From be6af239401647f5c70366ef6ab0f51a1cc82808 Mon Sep 17 00:00:00 2001 From: amentis Date: Fri, 10 May 2024 12:18:32 +0300 Subject: [PATCH] description template type editor always navigate to listing after save --- .../editor/description-template-type-editor.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/description-types/editor/description-template-type-editor.component.ts b/dmp-frontend/src/app/ui/admin/description-types/editor/description-template-type-editor.component.ts index 263030156..37ffd7742 100644 --- a/dmp-frontend/src/app/ui/admin/description-types/editor/description-template-type-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/description-types/editor/description-template-type-editor.component.ts @@ -150,7 +150,11 @@ export class DescriptionTemplateTypeEditorComponent extends BaseEditor onSuccess ? onSuccess(complete) : this.onCallbackSuccess(complete), + // for each state navigate to listing page + complete => { + this.formGroup = null; + this.router.navigate(['description-template-type']) + }, error => this.onCallbackError(error) ); } @@ -218,7 +222,7 @@ export class DescriptionTemplateTypeEditorComponent extends BaseEditor { if (result) { this.formGroup.get('status').setValue(DescriptionTemplateTypeStatus.Finalized); - this.persistEntity(); + this.formSubmit(); }}); } }