This commit is contained in:
CHIEFSOFT\ameye
2024-02-14 12:02:00 -05:00
parent 22acfbc8f2
commit 7df58de8dd
@@ -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
{
}
}
);
}
}