From eba16d35adbe764093aa6c12175b33ad62565fb2 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Fri, 9 Sep 2022 22:36:03 +0530 Subject: [PATCH] Is smc pd flag : ps --- .../pd-status-change-dialogue.component.ts | 7 ++++++- .../pd-service/pd-triger.service.ts | 21 ++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts index bc7dba3..5bbf80a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts @@ -129,10 +129,15 @@ export class PdStatusChangeDialogueComponent implements OnInit { else { - let update_status = { + let update_status : any = { "pd_id":this.data.pdid, "random_string":this.data.random_string }; + // sconsole.log("i am called here . "); + if(this.data.pd_status=='COMPLETED'){ + update_status.is_this_smc_pd = 1; + } + this.pd.editPdMasterDetails(update_status, status).subscribe(result => { if (result.status == 200) { this.dialogRef.close({update_status:true}); diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index c477fc0..a4f9ca4 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -320,7 +320,9 @@ export class PdTrigerService { editPdMasterDetails(editData: any, status: string): Observable { editData.pd_status = status; editData.fk_updatedby = this._aws.getlocale(); + // console.log("i am 1",editData); // editData.updatedon = currentdate; + // return this._http.post("http://localhost/AWSEC2/sparqapi/api/updatePDMaster", { records: editData }) return this._http.post(this.apiUrl + "updatePDMaster", { records: editData }) .pipe( @@ -353,8 +355,9 @@ export class PdTrigerService { // initiate address for pd process initiateAddressPdProcess(updateDate: any): Observable { updateDate.fk_updatedby = this._aws.getlocale(); + console.log("i am 2",updateDate); // editData.updatedon = currentdate; - return this._http.post(this.apiUrl + "updatePDMaster", { records: updateDate }) + return this._http.post("http://localhost/AWSEC2/sparqapi/api/updatePDMaster", { records: updateDate }) .pipe( catchError(this.handleError('operation', [])) @@ -562,8 +565,9 @@ export class PdTrigerService { // pd review status update details pdReviewStatusUpdate(editData: any): Observable { editData.fk_updatedby = this._aws.getlocale(); + console.log("i am 3",editData); // editData.updatedon = currentdate; - return this._http.post(this.apiUrl + "updatePDMaster", { records: editData }) + return this._http.post("http://localhost/AWSEC2/sparqapi/api/updatePDMaster", { records: editData }) .pipe( catchError(this.handleError('operation', [])) @@ -943,10 +947,14 @@ generatePDReportPDF(pdId: any): Observable { return this._http.post(this.apiUrl + "generatePDReportPDF", { "records": pdId }); } archivePDImages(Dtl : any): Observable { - return this._http.post(this.apiUrl + "archivePDSMCImages", { "records": Dtl }); + return this._http.post("http://localhost/AWSEC2/sparqapi/api/archivePDSMCImages", { "records": Dtl }); + // return this._http.post(this.apiUrl + "archivePDSMCImages", { "records": Dtl }); } photoPDFDownload(params:any): Observable{ - return this._http.post(this.apiUrl + "smcPhotoPDFDownload", { "records": params }); + + return this._http.post("http://localhost/AWSEC2/sparqapi/api/smcPhotoPDFDownload", { "records": params }); + + // return this._http.post(this.apiUrl + "smcPhotoPDFDownload", { "records": params }); } checkExistPDDetails(datas,entity_id){ return this._http.post(this.apiUrl+'checkExistPDDetails',{records:datas,client:entity_id}) @@ -1068,7 +1076,10 @@ loadTemplate(form_id) { // if(users.user_role != '19'){ // apiName = 'uploadCreditPDDataToCETApp'; // } - return this._http.get(this.apiUrl +"uploadCreditPDDataToCETApp/"+id); + return this._http.get(this.apiUrl+'uploadCreditPDDataToCETApp/'+id) + .pipe( + catchError(this.handleError('operation', [])) + ); // let apiName = "http://localhost/AWSEC2/sparqapi/api/uploadCreditPDDataToCETApp"; // return this._http.get(apiName+"/"+id); }