Skip to content

Commit 3f48b2a

Browse files
committed
UI: Minor fixed in notification dialog
1 parent efca0ec commit 3f48b2a

File tree

6 files changed

+38
-20
lines changed

6 files changed

+38
-20
lines changed

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

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,20 +140,24 @@ <h2>{{ dialogTitle | translate }}</h2>
140140
<mat-step *ngIf="!notificationRequestForm.get('useTemplate').value"
141141
[stepControl]="notificationTemplateConfigurationForm" #composeStep=matStep>
142142
<ng-template matStepLabel>{{ 'notification.compose' | translate }}</ng-template>
143-
<form [formGroup]="notificationTemplateConfigurationForm">
144-
<tb-template-configuration
145-
[notificationType]="templateNotificationForm.get('notificationType').value"
146-
[predefinedDeliveryMethodsTemplate]="deliveryConfiguration"
147-
[interacted]="composeStep.interacted"
148-
formControlName="deliveryMethodsTemplates">
149-
</tb-template-configuration>
150-
</form>
143+
<ng-template matStepContent>
144+
<form [formGroup]="notificationTemplateConfigurationForm">
145+
<tb-template-configuration
146+
notificationType="{{ notificationType.GENERAL }}"
147+
[predefinedDeliveryMethodsTemplate]="deliveryConfiguration"
148+
[interacted]="composeStep.interacted"
149+
formControlName="deliveryMethodsTemplates">
150+
</tb-template-configuration>
151+
</form>
152+
</ng-template>
151153
</mat-step>
152154
<mat-step>
153155
<ng-template matStepLabel>{{ 'notification.review' | translate }}</ng-template>
154-
<mat-progress-spinner color="warn" mode="indeterminate"
155-
strokeWidth="5" *ngIf="(isLoading$ | async) && !preview">
156-
</mat-progress-spinner>
156+
<div class="tb-loader" *ngIf="(isLoading$ | async) && !preview">
157+
<mat-progress-spinner color="warn" mode="indeterminate"
158+
strokeWidth="5">
159+
</mat-progress-spinner>
160+
</div>
157161
<div *ngIf="preview" class="tb-form-panel no-padding no-border">
158162
<section class="preview-group tb-form-panel stroked no-gap">
159163
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center">

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@
110110
margin-bottom: 16px;
111111
}
112112

113+
.tb-loader {
114+
display: flex;
115+
flex-direction: column;
116+
align-items: center;
117+
justify-content: center;
118+
height: 400px;
119+
max-height: 100%;
120+
}
121+
113122
.preview-group {
114123
&.notification {
115124
background-color: #F3F6FA;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export class SentNotificationDialogComponent extends
147147
this.notificationRequestForm.reset({}, {emitEvent: false});
148148
this.notificationRequestForm.patchValue(this.data.request, {emitEvent: false});
149149
this.notificationRequestForm.get('template.name').setValue(guid());
150+
this.notificationRequestForm.get('template.notificationType').setValue(NotificationType.GENERAL);
150151
let useTemplate = true;
151152
if (isDefinedAndNotNull(this.data.request.template)) {
152153
useTemplate = false;
@@ -155,6 +156,7 @@ export class SentNotificationDialogComponent extends
155156
}, {emitEvent: false});
156157
}
157158
this.notificationRequestForm.get('useTemplate').setValue(useTemplate, {onlySelf : true});
159+
this.deliveryConfiguration = this.templateNotificationForm.get('configuration.deliveryMethodsTemplates').value;
158160
}
159161
this.refreshAllowDeliveryMethod();
160162
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
.tb-template-header {
1818
position: sticky;
1919
top: 0;
20-
z-index: 1;
20+
z-index: 5;
2121
padding-bottom: 12px;
2222
background-color: var(--mdc-dialog-container-color, white);
2323

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,16 @@ <h2>{{ dialogTitle | translate }}</h2>
7171
</mat-step>
7272
<mat-step [stepControl]="notificationTemplateConfigurationForm" #composeStep=matStep>
7373
<ng-template matStepLabel>{{ 'notification.compose' | translate }}</ng-template>
74-
<form [formGroup]="notificationTemplateConfigurationForm">
75-
<tb-template-configuration
76-
[notificationType]="templateNotificationForm.get('notificationType').value"
77-
[predefinedDeliveryMethodsTemplate]="deliveryConfiguration"
78-
[interacted]="composeStep.interacted"
79-
formControlName="deliveryMethodsTemplates">
80-
</tb-template-configuration>
81-
</form>
74+
<ng-template matStepContent>
75+
<form [formGroup]="notificationTemplateConfigurationForm">
76+
<tb-template-configuration
77+
[notificationType]="templateNotificationForm.get('notificationType').value"
78+
[predefinedDeliveryMethodsTemplate]="deliveryConfiguration"
79+
[interacted]="composeStep.interacted"
80+
formControlName="deliveryMethodsTemplates">
81+
</tb-template-configuration>
82+
</form>
83+
</ng-template>
8284
</mat-step>
8385
</mat-horizontal-stepper>
8486
</div>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export class TemplateNotificationDialogComponent
102102
this.notificationTemplateConfigurationForm.patchValue({
103103
deliveryMethodsTemplates: this.templateNotification.configuration.deliveryMethodsTemplates
104104
}, {emitEvent: false});
105+
this.deliveryConfiguration = this.templateNotificationForm.get('configuration.deliveryMethodsTemplates').value;
105106
}
106107
}
107108

0 commit comments

Comments
 (0)