Browse Source
Merge pull request #8951 from rusikv/bug/notification-rule-optional-additional-config
Fix for notification rules page
pull/8968/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts
-
ui-ngx/src/app/shared/models/notification.models.ts
|
|
@ -81,7 +81,7 @@ export class RuleTableConfigResolver implements Resolve<EntityTableConfig<Notifi |
|
|
(rule) => this.translate.instant(TriggerTypeTranslationMap.get(rule.triggerType)) || '', |
|
|
(rule) => this.translate.instant(TriggerTypeTranslationMap.get(rule.triggerType)) || '', |
|
|
() => ({}), true), |
|
|
() => ({}), true), |
|
|
new EntityTableColumn<NotificationRule>('additionalConfig.description', 'notification.description', '30%', |
|
|
new EntityTableColumn<NotificationRule>('additionalConfig.description', 'notification.description', '30%', |
|
|
(target) => target.additionalConfig.description || '', |
|
|
(target) => target.additionalConfig?.description || '', |
|
|
() => ({}), false) |
|
|
() => ({}), false) |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
@ -116,7 +116,7 @@ export interface NotificationRule extends Omit<BaseData<NotificationRuleId>, 'la |
|
|
triggerType: TriggerType; |
|
|
triggerType: TriggerType; |
|
|
triggerConfig: NotificationRuleTriggerConfig; |
|
|
triggerConfig: NotificationRuleTriggerConfig; |
|
|
recipientsConfig: NotificationRuleRecipientConfig; |
|
|
recipientsConfig: NotificationRuleRecipientConfig; |
|
|
additionalConfig: {description: string}; |
|
|
additionalConfig?: {description: string}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export type NotificationRuleTriggerConfig = Partial<AlarmNotificationRuleTriggerConfig & DeviceInactivityNotificationRuleTriggerConfig & |
|
|
export type NotificationRuleTriggerConfig = Partial<AlarmNotificationRuleTriggerConfig & DeviceInactivityNotificationRuleTriggerConfig & |
|
|
|