subproduct hide
This commit is contained in:
parent
fa62a8449b
commit
0157ec0670
@ -68,7 +68,7 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
lenderShortName: any;
|
lenderShortName: any;
|
||||||
isSubproductShown: boolean = true;
|
isSubproductShown: boolean = true;
|
||||||
productShortName : any;
|
prod_catagory : any;
|
||||||
sales_and_credit_enable: boolean=false;
|
sales_and_credit_enable: boolean=false;
|
||||||
sales_and_credit_person: any=[];
|
sales_and_credit_person: any=[];
|
||||||
finInstitutionList: any;
|
finInstitutionList: any;
|
||||||
@ -118,6 +118,14 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
let selectLender=this.lenderList.filter(val=>val.entity_id == entity_id)[0]
|
let selectLender=this.lenderList.filter(val=>val.entity_id == entity_id)[0]
|
||||||
console.log(selectLender);
|
console.log(selectLender);
|
||||||
this.selectedLender(selectLender,option)
|
this.selectedLender(selectLender,option)
|
||||||
|
if(option != 'start'){
|
||||||
|
this.getSubproductList(res['records'].default_product,1);
|
||||||
|
this._EditPDtriggerForm.controls['fk_product_id'].setValue(res['records'].default_product);
|
||||||
|
this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(res['records'].default_sub_product);
|
||||||
|
this._EditPDtriggerForm.controls['fk_customer_segment'].setValue(res['records'].default_customer_segment);
|
||||||
|
this._EditPDtriggerForm.controls['fk_pd_type'].setValue(res['records'].default_pd_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -202,8 +210,8 @@ if(!option){
|
|||||||
|
|
||||||
if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK
|
if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK
|
||||||
// console.log("entered");
|
// console.log("entered");
|
||||||
this._EditPDtriggerForm.controls['fk_product_id'].setValue("3")
|
// this._EditPDtriggerForm.controls['fk_product_id'].setValue("3")
|
||||||
this._EditPDtriggerForm.controls['fk_pd_type'].setValue("1");
|
// this._EditPDtriggerForm.controls['fk_pd_type'].setValue("1");
|
||||||
this.getSubproductList("3",2)
|
this.getSubproductList("3",2)
|
||||||
}
|
}
|
||||||
// console.log("len",lender)
|
// console.log("len",lender)
|
||||||
@ -385,20 +393,20 @@ if(!option){
|
|||||||
|
|
||||||
|
|
||||||
if (productID !== undefined && productID !== null && productID !== '') {
|
if (productID !== undefined && productID !== null && productID !== '') {
|
||||||
this.productShortName = this.productAllList.filter(item => item.product_id == productID)[0].product_abbr;
|
this.prod_catagory = this.productAllList.filter(item => item.product_id == productID)[0].prod_catagory;
|
||||||
this.subProductList=this.productAllList.filter(item => item.product_id == productID);
|
this.subProductList=this.productAllList.filter(item => item.product_id == productID);
|
||||||
this.subProductList=this.subProductList[0].subproducts;
|
this.subProductList=this.subProductList[0].subproducts;
|
||||||
console.log("dd sub",this.subProductList)
|
console.log("dd sub",this.subProductList)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.productShortName = '';
|
this.prod_catagory = '';
|
||||||
this.subProductList=[];
|
this.subProductList=[];
|
||||||
}
|
}
|
||||||
// console.log('this.productAbbr',this.productShortName);
|
// console.log('this.productAbbr',this.prod_catagory);
|
||||||
switch (this.productShortName) {
|
switch (this.prod_catagory) {
|
||||||
case 'BL':
|
case 'BL':
|
||||||
// console.log(1);
|
// console.log(1);
|
||||||
this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
this.customerSegmentList = this.customerSegmentAllList;
|
||||||
if(this.lenderShortName == 'CLIX' && flag==2 ){ this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5'); }
|
if(this.lenderShortName == 'CLIX' && flag==2 ){ this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5'); }
|
||||||
// this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(this.subProductList[0].subproduct_id);
|
// this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(this.subProductList[0].subproduct_id);
|
||||||
this.subProductList=[];
|
this.subProductList=[];
|
||||||
@ -406,7 +414,7 @@ if(!option){
|
|||||||
break;
|
break;
|
||||||
case 'LAEP':
|
case 'LAEP':
|
||||||
// console.log(2);
|
// console.log(2);
|
||||||
this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
this.customerSegmentList = this.customerSegmentAllList;
|
||||||
// this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(this.subProductList[0].subproduct_id);
|
// this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(this.subProductList[0].subproduct_id);
|
||||||
if(this.lenderShortName == 'CLIX' && flag==2 ){ this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5'); }
|
if(this.lenderShortName == 'CLIX' && flag==2 ){ this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5'); }
|
||||||
this.subProductList=[];
|
this.subProductList=[];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user