|
6 | 6 | <mat-form-field class="flex-48"> |
7 | 7 | <mat-label>{{ 'labels.inputs.Entity' | translate }}</mat-label> |
8 | 8 | <mat-select required formControlName="entity"> |
9 | | - <mat-option *ngFor="let entity of templateData.entities" [value]="entity.id"> |
| 9 | + <mat-option *ngFor="let entity of templateData.entities; trackBy: trackByEntityId" [value]="entity.id"> |
10 | 10 | {{ entity.name }} |
11 | 11 | </mat-option> |
12 | 12 | </mat-select> |
|
19 | 19 | <mat-form-field class="flex-48"> |
20 | 20 | <mat-label>{{ 'labels.inputs.Type' | translate }}</mat-label> |
21 | 21 | <mat-select required formControlName="type"> |
22 | | - <mat-option *ngFor="let type of templateData.types" [value]="type.id"> |
| 22 | + <mat-option *ngFor="let type of templateData.types; trackBy: trackByTypeId" [value]="type.id"> |
23 | 23 | {{ type.name }} |
24 | 24 | </mat-option> |
25 | 25 | </mat-select> |
|
41 | 41 | </mat-card-content> |
42 | 42 | </form> |
43 | 43 |
|
44 | | - <div role="toggle" class="flex-33"> |
45 | | - <button mat-raised-button color="primary" (click)="showAdvanceOptions = !showAdvanceOptions"> |
46 | | - {{ 'labels.buttons.Advanced Options' | translate }} |
47 | | - </button> |
48 | | - </div> |
| 44 | + <mat-card-content> |
| 45 | + <div role="toggle" class="advanced-options-wrapper"> |
| 46 | + <button mat-raised-button color="primary" (click)="showAdvanceOptions = !showAdvanceOptions"> |
| 47 | + {{ 'labels.buttons.Advanced Options' | translate }} |
| 48 | + </button> |
| 49 | + </div> |
| 50 | + |
| 51 | + <ng-container role="mappers" *ngIf="showAdvanceOptions"> |
| 52 | + <div |
| 53 | + *ngFor="let mapper of mappers; index as i; trackBy: trackByMapperIndex" |
| 54 | + class="mapper-row layout-row gap-2percent" |
| 55 | + > |
| 56 | + <mat-form-field class="flex-48"> |
| 57 | + <mat-label>{{ 'labels.inputs.Mapper Key' | translate }}</mat-label> |
| 58 | + <input matInput [formControl]="mapper.mapperskey" /> |
| 59 | + </mat-form-field> |
49 | 60 |
|
50 | | - <ng-container role="mappers" *ngIf="showAdvanceOptions"> |
51 | | - <div *ngFor="let mapper of mappers; index as i" class="layout-row gap-2percent"> |
52 | | - <mat-form-field class="flex-48"> |
53 | | - <mat-label>{{ 'labels.inputs.Mapper Key' | translate }}</mat-label> |
54 | | - <input matInput [formControl]="mapper.mapperskey" /> |
55 | | - </mat-form-field> |
| 61 | + <mat-form-field class="flex-fill flex-38"> |
| 62 | + <mat-label>{{ 'labels.inputs.Mapper Value' | translate }}</mat-label> |
| 63 | + <input matInput [formControl]="mapper.mappersvalue" /> |
| 64 | + </mat-form-field> |
56 | 65 |
|
57 | | - <mat-form-field class="flex-fill flex-38"> |
58 | | - <mat-label>{{ 'labels.inputs.Mapper Value' | translate }}</mat-label> |
59 | | - <input matInput [formControl]="mapper.mappersvalue" /> |
60 | | - </mat-form-field> |
| 66 | + <button *ngIf="i === 0" class="mapper-button flex-8" mat-raised-button color="primary" (click)="addMapper()"> |
| 67 | + <fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }} |
| 68 | + </button> |
| 69 | + <button |
| 70 | + *ngIf="!(i === 0)" |
| 71 | + class="mapper-button flex-9" |
| 72 | + mat-raised-button |
| 73 | + color="primary" |
| 74 | + (click)="removeMapper(i)" |
| 75 | + > |
| 76 | + <fa-icon icon="minus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Remove' | translate }} |
| 77 | + </button> |
| 78 | + </div> |
| 79 | + </ng-container> |
| 80 | + </mat-card-content> |
61 | 81 |
|
62 | | - <button *ngIf="i === 0" class="mapper-button flex-8" mat-raised-button color="primary" (click)="addMapper()"> |
63 | | - <fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }} |
64 | | - </button> |
65 | | - <button |
66 | | - *ngIf="!(i === 0)" |
67 | | - class="mapper-button flex-9" |
68 | | - mat-raised-button |
69 | | - color="primary" |
70 | | - (click)="removeMapper(i)" |
71 | | - > |
72 | | - <fa-icon icon="minus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Remove' | translate }} |
73 | | - </button> |
| 82 | + <mat-card-content> |
| 83 | + <div role="editor" class="editor-wrapper"> |
| 84 | + <label for="ckeditor" class="required-label required-label-ckeditor"> |
| 85 | + {{ 'labels.inputs.Text' | translate }} <span class="required-asterisk">*</span> |
| 86 | + </label> |
| 87 | + <ckeditor |
| 88 | + #ckEditor |
| 89 | + [editor]="Editor" |
| 90 | + (change)="onEditorChange($event)" |
| 91 | + [data]="templateData.template?.text" |
| 92 | + ></ckeditor> |
74 | 93 | </div> |
75 | | - </ng-container> |
76 | | - |
77 | | - <div role="editor"> |
78 | | - <label for="ckeditor" class="required-label required-label-ckeditor"> |
79 | | - {{ 'labels.inputs.Text' | translate }} <span class="required-asterisk">*</span> |
80 | | - </label> |
81 | | - <ckeditor |
82 | | - #ckEditor |
83 | | - [editor]="Editor" |
84 | | - (change)="onEditorChange($event)" |
85 | | - [data]="templateData.template?.text" |
86 | | - ></ckeditor> |
87 | | - </div> |
| 94 | + </mat-card-content> |
88 | 95 |
|
89 | | - <div role="template-parameters"> |
90 | | - <mat-accordion> |
91 | | - <mat-expansion-panel *ngIf="templateForm.controls.entity.value === 0"> |
92 | | - <mat-expansion-panel-header> |
93 | | - <mat-panel-title> |
94 | | - {{ 'labels.inputs.Client Parameters' | translate }} |
95 | | - </mat-panel-title> |
96 | | - </mat-expansion-panel-header> |
| 96 | + <mat-card-content> |
| 97 | + <div role="template-parameters"> |
| 98 | + <mat-accordion> |
| 99 | + <mat-expansion-panel *ngIf="templateForm.controls.entity.value === 0"> |
| 100 | + <mat-expansion-panel-header> |
| 101 | + <mat-panel-title> |
| 102 | + {{ 'labels.inputs.Client Parameters' | translate }} |
| 103 | + </mat-panel-title> |
| 104 | + </mat-expansion-panel-header> |
97 | 105 |
|
98 | | - <div class="layout-row-wrap layout-xs-column layout-align-center"> |
99 | | - <button |
100 | | - mat-stroked-button |
101 | | - color="primary" |
102 | | - class="parameter" |
103 | | - *ngFor="let label of clientParameterLabels" |
104 | | - (click)="addText(label)" |
105 | | - > |
106 | | - {{ label }} |
107 | | - </button> |
108 | | - </div> |
109 | | - </mat-expansion-panel> |
| 106 | + <div class="layout-row-wrap layout-xs-column layout-align-center"> |
| 107 | + <button |
| 108 | + mat-stroked-button |
| 109 | + color="primary" |
| 110 | + class="parameter" |
| 111 | + *ngFor="let label of clientParameterLabels; trackBy: trackByLabel" |
| 112 | + (click)="addText(label)" |
| 113 | + > |
| 114 | + {{ label }} |
| 115 | + </button> |
| 116 | + </div> |
| 117 | + </mat-expansion-panel> |
110 | 118 |
|
111 | | - <mat-expansion-panel *ngIf="templateForm.controls.entity.value === 1"> |
112 | | - <mat-expansion-panel-header> |
113 | | - <mat-panel-title> |
114 | | - {{ 'labels.inputs.Loan Parameters' | translate }} |
115 | | - </mat-panel-title> |
116 | | - </mat-expansion-panel-header> |
| 119 | + <mat-expansion-panel *ngIf="templateForm.controls.entity.value === 1"> |
| 120 | + <mat-expansion-panel-header> |
| 121 | + <mat-panel-title> |
| 122 | + {{ 'labels.inputs.Loan Parameters' | translate }} |
| 123 | + </mat-panel-title> |
| 124 | + </mat-expansion-panel-header> |
117 | 125 |
|
118 | | - <div class="layout-row-wrap layout-xs-column layout-align-center"> |
119 | | - <button |
120 | | - mat-stroked-button |
121 | | - color="primary" |
122 | | - class="parameter" |
123 | | - *ngFor="let label of loanParameterLabels" |
124 | | - (click)="addText(label)" |
125 | | - > |
126 | | - {{ label }} |
127 | | - </button> |
128 | | - </div> |
129 | | - </mat-expansion-panel> |
| 126 | + <div class="layout-row-wrap layout-xs-column layout-align-center"> |
| 127 | + <button |
| 128 | + mat-stroked-button |
| 129 | + color="primary" |
| 130 | + class="parameter" |
| 131 | + *ngFor="let label of loanParameterLabels; trackBy: trackByLabel" |
| 132 | + (click)="addText(label)" |
| 133 | + > |
| 134 | + {{ label }} |
| 135 | + </button> |
| 136 | + </div> |
| 137 | + </mat-expansion-panel> |
130 | 138 |
|
131 | | - <mat-expansion-panel *ngIf="templateForm.controls.entity.value === 1"> |
132 | | - <mat-expansion-panel-header> |
133 | | - <mat-panel-title> |
134 | | - {{ 'labels.inputs.Repayment Schedule Parameters' | translate }} |
135 | | - </mat-panel-title> |
136 | | - </mat-expansion-panel-header> |
| 139 | + <mat-expansion-panel *ngIf="templateForm.controls.entity.value === 1"> |
| 140 | + <mat-expansion-panel-header> |
| 141 | + <mat-panel-title> |
| 142 | + {{ 'labels.inputs.Repayment Schedule Parameters' | translate }} |
| 143 | + </mat-panel-title> |
| 144 | + </mat-expansion-panel-header> |
137 | 145 |
|
138 | | - <div class="layout-row-wrap layout-xs-column layout-align-center"> |
139 | | - <button |
140 | | - mat-stroked-button |
141 | | - color="primary" |
142 | | - class="parameter" |
143 | | - *ngFor="let label of repaymentParameterLabels" |
144 | | - (click)="addText(label)" |
145 | | - > |
146 | | - {{ label }} |
147 | | - </button> |
148 | | - </div> |
149 | | - </mat-expansion-panel> |
150 | | - </mat-accordion> |
151 | | - </div> |
| 146 | + <div class="layout-row-wrap layout-xs-column layout-align-center"> |
| 147 | + <button |
| 148 | + mat-stroked-button |
| 149 | + color="primary" |
| 150 | + class="parameter" |
| 151 | + *ngFor="let label of repaymentParameterLabels; trackBy: trackByLabel" |
| 152 | + (click)="addText(label)" |
| 153 | + > |
| 154 | + {{ label }} |
| 155 | + </button> |
| 156 | + </div> |
| 157 | + </mat-expansion-panel> |
| 158 | + </mat-accordion> |
| 159 | + </div> |
| 160 | + </mat-card-content> |
152 | 161 |
|
153 | 162 | <mat-card-actions class="m-b-20 layout-row layout-xs-column layout-align-center gap-5px"> |
154 | 163 | <button type="button" mat-raised-button [routerLink]="['../']">{{ 'labels.buttons.Cancel' | translate }}</button> |
|
0 commit comments