others field changes : ps
This commit is contained in:
parent
f505fd1b60
commit
270004fea2
@ -436,6 +436,7 @@ export class AddressComponent implements OnInit {
|
||||
}
|
||||
|
||||
if (!this.addressForm.valid) {
|
||||
this.validateAllFormFields(this.addressForm);
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
this.disableAfterSubmit = false;
|
||||
return;
|
||||
@ -485,16 +486,18 @@ export class AddressComponent implements OnInit {
|
||||
|
||||
|
||||
/** To validate All Form Fields */
|
||||
validateAllFormFields(formGroup: FormGroup) {
|
||||
validateAllFormFields(formGroup: any) {
|
||||
Object.keys(formGroup.controls).forEach(field => {
|
||||
const control = formGroup.get(field);
|
||||
if (control instanceof FormControl) {
|
||||
control.markAsTouched({ onlySelf: true });
|
||||
} else if (control instanceof FormGroup) {
|
||||
} else if (control instanceof FormGroup) {
|
||||
this.validateAllFormFields(control);
|
||||
} else if (control instanceof FormArray) {
|
||||
this.validateAllFormFields(control);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** For DOCS Tab */
|
||||
public viewerOptions: any = {
|
||||
|
||||
@ -604,13 +604,10 @@ export class GeneralInfoComponent implements OnInit {
|
||||
temp: number = 0;
|
||||
submitGeneralForm(formData: any) {
|
||||
// console.log('formData',formData);
|
||||
|
||||
if (formData.individuals.length > 0) {
|
||||
|
||||
formData.individuals.forEach((val, index) => {
|
||||
|
||||
if (val.is_person_met == false) {
|
||||
|
||||
this.temp++;
|
||||
}
|
||||
|
||||
@ -618,11 +615,12 @@ export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
if (this.temp == formData.individuals.length) {
|
||||
this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
|
||||
|
||||
this.temp = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
else if(this.temp <= formData.individuals.length){
|
||||
this.temp = 0;
|
||||
}
|
||||
|
||||
let individualCtrl: any = this._generalForm.get('individuals') as FormArray;
|
||||
let individualCtrlLength: any = individualCtrl.controls.length;
|
||||
|
||||
@ -40,11 +40,13 @@
|
||||
<input matInput placeholder="What is the name of lender representative who accompanies the PD officer, If any?"
|
||||
formControlName="lender_representative_who_accompanies"
|
||||
required>
|
||||
<mat-error *ngIf="details.controls['lender_representative_who_accompanies'].hasError('required')">Lender Name Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Did the lender representative carry the loan file during PD?"
|
||||
formControlName="lender_representative_carry_loan_files"
|
||||
required>
|
||||
<mat-error *ngIf="details.controls['lender_representative_carry_loan_files'].hasError('required')">Did the lender representative carry the loan file during PD? Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -176,13 +176,15 @@ export class LenderRepresentativeComponent implements OnInit {
|
||||
this.disableAfterSubmit = false;
|
||||
})
|
||||
}
|
||||
validateAllFormFields(formGroup: FormGroup) {
|
||||
validateAllFormFields(formGroup: any) {
|
||||
Object.keys(formGroup.controls).forEach(field => {
|
||||
const control = formGroup.get(field);
|
||||
if (control instanceof FormControl) {
|
||||
control.markAsTouched({ onlySelf: true });
|
||||
} else if (control instanceof FormGroup) {
|
||||
this.validateAllFormFields(control);
|
||||
} else if (control instanceof FormArray) {
|
||||
this.validateAllFormFields(control);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -55,6 +55,7 @@
|
||||
<mat-form-field *ngIf="isOtherPurpose" style="width: 28%">
|
||||
<input matInput placeholder="Specify End Use *" formControlName="end_use_other"
|
||||
autocomplete="off">
|
||||
<mat-error *ngIf="loanDetailsForm.controls['end_use_other'].hasError('required')">End Use Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 64%">
|
||||
<mat-select placeholder="Is there a balance transfer ? " (selectionChange)="selectedBalancesTransferChanges($event)"
|
||||
@ -87,6 +88,7 @@
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['lender'].value == 1" style="width: 28%">
|
||||
<input matInput placeholder="Specify Others Lender *" formControlName="other_bt_lender"
|
||||
autocomplete="off">
|
||||
<mat-error *ngIf="loanDetailsForm.controls['other_bt_lender'].hasError('required')">Lender Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
@ -109,6 +111,7 @@
|
||||
style="width: 28%">
|
||||
<input matInput placeholder="Specify End Use of Top Up *"
|
||||
formControlName="other_end_use_topup" autocomplete="off">
|
||||
<mat-error *ngIf="loanDetailsForm.controls['other_end_use_topup'].hasError('required')">End Use of Top Up Required</mat-error>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<span *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' && !isContribution">
|
||||
@ -136,6 +139,7 @@
|
||||
<mat-form-field *ngIf="isOtherSource" style="width: 28%">
|
||||
<input matInput placeholder="Specify Other Sources *" formControlName="other_source"
|
||||
autocomplete="off">
|
||||
<mat-error *ngIf="loanDetailsForm.controls['other_source'].hasError('required')">Sources Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
</span>
|
||||
@ -166,6 +170,7 @@
|
||||
<mat-form-field *ngIf="mortageAccess" style="width:46%;">
|
||||
<input matInput placeholder="Specify Type of Property *" formControlName="property_type_others"
|
||||
autocomplete="off">
|
||||
<mat-error *ngIf="loanDetailsForm.controls['property_type_others'].hasError('required')">Type of Property Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:46%;">
|
||||
@ -177,6 +182,7 @@
|
||||
</mat-option>
|
||||
</mat-optgroup>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="loanDetailsForm.controls['owner_name'].hasError('required')">Owner Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <mat-select multiple placeholder="Name of Owner"
|
||||
|
||||
@ -617,7 +617,7 @@
|
||||
|
||||
<!-- start validate appplicant/agreement payment options -->
|
||||
<span *ngIf="units.controls['paid_monthly_rent_per_met'] && units.controls['payment_mode'] && units.controls['monthly_rent_amount'] && units.controls['payment_mode_per_met']">
|
||||
<mat-form-field style="width:100% !important" appearance="outline" *ngIf="(units.value.monthly_rent_amount>0 && units.value.paid_monthly_rent_per_met>0 && units.value.payment_mode!='' && units.value.payment_mode_per_met!='') && (units.value.monthly_rent_amount!=units.value.paid_monthly_rent_per_met) || units.value.payment_mode_per_met.id != 2 "><!-- || units.value.payment_mode.id!=units.value.payment_mode_per_met.id -->
|
||||
<mat-form-field style="width: 28.2rem !important;" appearance="outline" *ngIf="(units.value.monthly_rent_amount>0 && units.value.paid_monthly_rent_per_met>0 && units.value.payment_mode!='' && units.value.payment_mode_per_met!='') && (units.value.monthly_rent_amount!=units.value.paid_monthly_rent_per_met) || units.value.payment_mode_per_met.id != 2 "><!-- || units.value.payment_mode.id!=units.value.payment_mode_per_met.id -->
|
||||
<mat-label>What is the Reason for Difference in Rent Amount</mat-label><!-- or Mode of Payment -->
|
||||
<input matInput autocomplete="off" placeholder="" formControlName="payment_difference_per_met">
|
||||
</mat-form-field>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user