send job
This commit is contained in:
@@ -117,9 +117,75 @@ export class FamilyaddtaskPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
sendFamTask(jobData){
|
||||
assigResult:any;
|
||||
assign_ind_result:string='';
|
||||
assign_mak_result:string='';
|
||||
|
||||
|
||||
reqData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
sessionid: string,
|
||||
job_id: string,
|
||||
job_uid: string,
|
||||
duration: number,
|
||||
job_description: string,
|
||||
family_uid:string,
|
||||
price:number,
|
||||
assign_mode: number
|
||||
};
|
||||
|
||||
async sendFamTask(jobData){
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Sending...',
|
||||
duration: 5000,
|
||||
});
|
||||
|
||||
// if ( this.job_recipient== undefined || !this.validateEmail( this.job_recipient)){
|
||||
// this.job_recipient='';
|
||||
// alert("Enter valid email");
|
||||
// return;
|
||||
// }
|
||||
|
||||
this.reqData = {
|
||||
action:13025,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session,
|
||||
job_id: this.jobData.job_id,
|
||||
job_uid: this.jobData.job_uid,
|
||||
duration: 0,
|
||||
job_description: this.jobData.description,
|
||||
family_uid: this.family_uid,
|
||||
price: this.jobData.price,
|
||||
assign_mode: 110055
|
||||
};
|
||||
// console.log('XXX-> ', this.reqData );
|
||||
|
||||
loading.present();
|
||||
|
||||
this.wrenchService.assignTask(this.reqData).subscribe(
|
||||
assigResult => {
|
||||
this.assigResult = assigResult;
|
||||
console.log("assigResult RETURN->", this.assigResult);
|
||||
if ( this.assigResult != undefined && this.assigResult.internal_return > 0){
|
||||
// this.assign_ind_result = "Task sent to the email - " +this.job_recipient;
|
||||
// this.job_recipient='';
|
||||
const event = new Event("app-myjob-offers-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
setTimeout(() => {
|
||||
this.assign_ind_result ='';
|
||||
}, 3000);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user