Skip to content

Commit 6d03bf2

Browse files
committed
WEB-425 Field validation for required field missing in Bulk Loan Reassignment page
1 parent a939acc commit 6d03bf2

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/app/organization/bulk-loan-reassignmnet/bulk-loan-reassignmnet.component.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@
55
<div class="layout-row-wrap gap-2px responsive-column">
66
<mat-form-field class="flex-48">
77
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
8-
<mat-select required (selectionChange)="getOffice($event.value)">
8+
<mat-select required formControlName="officeId" (selectionChange)="getOffice($event.value)">
99
<mat-option *ngFor="let office of offices" [value]="office.id">
1010
{{ office.name }}
1111
</mat-option>
1212
</mat-select>
13+
<mat-error *ngIf="bulkLoanForm.controls.officeId.hasError('required')">
14+
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
15+
<strong>{{ 'labels.commons.required' | translate }}</strong>
16+
</mat-error>
1317
</mat-form-field>
1418
</div>
1519

@@ -23,6 +27,7 @@
2327
[matDatepicker]="assignmentDatePicker"
2428
required
2529
formControlName="assignmentDate"
30+
placeholder="{{ 'labels.inputs.Assignment Date' | translate }}"
2631
/>
2732
<mat-datepicker-toggle matSuffix [for]="assignmentDatePicker"></mat-datepicker-toggle>
2833
<mat-datepicker #assignmentDatePicker></mat-datepicker>
@@ -123,6 +128,7 @@
123128
{{ 'labels.buttons.Cancel' | translate }}
124129
</button>
125130
<button
131+
type="submit"
126132
mat-raised-button
127133
color="primary"
128134
[disabled]="!bulkLoanForm.valid"

src/app/organization/bulk-loan-reassignmnet/bulk-loan-reassignmnet.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@ export class BulkLoanReassignmnetComponent implements OnInit {
7979
*/
8080
setBulkLoanForm() {
8181
this.bulkLoanForm = this.formBuilder.group({
82+
officeId: [
83+
'',
84+
Validators.required
85+
],
8286
assignmentDate: [
83-
new Date(),
87+
this.settingsService.businessDate,
8488
Validators.required
8589
],
8690
toLoanOfficerId: [

0 commit comments

Comments
 (0)