diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/section-editor-model.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/section-editor-model.ts index 32eefaa3b..8edc81899 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/section-editor-model.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/section-editor-model.ts @@ -31,7 +31,7 @@ export class SectionEditorModel extends BaseFormModel { page: [{ value: this.page, disabled: (disabled && !skipDisable.includes('SectionEditorModel.page')) }, [Validators.required]], title: [{ value: this.title, disabled: (disabled && !skipDisable.includes('SectionEditorModel.title')) }], description: [{ value: this.description, disabled: (disabled && !skipDisable.includes('SectionEditorModel.description')) }], - ordinal: [{ value: this.ordinal, disabled: (disabled && !skipDisable.includes('SectionEditorModel.ordinal')) }], + ordinal: [{ value: this.ordinal, disabled: (disabled && !skipDisable.includes('SectionEditorModel.ordinal')) }, [Validators.required]], defaultVisibility: [{ value: this.defaultVisibility, disabled: (disabled && !skipDisable.includes('SectionEditorModel.defaultVisibility')) }] }); const sectionsFormArray = new Array(); diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts index 38ab8e72d..3f673d43d 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts @@ -629,14 +629,21 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr }); } +<<<<<<< HEAD onCallbackSuccess(data?: DatasetWizardModel, saveType?: SaveType): 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 (data.id) { +======= + onCallbackSuccess(data?: DatasetWizardEditorModel, saveType?: SaveType): 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 (data) { +>>>>>>> c391cd5521858e9623d695ae9630295df416bf86 if (saveType === this.saveAnd.addNew) { this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'new', this.formGroup.get('dmp').value.id]); }) } else if (saveType === this.saveAnd.close) { this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans', 'edit', this.formGroup.get('dmp').value.id]); }); } else { +<<<<<<< HEAD this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data); this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue())); this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft; @@ -660,6 +667,9 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr }, 500); // this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', data.id]); }); +======= + this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', data.id]); }); +>>>>>>> c391cd5521858e9623d695ae9630295df416bf86 } } else { this.router.navigate(['/datasets']);