WEB-425 Field validation for required field missing in Bulk Loan Reassignment page
This commit is contained in:
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user