From 8c7b92e02779b14db7ce9d5228a91ae126da5f42 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 11 Dec 2023 11:35:31 -0500 Subject: [PATCH] offer cancel --- .../myjob-offers/myjob-offers.component.ts | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/src/app/components/myjob-offers/myjob-offers.component.ts b/src/app/components/myjob-offers/myjob-offers.component.ts index 8b7aae0..620af59 100644 --- a/src/app/components/myjob-offers/myjob-offers.component.ts +++ b/src/app/components/myjob-offers/myjob-offers.component.ts @@ -107,7 +107,8 @@ export class MyjobOffersComponent implements OnInit { job_uid: string, offer_code: string, mode: number, - extend_days:number + extend_days:number, + reason:string }; async pendingJobExtend(){ @@ -119,7 +120,8 @@ export class MyjobOffersComponent implements OnInit { job_uid: this.currentJobSelected.job_uid, offer_code: this.currentJobSelected .offer_code, mode: 200, - extend_days: 2 + extend_days: 2, + reason:'' }; const alert = await this.alertController.create({ @@ -166,7 +168,8 @@ pendingActionResult:string=''; job_uid: this.currentJobSelected.job_uid, offer_code: this.currentJobSelected .offer_code, mode: 200, - extend_days: 0 + extend_days: 0, + reason:'' }; const alert = await this.alertController.create({ header: "Send Details.", @@ -202,6 +205,19 @@ pendingActionResult:string=''; } // async pendingJobCancel(){ + + this.reqData = { + action:13043, + 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, + reason:'Cancelled from app.' + }; + const alert = await this.alertController.create({ header: "Log out", message: "Confirm you are ready to log out now.", @@ -214,10 +230,19 @@ pendingActionResult:string=''; }, }, { - text: "Log out", + text: "Cancel Offer", handler: () => { - // this.sessionDataProviderService.DestroySessionOnLogout(); - // this.router.navigate(['logout']); + this.wrenchService.pendingJobCancel(this.reqData).subscribe( + res => { + if (res?.internal_return > 0){ + this.pendingActionResult = "Offer Cancelled,"; + setTimeout(()=>{ + this.setCloseModal(); + this.pendingActionResult =''; + },3000); + } + } + ); }, }, ],