Merge branch 'ui-redesign' of https://gitlab.eudat.eu/dmp/OpenAIRE-EUDAT-DMP-service-pilot.git into ui-redesign
This commit is contained in:
commit
b64f6e98fe
|
@ -66,8 +66,8 @@ export class DmpService {
|
|||
return this.http.get<DmpModel>(this.actionUrl + id + '/unlock', { headers: this.headers });
|
||||
}
|
||||
|
||||
createDmp(dataManagementPlanModel: DmpModel): Observable<String> {
|
||||
return this.http.post<String>(this.actionUrl, dataManagementPlanModel, { headers: this.headers });
|
||||
createDmp(dataManagementPlanModel: DmpModel): Observable<DmpModel> {
|
||||
return this.http.post<DmpModel>(this.actionUrl, dataManagementPlanModel, { headers: this.headers });
|
||||
}
|
||||
|
||||
createDmpWithDatasets(dataManagementPlanModel: DmpModel): Observable<String> {
|
||||
|
|
|
@ -477,10 +477,10 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
|||
);
|
||||
}
|
||||
|
||||
onCallbackSuccess(id?: String, datasetId?: string): void {
|
||||
onCallbackSuccess(dmp?: DmpModel, datasetId?: string): void {
|
||||
this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
|
||||
if (id != null) {
|
||||
datasetId ? this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans', 'edit', id], { queryParams: { dataset: datasetId } }); }) : this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans', 'edit', id]); })
|
||||
if (dmp.id != null) {
|
||||
datasetId ? this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans', 'edit', dmp.id], { queryParams: { dataset: datasetId } }); }) : this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans', 'edit', dmp.id]); })
|
||||
} else {
|
||||
this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans']); });
|
||||
}
|
||||
|
@ -492,9 +492,9 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
|||
//this.validateAllFormFields(this.formGroup);
|
||||
}
|
||||
|
||||
onCallbackSuccessAddNew(id?: String) {
|
||||
onCallbackSuccessAddNew(dmp?: DmpModel) {
|
||||
// this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
|
||||
this.router.navigate(['/datasets', 'new', id]);
|
||||
this.router.navigate(['/datasets', 'new', dmp.id]);
|
||||
}
|
||||
|
||||
public setErrorModel(validationErrorModel: ValidationErrorModel) {
|
||||
|
@ -704,7 +704,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
|||
return this.formGroup.get('profiles') && this.formGroup.get('profiles').value && this.formGroup.get('profiles').value.length > 0;
|
||||
}
|
||||
|
||||
addDatasetOpenDialog(id: String) {
|
||||
addDatasetOpenDialog(dmp: DmpModel) {
|
||||
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||
maxWidth: '500px',
|
||||
restoreFocus: false,
|
||||
|
@ -721,7 +721,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
|||
// this.router.navigate(['datasets/new/' + id]);
|
||||
this.addDataset();
|
||||
} else {
|
||||
id != null ? this.router.navigate(['/plans', 'edit', id]) : this.router.navigate(['/plans']);
|
||||
dmp.id != null ? this.router.navigate(['/plans', 'edit', dmp.id]) : this.router.navigate(['/plans']);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue