Merge pull request #9288 from ArtemDzhereleiko/AD/bug-fix/notification-template-dialog
Fixed notifications dialog
This commit is contained in:
commit
1255b2af54
@ -29,7 +29,7 @@
|
|||||||
</mat-progress-bar>
|
</mat-progress-bar>
|
||||||
<div mat-dialog-content>
|
<div mat-dialog-content>
|
||||||
<mat-horizontal-stepper linear #createNotification
|
<mat-horizontal-stepper linear #createNotification
|
||||||
[labelPosition]="(stepperLabelPosition | async)"
|
labelPosition="bottom"
|
||||||
[orientation]="(stepperOrientation | async)"
|
[orientation]="(stepperOrientation | async)"
|
||||||
(selectionChange)="changeStep($event)">
|
(selectionChange)="changeStep($event)">
|
||||||
<ng-template matStepperIcon="edit">
|
<ng-template matStepperIcon="edit">
|
||||||
|
|||||||
@ -63,7 +63,6 @@ export class SentNotificationDialogComponent extends
|
|||||||
|
|
||||||
@ViewChild('createNotification', {static: true}) createNotification: MatStepper;
|
@ViewChild('createNotification', {static: true}) createNotification: MatStepper;
|
||||||
stepperOrientation: Observable<StepperOrientation>;
|
stepperOrientation: Observable<StepperOrientation>;
|
||||||
stepperLabelPosition: Observable<'bottom' | 'end'>;
|
|
||||||
|
|
||||||
isAdd = true;
|
isAdd = true;
|
||||||
entityType = EntityType;
|
entityType = EntityType;
|
||||||
@ -102,9 +101,6 @@ export class SentNotificationDialogComponent extends
|
|||||||
this.stepperOrientation = this.breakpointObserver.observe(MediaBreakpoints['gt-sm'])
|
this.stepperOrientation = this.breakpointObserver.observe(MediaBreakpoints['gt-sm'])
|
||||||
.pipe(map(({matches}) => matches ? 'horizontal' : 'vertical'));
|
.pipe(map(({matches}) => matches ? 'horizontal' : 'vertical'));
|
||||||
|
|
||||||
this.stepperLabelPosition = this.breakpointObserver.observe(MediaBreakpoints['gt-md'])
|
|
||||||
.pipe(map(({matches}) => matches ? 'end' : 'bottom'));
|
|
||||||
|
|
||||||
this.notificationRequestForm = this.fb.group({
|
this.notificationRequestForm = this.fb.group({
|
||||||
useTemplate: [false],
|
useTemplate: [false],
|
||||||
templateId: [{value: null, disabled: true}, Validators.required],
|
templateId: [{value: null, disabled: true}, Validators.required],
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
</mat-progress-bar>
|
</mat-progress-bar>
|
||||||
<div mat-dialog-content>
|
<div mat-dialog-content>
|
||||||
<mat-horizontal-stepper linear #notificationTemplateStepper
|
<mat-horizontal-stepper linear #notificationTemplateStepper
|
||||||
[labelPosition]="(stepperLabelPosition | async)"
|
labelPosition="bottom"
|
||||||
[orientation]="(stepperOrientation | async)"
|
[orientation]="(stepperOrientation | async)"
|
||||||
(selectionChange)="changeStep($event)">
|
(selectionChange)="changeStep($event)">
|
||||||
<ng-template matStepperIcon="edit">
|
<ng-template matStepperIcon="edit">
|
||||||
|
|||||||
@ -54,7 +54,6 @@ export class TemplateNotificationDialogComponent
|
|||||||
@ViewChild('notificationTemplateStepper', {static: true}) notificationTemplateStepper: MatStepper;
|
@ViewChild('notificationTemplateStepper', {static: true}) notificationTemplateStepper: MatStepper;
|
||||||
|
|
||||||
stepperOrientation: Observable<StepperOrientation>;
|
stepperOrientation: Observable<StepperOrientation>;
|
||||||
stepperLabelPosition: Observable<'bottom' | 'end'>;
|
|
||||||
|
|
||||||
dialogTitle = 'notification.edit-notification-template';
|
dialogTitle = 'notification.edit-notification-template';
|
||||||
|
|
||||||
@ -82,9 +81,6 @@ export class TemplateNotificationDialogComponent
|
|||||||
this.stepperOrientation = this.breakpointObserver.observe(MediaBreakpoints['gt-sm'])
|
this.stepperOrientation = this.breakpointObserver.observe(MediaBreakpoints['gt-sm'])
|
||||||
.pipe(map(({matches}) => matches ? 'horizontal' : 'vertical'));
|
.pipe(map(({matches}) => matches ? 'horizontal' : 'vertical'));
|
||||||
|
|
||||||
this.stepperLabelPosition = this.breakpointObserver.observe(MediaBreakpoints['gt-md'])
|
|
||||||
.pipe(map(({matches}) => matches ? 'end' : 'bottom'));
|
|
||||||
|
|
||||||
if (isDefinedAndNotNull(this.data?.predefinedType)) {
|
if (isDefinedAndNotNull(this.data?.predefinedType)) {
|
||||||
this.hideSelectType = true;
|
this.hideSelectType = true;
|
||||||
this.templateNotificationForm.get('notificationType').setValue(this.data.predefinedType, {emitEvent: false});
|
this.templateNotificationForm.get('notificationType').setValue(this.data.predefinedType, {emitEvent: false});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user