diff --git a/src/app/components/interest-card/interest-card.component.html b/src/app/components/interest-card/interest-card.component.html index 0cb7d14..7338268 100644 --- a/src/app/components/interest-card/interest-card.component.html +++ b/src/app/components/interest-card/interest-card.component.html @@ -38,11 +38,11 @@ - Approve Start + Approve Start - Reject + Reject diff --git a/src/app/components/interest-card/interest-card.component.ts b/src/app/components/interest-card/interest-card.component.ts index e4f20d4..a14153c 100644 --- a/src/app/components/interest-card/interest-card.component.ts +++ b/src/app/components/interest-card/interest-card.component.ts @@ -28,11 +28,34 @@ currData:any; } - async approveStart(){ - this.intResponse(this.thisObj, this.intData, "APPROVED"); + async approveStart(intDataR){ + + var reqData = { + member_id: this.thisObj.sessionDataProviderService.member_id, + uid: this.thisObj.sessionDataProviderService.member_uid, + sessionid: this.thisObj.sessionDataProviderService.session , + proc : 'ACCEPT', + client_uid: intDataR.client_uid, + offer_code: intDataR.offer_code, + offer_uid: intDataR.offer_code + }; + + // debugger; + this.intResponse( this.thisObj, reqData, "APPROVED"); } - async rejectStart(){ - this.intResponse(this.thisObj,this.intData, "REJECT"); + async rejectStart(intDataR){ + + var reqData = { + member_id: this.thisObj.sessionDataProviderService.member_id, + uid: this.thisObj.sessionDataProviderService.member_uid, + sessionid: this.thisObj.sessionDataProviderService.session , + proc : 'REJECT', + client_uid: intDataR.client_uid, + offer_code: intDataR.offer_code, + offer_uid: intDataR.offer_code + }; + + this.intResponse(this.thisObj ,reqData,"REJECT"); // "REJECT" } } diff --git a/src/app/pages/jobintprocess/jobintprocess.page.ts b/src/app/pages/jobintprocess/jobintprocess.page.ts index 1f48186..c8a4533 100644 --- a/src/app/pages/jobintprocess/jobintprocess.page.ts +++ b/src/app/pages/jobintprocess/jobintprocess.page.ts @@ -42,17 +42,20 @@ export class JobintprocessPage implements OnInit { // his.jobsData = AllResult.filter((item) => item.status_description == 'ACTIVE') } - async intResponse(thisObj,itemData, approveStatus){ + async intResponse(thisObj,ProcessItemData, approveStatus){ var actionMessage = ''; var messageHeader =''; var promtMessage=''; + var procc = ''; + var reqResult:any; switch (approveStatus){ case "APPROVED": actionMessage ="Confirm you are about to approve this task for this user ?"; messageHeader = "Confirm Approval"; promtMessage="Approve"; + procc = "ACCEPT"; break; case "REJECT": @@ -61,6 +64,8 @@ export class JobintprocessPage implements OnInit { promtMessage = "Decline"; break; } + console.log(ProcessItemData); + //debugger; //alert("It is me"); const alert = await thisObj.alertController.create({ header: messageHeader, @@ -70,14 +75,31 @@ export class JobintprocessPage implements OnInit { text: "Cancel", role: "cancel", handler: () => { - // this.getMyOffersData(); + // Do nothing - just close }, }, { text: promtMessage, handler: () => { - // this.sessionDataProviderService.DestroySessionOnLogout(); - // this.router.navigate(['logout']); + // call Service now to process +/* +array (size=8) + 'member_id' => int 1 + 'sessionid' => string '6959759CD031A5BE65EF313E74BE21F067A8440150902718232E1248D75ECE05' (length=64) + 'uid' => string '3119b744-42ad-4834-bb83-b737588754ca' (length=36) + 'proc' => string 'ACCEPT' (length=6) + 'client_uid' => string 'c17a43e0-3b70-4128-895c-4dc2d99f17a8' (length=36) + 'offer_code' => string 'XWT8B7W377' (length=10) + 'offer_uid' => string '10088dc3-c1ed-4782-808c-ae64940d3405' (length=36) + */ + + + thisObj.wrenchService.sendTaskMessage(ProcessItemData).subscribe( + reqResult => { + reqResult = reqResult; + console.log("reqResult RETURN->", reqResult); + + }); }, }, ], diff --git a/src/app/services/wrench.service.ts b/src/app/services/wrench.service.ts index d5c09cb..eb16975 100644 --- a/src/app/services/wrench.service.ts +++ b/src/app/services/wrench.service.ts @@ -87,6 +87,10 @@ export class WrenchService { return this.getPostData('sendreferral', reqData); } + offersInterestProcces(reqData){ + return this.getPostData('offersinterestproc', reqData); + } + // signUpCountry(apiData) {