Fairoj : general info applicant edit image not appear issue and loan details invalid form issue

This commit is contained in:
venbatechnologies@gmail.com 2020-02-21 17:31:53 +05:30
parent b704269471
commit 055483f259
3 changed files with 33 additions and 2 deletions

View File

@ -193,6 +193,10 @@ export class OtherApplicantDetailsComponent implements OnInit {
let diaglog_param=formData.applicant_list
if(!this.data.edit_data){
diaglog_param[0].pd_co_applicant_id=result_data.pd_co_applicant_id
}
else{
diaglog_param[0].is_person_met_id_proof=result_data.is_person_met_id_proof
diaglog_param[0].is_person_met_pic=result_data.is_person_met_pic
}
console.log("dialog param",diaglog_param);
this.dialogRef.close({

View File

@ -819,7 +819,23 @@ export class GeneralInfoComponent implements OnInit {
saveRecords.general_remark = formData.general_remark;
saveRecords.is_kyc = formData.is_kyc;
saveRecords.kyc_and_captur_the_name = formData.kyc_and_captur_the_name;
saveRecords.individuals.forEach(res=>{
})
if(saveRecords.individuals.length > 0){
saveRecords.individuals.forEach(val=>{
if(val.hasOwnProperty('is_person_met_id_proof')){
if(val.is_person_met_id_proof != ''){
val.is_person_met_id_proof = 'SAVED'
}
}
if(val.hasOwnProperty('is_person_met_pic')){
if(val.is_person_met_pic != ''){
val.is_person_met_pic = 'SAVED'
}
}
})
}
this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
dataresult => {
if (dataresult.status == 200) {

View File

@ -619,12 +619,14 @@ export class LoanDetailsComponent implements OnInit {
// console.log(event);
if (event == 'no') {
// console.log('on 2 time -', event);
console.log(this.loanDetailsForm.value.is_transfer,!this.isContribution)
if(this.loanDetailsForm.value.is_transfer == 'no' && !this.isContribution){
this.loanDetailsForm.controls['source'].setValidators([Validators.required]);
this.loanDetailsForm.controls['source'].updateValueAndValidity();
this.loanDetailsForm.controls['own_contribution'].setValidators([Validators.required]);
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
}
this.loanDetailsForm.controls['other_bt_lender'].setValue('');
this.loanDetailsForm.controls['balance_transfer_amount'].setValue('');
this.loanDetailsForm.controls['lender'].setValue('');
@ -816,12 +818,21 @@ export class LoanDetailsComponent implements OnInit {
else if(this.isContribution == false) {
if (this.loanDetailsForm.controls['is_transfer'].value != 'yes') {
console.log(this.loanDetailsForm.value.is_transfer,this.isContribution)
if(this.loanDetailsForm.value.is_transfer == 'no' && !this.isContribution && (this.lenderShortName != 'CLIX' && this.lenderShortName != 'MWISE' || this.prod_catagory == 'LFMP')){
this.loanDetailsForm.controls['own_contribution'].setValidators([Validators.required]);
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
this.loanDetailsForm.controls['source'].setValidators([Validators.required]);
this.loanDetailsForm.controls['source'].updateValueAndValidity();
}
else{
this.loanDetailsForm.controls['own_contribution'].clearValidators();
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
this.loanDetailsForm.controls['source'].clearValidators();
this.loanDetailsForm.controls['source'].updateValueAndValidity();
}
}
else if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
this.loanDetailsForm.controls['own_contribution'].setValue('');