job group
This commit is contained in:
@@ -179,7 +179,7 @@
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
<ion-button color="secondary" expand="block" >Request Extension</ion-button>
|
||||
<ion-button color="secondary" size="small" shape="round" expand="block" (click)="requestExtension()">Request Extension</ion-button>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</div>
|
||||
|
||||
@@ -303,4 +303,52 @@ export class ActivetaskPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
async requestExtension(){
|
||||
let reqData = {
|
||||
contract: this.jobData.contract,
|
||||
contract_uid: this.jobData.contract_uid,
|
||||
job_action: 'NOTIFY_REQEXTENT',
|
||||
}
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Sending...',
|
||||
duration: 2500,
|
||||
});
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: "Request Extensions",
|
||||
message: "Confirm you are ready to send request?",
|
||||
buttons: [
|
||||
{
|
||||
text: "Cancel",
|
||||
role: "cancel",
|
||||
handler: () => {
|
||||
// this.getMyOffersData();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Send Request",
|
||||
handler: () => {
|
||||
loading.present();
|
||||
// API CALL TO MARK TASK AS COMPLETED BY WORKER
|
||||
this.wrenchService.workerJobAction(reqData).subscribe((res)=> {
|
||||
loading.dismiss();
|
||||
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']);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
await alert.present();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user