cancel task
This commit is contained in:
@@ -178,8 +178,45 @@ export class ActivetaskPage implements OnInit {
|
||||
});
|
||||
await alert.present();
|
||||
}
|
||||
taskCancel(){
|
||||
async taskCancel(){
|
||||
let reqData = {
|
||||
contract: this.jobData.contract,
|
||||
contract_uid: this.jobData.contract_uid,
|
||||
job_action: 'NOTIFY_CANCEL',
|
||||
}
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: "Confirm Cancel Request.",
|
||||
message: "The task owner will be informed of this cancellation. Once completed, we cannot reverse this action.",
|
||||
buttons: [
|
||||
{
|
||||
text: "Cancel",
|
||||
role: "cancel",
|
||||
handler: () => {
|
||||
// this.getMyOffersData();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Confirm Cancel ?",
|
||||
handler: () => {
|
||||
// start
|
||||
// API CALL TO MARK TASK AS COMPLETED BY WORKER
|
||||
this.wrenchService.workerJobAction(reqData).subscribe((res)=> {
|
||||
if (res.status != 200 || res.data.internal_return < 0) {
|
||||
// setReqStatus({loading:false, status: false, message: 'unable to complete request. Try again'})
|
||||
// Alert("Unable to set task as completed, try again soon");
|
||||
} else {
|
||||
this.router.navigate(['mytasks']);
|
||||
}
|
||||
}
|
||||
);
|
||||
// this.router.navigate(['mytasks']);
|
||||
// end
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
await alert.present();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -109,11 +109,11 @@
|
||||
</div>
|
||||
|
||||
<div class="route">
|
||||
<ion-item lines="none" (click)="onProfile()">
|
||||
<ion-icon name="person-outline" color="dark"></ion-icon>
|
||||
<ion-label>Edit Profile</ion-label>
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</ion-item>
|
||||
<!-- <ion-item lines="none" (click)="onProfile()">-->
|
||||
<!-- <ion-icon name="person-outline" color="dark"></ion-icon>-->
|
||||
<!-- <ion-label>Edit Profile</ion-label>-->
|
||||
<!-- <ion-icon name="chevron-forward-outline" color="medium"></ion-icon>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<ion-item lines="none" (click)="onFamily()">
|
||||
<ion-icon name="people-outline"></ion-icon>
|
||||
|
||||
Reference in New Issue
Block a user