issues fixes in web : ps
This commit is contained in:
parent
58512172fc
commit
eb930a31b3
@ -136,7 +136,7 @@
|
|||||||
<!-- //*ngIf="current_balance_tenure.hasError('min')" class="mat-text-warn" -->
|
<!-- //*ngIf="current_balance_tenure.hasError('min')" class="mat-text-warn" -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput placeholder="Elapsed Tenure in Months"
|
<input matInput placeholder="Elapsed Tenure in Months" readonly
|
||||||
formControlName="elapsed_tenure" autocomplete="off">
|
formControlName="elapsed_tenure" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -226,12 +226,7 @@ export class CurrentLoanComponent implements OnInit {
|
|||||||
this.dataFromAssets.forEach((val, index) => {
|
this.dataFromAssets.forEach((val, index) => {
|
||||||
if (val.mode == 0) {
|
if (val.mode == 0) {
|
||||||
let owner = val.owner_name.map((e => {
|
let owner = val.owner_name.map((e => {
|
||||||
console.log(e.name.split(','));
|
|
||||||
console.log(e.name);
|
|
||||||
|
|
||||||
return (e.name == 'Others' ? val.other_owner : e.name).split(',');
|
return (e.name == 'Others' ? val.other_owner : e.name).split(',');
|
||||||
|
|
||||||
|
|
||||||
}));
|
}));
|
||||||
// labelarray[index] = ' : '+owner +' - '+ val.mode_name.split("/")[0] + ' ( ' + val.mode_name.split("/")[1] + ' )';
|
// labelarray[index] = ' : '+owner +' - '+ val.mode_name.split("/")[0] + ' ( ' + val.mode_name.split("/")[1] + ' )';
|
||||||
labelarray[index] = ' : ' + owner + ' - ' + val.mode_name;
|
labelarray[index] = ' : ' + owner + ' - ' + val.mode_name;
|
||||||
|
|||||||
@ -518,10 +518,101 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
submitFamily() {
|
submitFamily() {
|
||||||
|
|
||||||
|
const familyFormArray : FormArray = this.familyForm.controls['family_details'] as FormArray;
|
||||||
|
|
||||||
|
let FDArrayLength: any = familyFormArray.controls.length;
|
||||||
|
|
||||||
|
if (FDArrayLength > 0) {
|
||||||
|
let cnt1 = 0;
|
||||||
|
while(cnt1 < FDArrayLength){
|
||||||
|
|
||||||
|
let familyDetailsFormGrp : FormGroup = familyFormArray.controls[cnt1] as FormGroup;
|
||||||
|
let familyMembersFormArr : FormArray = familyDetailsFormGrp.controls.family_members_details as FormArray;
|
||||||
|
|
||||||
|
familyDetailsFormGrp.controls.residence_ownership.value == 1
|
||||||
|
? familyDetailsFormGrp.controls.ownershipOther.setValidators([Validators.required])
|
||||||
|
: familyDetailsFormGrp.controls.ownershipOther.setValue('');
|
||||||
|
familyDetailsFormGrp.controls.ownershipOther.updateValueAndValidity();
|
||||||
|
|
||||||
|
familyDetailsFormGrp.controls.residence_ownership.value == 3
|
||||||
|
? familyDetailsFormGrp.controls.rent.setValidators([Validators.required])
|
||||||
|
: familyDetailsFormGrp.controls.rent.setValue('');
|
||||||
|
familyDetailsFormGrp.controls.rent.updateValueAndValidity();
|
||||||
|
|
||||||
|
familyDetailsFormGrp.controls.residence_pin.value == 1
|
||||||
|
? familyDetailsFormGrp.controls.residence_other_pincode.setValidators([Validators.required])
|
||||||
|
: familyDetailsFormGrp.controls.residence_other_pincode.setValue('');
|
||||||
|
familyDetailsFormGrp.controls.residence_other_pincode.updateValueAndValidity();
|
||||||
|
|
||||||
|
let FMArrayLength: any = familyMembersFormArr.controls.length;
|
||||||
|
|
||||||
|
if (FMArrayLength > 0) {
|
||||||
|
let cnt2 = 0;
|
||||||
|
while(cnt2 < FMArrayLength){
|
||||||
|
let Ctrls : FormArray = familyMembersFormArr.controls[cnt2] as FormArray;
|
||||||
|
if(Ctrls.controls['family_member_earning_status'].value == 1){
|
||||||
|
|
||||||
|
Ctrls.controls['non_earning_occupation'].setValue('');
|
||||||
|
Ctrls.controls['non_earning_occupation'].clearValidators();
|
||||||
|
Ctrls.controls['non_earning_occupation'].updateValueAndValidity();
|
||||||
|
|
||||||
|
if(Ctrls.controls['earning_segment'].value == 1){
|
||||||
|
Ctrls.controls['earning_if_others_segment'].setValidators([Validators.required]);
|
||||||
|
}
|
||||||
|
|
||||||
|
Ctrls.controls['non_earning_if_others'].setValue('');
|
||||||
|
Ctrls.controls['non_earning_if_schoolorcollege'].setValue('');
|
||||||
|
Ctrls.controls['non_earning_if_retired_from'].setValue('');
|
||||||
|
|
||||||
|
}
|
||||||
|
if(Ctrls.controls['family_member_earning_status'].value == 2){
|
||||||
|
|
||||||
|
Ctrls.controls['earning_if_others_segment'].setValue('');
|
||||||
|
|
||||||
|
Ctrls.controls['earning_gross_income_per_month'].setValue('');
|
||||||
|
|
||||||
|
Ctrls.controls['earning_segment'].setValue('');
|
||||||
|
Ctrls.controls['earning_segment'].clearValidators();
|
||||||
|
|
||||||
|
Ctrls.controls['earning_name_of_the_employer_or_business'].setValue('');
|
||||||
|
Ctrls.controls['earning_name_of_the_employer_or_business'].clearValidators();
|
||||||
|
|
||||||
|
Ctrls.controls['earning_number_of_years_in_employment_or_business'].setValue('');
|
||||||
|
Ctrls.controls['earning_number_of_years_in_employment_or_business'].clearValidators();
|
||||||
|
|
||||||
|
|
||||||
|
if(Ctrls.controls['non_earning_occupation'].value==1){
|
||||||
|
Ctrls.controls['non_earning_if_others'].setValidators([Validators.required]);
|
||||||
|
}
|
||||||
|
if(Ctrls.controls['non_earning_occupation'].value==2){
|
||||||
|
Ctrls.controls['non_earning_if_schoolorcollege'].setValidators([Validators.required]);
|
||||||
|
}
|
||||||
|
if(Ctrls.controls['non_earning_occupation'].value==3){
|
||||||
|
Ctrls.controls['non_earning_if_retired_from'].setValidators([Validators.required]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ctrls.controls['earning_if_others_segment'].updateValueAndValidity();
|
||||||
|
Ctrls.controls['earning_segment'].updateValueAndValidity();
|
||||||
|
Ctrls.controls['earning_name_of_the_employer_or_business'].updateValueAndValidity();
|
||||||
|
Ctrls.controls['earning_number_of_years_in_employment_or_business'].updateValueAndValidity();
|
||||||
|
Ctrls.controls['non_earning_if_others'].updateValueAndValidity();
|
||||||
|
Ctrls.controls['non_earning_if_schoolorcollege'].updateValueAndValidity();
|
||||||
|
Ctrls.controls['non_earning_if_retired_from'].updateValueAndValidity();
|
||||||
|
Ctrls.controls['earning_gross_income_per_month'].updateValueAndValidity();
|
||||||
|
cnt2++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cnt1++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.familyForm.valid) {
|
if (!this.familyForm.valid) {
|
||||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var records = this.familyForm.value;
|
var records = this.familyForm.value;
|
||||||
//To Remove The "Null" With Key also
|
//To Remove The "Null" With Key also
|
||||||
Object.keys(records).forEach((key) => (records[key] == null) && delete records[key]);
|
Object.keys(records).forEach((key) => (records[key] == null) && delete records[key]);
|
||||||
|
|||||||
@ -265,7 +265,6 @@ export class NeighbourHoodComponent implements OnInit {
|
|||||||
// let RefCtrlLength : any = referencecheckControl.controls.length;
|
// let RefCtrlLength : any = referencecheckControl.controls.length;
|
||||||
const neighbourhoodControl : FormGroup = this._neighbourhoodForm.controls['neighbourhood_list'] as FormGroup;
|
const neighbourhoodControl : FormGroup = this._neighbourhoodForm.controls['neighbourhood_list'] as FormGroup;
|
||||||
let NbhdCtrlLength: any = neighbourhoodControl.controls.length;
|
let NbhdCtrlLength: any = neighbourhoodControl.controls.length;
|
||||||
|
|
||||||
if (NbhdCtrlLength > 0) {
|
if (NbhdCtrlLength > 0) {
|
||||||
let Ncnt = 0;
|
let Ncnt = 0;
|
||||||
while(Ncnt < NbhdCtrlLength){
|
while(Ncnt < NbhdCtrlLength){
|
||||||
@ -307,6 +306,10 @@ export class NeighbourHoodComponent implements OnInit {
|
|||||||
Ncnt++;
|
Ncnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._neighbourhoodForm.controls.neighbourhood_status.setValidators([Validators.required]);
|
||||||
|
this._neighbourhoodForm.controls.neighbourhood_status.updateValueAndValidity();
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// if(formData.check_type==1){
|
// if(formData.check_type==1){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user