|
|
|
@ -100,6 +100,23 @@ |
|
|
|
{{ 'notification.create-new' | translate }} |
|
|
|
</button> |
|
|
|
</tb-entity-list> |
|
|
|
<section formGroupName="additionalConfig" class="additional-config-group"> |
|
|
|
<mat-slide-toggle formControlName="enabled" class="toggle"> |
|
|
|
{{ 'notification.scheduler-later' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
<div *ngIf="notificationRequestForm.get('additionalConfig.enabled').value" fxLayout="column"> |
|
|
|
<tb-timezone-select userTimezoneByDefault |
|
|
|
required |
|
|
|
formControlName="timezone"> |
|
|
|
</tb-timezone-select> |
|
|
|
<mat-form-field> |
|
|
|
<mat-label translate>notification.time</mat-label> |
|
|
|
<mat-datetimepicker-toggle [for]="startTimePicker" matPrefix></mat-datetimepicker-toggle> |
|
|
|
<mat-datetimepicker #startTimePicker type="datetime" openOnFocus="true"></mat-datetimepicker> |
|
|
|
<input required matInput fxFlex formControlName="time" [min]="minDate()" [max]="maxDate()" [matDatetimepicker]="startTimePicker"> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
</form> |
|
|
|
</mat-step> |
|
|
|
<mat-step optional *ngIf="!notificationRequestForm.get('useTemplate').value && |
|
|
|
@ -222,21 +239,50 @@ |
|
|
|
</mat-form-field> |
|
|
|
</form> |
|
|
|
</mat-step> |
|
|
|
<mat-step [stepControl]="notificationRequestAdditionalConfigForm"> |
|
|
|
<mat-step> |
|
|
|
<ng-template matStepLabel>{{ 'notification.review' | translate }}</ng-template> |
|
|
|
<mat-progress-spinner color="warn" mode="indeterminate" |
|
|
|
strokeWidth="5" *ngIf="(isLoading$ | async) && !preview"> |
|
|
|
</mat-progress-spinner> |
|
|
|
<div *ngIf="preview" style="padding-bottom: 16px"> |
|
|
|
<section class="preview-group notification" *ngIf="preview.processedTemplates.PUSH.enabled"> |
|
|
|
<section class="preview-group notification" *ngIf="preview.processedTemplates.PUSH?.enabled"> |
|
|
|
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> |
|
|
|
<mat-icon svgIcon="mdi:bell-badge"></mat-icon> |
|
|
|
<div class="group-title">Web notification preview</div> |
|
|
|
<div class="group-title" translate>notification.delivery-method-type.push-preview</div> |
|
|
|
</div> |
|
|
|
<div class="web-preview"> |
|
|
|
<tb-notification preview [notification]="preview.processedTemplates.PUSH"></tb-notification> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<section class="preview-group notification" *ngIf="preview.processedTemplates.EMAIL?.enabled"> |
|
|
|
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> |
|
|
|
<mat-icon svgIcon="mdi:email"></mat-icon> |
|
|
|
<div class="group-title" translate>notification.delivery-method-type.email-preview</div> |
|
|
|
</div> |
|
|
|
<div class="notification-content"> |
|
|
|
<div class="subject">{{ preview.processedTemplates.EMAIL.subject }}</div> |
|
|
|
<mat-divider></mat-divider> |
|
|
|
<div class="html-content" [innerHTML]="(preview.processedTemplates.EMAIL.body | safe: 'html')"></div> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<section class="preview-group notification" *ngIf="preview.processedTemplates.SMS?.enabled"> |
|
|
|
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> |
|
|
|
<mat-icon svgIcon="mdi:message-processing"></mat-icon> |
|
|
|
<div class="group-title" translate>notification.delivery-method-type.sms-preview</div> |
|
|
|
</div> |
|
|
|
<div class="notification-content"> |
|
|
|
{{ preview.processedTemplates.SMS.body }} |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<section class="preview-group notification" *ngIf="preview.processedTemplates.SLACK?.enabled"> |
|
|
|
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> |
|
|
|
<mat-icon svgIcon="mdi:slack"></mat-icon> |
|
|
|
<div class="group-title" translate>notification.delivery-method-type.slack-preview</div> |
|
|
|
</div> |
|
|
|
<div class="notification-content"> |
|
|
|
{{ preview.processedTemplates.SLACK.body }} |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<section class="preview-group"> |
|
|
|
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> |
|
|
|
<mat-icon>supervisor_account</mat-icon> |
|
|
|
@ -248,23 +294,6 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<form [formGroup]="notificationRequestAdditionalConfigForm" class="additional-config-group"> |
|
|
|
<mat-slide-toggle formControlName="enabled" class="toggle"> |
|
|
|
{{ 'notification.scheduler-later' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
<div *ngIf="notificationRequestAdditionalConfigForm.get('enabled').value" fxLayout="column"> |
|
|
|
<tb-timezone-select userTimezoneByDefault |
|
|
|
required |
|
|
|
formControlName="timezone"> |
|
|
|
</tb-timezone-select> |
|
|
|
<mat-form-field> |
|
|
|
<mat-label translate>notification.time</mat-label> |
|
|
|
<mat-datetimepicker-toggle [for]="startTimePicker" matPrefix></mat-datetimepicker-toggle> |
|
|
|
<mat-datetimepicker #startTimePicker type="datetime" openOnFocus="true"></mat-datetimepicker> |
|
|
|
<input required matInput fxFlex formControlName="time" [min]="minDate()" [max]="maxDate()" [matDatetimepicker]="startTimePicker"> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</mat-step> |
|
|
|
</mat-horizontal-stepper> |
|
|
|
|