Admin Dataset editor guard fix.
This commit is contained in:
parent
0780c629c9
commit
52c26cd864
|
@ -87,10 +87,10 @@
|
||||||
{{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}
|
{{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button mat-button class="navigate-btn ml-3"
|
<button mat-button class="navigate-btn ml-3"
|
||||||
[@next_btn]
|
[@next_btn]
|
||||||
(click)="validateStep(stepper.selectedIndex);stepper.next();"
|
(click)="validateStep(stepper.selectedIndex);stepper.next();"
|
||||||
*ngIf="stepper.selectedIndex != (steps.length-1)"
|
*ngIf="stepper.selectedIndex != (steps.length-1)"
|
||||||
[ngClass]="{'navigate-btn-disabled': !isStepCompleted(stepper.selectedIndex)}">
|
[ngClass]="{'navigate-btn-disabled': !isStepCompleted(stepper.selectedIndex)}">
|
||||||
|
|
||||||
<mat-icon style="font-size: 1.66em;">navigate_next</mat-icon>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}
|
<mat-icon style="font-size: 1.66em;">navigate_next</mat-icon>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -471,6 +471,7 @@ export class DatasetProfileEditorComponent extends CheckDeactivateBaseComponent
|
||||||
this.datasetProfileService.updateForm(this.datasetProfileId, this.form.getRawValue())
|
this.datasetProfileService.updateForm(this.datasetProfileId, this.form.getRawValue())
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
|
this.form.markAsPristine();//deactivate guard
|
||||||
this.router.navigate(['/dataset-profiles']);
|
this.router.navigate(['/dataset-profiles']);
|
||||||
this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-PROFILE-EDITOR.FEEDBACK-MESSAGES.SAVE-SUCCESS'), SnackBarNotificationLevel.Success)
|
this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-PROFILE-EDITOR.FEEDBACK-MESSAGES.SAVE-SUCCESS'), SnackBarNotificationLevel.Success)
|
||||||
},error=>this.onCallbackError(error));
|
},error=>this.onCallbackError(error));
|
||||||
|
|
Loading…
Reference in New Issue