front changes to match with changes on back-end previous commit
This commit is contained in:
parent
58ef4800c2
commit
716610e7c3
|
@ -66,8 +66,8 @@ export class DmpService {
|
||||||
return this.http.get<DmpModel>(this.actionUrl + id + '/unlock', { headers: this.headers });
|
return this.http.get<DmpModel>(this.actionUrl + id + '/unlock', { headers: this.headers });
|
||||||
}
|
}
|
||||||
|
|
||||||
createDmp(dataManagementPlanModel: DmpModel): Observable<String> {
|
createDmp(dataManagementPlanModel: DmpModel): Observable<DmpModel> {
|
||||||
return this.http.post<String>(this.actionUrl, dataManagementPlanModel, { headers: this.headers });
|
return this.http.post<DmpModel>(this.actionUrl, dataManagementPlanModel, { headers: this.headers });
|
||||||
}
|
}
|
||||||
|
|
||||||
createDmpWithDatasets(dataManagementPlanModel: DmpModel): Observable<String> {
|
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);
|
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) {
|
if (dmp.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]); })
|
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 {
|
} else {
|
||||||
this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans']); });
|
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);
|
//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.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) {
|
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;
|
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, {
|
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||||
maxWidth: '500px',
|
maxWidth: '500px',
|
||||||
restoreFocus: false,
|
restoreFocus: false,
|
||||||
|
@ -721,7 +721,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
// this.router.navigate(['datasets/new/' + id]);
|
// this.router.navigate(['datasets/new/' + id]);
|
||||||
this.addDataset();
|
this.addDataset();
|
||||||
} else {
|
} 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