From f755744a5eace1120f7c1e055e7ad88535c5ea50 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Wed, 2 Oct 2019 14:11:19 +0300 Subject: [PATCH] Minor change on show dialog condition when leaving wizard pages before submit. --- .../dataset-create-wizard/dataset-create-wizard.component.ts | 3 +-- .../quick-wizard-editor/quick-wizard-editor.component.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dmp-frontend/src/app/ui/dataset-create-wizard/dataset-create-wizard.component.ts b/dmp-frontend/src/app/ui/dataset-create-wizard/dataset-create-wizard.component.ts index 8a233b321..cfa7614b2 100644 --- a/dmp-frontend/src/app/ui/dataset-create-wizard/dataset-create-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset-create-wizard/dataset-create-wizard.component.ts @@ -73,7 +73,6 @@ export class DatasetCreateWizard extends CheckDeactivateBaseComponent implements .subscribe( complete => this.onCallbackSuccess(dmpId) ); - this.isSubmitted = true; } else { return; } @@ -133,7 +132,6 @@ export class DatasetCreateWizard extends CheckDeactivateBaseComponent implements .subscribe( complete => this.onCallbackSuccess(dmpId) ); - this.isSubmitted = true; } hasDatasets() { @@ -149,6 +147,7 @@ export class DatasetCreateWizard extends CheckDeactivateBaseComponent implements } onCallbackSuccess(dmpId: string): void { + this.isSubmitted = true; 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(['/plans/overview/' + dmpId]); } diff --git a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts index 8c755bb9d..0890149e8 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts +++ b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts @@ -158,7 +158,6 @@ export class QuickWizardEditorComponent extends CheckDeactivateBaseComponent imp complete => this.onCallbackSuccess(), error => this.onCallbackError(error) ); - this.isSubmitted = true; } onSubmitSave(): void { @@ -180,12 +179,12 @@ export class QuickWizardEditorComponent extends CheckDeactivateBaseComponent imp .subscribe( complete => this.onCallbackSuccess() ) - this.isSubmitted = true; } }); } onCallbackSuccess(): void { + this.isSubmitted = true; 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(['/home']); }