Browse Source

UI: Fixed error review in send notification

pull/8470/head
Vladyslav_Prykhodko 3 years ago
parent
commit
cbaaee657a
  1. 3
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts
  2. 2
      ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts

3
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;

2
ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts

@ -190,7 +190,7 @@ export abstract class TemplateConfiguration<T, R = any> 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];

Loading…
Cancel
Save