From cbaaee657ae09ece2ed85b0ad86683422c232981 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Tue, 2 May 2023 17:56:29 +0300 Subject: [PATCH] UI: Fixed error review in send notification --- .../notification/sent/sent-notification-dialog.componet.ts | 3 --- .../home/pages/notification/template/template-configuration.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts index 3d8857694b..b85a891e4e 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts @@ -72,9 +72,6 @@ export class SentNotificationDialogComponent extends notificationRequestForm: FormGroup; - notificationDeliveryMethods = Object.keys(NotificationDeliveryMethod) as NotificationDeliveryMethod[]; - notificationDeliveryMethodTranslateMap = NotificationDeliveryMethodTranslateMap; - selectedIndex = 0; preview: NotificationRequestPreview = null; diff --git a/ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts b/ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts index 79612a8592..e894c62631 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts @@ -190,7 +190,7 @@ export abstract class TemplateConfiguration extends DialogComponent< protected getNotificationTemplateValue(): NotificationTemplate { const template: NotificationTemplate = deepClone(this.templateNotificationForm.value); this.notificationDeliveryMethods.forEach(method => { - if (template.configuration.deliveryMethodsTemplates[method].enabled) { + if (template.configuration.deliveryMethodsTemplates[method]?.enabled) { Object.assign(template.configuration.deliveryMethodsTemplates[method], this.deliveryMethodFormsMap.get(method).value, {method}); } else { delete template.configuration.deliveryMethodsTemplates[method];