Browse Source

Fixed notification rules page not working when rule saved without additional config

pull/8951/head
rusikv 3 years ago
parent
commit
bebd5021ee
  1. 2
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts
  2. 2
      ui-ngx/src/app/shared/models/notification.models.ts

2
ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts

@ -81,7 +81,7 @@ export class RuleTableConfigResolver implements Resolve<EntityTableConfig<Notifi
(rule) => this.translate.instant(TriggerTypeTranslationMap.get(rule.triggerType)) || '',
() => ({}), true),
new EntityTableColumn<NotificationRule>('additionalConfig.description', 'notification.description', '30%',
(target) => target.additionalConfig.description || '',
(target) => target.additionalConfig?.description || '',
() => ({}), false)
);
}

2
ui-ngx/src/app/shared/models/notification.models.ts

@ -116,7 +116,7 @@ export interface NotificationRule extends Omit<BaseData<NotificationRuleId>, 'la
triggerType: TriggerType;
triggerConfig: NotificationRuleTriggerConfig;
recipientsConfig: NotificationRuleRecipientConfig;
additionalConfig: {description: string};
additionalConfig?: {description: string};
}
export type NotificationRuleTriggerConfig = Partial<AlarmNotificationRuleTriggerConfig & DeviceInactivityNotificationRuleTriggerConfig &

Loading…
Cancel
Save