diff --git a/src/app/components/myjob-offers/myjob-offers.component.html b/src/app/components/myjob-offers/myjob-offers.component.html index 9acef1c..8f88908 100644 --- a/src/app/components/myjob-offers/myjob-offers.component.html +++ b/src/app/components/myjob-offers/myjob-offers.component.html @@ -49,6 +49,7 @@ @@ -57,6 +58,7 @@ @@ -73,6 +75,7 @@ @@ -87,6 +90,9 @@ + + {{pendingActionResult}} + { + }, + }, + { + text: "Extend Now", + handler: () => { + this.wrenchService.pendingJobExtend(this.reqData).subscribe( + res => { + if (res?.internal_return > 0){ + this.pendingActionResult = "Task due was extended 2 days from today"; + setTimeout(()=>{ + this.pendingActionResult =''; + },3000); + } + } + ); + + }, + }, + ], + }); + await alert.present(); + + // return this.getPostData("pendingjobextend", reqData); + } + +pendingActionResult:string=''; + + async pendingJobSendToMe(){ + this.reqData = { + action:13042, + member_id: this.sessionDataProviderService.member_id, + uid: this.sessionDataProviderService.member_uid, + sessionid: this.sessionDataProviderService.session, + job_uid: this.currentJobSelected.job_uid, + offer_code: this.currentJobSelected .offer_code, + mode: 200, + extend_days: 0 + }; + const alert = await this.alertController.create({ + header: "Send Details.", + message: "Confirm you want to send Task details to your email ?.", + buttons: [ + { + text: "Cancel", + role: "cancel", + handler: () => { + // this.getMyOffersData(); + }, + }, + { + text: "Send Now", + handler: () => { + + this.wrenchService.pendingJobSendToMe(this.reqData).subscribe( + res => { + if (res?.internal_return > 0){ + this.pendingActionResult = "Message Sent"; + setTimeout(()=>{ + this.pendingActionResult =''; + },3000); + } + } + ); + }, + }, + ], + }); + await alert.present(); + // return this.getPostData("pendingjobsendtome", reqData); + } + // + async pendingJobCancel(){ + const alert = await this.alertController.create({ + header: "Log out", + message: "Confirm you are ready to log out now.", + buttons: [ + { + text: "Cancel", + role: "cancel", + handler: () => { + // this.getMyOffersData(); + }, + }, + { + text: "Log out", + handler: () => { + // this.sessionDataProviderService.DestroySessionOnLogout(); + // this.router.navigate(['logout']); + }, + }, + ], + }); + await alert.present(); + // return this.getPostData("pendingjobcancel", reqData); + } + // } diff --git a/src/app/services/wrench.service.ts b/src/app/services/wrench.service.ts index 56b0db6..a128322 100644 --- a/src/app/services/wrench.service.ts +++ b/src/app/services/wrench.service.ts @@ -179,6 +179,18 @@ export class WrenchService { return this.getPostData("getwallets", usrData); } + pendingJobExtend(reqData){ + return this.getPostData("pendingjobextend", reqData); + } + + pendingJobSendToMe(reqData){ + return this.getPostData("pendingjobsendtome", reqData); + } + + pendingJobCancel(reqData){ + return this.getPostData("pendingjobcancel", reqData); + } + jobGroupData(reqData){ return this.getPostData("jobgrouplist", reqData); }