procc jobs
This commit is contained in:
@@ -38,11 +38,11 @@
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col style="padding: 10px">
|
||||
<ion-button expand="block" (click)="approveStart()">Approve Start</ion-button>
|
||||
<ion-button expand="block" (click)="approveStart(intData)">Approve Start</ion-button>
|
||||
</ion-col>
|
||||
|
||||
<ion-col style="padding: 10px">
|
||||
<ion-button expand="block" color="danger" (click)="rejectStart()">Reject</ion-button>
|
||||
<ion-button expand="block" color="danger" (click)="rejectStart(intData)">Reject</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -87,6 +87,10 @@ export class WrenchService {
|
||||
return this.getPostData('sendreferral', reqData);
|
||||
}
|
||||
|
||||
offersInterestProcces(reqData){
|
||||
return this.getPostData('offersinterestproc', reqData);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
signUpCountry(apiData) {
|
||||
|
||||
Reference in New Issue
Block a user