fetching pblm solved
This commit is contained in:
parent
f3ebdadf68
commit
eec33d5c58
@ -83,13 +83,19 @@
|
||||
</h2>
|
||||
<mat-dialog-content style="border-bottom: 2px solid red;">
|
||||
<mat-tab-group>
|
||||
|
||||
|
||||
<mat-tab label="Details">
|
||||
<mat-card>
|
||||
|
||||
<div style="border: 2px solid rgb(223, 213, 213);">
|
||||
<mat-card-content>
|
||||
<mat-card-header style="font-size: medium;">Personal Banking Details
|
||||
|
||||
</mat-card-header>
|
||||
<br>
|
||||
|
||||
<mat-form-field style="width:60% !important;">
|
||||
<mat-select placeholder="Is the Banking Infomation Available" formControlName="bank_info_available" (selectionChange)="onChangeAvailable($event.value)">
|
||||
<mat-select placeholder="Is the Personal Banking Infomation Available" formControlName="bank_info_available" (selectionChange)="onChangeAvailable($event.value)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
@ -101,7 +107,7 @@
|
||||
<mat-expansion-panel class="banlFields" [expanded]="step == i">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
<p>Banking Details {{i+1}}
|
||||
<p>Personal Banking Details {{i+1}}
|
||||
</p>
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
@ -210,7 +216,7 @@
|
||||
<div fxFlex="100" align="center">
|
||||
<button type="button" mat-flat-button color="primary" (click)="addBankdetails(i, $event)"
|
||||
matTooltip="Add More" matTooltipPosition="above" *ngIf="last">
|
||||
<strong>Add More Banking Details</strong>
|
||||
<strong>Add More Personal Banking Details</strong>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -243,6 +249,10 @@
|
||||
</div>
|
||||
<div style="border: 2px solid rgb(223, 213, 213);">
|
||||
<mat-card-content>
|
||||
<mat-card-header style="font-size: medium;">Business Details
|
||||
|
||||
</mat-card-header>
|
||||
<br>
|
||||
<mat-form-field style="width:60% !important;">
|
||||
<mat-select placeholder="Is the Business Infomation Available" formControlName="bank_info_available_business" (selectionChange)="onChangeAvailablebusiness($event.value)">
|
||||
<mat-option>Select</mat-option>
|
||||
@ -264,8 +274,8 @@
|
||||
<mat-select placeholder="Account Holder’s Name" formControlName="applicant_name_business"
|
||||
[compareWith]="compareObjects">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
<mat-optgroup *ngFor="let group1 of mergeCompanyApplicant" [label]="group1.groupName">
|
||||
<mat-option *ngFor="let val of group1.groupValues" [value]="val">
|
||||
{{val.group_id != 2 ? val.name : val.name | titlecase}}
|
||||
</mat-option>
|
||||
</mat-optgroup>
|
||||
|
||||
@ -72,7 +72,7 @@ export class BankingDetailsComponent implements OnInit {
|
||||
this.pd_cus_segment = this.pd_cus_segment.substring(0, 3);
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
this.applicants = this.applicants.filter(val => val.applicant_type == 0 || val.applicant_type == 1)
|
||||
this.applicants.push({ 'pd_co_applicant_id': '0', 'applicant_name': 'Others' });
|
||||
// this.applicants.push({ 'pd_co_applicant_id': '0', 'applicant_name': 'Others' });
|
||||
this.companies = this.pd_all_details.pdapplicants_detials.filter(val => val.applicant_type == 2)
|
||||
this.notifier = notifier;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
@ -125,6 +125,7 @@ export class BankingDetailsComponent implements OnInit {
|
||||
if (this.applicants.length > 0) {
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return { id: element.pd_co_applicant_id, name: element.applicant_name, group_id: 2 };
|
||||
// return { id: element.pd_co_applicant_id, name: element.applicant_name_business, group_id: 2 };
|
||||
});
|
||||
this.mergeCompanyApplicant.push({ groupName: 'APPLICANTS', groupValues: modifyApplicantList })
|
||||
|
||||
@ -163,11 +164,16 @@ export class BankingDetailsComponent implements OnInit {
|
||||
if (data.status == 200) {
|
||||
this.bankingForm.controls.banking_form_remark.setValue(data.records.banking_form_remark);
|
||||
let bank_info=data.records.hasOwnProperty('bank_info_available') ? data.records.bank_info_available == true ? 'Yes' : 'No' : 'Yes'
|
||||
let bank_info_business=data.records.hasOwnProperty('bank_info_available_business') ? data.records.bank_info_available_business == true ? 'Yes' : 'No' : 'Yes'
|
||||
console.log("bank_info",bank_info)
|
||||
this.bankingForm.controls.bank_info_available.setValue(bank_info);
|
||||
this.bankingForm.controls.bank_info_available_business.setValue(bank_info_business);
|
||||
var result = Object.keys(data.records.banking_details).map(function (key) {
|
||||
return data.records.banking_details[key];
|
||||
});
|
||||
var result1 = Object.keys(data.records.business_details).map(function (key) {
|
||||
return data.records.business_details[key];
|
||||
});
|
||||
if (result.length == 0) {
|
||||
// control.push(this.createBankarray());
|
||||
} else {
|
||||
@ -176,24 +182,29 @@ export class BankingDetailsComponent implements OnInit {
|
||||
this.selectedAccTypeChanges(+datas.account_type, index)
|
||||
// this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
|
||||
control.push(this.createBankarray());
|
||||
control1.push(this.createBusinessarray());
|
||||
//control1.push(this.createBusinessarray());
|
||||
});
|
||||
let reeult1=[{account_type: "1",bank_name: "60",
|
||||
limit: "",
|
||||
other_applicant: "",
|
||||
other_bank: "",
|
||||
salary: "",
|
||||
vintage_month: "",
|
||||
same_ac_used_for:"",
|
||||
vintage_year: 18,applicant_name:{group_id: 2,
|
||||
id: "5521",
|
||||
name: "Test1"}}]
|
||||
|
||||
|
||||
this.bankingForm.controls.itemRows.setValue(result);
|
||||
//this.businessForm.controls.itemRows1.setValue(result);
|
||||
// console.log(result);
|
||||
//console.log('1va');
|
||||
//console.log(this.bankingForm.controls.itemRows);
|
||||
//this.bankingForm.controls.itemRows1.setValue(result1);
|
||||
|
||||
}
|
||||
if (result1.length == 0) {
|
||||
// control.push(this.createBankarray());
|
||||
} else {
|
||||
result1.forEach((datas, index) => {
|
||||
// this.selectedBorrower(datas.applicant_name,index);
|
||||
this.selectedAccTypeChanges(+datas.account_type, index)
|
||||
// this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
|
||||
//control.push(this.createBankarray());
|
||||
control1.push(this.createBusinessarray());
|
||||
});
|
||||
|
||||
|
||||
//this.bankingForm.controls.itemRows.setValue(result);
|
||||
this.bankingForm.controls.itemRows1.setValue(result1);
|
||||
|
||||
}
|
||||
} else {
|
||||
// control.push(this.createBankarray());
|
||||
@ -405,7 +416,7 @@ export class BankingDetailsComponent implements OnInit {
|
||||
records.business_details=this.bankingForm.controls['itemRows1'].value;
|
||||
console.log('record');
|
||||
console.log(records);
|
||||
return
|
||||
//return
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user