diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts index 28e4b660b..dc950b456 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts @@ -102,10 +102,12 @@ export class AddPdComponent implements OnInit, OnDestroy { console.log(selectLender); this.selectedLender(selectLender) + this.getSubproductList(res['records'].default_product) this._PDtriggerForm.controls['fk_product_id'].setValue(res['records'].default_product); + this._PDtriggerForm.controls['fk_subproduct_id'].setValue(res['records'].default_sub_product); this._PDtriggerForm.controls['fk_customer_segment'].setValue(res['records'].default_customer_segment); this._PDtriggerForm.controls['fk_pd_type'].setValue(res['records'].default_pd_type); - this.getSubproductList(res['records'].default_product) + } else{ @@ -263,36 +265,36 @@ export class AddPdComponent implements OnInit, OnDestroy { //get sub product list based on prokduct id getSubproductList(productID: string) { // console.log(productID) - let productabbr : any; + let prod_catagory : any; // console.log('productID',productID); if(productID !== undefined && productID !== null && productID !== '' && this.productList.length > 0) { this.subProductList = this.productList.filter(item => item.product_id == productID); console.log('sub products',this.subProductList,this.productList,productID) this.subProductList = this.subProductList[0].subproducts; this.subProductList = this.subProductList.filter(item => item.is_others == 0); - productabbr = this.productAllList.filter(item => item.product_id == productID)[0].product_abbr; + prod_catagory = this.productAllList.filter(item => item.product_id == productID)[0].prod_catagory; } else{ - productabbr = '' + prod_catagory = '' this.subProductList = []; this._PDtriggerForm.controls['fk_subproduct_id'].setValue(''); this._PDtriggerForm.controls['fk_pd_type'].setValue(''); this._PDtriggerForm.controls['fk_customer_segment'].setValue(''); this._PDtriggerForm.controls['loan_amount'].setValue(''); } - // console.log('productID',productID,productabbr); + // console.log('productID',productID,prod_catagory); /**customer segment */ - switch(productabbr){ + switch(prod_catagory){ case 'BL' : // console.log(1); - this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')); + this.customerSegmentList = this.customerSegmentAllList; this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null); this.isSubproductShown = false; break; case 'LAEP': // console.log(2); - this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')); + this.customerSegmentList = this.customerSegmentAllList; this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null); this.isSubproductShown = false; break; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts index 23982b0f8..bab96ca38 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts @@ -68,7 +68,7 @@ export class EditPdMasterComponent implements OnInit { }; lenderShortName: any; isSubproductShown: boolean = true; - productShortName : any; + prod_catagory : any; sales_and_credit_enable: boolean=false; sales_and_credit_person: any=[]; finInstitutionList: any; @@ -118,6 +118,14 @@ export class EditPdMasterComponent implements OnInit { let selectLender=this.lenderList.filter(val=>val.entity_id == entity_id)[0] console.log(selectLender); 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{ @@ -202,8 +210,8 @@ if(!option){ if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK // console.log("entered"); - this._EditPDtriggerForm.controls['fk_product_id'].setValue("3") - this._EditPDtriggerForm.controls['fk_pd_type'].setValue("1"); + // this._EditPDtriggerForm.controls['fk_product_id'].setValue("3") + // this._EditPDtriggerForm.controls['fk_pd_type'].setValue("1"); this.getSubproductList("3",2) } // console.log("len",lender) @@ -385,20 +393,20 @@ if(!option){ 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.subProductList[0].subproducts; console.log("dd sub",this.subProductList) } else { - this.productShortName = ''; + this.prod_catagory = ''; this.subProductList=[]; } - // console.log('this.productAbbr',this.productShortName); - switch (this.productShortName) { + // console.log('this.productAbbr',this.prod_catagory); + switch (this.prod_catagory) { case 'BL': // 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'); } // this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(this.subProductList[0].subproduct_id); this.subProductList=[]; @@ -406,7 +414,7 @@ if(!option){ break; case 'LAEP': // 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); if(this.lenderShortName == 'CLIX' && flag==2 ){ this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5'); } this.subProductList=[]; diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html index ec87d145b..f50397326 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html @@ -48,8 +48,9 @@ + - + diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.html index fd5c717d8..cdb75c10d 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.html @@ -27,6 +27,25 @@ +