Merge pull request #2803 from JaySoni1/WEB-425-field-validation-for-required-field-missing-in-bulk-loan-reassignment-page

WEB-425 Field validation for required field missing in "Bulk Loan Reassignment" page
This commit is contained in:
Jose Alberto Hernandez
2025-11-19 17:28:48 -05:00
committed by GitHub
2 changed files with 12 additions and 2 deletions
@@ -5,11 +5,15 @@
<div class="layout-row-wrap gap-2px responsive-column">
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
<mat-select required (selectionChange)="getOffice($event.value)">
<mat-select required formControlName="officeId" (selectionChange)="getOffice($event.value)">
<mat-option *ngFor="let office of offices" [value]="office.id">
{{ office.name }}
</mat-option>
</mat-select>
<mat-error *ngIf="bulkLoanForm.controls.officeId.hasError('required')">
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
</div>
@@ -23,6 +27,7 @@
[matDatepicker]="assignmentDatePicker"
required
formControlName="assignmentDate"
placeholder="{{ 'labels.inputs.Assignment Date' | translate }}"
/>
<mat-datepicker-toggle matSuffix [for]="assignmentDatePicker"></mat-datepicker-toggle>
<mat-datepicker #assignmentDatePicker></mat-datepicker>
@@ -123,6 +128,7 @@
{{ 'labels.buttons.Cancel' | translate }}
</button>
<button
type="submit"
mat-raised-button
color="primary"
[disabled]="!bulkLoanForm.valid"
@@ -79,8 +79,12 @@ export class BulkLoanReassignmnetComponent implements OnInit {
*/
setBulkLoanForm() {
this.bulkLoanForm = this.formBuilder.group({
officeId: [
'',
Validators.required
],
assignmentDate: [
new Date(),
this.settingsService.businessDate,
Validators.required
],
toLoanOfficerId: [