-
Notifications
You must be signed in to change notification settings - Fork 0
/
property.component.html
71 lines (68 loc) · 3.46 KB
/
property.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<div class="container">
<div>
<div class="mt-6">
<div >Property Details</div>
<form [formGroup]="propertyForm">
<mat-form-field class="w-100">
<input matInput id="companyname" formControlName="companyName" placeholder="Company Name" />
<mat-error *ngIf="propertyForm.controls.companyName.errors?.required && propertyForm.controls.companyName.touched"
>Required field</mat-error
>
</mat-form-field>
<mat-form-field class="w-100">
<input matInput id="propertyname" formControlName="propertyName" placeholder="Property Name" />
<mat-error *ngIf="propertyForm.controls.propertyName.errors?.required && propertyForm.controls.propertyName.touched"
>Required field</mat-error
>
</mat-form-field>
<ng-container formGroupName="address">
<mat-form-field class="w-100">
<input matInput id="line1" formControlName="line1" placeholder="Address (line 1)" />
<mat-error *ngIf="propertyForm.get('address.line1').errors?.required && propertyForm.get('address.line1').touched"
>Required field</mat-error
>
</mat-form-field>
<mat-form-field class="w-100"> <input matInput id="line2" formControlName="line2" placeholder="Address (line 2)" /> </mat-form-field>
<mat-form-field class="w-100"> <input matInput id="line3" formControlName="line3" placeholder="Address (line 3)" /> </mat-form-field>
<table class="w-100" cellspacing="0">
<td>
<mat-form-field class="w-100">
<mat-select id="country" formControlName="country" placeholder="Country" (change)="onSelect($event.target.value)">
<mat-option value="0">Select</mat-option>
<mat-option *ngFor="let country of countries" value="{{ country.id }}">{{ country.name }}</mat-option>
</mat-select>
</mat-form-field>
</td>
<td>
<mat-form-field class="w-100">
<mat-select id="state" formControlName="state" placeholder="State">
<mat-option *ngIf="selectedCountry.id == 0" value="0">Select</mat-option>
<mat-option *ngFor="let state of states" value="{{ state.id }}">{{ state.name }}</mat-option>
</mat-select>
</mat-form-field>
</td>
</table>
<table class="w-100" cellspacing="0">
<td>
<mat-form-field class="w-100">
<input matInput id="city" formControlName="city" placeholder="City" />
<mat-error *ngIf="propertyForm.get('address.city').errors?.required && propertyForm.get('address.city').touched"
>Required field</mat-error
>
</mat-form-field>
</td>
<td>
<mat-form-field class="w-100">
<input matInput id="postalCode" formControlName="postalCode" placeholder="Postal Code" />
<mat-error *ngIf="propertyForm.get('address.postalCode').errors?.required && propertyForm.get('address.postalCode').touched"
>Required field</mat-error
>
</mat-form-field>
</td>
</table>
</ng-container>
</form>
<div class="flt-rt"><button mat-raised-button color="primary" [disabled]="!propertyForm.valid" (click)="nextStep()">NEXT</button></div>
</div>
</div>
</div>