notification template ui changes

This commit is contained in:
Sofia Papacharalampous 2024-04-16 16:06:28 +03:00
parent 0598067608
commit 6bb091868c
1 changed files with 254 additions and 206 deletions

View File

@ -29,7 +29,10 @@
<mat-card-title *ngIf="isNew">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.NEW' | translate}}</mat-card-title>
</mat-card-header>
<mat-card-content>
<div class="d-flex flex-wrap mt-4">
<div class="row mt-4">
<div class="col-12">
<div class="container">
<div class="row flex-wrap">
<div class="col-md-12">
<mat-form-field class="w-100">
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.NOTIFICATION-TYPE' | translate}}</mat-label>
@ -79,9 +82,15 @@
</mat-form-field>
</div>
</div>
</div>
</div>
</div>
<!-- Subject -->
<div class="d-flex flex-wrap">
<div class="row">
<div class="col-12">
<div class="container">
<div class="row flex-wrap">
<h3 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.SUBJECT-SECTION' | translate}}</h3>
<div class="col-md-6">
<mat-form-field class="w-100">
@ -100,9 +109,20 @@
</mat-form-field>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="container">
<div class="row">
<h4 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.SUBJECT-FIELD-OPTIONS' | translate}}
<mat-checkbox [checked]="subjectFieldOptionsEnabled" (change)="subjectFieldOptionsSelectionChanged($event)"></mat-checkbox>
</h4>
</div>
</div>
</div>
</div>
<ng-container *ngIf="subjectFieldOptionsEnabled == true">
<app-notification-template-field-options-component
[form]="formGroup.get('value').get('subjectFieldOptions')"
@ -114,7 +134,10 @@
</ng-container>
<!-- Body -->
<div>
<div class="row">
<div class="col-12">
<div class="container">
<div class="row">
<h3 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.BODY-SECTION' | translate}}</h3>
<div class="col-md-6">
<mat-form-field class="w-100">
@ -149,9 +172,20 @@
<mat-error *ngIf="formGroup.get('value').get('bodyText').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="container">
<div class="row">
<h4 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.BODY-FIELD-OPTIONS' | translate}}
<mat-checkbox [checked]="bodyFieldOptionsEnabled" (change)="bodyFieldOptionsSelectionChanged($event)"></mat-checkbox>
</h4>
</div>
</div>
</div>
</div>
<ng-container *ngIf="bodyFieldOptionsEnabled == true">
<app-notification-template-field-options-component
[form]="formGroup.get('value').get('bodyFieldOptions')"
@ -162,6 +196,9 @@
</app-notification-template-field-options-component>
</ng-container>
<!--Extra Options -->
<div class="row">
<div class="col-12">
<div class="container">
<div class="row">
<h3 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.EXTRA-OPTIONS' | translate}}</h3>
<div>
@ -170,16 +207,24 @@
<mat-error *ngIf="formGroup.get('value').get('allowAttachments').hasError('backendError')">{{formGroup.get('value').get('allowAttachments').getError('backendError').message}}</mat-error>
</h4>
</div>
<div class="col-4">
<mat-form-field class="col-md-12">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="container">
<div class="row">
<div class="col-12 col-lg-4">
<mat-form-field class="w-100">
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.PRIORITY-KEY' | translate}}</mat-label>
<input matInput [formControl]="formGroup.get('value').get('priorityKey')">
<mat-error *ngIf="formGroup.get('value').get('priorityKey').hasError('backendError')">{{formGroup.get('value').get('priorityKey').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('value').get('priorityKey').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
<div class="col-4" >
<mat-form-field class="chip-list">
<div class="col-12 col-lg-4">
<mat-form-field class="w-100 chip-list">
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.CC' | translate}}</mat-label>
<mat-chip-grid #cc [formControl]="formGroup.get('value').get('cc')">
<mat-chip-row *ngFor="let field of ccValues"
@ -200,8 +245,8 @@
<mat-error *ngIf="formGroup.get('value').get('cc').hasError('backendError')">{{formGroup.get('value').get('cc').getError('backendError').message}}</mat-error>
</mat-form-field>
</div>
<div class="col-4">
<mat-form-field class="col-auto">
<div class="col-12 col-lg-4">
<mat-form-field class="w-100">
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.CC-MODE' | translate}}</mat-label>
<mat-select name="ccMode" [formControl]="formGroup.get('value').get('ccMode')">
<mat-option *ngFor="let emailOverrideMode of emailOverrideModeEnum" [value]="emailOverrideMode">
@ -212,8 +257,8 @@
<mat-error *ngIf="formGroup.get('value').get('ccMode').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
<div class="col-4" >
<mat-form-field class="chip-list">
<div class="col-12 col-lg-4">
<mat-form-field class="w-100 chip-list">
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.BCC' | translate}}</mat-label>
<mat-chip-grid #bcc [formControl]="formGroup.get('value').get('bcc')">
<mat-chip-row *ngFor="let field of bccValues"
@ -234,8 +279,8 @@
<mat-error *ngIf="formGroup.get('value').get('bcc').hasError('backendError')">{{formGroup.get('value').get('bcc').getError('backendError').message}}</mat-error>
</mat-form-field>
</div>
<div class="col-4">
<mat-form-field class="col-auto">
<div class="col-12 col-lg-4">
<mat-form-field class="w-100">
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.BCC-MODE' | translate}}</mat-label>
<mat-select name="bccMode" [formControl]="formGroup.get('value').get('bccMode')">
<mat-option *ngFor="let emailOverrideMode of emailOverrideModeEnum" [value]="emailOverrideMode">
@ -246,8 +291,8 @@
<mat-error *ngIf="formGroup.get('value').get('bccMode').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
<div class="col-4" >
<mat-form-field class="chip-list">
<div class="col-12 col-lg-4">
<mat-form-field class="w-100 chip-list">
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.EXTRA-DATA-KEYS' | translate}}</mat-label>
<mat-chip-grid #extraDataKeys [formControl]="formGroup.get('value').get('extraDataKeys')">
<mat-chip-row *ngFor="let field of extraDataKeys"
@ -269,6 +314,9 @@
</mat-form-field>
</div>
</div>
</div>
</div>
</div>
</mat-card-content>
</mat-card>
</form>