From 52c26cd864a8fd3e3368c6f03197141792116450 Mon Sep 17 00:00:00 2001 From: Kristan Ntavidi Date: Thu, 9 Sep 2021 09:09:27 +0300 Subject: [PATCH] Admin Dataset editor guard fix. --- .../editor/dataset-profile-editor.component.html | 8 ++++---- .../editor/dataset-profile-editor.component.ts | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html index c3ea08d9d..2d7e781b5 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html @@ -87,10 +87,10 @@ {{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}} diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts index 951c168ad..dbffd42a5 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts @@ -471,6 +471,7 @@ export class DatasetProfileEditorComponent extends CheckDeactivateBaseComponent this.datasetProfileService.updateForm(this.datasetProfileId, this.form.getRawValue()) .pipe(takeUntil(this._destroyed)) .subscribe(() => { + this.form.markAsPristine();//deactivate guard this.router.navigate(['/dataset-profiles']); this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-PROFILE-EDITOR.FEEDBACK-MESSAGES.SAVE-SUCCESS'), SnackBarNotificationLevel.Success) },error=>this.onCallbackError(error));