Fixes bug on dataset copy functionality
This commit is contained in:
parent
e3e83bfc4d
commit
accdc06ab1
|
@ -154,8 +154,9 @@ export class DraftsComponent extends BaseComponent implements OnInit {
|
|||
.subscribe(result => {
|
||||
if (result && result.datasetProfileExist) {
|
||||
const newDmpId = result.formControl.value.id;
|
||||
let url = this.router.createUrlTree(['/datasets/copy/', result.datasetId, { newDmpId: newDmpId } ]);
|
||||
window.open(url.toString(), '_blank');
|
||||
this.router.navigate(['/datasets/copy/' + result.datasetId], { queryParams: { newDmpId: newDmpId } });
|
||||
// let url = this.router.createUrlTree(['/datasets/copy/', result.datasetId, { newDmpId: newDmpId } ]);
|
||||
// window.open(url.toString(), '_blank');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -539,9 +539,9 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
|
|||
.subscribe(result => {
|
||||
if (result && result.datasetProfileExist) {
|
||||
const newDmpId = result.formControl.value.id;
|
||||
let url = this.router.createUrlTree(['/datasets/copy/', result.datasetId, { newDmpId: newDmpId }]);
|
||||
window.open(url.toString(), '_blank');
|
||||
// this.router.navigate(['/datasets/copy/' + result.datasetId], { queryParams: { newDmpId: newDmpId } });
|
||||
// let url = this.router.createUrlTree(['/datasets/copy/', result.datasetId, { newDmpId: newDmpId }]);
|
||||
// window.open(url.toString(), '_blank');
|
||||
this.router.navigate(['/datasets/copy/' + result.datasetId], { queryParams: { newDmpId: newDmpId } });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -207,8 +207,9 @@ export class RecentEditedDatasetActivityComponent extends BaseComponent implemen
|
|||
.subscribe(result => {
|
||||
if (result && result.datasetProfileExist) {
|
||||
const newDmpId = result.formControl.value.id;
|
||||
let url = this.router.createUrlTree(['/datasets/copy/', result.datasetId, { newDmpId: newDmpId }]);
|
||||
window.open(url.toString(), '_blank');
|
||||
this.router.navigate(['/datasets/copy/' + result.datasetId], { queryParams: { newDmpId: newDmpId } });
|
||||
// let url = this.router.createUrlTree(['/datasets/copy/', result.datasetId, { newDmpId: newDmpId }]);
|
||||
// window.open(url.toString(), '_blank');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<!-- <mat-error *ngIf="data.formControl.hasError('incorrect')">{{getErrorMessage()}}</mat-error> -->
|
||||
</div>
|
||||
<div mat-dialog-actions class="row">
|
||||
<div class="col-auto ml-auto"><button mat-raised-button type="button" (click)="cancel()">{{ data.cancelButton }}</button></div>
|
||||
<div class="col-auto"><button mat-raised-button color="primary" type="button" (click)="confirm()">{{ data.confirmButton }}</button></div>
|
||||
<div class="col-auto ml-auto"><button mat-button class="cancel-btn" type="button" (click)="cancel()">{{ data.cancelButton }}</button></div>
|
||||
<div class="col-auto"><button mat-button class="confirm-btn" type="button" (click)="confirm()">{{ data.confirmButton }}</button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,32 @@
|
|||
.confirmation-message {
|
||||
padding-bottom: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dataset-copy-dialog {
|
||||
margin-bottom: 1.125rem;
|
||||
margin-bottom: 1.125rem;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
background: #ffffff 0% 0% no-repeat padding-box;
|
||||
border: 1px solid #b5b5b5;
|
||||
border-radius: 30px;
|
||||
width: 101px;
|
||||
height: 43px;
|
||||
color: #212121;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
background: #ffffff 0% 0% no-repeat padding-box;
|
||||
border: 1px solid #129d99;
|
||||
border-radius: 30px;
|
||||
opacity: 1;
|
||||
width: 101px;
|
||||
height: 43px;
|
||||
color: #129d99;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
|
|
@ -169,8 +169,9 @@ export class DatasetListingItemComponent extends BaseComponent implements OnInit
|
|||
.subscribe(result => {
|
||||
if (result && result.datasetProfileExist) {
|
||||
const newDmpId = result.formControl.value.id;
|
||||
let url = this.router.createUrlTree(['/datasets/copy/', result.datasetId, { newDmpId: newDmpId }]);
|
||||
window.open(url.toString(), '_blank');
|
||||
this.router.navigate(['/datasets/copy/' + result.datasetId], { queryParams: { newDmpId: newDmpId } });
|
||||
// let url = this.router.createUrlTree(['/datasets/copy/', result.datasetId, { newDmpId: newDmpId }]);
|
||||
// window.open(url.toString(), '_blank');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -393,9 +393,10 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
|
|||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed))
|
||||
.subscribe(result => {
|
||||
if (result && result.datasetProfileExist) {
|
||||
const newDmpId = result.formControl.value.id
|
||||
let url = this.router.createUrlTree(['/datasets/copy/', result.datasetId, { newDmpId: newDmpId }])
|
||||
window.open(url.toString(), '_blank')
|
||||
const newDmpId = result.formControl.value.id;
|
||||
this.router.navigate(['/datasets/copy/' + result.datasetId], { queryParams: { newDmpId: newDmpId } });
|
||||
// let url = this.router.createUrlTree(['/datasets/copy/', result.datasetId, { newDmpId: newDmpId }])
|
||||
// window.open(url.toString(), '_blank')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue