UI: Add notification subject and message limits characters
This commit is contained in:
parent
7b34dbe204
commit
dca8f9e5e1
@ -97,6 +97,11 @@
|
|||||||
<mat-error *ngIf="templateConfigurationForm.get('MOBILE_APP.subject').hasError('required')">
|
<mat-error *ngIf="templateConfigurationForm.get('MOBILE_APP.subject').hasError('required')">
|
||||||
{{ 'notification.subject-required' | translate }}
|
{{ 'notification.subject-required' | translate }}
|
||||||
</mat-error>
|
</mat-error>
|
||||||
|
<mat-error *ngIf="templateConfigurationForm.get('MOBILE_APP.subject').hasError('maxlength')">
|
||||||
|
{{ 'notification.subject-max-length' | translate :
|
||||||
|
{length: templateConfigurationForm.get('MOBILE_APP.subject').getError('maxlength').requiredLength}
|
||||||
|
}}
|
||||||
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field class="mat-block">
|
<mat-form-field class="mat-block">
|
||||||
<mat-label translate>notification.message</mat-label>
|
<mat-label translate>notification.message</mat-label>
|
||||||
@ -109,6 +114,11 @@
|
|||||||
<mat-error *ngIf="templateConfigurationForm.get('MOBILE_APP.body').hasError('required')">
|
<mat-error *ngIf="templateConfigurationForm.get('MOBILE_APP.body').hasError('required')">
|
||||||
{{ 'notification.message-required' | translate }}
|
{{ 'notification.message-required' | translate }}
|
||||||
</mat-error>
|
</mat-error>
|
||||||
|
<mat-error *ngIf="templateConfigurationForm.get('MOBILE_APP.body').hasError('maxlength')">
|
||||||
|
{{ 'notification.message-max-length' | translate :
|
||||||
|
{length: templateConfigurationForm.get('MOBILE_APP.body').getError('maxlength').requiredLength}
|
||||||
|
}}
|
||||||
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<div formGroupName="additionalConfig">
|
<div formGroupName="additionalConfig">
|
||||||
<tb-notification-action-button-configuration
|
<tb-notification-action-button-configuration
|
||||||
|
|||||||
@ -210,8 +210,8 @@ export class NotificationTemplateConfigurationComponent implements OnDestroy, Co
|
|||||||
break;
|
break;
|
||||||
case NotificationDeliveryMethod.MOBILE_APP:
|
case NotificationDeliveryMethod.MOBILE_APP:
|
||||||
deliveryMethodForm = this.fb.group({
|
deliveryMethodForm = this.fb.group({
|
||||||
subject: ['', Validators.required],
|
subject: ['', [Validators.required, Validators.maxLength(50)]],
|
||||||
body: ['', Validators.required],
|
body: ['', [Validators.required, Validators.maxLength(150)]],
|
||||||
additionalConfig: this.fb.group({
|
additionalConfig: this.fb.group({
|
||||||
onClick: [null]
|
onClick: [null]
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3420,6 +3420,7 @@
|
|||||||
"stop-escalation-alarm-status-become": "Stop the escalation on the alarm status become:",
|
"stop-escalation-alarm-status-become": "Stop the escalation on the alarm status become:",
|
||||||
"subject": "Subject",
|
"subject": "Subject",
|
||||||
"subject-required": "Subject is required",
|
"subject-required": "Subject is required",
|
||||||
|
"subject-max-length": "Subject should be less than or equal to {{ length }} characters",
|
||||||
"template": "Template",
|
"template": "Template",
|
||||||
"template-name": "Template name",
|
"template-name": "Template name",
|
||||||
"template-required": "Template is required",
|
"template-required": "Template is required",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user