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