|
|
|
@ -28,7 +28,8 @@ |
|
|
|
</mat-progress-bar> |
|
|
|
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> |
|
|
|
<div mat-dialog-content> |
|
|
|
<mat-horizontal-stepper [linear]="true" #createNotification |
|
|
|
<mat-horizontal-stepper linear #createNotification |
|
|
|
[labelPosition]="(stepperLabelPosition | async)" |
|
|
|
[orientation]="(stepperOrientation | async)" |
|
|
|
(selectionChange)="changeStep($event)"> |
|
|
|
<ng-template matStepperIcon="edit"> |
|
|
|
@ -55,22 +56,6 @@ |
|
|
|
<ng-template #scratchTemplate> |
|
|
|
<section formGroupName="template"> |
|
|
|
<section formGroupName="configuration"> |
|
|
|
<mat-form-field class="mat-block" subscriptSizing="dynamic"> |
|
|
|
<mat-label translate>notification.subject</mat-label> |
|
|
|
<input matInput formControlName="notificationSubject" required> |
|
|
|
<mat-error *ngIf="notificationRequestForm.get('template.configuration.notificationSubject').hasError('required')"> |
|
|
|
{{ 'notification.subject-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-hint>{{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }}</mat-hint> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block tb-form-fields" subscriptSizing="dynamic"> |
|
|
|
<mat-label translate>notification.message</mat-label> |
|
|
|
<input matInput formControlName="defaultTextTemplate" required> |
|
|
|
<mat-error *ngIf="notificationRequestForm.get('template.configuration.defaultTextTemplate').hasError('required')"> |
|
|
|
{{ 'notification.message-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-hint>{{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }}</mat-hint> |
|
|
|
</mat-form-field> |
|
|
|
<label class="tb-title tb-required" |
|
|
|
[ngClass]="{'tb-error': notificationRequestForm.get('template.configuration.deliveryMethodsTemplates').hasError('atLeastOne')}"> |
|
|
|
{{ "notification.delivery-methods" | translate }} |
|
|
|
@ -127,19 +112,24 @@ |
|
|
|
{{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }} |
|
|
|
</div> |
|
|
|
<form [formGroup]="webTemplateForm"> |
|
|
|
<mat-form-field class="mat-block" floatLabel="always"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>notification.subject</mat-label> |
|
|
|
<input matInput formControlName="subject" [placeholder]="notificationRequestForm.get('template.configuration.notificationSubject').value"> |
|
|
|
<input matInput formControlName="subject"> |
|
|
|
<mat-error *ngIf="webTemplateForm.get('subject').hasError('required')"> |
|
|
|
{{ 'notification.subject-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block" floatLabel="always"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>notification.message</mat-label> |
|
|
|
<textarea matInput |
|
|
|
cdkTextareaAutosize |
|
|
|
cols="1" |
|
|
|
cdkAutosizeMinRows="1" |
|
|
|
formControlName="body" |
|
|
|
[placeholder]="notificationRequestForm.get('template.configuration.defaultTextTemplate').value"> |
|
|
|
formControlName="body"> |
|
|
|
</textarea> |
|
|
|
<mat-error *ngIf="webTemplateForm.get('body').hasError('required')"> |
|
|
|
{{ 'notification.message-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<section formGroupName="additionalConfig"> |
|
|
|
<section formGroupName="icon" class="additional-config-group"> |
|
|
|
@ -215,9 +205,12 @@ |
|
|
|
{{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }} |
|
|
|
</div> |
|
|
|
<form [formGroup]="emailTemplateForm"> |
|
|
|
<mat-form-field class="mat-block" floatLabel="always"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>notification.subject</mat-label> |
|
|
|
<input matInput formControlName="subject" [placeholder]="notificationRequestForm.get('template.configuration.notificationSubject').value"> |
|
|
|
<input matInput formControlName="subject"> |
|
|
|
<mat-error *ngIf="emailTemplateForm.get('subject').hasError('required')"> |
|
|
|
{{ 'notification.subject-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-label class="tb-title" translate>notification.message</mat-label> |
|
|
|
<editor [init]="tinyMceOptions" formControlName="body"></editor> |
|
|
|
@ -232,15 +225,17 @@ |
|
|
|
{{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }} |
|
|
|
</div> |
|
|
|
<form [formGroup]="smsTemplateForm"> |
|
|
|
<mat-form-field class="mat-block" floatLabel="always"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>notification.message</mat-label> |
|
|
|
<textarea matInput |
|
|
|
cdkTextareaAutosize |
|
|
|
cols="1" |
|
|
|
cdkAutosizeMinRows="1" |
|
|
|
formControlName="body" |
|
|
|
[placeholder]="notificationRequestForm.get('template.configuration.defaultTextTemplate').value"> |
|
|
|
formControlName="body"> |
|
|
|
</textarea> |
|
|
|
<mat-error *ngIf="smsTemplateForm.get('body').hasError('required')"> |
|
|
|
{{ 'notification.message-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</form> |
|
|
|
</mat-step> |
|
|
|
@ -252,15 +247,17 @@ |
|
|
|
{{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }} |
|
|
|
</div> |
|
|
|
<form [formGroup]="slackTemplateForm" fxLayoutGap="8px"> |
|
|
|
<mat-form-field class="mat-block" floatLabel="always"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>notification.message</mat-label> |
|
|
|
<textarea matInput |
|
|
|
cdkTextareaAutosize |
|
|
|
cols="1" |
|
|
|
cdkAutosizeMinRows="1" |
|
|
|
formControlName="body" |
|
|
|
[placeholder]="notificationRequestForm.get('template.configuration.defaultTextTemplate').value"> |
|
|
|
formControlName="body"> |
|
|
|
</textarea> |
|
|
|
<mat-error *ngIf="slackTemplateForm.get('body').hasError('required')"> |
|
|
|
{{ 'notification.message-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</form> |
|
|
|
</mat-step> |
|
|
|
|