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 } })