@@ -15,12 +15,23 @@ <h3>Property</h3>
1515
1616 < div class ="government-region-fields ">
1717 < mat-form-field appearance ="outline ">
18- < mat-label > Local or First Nation Government</ mat-label >
19- < mat-select formControlName ="localGovernmentUuid " (selectionChange) ="onLocalGovernmentChange($event) ">
20- < mat-option *ngFor ="let lg of filteredLocalGovernments " [value] ="lg.uuid ">
18+ < mat-label > Local or First Nation Government*</ mat-label >
19+ < input
20+ matInput
21+ type ="text "
22+ [formControl] ="localGovernmentControl "
23+ [matAutocomplete] ="auto "
24+ placeholder ="Type government name "
25+ (blur) ="onLocalGovernmentBlur() "
26+ />
27+ < mat-autocomplete #auto ="matAutocomplete " (optionSelected) ="onLocalGovernmentChange($event) ">
28+ < mat-option *ngFor ="let lg of filteredLocalGovernments | async " [value] ="lg.uuid ">
2129 {{ lg.name }}
2230 </ mat-option >
23- </ mat-select >
31+ </ mat-autocomplete >
32+ < mat-error *ngIf ="localGovernmentControl.hasError('required') && localGovernmentControl.touched ">
33+ Local or First Nation Government is required
34+ </ mat-error >
2435 </ mat-form-field >
2536
2637 < mat-form-field appearance ="outline ">
@@ -37,17 +48,29 @@ <h3>Property</h3>
3748 < div class ="coordinate-field ">
3849 < mat-form-field appearance ="outline ">
3950 < mat-label > Latitude</ mat-label >
40- < input type ="number " matInput formControlName ="latitude " step ="0.000001 " />
51+ < input type ="number " matInput formControlName ="latitude " step ="0.00001 " placeholder ="e.g. 49.55555 " />
52+ < mat-error *ngIf ="form.get('latitude')?.hasError('required') "> Latitude is required</ mat-error >
53+ < mat-error *ngIf ="form.get('latitude')?.hasError('min') "> Latitude must be at least 48</ mat-error >
54+ < mat-error *ngIf ="form.get('latitude')?.hasError('max') "> Latitude must be at most 61</ mat-error >
55+ < mat-error *ngIf ="form.get('latitude')?.hasError('decimalPlaces') ">
56+ Latitude must have exactly 5 decimal places (e.g. 49.55555)
57+ </ mat-error >
4158 </ mat-form-field >
4259 < div class ="coordinate-help "> Valid Range is 48 to 61. Example: 49.55555</ div >
4360 </ div >
4461
4562 < div class ="coordinate-field ">
4663 < mat-form-field appearance ="outline ">
4764 < mat-label > Longitude</ mat-label >
48- < input type ="number " matInput formControlName ="longitude " step ="0.000001 " />
65+ < input type ="number " matInput formControlName ="longitude " step ="0.00001 " placeholder ="e.g. -130.55555 " />
66+ < mat-error *ngIf ="form.get('longitude')?.hasError('required') "> Longitude is required</ mat-error >
67+ < mat-error *ngIf ="form.get('longitude')?.hasError('min') "> Longitude must be at least -140</ mat-error >
68+ < mat-error *ngIf ="form.get('longitude')?.hasError('max') "> Longitude must be at most -113</ mat-error >
69+ < mat-error *ngIf ="form.get('longitude')?.hasError('decimalPlaces') ">
70+ Longitude must have exactly 5 decimal places (e.g. -130.55555)
71+ </ mat-error >
4972 </ mat-form-field >
50- < div class ="coordinate-help "> Valid Range is -140 to -113. Example: -153.44444 </ div >
73+ < div class ="coordinate-help "> Valid Range is -140 to -113. Example: -130.55555 </ div >
5174 </ div >
5275 </ div >
5376
@@ -84,12 +107,12 @@ <h3>Property</h3>
84107 < div class ="area-fields ">
85108 < mat-form-field appearance ="outline ">
86109 < mat-label > Area (ha)</ mat-label >
87- < input type ="number " matInput formControlName ="areaHectares " step ="0.01 " min ="0 " />
110+ < input type ="number " matInput formControlName ="areaHectares " step ="0.01 " min ="0 " placeholder =" e.g. 10.50 " />
88111 </ mat-form-field >
89112
90113 < mat-form-field appearance ="outline ">
91114 < mat-label > % within ALR</ mat-label >
92- < input type ="number " matInput formControlName ="alrPercentage " step ="0.1 " min ="0 " max ="100 " />
115+ < input type ="number " matInput formControlName ="alrPercentage " step ="0.1 " min ="0 " max ="100 " placeholder =" e.g. 75.5 " />
93116 < span matTextSuffix > %</ span >
94117 </ mat-form-field >
95118 </ div >
0 commit comments