loan details issue fix
This commit is contained in:
parent
6934631256
commit
cd9a92b1c9
@ -38,7 +38,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:64%">
|
||||
<mat-select placeholder="Sub Product" formControlName="sub_product"
|
||||
(selectionChange)="onChangeSubProduct($event)">
|
||||
(selectionChange)="onChangeSubProduct($event.value)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let list of m_endUseofLoad" [value]="list.subproduct_id">
|
||||
{{list.name }} ( {{list.abbr}} ) </mat-option>
|
||||
|
||||
@ -223,7 +223,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
result.forEach(val => {
|
||||
enduse.push(val.end_use);
|
||||
});
|
||||
|
||||
this.onChangeSubProduct(value.records.sub_product);
|
||||
|
||||
this.loanDetailsForm.controls['end_use'].setValue(enduse);
|
||||
this.endUserChange(enduse);
|
||||
|
||||
@ -516,8 +517,11 @@ export class LoanDetailsComponent implements OnInit {
|
||||
}
|
||||
|
||||
onChangeSubProduct(e) {
|
||||
let splitted = e.source.triggerValue.split(" ( ", 2);
|
||||
this._pd.getEndUseForLoan(this.pdid, e.value).subscribe(data => {
|
||||
console.log('eeeeeee',e)
|
||||
// let splitted = e.source.triggerValue.split(" ( ", 2);
|
||||
let splitted=this.m_endUseofLoad.filter(val=>val.subproduct_id == e).map(res=>res.name)[0]
|
||||
console.log(splitted);
|
||||
this._pd.getEndUseForLoan(this.pdid, e).subscribe(data => {
|
||||
this.m_endUseForLoan = data.records.filter(data => data.isactive == 1);
|
||||
});
|
||||
if(this.mortageCardAccess == true) {
|
||||
@ -530,7 +534,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
else if (that.productAbbr == "LAP") {
|
||||
if (data.group_name == that.productAbbr && data.sub_group_name == splitted[0] && data.isactive == 1) {
|
||||
if (data.group_name == that.productAbbr && data.sub_group_name == splitted && data.isactive == 1) {
|
||||
return data;
|
||||
}
|
||||
else if (data.group_name == that.productAbbr && (data.sub_group_name == null || data.sub_group_name == '') && data.isactive == 1) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user