From 9c615081d963d1bbe8b458d42d55ee89eb02916b Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Thu, 23 Jan 2020 18:14:33 +0530 Subject: [PATCH 1/3] sub product auto fill added --- .../manage-pd/list-pd/add-pd/add-pd.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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..401c7f682 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{ From fa62a8449b4b9222281f74085a9f397ea42668e0 Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Fri, 24 Jan 2020 16:33:06 +0530 Subject: [PATCH 2/3] Geo Location and Sub product changes done --- .../list-pd/add-pd/add-pd.component.ts | 14 +++++----- .../qc-pd-report/qc-pd-report.component.html | 3 ++- .../qc-review/qc-review.component.html | 19 +++++++++++++ .../qc-review/qc-review.component.ts | 27 +++++++++++++++++++ .../quality-check/qc-service/qc.service.ts | 7 +++++ 5 files changed, 62 insertions(+), 8 deletions(-) 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 401c7f682..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 @@ -265,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/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 @@ +
+

Geo-Location

+ +
+
+
+ + Geo Location + + +
+
+
+
+ + + + +

QC Notes

diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts index ebc0e1e0d..b8f79dfbe 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts @@ -102,6 +102,12 @@ export class QcReviewComponent implements OnInit { this.showForm = true; } + else if(this.showStatus == 'GEOLOCATION'){ + this.ngForm = this._formBuilder.group({ + qc_geo_location: [''] + }) + this.showForm = true; + } } @@ -147,6 +153,27 @@ export class QcReviewComponent implements OnInit { }) } + geoLocationClick(): void { + let geo = this.ngForm.value; + let records = { + 'pd_id':this.data.startId, + 'geo_location':geo.qc_geo_location, + 'comment':"" + } + + this.pdTrigerService.updateGeoLocation(records).subscribe(data=>{ + this.notifier.notify('success', 'Your Changes Updated.!'); + this.dialogRef.close({ + status:true, + dialog_close:true + }); + }, error => { + this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); + // alert(err.html_format); + }); + + } + // ============================= diff --git a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts index 09be837a2..731670b8e 100755 --- a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts +++ b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts @@ -342,6 +342,13 @@ export class QcService { catchError(this.handleError('operation', [])) ) } + updateGeoLocation(records: any): Observable { + records.fk_updatedby=this._aws.getlocale(); + return this._http.post(this.apiUrl + "renewSatellite", { "records": records }) + .pipe( + catchError(this.handleError('operation', [])) + ) + } getPdDocVersionList(pdId: number): Observable { return this._http.post(this.apiUrl + "getListOfPDReportVersions", { "records": { "pd_id": pdId } }) From 0157ec06707316004a6fdef86c24923780e18e13 Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Sat, 25 Jan 2020 18:57:35 +0530 Subject: [PATCH 3/3] subproduct hide --- .../edit-pd-master.component.ts | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) 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=[];