Browse Source

UI: Minor fixed in notification dialog

pull/10243/head
Vladyslav_Prykhodko 3 years ago
parent
commit
3f48b2a0ee
  1. 26
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html
  2. 9
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss
  3. 2
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts
  4. 2
      ui-ngx/src/app/modules/home/pages/notification/template/configuration/notification-template-configuration.component.scss
  5. 18
      ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html
  6. 1
      ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts

26
ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html

@ -140,20 +140,24 @@
<mat-step *ngIf="!notificationRequestForm.get('useTemplate').value" <mat-step *ngIf="!notificationRequestForm.get('useTemplate').value"
[stepControl]="notificationTemplateConfigurationForm" #composeStep=matStep> [stepControl]="notificationTemplateConfigurationForm" #composeStep=matStep>
<ng-template matStepLabel>{{ 'notification.compose' | translate }}</ng-template> <ng-template matStepLabel>{{ 'notification.compose' | translate }}</ng-template>
<form [formGroup]="notificationTemplateConfigurationForm"> <ng-template matStepContent>
<tb-template-configuration <form [formGroup]="notificationTemplateConfigurationForm">
[notificationType]="templateNotificationForm.get('notificationType').value" <tb-template-configuration
[predefinedDeliveryMethodsTemplate]="deliveryConfiguration" notificationType="{{ notificationType.GENERAL }}"
[interacted]="composeStep.interacted" [predefinedDeliveryMethodsTemplate]="deliveryConfiguration"
formControlName="deliveryMethodsTemplates"> [interacted]="composeStep.interacted"
</tb-template-configuration> formControlName="deliveryMethodsTemplates">
</form> </tb-template-configuration>
</form>
</ng-template>
</mat-step> </mat-step>
<mat-step> <mat-step>
<ng-template matStepLabel>{{ 'notification.review' | translate }}</ng-template> <ng-template matStepLabel>{{ 'notification.review' | translate }}</ng-template>
<mat-progress-spinner color="warn" mode="indeterminate" <div class="tb-loader" *ngIf="(isLoading$ | async) && !preview">
strokeWidth="5" *ngIf="(isLoading$ | async) && !preview"> <mat-progress-spinner color="warn" mode="indeterminate"
</mat-progress-spinner> strokeWidth="5">
</mat-progress-spinner>
</div>
<div *ngIf="preview" class="tb-form-panel no-padding no-border"> <div *ngIf="preview" class="tb-form-panel no-padding no-border">
<section class="preview-group tb-form-panel stroked no-gap"> <section class="preview-group tb-form-panel stroked no-gap">
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> <div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center">

9
ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss

@ -110,6 +110,15 @@
margin-bottom: 16px; margin-bottom: 16px;
} }
.tb-loader {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 400px;
max-height: 100%;
}
.preview-group { .preview-group {
&.notification { &.notification {
background-color: #F3F6FA; background-color: #F3F6FA;

2
ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts

@ -147,6 +147,7 @@ export class SentNotificationDialogComponent extends
this.notificationRequestForm.reset({}, {emitEvent: false}); this.notificationRequestForm.reset({}, {emitEvent: false});
this.notificationRequestForm.patchValue(this.data.request, {emitEvent: false}); this.notificationRequestForm.patchValue(this.data.request, {emitEvent: false});
this.notificationRequestForm.get('template.name').setValue(guid()); this.notificationRequestForm.get('template.name').setValue(guid());
this.notificationRequestForm.get('template.notificationType').setValue(NotificationType.GENERAL);
let useTemplate = true; let useTemplate = true;
if (isDefinedAndNotNull(this.data.request.template)) { if (isDefinedAndNotNull(this.data.request.template)) {
useTemplate = false; useTemplate = false;
@ -155,6 +156,7 @@ export class SentNotificationDialogComponent extends
}, {emitEvent: false}); }, {emitEvent: false});
} }
this.notificationRequestForm.get('useTemplate').setValue(useTemplate, {onlySelf : true}); this.notificationRequestForm.get('useTemplate').setValue(useTemplate, {onlySelf : true});
this.deliveryConfiguration = this.templateNotificationForm.get('configuration.deliveryMethodsTemplates').value;
} }
this.refreshAllowDeliveryMethod(); this.refreshAllowDeliveryMethod();
} }

2
ui-ngx/src/app/modules/home/pages/notification/template/configuration/notification-template-configuration.component.scss

@ -17,7 +17,7 @@
.tb-template-header { .tb-template-header {
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 1; z-index: 5;
padding-bottom: 12px; padding-bottom: 12px;
background-color: var(--mdc-dialog-container-color, white); background-color: var(--mdc-dialog-container-color, white);

18
ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html

@ -71,14 +71,16 @@
</mat-step> </mat-step>
<mat-step [stepControl]="notificationTemplateConfigurationForm" #composeStep=matStep> <mat-step [stepControl]="notificationTemplateConfigurationForm" #composeStep=matStep>
<ng-template matStepLabel>{{ 'notification.compose' | translate }}</ng-template> <ng-template matStepLabel>{{ 'notification.compose' | translate }}</ng-template>
<form [formGroup]="notificationTemplateConfigurationForm"> <ng-template matStepContent>
<tb-template-configuration <form [formGroup]="notificationTemplateConfigurationForm">
[notificationType]="templateNotificationForm.get('notificationType').value" <tb-template-configuration
[predefinedDeliveryMethodsTemplate]="deliveryConfiguration" [notificationType]="templateNotificationForm.get('notificationType').value"
[interacted]="composeStep.interacted" [predefinedDeliveryMethodsTemplate]="deliveryConfiguration"
formControlName="deliveryMethodsTemplates"> [interacted]="composeStep.interacted"
</tb-template-configuration> formControlName="deliveryMethodsTemplates">
</form> </tb-template-configuration>
</form>
</ng-template>
</mat-step> </mat-step>
</mat-horizontal-stepper> </mat-horizontal-stepper>
</div> </div>

1
ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts

@ -102,6 +102,7 @@ export class TemplateNotificationDialogComponent
this.notificationTemplateConfigurationForm.patchValue({ this.notificationTemplateConfigurationForm.patchValue({
deliveryMethodsTemplates: this.templateNotification.configuration.deliveryMethodsTemplates deliveryMethodsTemplates: this.templateNotification.configuration.deliveryMethodsTemplates
}, {emitEvent: false}); }, {emitEvent: false});
this.deliveryConfiguration = this.templateNotificationForm.get('configuration.deliveryMethodsTemplates').value;
} }
} }

Loading…
Cancel
Save