From bebd5021ee35586726eb95a60d1236bf077b8c13 Mon Sep 17 00:00:00 2001 From: rusikv Date: Tue, 18 Jul 2023 12:24:49 +0300 Subject: [PATCH] Fixed notification rules page not working when rule saved without additional config --- .../home/pages/notification/rule/rule-table-config.resolver.ts | 2 +- ui-ngx/src/app/shared/models/notification.models.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts index 86f8120ae0..f547f997bd 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts @@ -81,7 +81,7 @@ export class RuleTableConfigResolver implements Resolve this.translate.instant(TriggerTypeTranslationMap.get(rule.triggerType)) || '', () => ({}), true), new EntityTableColumn('additionalConfig.description', 'notification.description', '30%', - (target) => target.additionalConfig.description || '', + (target) => target.additionalConfig?.description || '', () => ({}), false) ); } diff --git a/ui-ngx/src/app/shared/models/notification.models.ts b/ui-ngx/src/app/shared/models/notification.models.ts index 4d8a9cffcd..edafef4704 100644 --- a/ui-ngx/src/app/shared/models/notification.models.ts +++ b/ui-ngx/src/app/shared/models/notification.models.ts @@ -116,7 +116,7 @@ export interface NotificationRule extends Omit, 'la triggerType: TriggerType; triggerConfig: NotificationRuleTriggerConfig; recipientsConfig: NotificationRuleRecipientConfig; - additionalConfig: {description: string}; + additionalConfig?: {description: string}; } export type NotificationRuleTriggerConfig = Partial