|
2 | 2 | <mat-card>
|
3 | 3 | <form [formGroup]="editClientForm">
|
4 | 4 | <mat-card-content>
|
5 |
| - <div class="layout-row-wrap gap-2px responsive-column"> |
6 |
| - <mat-form-field class="flex-fill flex-23"> |
| 5 | + <!-- First Row: Office, Legal Form, Account No, External ID --> |
| 6 | + <div class="responsive-row"> |
| 7 | + <mat-form-field class="flex-24"> |
7 | 8 | <mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
|
8 | 9 | <mat-select required formControlName="officeId">
|
9 | 10 | <mat-option *ngFor="let office of officeOptions" [value]="office.id">
|
|
16 | 17 | </mat-error>
|
17 | 18 | </mat-form-field>
|
18 | 19 |
|
19 |
| - <mat-form-field class="flex-fill flex-23"> |
| 20 | + <mat-form-field class="flex-24"> |
20 | 21 | <mat-label>{{ 'labels.inputs.Legal Form' | translate }}</mat-label>
|
21 | 22 | <mat-select formControlName="legalFormId">
|
22 | 23 | <mat-option *ngFor="let legalForm of legalFormOptions" [value]="legalForm.id">
|
|
25 | 26 | </mat-select>
|
26 | 27 | </mat-form-field>
|
27 | 28 |
|
28 |
| - <mat-form-field class="flex-fill flex-23"> |
| 29 | + <mat-form-field class="flex-24"> |
29 | 30 | <mat-label>{{ 'labels.inputs.Account No' | translate }}</mat-label>
|
30 | 31 | <input matInput formControlName="accountNo" />
|
31 | 32 | </mat-form-field>
|
32 | 33 |
|
33 |
| - <mat-form-field class="flex-fill flex-23"> |
| 34 | + <mat-form-field class="flex-24"> |
34 | 35 | <mat-label>{{ 'labels.inputs.External Id' | translate }}</mat-label>
|
35 | 36 | <input matInput formControlName="externalId" />
|
36 | 37 | </mat-form-field>
|
| 38 | + </div> |
37 | 39 |
|
| 40 | + <!-- Name fields section --> |
| 41 | + <div class="responsive-row"> |
38 | 42 | <mat-form-field *ngIf="editClientForm.contains('fullname')" class="flex-48">
|
39 | 43 | <mat-label>{{
|
40 | 44 | 'labels.inputs.' + getDateLabel(legalFormId, ['Name', 'Entity Name']) | translate
|
|
46 | 50 | </mat-error>
|
47 | 51 | </mat-form-field>
|
48 | 52 |
|
49 |
| - <mat-form-field *ngIf="editClientForm.contains('firstname')" class="flex-48"> |
| 53 | + <mat-form-field *ngIf="editClientForm.contains('firstname')" class="flex-32"> |
50 | 54 | <mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label>
|
51 | 55 | <input matInput required formControlName="firstname" />
|
52 | 56 | <mat-error *ngIf="editClientForm.controls.firstname.hasError('required')">
|
|
55 | 59 | </mat-error>
|
56 | 60 | </mat-form-field>
|
57 | 61 |
|
58 |
| - <mat-form-field *ngIf="editClientForm.contains('middlename')" class="flex-48"> |
| 62 | + <mat-form-field *ngIf="editClientForm.contains('middlename')" class="flex-32"> |
59 | 63 | <mat-label>{{ 'labels.inputs.Middle Name' | translate }}</mat-label>
|
60 | 64 | <input matInput formControlName="middlename" />
|
61 | 65 | </mat-form-field>
|
62 | 66 |
|
63 |
| - <mat-form-field *ngIf="editClientForm.contains('lastname')" class="flex-48"> |
| 67 | + <mat-form-field *ngIf="editClientForm.contains('lastname')" class="flex-32"> |
64 | 68 | <mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label>
|
65 | 69 | <input matInput required formControlName="lastname" />
|
66 | 70 | <mat-error *ngIf="editClientForm.controls.lastname.hasError('required')">
|
67 | 71 | {{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }}
|
68 | 72 | <strong>{{ 'labels.commons.required' | translate }}</strong>
|
69 | 73 | </mat-error>
|
70 | 74 | </mat-form-field>
|
| 75 | + </div> |
71 | 76 |
|
72 |
| - <mat-divider></mat-divider> |
| 77 | + <mat-divider class="section-divider"></mat-divider> |
73 | 78 |
|
| 79 | + <!-- Date of Birth and Gender Row --> |
| 80 | + <div class="responsive-row"> |
74 | 81 | <mat-form-field class="flex-48" (click)="dateOfBirthDatePicker.open()">
|
75 | 82 | <mat-label>{{
|
76 | 83 | 'labels.inputs.' + getDateLabel(legalFormId, ['Date of Birth', 'Incorporation Date']) | translate
|
|
88 | 95 | </mat-option>
|
89 | 96 | </mat-select>
|
90 | 97 | </mat-form-field>
|
| 98 | + </div> |
91 | 99 |
|
| 100 | + <!-- Staff and Is Staff Row --> |
| 101 | + <div class="responsive-row align-center"> |
92 | 102 | <mat-form-field class="flex-48">
|
93 | 103 | <mat-label>{{ 'labels.inputs.Staff' | translate }}</mat-label>
|
94 | 104 | <mat-select formControlName="staffId">
|
|
98 | 108 | </mat-select>
|
99 | 109 | </mat-form-field>
|
100 | 110 |
|
101 |
| - <div |
102 |
| - class="flex-100 layout-row-wrap gap-2percent column-on-small" |
103 |
| - formGroupName="clientNonPersonDetails" |
104 |
| - *ngIf="editClientForm.contains('clientNonPersonDetails')" |
105 |
| - > |
106 |
| - <mat-form-field class="flex-48"> |
107 |
| - <mat-label>{{ 'labels.inputs.Constitution' | translate }}</mat-label> |
108 |
| - <mat-select formControlName="constitutionId" required> |
109 |
| - <mat-option *ngFor="let constitution of constitutionOptions" [value]="constitution.id"> |
110 |
| - {{ constitution.name }} |
111 |
| - </mat-option> |
112 |
| - </mat-select> |
113 |
| - </mat-form-field> |
114 |
| - |
115 |
| - <mat-form-field class="flex-48"> |
116 |
| - <mat-label>{{ 'labels.inputs.Main Business Line' | translate }}</mat-label> |
117 |
| - <mat-select formControlName="mainBusinessLineId"> |
118 |
| - <mat-option *ngFor="let business of businessLineOptions" [value]="business.id"> |
119 |
| - {{ business.name }} |
120 |
| - </mat-option> |
121 |
| - </mat-select> |
122 |
| - </mat-form-field> |
123 |
| - |
124 |
| - <mat-form-field class="flex-48" (click)="incorpValidityTillDateDatePicker.open()"> |
125 |
| - <mat-label>{{ 'labels.inputs.Incorporation Validity Till Date' | translate }}</mat-label> |
126 |
| - <input |
127 |
| - matInput |
128 |
| - [min]="minDate" |
129 |
| - [max]="maxDate" |
130 |
| - [matDatepicker]="incorpValidityTillDateDatePicker" |
131 |
| - formControlName="incorpValidityTillDate" |
132 |
| - /> |
133 |
| - <mat-datepicker-toggle matSuffix [for]="incorpValidityTillDateDatePicker"></mat-datepicker-toggle> |
134 |
| - <mat-datepicker #incorpValidityTillDateDatePicker></mat-datepicker> |
135 |
| - </mat-form-field> |
136 |
| - |
137 |
| - <mat-form-field class="flex-48"> |
138 |
| - <mat-label>{{ 'labels.inputs.Incorporation No' | translate }}</mat-label> |
139 |
| - <input matInput formControlName="incorpNumber" /> |
140 |
| - </mat-form-field> |
141 |
| - |
142 |
| - <mat-form-field class="flex-98"> |
143 |
| - <mat-label>{{ 'labels.inputs.Remarks' | translate }}</mat-label> |
144 |
| - <textarea matInput formControlName="remarks" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea> |
145 |
| - </mat-form-field> |
146 |
| - </div> |
147 |
| - |
148 | 111 | <mat-checkbox
|
149 | 112 | *ngIf="legalFormId === 1"
|
150 | 113 | class="flex-48 margin-v"
|
|
153 | 116 | >
|
154 | 117 | {{ 'labels.inputs.Is staff' | translate }}?
|
155 | 118 | </mat-checkbox>
|
| 119 | + </div> |
| 120 | + |
| 121 | + <div |
| 122 | + class="flex-100 layout-row-wrap gap-2percent column-on-small" |
| 123 | + formGroupName="clientNonPersonDetails" |
| 124 | + *ngIf="editClientForm.contains('clientNonPersonDetails')" |
| 125 | + > |
| 126 | + <mat-form-field class="flex-48"> |
| 127 | + <mat-label>{{ 'labels.inputs.Constitution' | translate }}</mat-label> |
| 128 | + <mat-select formControlName="constitutionId" required> |
| 129 | + <mat-option *ngFor="let constitution of constitutionOptions" [value]="constitution.id"> |
| 130 | + {{ constitution.name }} |
| 131 | + </mat-option> |
| 132 | + </mat-select> |
| 133 | + </mat-form-field> |
156 | 134 |
|
| 135 | + <mat-form-field class="flex-48"> |
| 136 | + <mat-label>{{ 'labels.inputs.Main Business Line' | translate }}</mat-label> |
| 137 | + <mat-select formControlName="mainBusinessLineId"> |
| 138 | + <mat-option *ngFor="let business of businessLineOptions" [value]="business.id"> |
| 139 | + {{ business.name }} |
| 140 | + </mat-option> |
| 141 | + </mat-select> |
| 142 | + </mat-form-field> |
| 143 | + |
| 144 | + <mat-form-field class="flex-48" (click)="incorpValidityTillDateDatePicker.open()"> |
| 145 | + <mat-label>{{ 'labels.inputs.Incorporation Validity Till Date' | translate }}</mat-label> |
| 146 | + <input |
| 147 | + matInput |
| 148 | + [min]="minDate" |
| 149 | + [max]="maxDate" |
| 150 | + [matDatepicker]="incorpValidityTillDateDatePicker" |
| 151 | + formControlName="incorpValidityTillDate" |
| 152 | + /> |
| 153 | + <mat-datepicker-toggle matSuffix [for]="incorpValidityTillDateDatePicker"></mat-datepicker-toggle> |
| 154 | + <mat-datepicker #incorpValidityTillDateDatePicker></mat-datepicker> |
| 155 | + </mat-form-field> |
| 156 | + |
| 157 | + <mat-form-field class="flex-48"> |
| 158 | + <mat-label>{{ 'labels.inputs.Incorporation No' | translate }}</mat-label> |
| 159 | + <input matInput formControlName="incorpNumber" /> |
| 160 | + </mat-form-field> |
| 161 | + |
| 162 | + <mat-form-field class="flex-98"> |
| 163 | + <mat-label>{{ 'labels.inputs.Remarks' | translate }}</mat-label> |
| 164 | + <textarea matInput formControlName="remarks" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea> |
| 165 | + </mat-form-field> |
| 166 | + </div> |
| 167 | + |
| 168 | + <!-- Mobile No and Email Address Row --> |
| 169 | + <div class="responsive-row"> |
157 | 170 | <mat-form-field class="flex-48">
|
158 | 171 | <mat-label>{{ 'labels.inputs.Mobile No' | translate }}</mat-label>
|
159 | 172 | <input matInput type="text" formControlName="mobileNo" />
|
|
164 | 177 | <input matInput formControlName="emailAddress" />
|
165 | 178 | <mat-error *ngIf="editClientForm.controls.emailAddress.errors?.email"> Email not valid </mat-error>
|
166 | 179 | </mat-form-field>
|
| 180 | + </div> |
167 | 181 |
|
| 182 | + <!-- Client Type and Client Classification Row --> |
| 183 | + <div class="responsive-row"> |
168 | 184 | <mat-form-field class="flex-48">
|
169 | 185 | <mat-label>{{ 'labels.inputs.Client Type' | translate }}</mat-label>
|
170 | 186 | <mat-select formControlName="clientTypeId">
|
|
185 | 201 | </mat-option>
|
186 | 202 | </mat-select>
|
187 | 203 | </mat-form-field>
|
| 204 | + </div> |
188 | 205 |
|
| 206 | + <!-- Submitted On and Activated On Row --> |
| 207 | + <div class="responsive-row"> |
189 | 208 | <mat-form-field class="flex-48" (click)="submittedOnDatePicker.open()">
|
190 | 209 | <mat-label>{{ 'labels.inputs.Submitted On' | translate }}</mat-label>
|
191 | 210 | <input
|
|
219 | 238 | </div>
|
220 | 239 | </mat-card-content>
|
221 | 240 |
|
222 |
| - <mat-card-actions class="layout-row align-center gap-5px responsive-column"> |
223 |
| - <button type="button" mat-raised-button [routerLink]="['../general']"> |
| 241 | + <mat-card-actions class="button-container"> |
| 242 | + <button type="button" mat-raised-button [routerLink]="['../general']" class="custom-button"> |
224 | 243 | {{ 'labels.buttons.Cancel' | translate }}
|
225 | 244 | </button>
|
226 |
| - <button mat-raised-button color="primary" [disabled]="!editClientForm.valid" (click)="submit()"> |
| 245 | + <button |
| 246 | + type="submit" |
| 247 | + mat-raised-button |
| 248 | + color="primary" |
| 249 | + [disabled]="!editClientForm.valid" |
| 250 | + (click)="submit()" |
| 251 | + class="custom-button" |
| 252 | + > |
227 | 253 | {{ 'labels.buttons.Submit' | translate }}
|
228 | 254 | </button>
|
229 | 255 | </mat-card-actions>
|
|
0 commit comments