From db1eb1682f291c380fb66d6a44b06bd563315cb5 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Mon, 28 Jul 2025 17:24:37 +0300 Subject: [PATCH] UI: Fixed edit and improve create new --- .../template/template-notification-dialog.component.ts | 4 ++++ .../notification/template-autocomplete.component.html | 5 ++++- .../notification/template-autocomplete.component.ts | 10 ++++++++++ ui-ngx/src/assets/locale/locale.constant-en_US.json | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts index 98595de798..0f13409a3e 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts @@ -40,6 +40,7 @@ export interface TemplateNotificationDialogData { predefinedType?: NotificationType; isAdd?: boolean; isCopy?: boolean; + name?: string; } @Component({ @@ -85,6 +86,9 @@ export class TemplateNotificationDialogComponent this.hideSelectType = true; this.templateNotificationForm.get('notificationType').setValue(this.data.predefinedType, {emitEvent: false}); } + if (isDefinedAndNotNull(this.data?.name)) { + this.templateNotificationForm.get('name').setValue(this.data.name, {emitEvent: false}); + } if (data.isAdd || data.isCopy) { this.dialogTitle = 'notification.add-notification-template'; diff --git a/ui-ngx/src/app/shared/components/notification/template-autocomplete.component.html b/ui-ngx/src/app/shared/components/notification/template-autocomplete.component.html index d5e67a1f60..446dc18e34 100644 --- a/ui-ngx/src/app/shared/components/notification/template-autocomplete.component.html +++ b/ui-ngx/src/app/shared/components/notification/template-autocomplete.component.html @@ -29,7 +29,7 @@ (click)="clear()"> close -