# Conflicts:
#	dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts
This commit is contained in:
apapachristou 2020-11-02 18:11:19 +02:00
commit d0d98bc520
2 changed files with 11 additions and 1 deletions

View File

@ -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<FormGroup>();

View File

@ -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']);