active jobs filters
This commit is contained in:
@@ -65,19 +65,19 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="tabs =='pastdue'">
|
||||
<div *ngIf="pastdue_job_count == 0">
|
||||
<ion-card>
|
||||
<img alt="WrenchBoard Past Due" src="https://www.wrenchboard.com/assets/images/apps/pastdue-task.png" />
|
||||
<ion-card-header>
|
||||
<ion-card-title>Past Due</ion-card-title>
|
||||
<!-- <ion-card-subtitle>Card Subtitle</ion-card-subtitle>-->
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card>
|
||||
<img alt="WrenchBoard Past Due" src="https://www.wrenchboard.com/assets/images/apps/pastdue-task.png" />
|
||||
<ion-card-header>
|
||||
<ion-card-title>Past Due</ion-card-title>
|
||||
<!-- <ion-card-subtitle>Card Subtitle</ion-card-subtitle>-->
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
You do not have any task past due.
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<ion-card-content>
|
||||
You do not have any task past due.
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</div>
|
||||
<div class="chat" *ngFor="let item of jobsPastDueData;" >
|
||||
<div class="flex">
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(assets/images/taskbanners/'+item.banner+')'"></div>
|
||||
@@ -102,18 +102,20 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="tabs =='review'">
|
||||
<div *ngIf="review_job_count == 0">
|
||||
<ion-card>
|
||||
<img alt="Silhouette of mountains" src="https://www.wrenchboard.com/assets/images/apps/review-task.png" />
|
||||
<ion-card-header>
|
||||
<ion-card-title>In Review</ion-card-title>
|
||||
<!-- <ion-card-subtitle>Card Subtitle</ion-card-subtitle>-->
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card>
|
||||
<img alt="Silhouette of mountains" src="https://www.wrenchboard.com/assets/images/apps/review-task.png" />
|
||||
<ion-card-header>
|
||||
<ion-card-title>In Review</ion-card-title>
|
||||
<!-- <ion-card-subtitle>Card Subtitle</ion-card-subtitle>-->
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
No task is currently in review.
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</div>
|
||||
|
||||
<ion-card-content>
|
||||
No task is currently in review.
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<div class="chat" *ngFor="let item of jobsInReviewData;">
|
||||
<div class="flex">
|
||||
|
||||
@@ -27,8 +27,8 @@ export class MytasksPage implements OnInit {
|
||||
ngOnInit() {
|
||||
// debugger;
|
||||
this.getJobsData();
|
||||
this.getPastDueJobsData();
|
||||
this.getInReviewJobsData();
|
||||
// this.getPastDueJobsData();
|
||||
// this.getInReviewJobsData();
|
||||
}
|
||||
|
||||
onCall() {
|
||||
@@ -43,69 +43,86 @@ export class MytasksPage implements OnInit {
|
||||
}
|
||||
|
||||
usrData: {
|
||||
action:11200, member_id: number, uid: string, sessionid: string, limit:20, page:0, offset: 0, job_mode: string
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string, sessionid: string,
|
||||
limit:20,
|
||||
page:0,
|
||||
offset: 0,
|
||||
job_mode: string,
|
||||
allstatus: number
|
||||
};
|
||||
|
||||
jobsTotalData:any;
|
||||
jobsData: [];
|
||||
getJobsData(){
|
||||
|
||||
this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid, sessionid: this.sessionDataProviderService.session ,
|
||||
limit:20, page:0, offset:0, job_mode: 'ACTIVE'}
|
||||
this.usrData = {
|
||||
action:11200,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
limit:20,
|
||||
page:0,
|
||||
offset:0,
|
||||
job_mode: 'ACTIVE',
|
||||
allstatus: 100
|
||||
}
|
||||
this.wrenchService.getMyActiveJobsData(this.usrData).subscribe(
|
||||
jobsTotalData => {
|
||||
this.jobsTotalData = jobsTotalData;
|
||||
console.log("PAH HX RETURN->", this.jobsTotalData);
|
||||
this.jobsData = this.jobsTotalData.result_list;
|
||||
// debugger;
|
||||
console.log("JOBS RETURN DATA->", this.jobsData);
|
||||
this.active_job_count = this.jobsData.length;
|
||||
// this.blogDataService.setBlogData(this.blogResult.blog_data);
|
||||
console.log("getMyActiveJobsData RETURN->", this.jobsTotalData);
|
||||
|
||||
let AllResult = this.jobsTotalData.result_list;;
|
||||
this.jobsData = AllResult.filter((item) => item.status_description == 'ACTIVE')
|
||||
this.jobsPastDueData =AllResult.filter((item) => item.status_description == 'PASTDUE')
|
||||
this.jobsInReviewData =AllResult.filter((item) => item.status_description == 'REVIEW')
|
||||
this.active_job_count = this.jobsData.length;
|
||||
this.review_job_count = this.jobsPastDueData.length;
|
||||
this.pastdue_job_count = this.jobsInReviewData.length;
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
jobsTotalPastDueData:any;
|
||||
jobsPastDueData: [];
|
||||
getPastDueJobsData(){
|
||||
|
||||
this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_id, uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session , limit:20, page:0, offset:0, job_mode: 'PASTDUE'}
|
||||
this.wrenchService.getMyActiveJobsData(this.usrData).subscribe(
|
||||
jobsTotalPastDueData => {
|
||||
this.jobsTotalPastDueData = jobsTotalPastDueData;
|
||||
console.log("PAST DUE TOTAL RETURN->", this.jobsTotalPastDueData);
|
||||
this.jobsPastDueData = this.jobsTotalPastDueData.result_list;
|
||||
// debugger;
|
||||
console.log("PAST DUE JOBS RETURN DATA->", this.jobsPastDueData);
|
||||
// this.blogDataService.setBlogData(this.blogResult.blog_data);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
jobsPastDueData: [];
|
||||
// getPastDueJobsData(){
|
||||
//
|
||||
// this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_id, uid: this.sessionDataProviderService.member_uid,
|
||||
// sessionid: this.sessionDataProviderService.session , limit:20, page:0, offset:0, job_mode: 'PASTDUE'}
|
||||
// this.wrenchService.getMyActiveJobsData(this.usrData).subscribe(
|
||||
// jobsTotalPastDueData => {
|
||||
// this.jobsTotalPastDueData = jobsTotalPastDueData;
|
||||
// console.log("PAST DUE TOTAL RETURN->", this.jobsTotalPastDueData);
|
||||
// this.jobsPastDueData = this.jobsTotalPastDueData.result_list;
|
||||
// // debugger;
|
||||
// console.log("PAST DUE JOBS RETURN DATA->", this.jobsPastDueData);
|
||||
// // this.blogDataService.setBlogData(this.blogResult.blog_data);
|
||||
// }
|
||||
// );
|
||||
//
|
||||
// }
|
||||
|
||||
jobsTotalInReviewData:any;
|
||||
jobsInReviewData: [];
|
||||
getInReviewJobsData(){
|
||||
|
||||
this.usrData = {action:11200,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
limit:20, page:0, offset:0, job_mode: 'REVIEW'}
|
||||
this.wrenchService.getMyActiveJobsData(this.usrData).subscribe(
|
||||
jobsTotalInReviewData => {
|
||||
this.jobsTotalInReviewData = jobsTotalInReviewData;
|
||||
console.log("JOBS IN REVIEW TOTAL RETURN->", this.jobsTotalInReviewData);
|
||||
this.jobsInReviewData = this.jobsTotalInReviewData.result_list;
|
||||
// debugger;
|
||||
console.log("JOBS IN REVIEW RETURN DATA->", this.jobsInReviewData);
|
||||
// this.blogDataService.setBlogData(this.blogResult.blog_data);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
// getInReviewJobsData(){
|
||||
//
|
||||
// this.usrData = {action:11200,
|
||||
// member_id: this.sessionDataProviderService.member_id,
|
||||
// uid: this.sessionDataProviderService.member_uid,
|
||||
// sessionid: this.sessionDataProviderService.session ,
|
||||
// limit:20, page:0, offset:0, job_mode: 'REVIEW'}
|
||||
// this.wrenchService.getMyActiveJobsData(this.usrData).subscribe(
|
||||
// jobsTotalInReviewData => {
|
||||
// this.jobsTotalInReviewData = jobsTotalInReviewData;
|
||||
// console.log("JOBS IN REVIEW TOTAL RETURN->", this.jobsTotalInReviewData);
|
||||
// this.jobsInReviewData = this.jobsTotalInReviewData.result_list;
|
||||
// // debugger;
|
||||
// console.log("JOBS IN REVIEW RETURN DATA->", this.jobsInReviewData);
|
||||
// // this.blogDataService.setBlogData(this.blogResult.blog_data);
|
||||
// }
|
||||
// );
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user