|
1 | 1 | <form [formGroup]="createClientForm"> |
2 | 2 | <div class="layout-row-wrap gap-2px responsive-column"> |
3 | | - <mat-form-field class="flex-48"> |
| 3 | + <mat-form-field class="flex-fill flex-23"> |
4 | 4 | <mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label> |
5 | 5 | <mat-select required formControlName="officeId"> |
6 | 6 | <mat-option *ngFor="let office of officeOptions" [value]="office.id"> |
|
42 | 42 | </mat-error> |
43 | 43 | </mat-form-field> |
44 | 44 |
|
45 | | - <mat-form-field *ngIf="createClientForm.contains('firstname')" class="flex-48"> |
46 | | - <mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label> |
47 | | - <input matInput required formControlName="firstname" /> |
48 | | - <mat-error *ngIf="createClientForm.controls.firstname.hasError('required')"> |
49 | | - {{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }} |
50 | | - <strong>{{ 'labels.commons.required' | translate }}</strong> |
51 | | - </mat-error> |
52 | | - <mat-error *ngIf="createClientForm.controls.firstname.hasError('pattern')"> |
53 | | - {{ 'labels.inputs.Client first name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong> |
54 | | - {{ 'labels.commons.begin with a special character or number' | translate }} |
55 | | - </mat-error> |
56 | | - </mat-form-field> |
| 45 | + <div |
| 46 | + class="name-fields-row" |
| 47 | + *ngIf=" |
| 48 | + createClientForm.contains('firstname') || |
| 49 | + createClientForm.contains('middlename') || |
| 50 | + createClientForm.contains('lastname') |
| 51 | + " |
| 52 | + > |
| 53 | + <mat-form-field *ngIf="createClientForm.contains('firstname')" class="name-field first-name"> |
| 54 | + <mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label> |
| 55 | + <input matInput required formControlName="firstname" /> |
| 56 | + <mat-error *ngIf="createClientForm.controls.firstname.hasError('required')"> |
| 57 | + {{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }} |
| 58 | + <strong>{{ 'labels.commons.required' | translate }}</strong> |
| 59 | + </mat-error> |
| 60 | + <mat-error *ngIf="createClientForm.controls.firstname.hasError('pattern')"> |
| 61 | + {{ 'labels.inputs.Client first name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong> |
| 62 | + {{ 'labels.commons.begin with a special character or number' | translate }} |
| 63 | + </mat-error> |
| 64 | + </mat-form-field> |
57 | 65 |
|
58 | | - <mat-form-field *ngIf="createClientForm.contains('middlename')" class="flex-48"> |
59 | | - <mat-label>{{ 'labels.inputs.Middle Name' | translate }}</mat-label> |
60 | | - <input matInput formControlName="middlename" /> |
61 | | - <mat-error *ngIf="createClientForm.controls.middlename.hasError('pattern')"> |
62 | | - {{ 'labels.inputs.Client middle name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong> |
63 | | - {{ 'labels.commons.begin with a special character or number' | translate }} |
64 | | - </mat-error> |
65 | | - </mat-form-field> |
| 66 | + <mat-form-field *ngIf="createClientForm.contains('middlename')" class="name-field middle-name"> |
| 67 | + <mat-label>{{ 'labels.inputs.Middle Name' | translate }}</mat-label> |
| 68 | + <input matInput formControlName="middlename" /> |
| 69 | + <mat-error *ngIf="createClientForm.controls.middlename.hasError('pattern')"> |
| 70 | + {{ 'labels.inputs.Client middle name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong> |
| 71 | + {{ 'labels.commons.begin with a special character or number' | translate }} |
| 72 | + </mat-error> |
| 73 | + </mat-form-field> |
66 | 74 |
|
67 | | - <mat-form-field *ngIf="createClientForm.contains('lastname')" class="flex-48"> |
68 | | - <mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label> |
69 | | - <input matInput required formControlName="lastname" /> |
70 | | - <mat-error *ngIf="createClientForm.controls.lastname.hasError('required')"> |
71 | | - {{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }} |
72 | | - <strong>{{ 'labels.commons.required' | translate }}</strong> |
73 | | - </mat-error> |
74 | | - <mat-error *ngIf="createClientForm.controls.lastname.hasError('pattern')"> |
75 | | - {{ 'labels.inputs.Client last name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong> |
76 | | - {{ 'labels.commons.begin with a special character or number' | translate }} |
77 | | - </mat-error> |
78 | | - </mat-form-field> |
| 75 | + <mat-form-field *ngIf="createClientForm.contains('lastname')" class="name-field last-name"> |
| 76 | + <mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label> |
| 77 | + <input matInput required formControlName="lastname" /> |
| 78 | + <mat-error *ngIf="createClientForm.controls.lastname.hasError('required')"> |
| 79 | + {{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }} |
| 80 | + <strong>{{ 'labels.commons.required' | translate }}</strong> |
| 81 | + </mat-error> |
| 82 | + <mat-error *ngIf="createClientForm.controls.lastname.hasError('pattern')"> |
| 83 | + {{ 'labels.inputs.Client last name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong> |
| 84 | + {{ 'labels.commons.begin with a special character or number' | translate }} |
| 85 | + </mat-error> |
| 86 | + </mat-form-field> |
| 87 | + </div> |
79 | 88 |
|
80 | 89 | <mat-divider></mat-divider> |
81 | 90 |
|
|
0 commit comments