job manager page
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
|
||||
<ion-header mode="ios" class="ion-no-border">
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button>
|
||||
<ion-icon name="search-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
<!-- <ion-buttons slot="end">-->
|
||||
<!-- <ion-button>-->
|
||||
<!-- <ion-icon name="search-outline"></ion-icon>-->
|
||||
<!-- </ion-button>-->
|
||||
<!-- </ion-buttons>-->
|
||||
<ion-title>My Tasks</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
@@ -26,15 +26,15 @@
|
||||
<div class="items">
|
||||
<div class="stud">
|
||||
<ion-icon slot="start" name="people" color="primary"></ion-icon>
|
||||
<ion-label>20 Jobs</ion-label>
|
||||
<ion-label>{{total_active}} Active</ion-label>
|
||||
</div>
|
||||
<div class="stud">
|
||||
<ion-icon slot="start" name="time" color="primary"></ion-icon>
|
||||
<ion-label>0 Waiting</ion-label>
|
||||
<ion-label>{{total_review}} Review</ion-label>
|
||||
</div>
|
||||
<div class="stud">
|
||||
<ion-icon slot="start" name="document-text" color="primary"></ion-icon>
|
||||
<ion-label>0 Interest</ion-label>
|
||||
<ion-label>{{total_pastdue}} Past Due</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -53,13 +53,13 @@
|
||||
<div *ngIf="tabs =='active'" class="lesson">
|
||||
<ion-label class="head_text">Currently Active</ion-label>
|
||||
|
||||
<div class="video" *ngFor="let item of [1,2]">
|
||||
<div class="video" *ngFor="let item of jobManagerActiveData">
|
||||
<div class="left">
|
||||
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/line.png)'"></div>
|
||||
|
||||
<div class="text">
|
||||
<ion-label class="bold_text">Why Using Figma ?</ion-label>
|
||||
<ion-label class="grey_text">10 mins</ion-label>
|
||||
<ion-label class="bold_text">{{item.title}}</ion-label>
|
||||
<ion-label class="grey_text">{{item.description}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
@@ -73,13 +73,13 @@
|
||||
<div *ngIf="tabs =='review'" class="lesson">
|
||||
<ion-label class="head_text">Jobs Ready for Review</ion-label>
|
||||
|
||||
<div class="video" *ngFor="let item of [1,2]">
|
||||
<div class="video" *ngFor="let item of jobManagerReviewData">
|
||||
<div class="left">
|
||||
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/line.png)'"></div>
|
||||
|
||||
<div class="text">
|
||||
<ion-label class="bold_text">Why Using Figma ?</ion-label>
|
||||
<ion-label class="grey_text">10 mins</ion-label>
|
||||
<ion-label class="bold_text">{{item.title}}</ion-label>
|
||||
<ion-label class="grey_text">{{item.description}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
@@ -92,13 +92,13 @@
|
||||
<div *ngIf="tabs =='pastdue'" class="lesson">
|
||||
<ion-label class="head_text">Jobs Past Due Date</ion-label>
|
||||
|
||||
<div class="video" *ngFor="let item of [1,2]">
|
||||
<div class="video" *ngFor="let item of jobManagerPastDueData">
|
||||
<div class="left">
|
||||
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/line.png)'"></div>
|
||||
|
||||
<div class="text">
|
||||
<ion-label class="bold_text">Why Using Figma ?</ion-label>
|
||||
<ion-label class="grey_text">10 mins</ion-label>
|
||||
<ion-label class="bold_text">{{item.title}}</ion-label>
|
||||
<ion-label class="grey_text">{{item.description}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Router } from '@angular/router';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NavController } from '@ionic/angular';
|
||||
import {NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import { WrenchService } from 'src/app/services/wrench.service';
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -13,12 +15,22 @@ export class JobmanagerPage implements OnInit {
|
||||
|
||||
tabs = 'active';
|
||||
|
||||
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router
|
||||
) { }
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService
|
||||
) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getManagerJobsData("ACTIVE");
|
||||
this.getManagerJobsData("PASTDUE");
|
||||
this.getManagerJobsData("REVIEW");
|
||||
|
||||
}
|
||||
|
||||
onMyJobs(){
|
||||
@@ -35,6 +47,52 @@ export class JobmanagerPage implements OnInit {
|
||||
onEnroll() {
|
||||
this.router.navigate(['enroll']);
|
||||
}
|
||||
total_active:number=0;
|
||||
total_pastdue:number=0;
|
||||
total_review:number=0;
|
||||
|
||||
usrData: {
|
||||
action:22010, member_id: number, uid: string, sessionid: string, job_mode:string, limit:20, page:1,offset: 0
|
||||
};
|
||||
|
||||
|
||||
jobManagerActiveTotalData:any;
|
||||
jobManagerActiveData: [];
|
||||
jobManagerPastDueData: [];
|
||||
jobManagerReviewData: [];
|
||||
getManagerJobsData(job_mode){
|
||||
this.usrData = {action:22010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
job_mode: job_mode,
|
||||
limit:20, page:1,offset: 0}
|
||||
|
||||
this.wrenchService.getJobsManagerData(this.usrData).subscribe(
|
||||
jobManagerTotalData => {
|
||||
this.jobManagerActiveTotalData = jobManagerTotalData;
|
||||
|
||||
console.log("getManagerJobsData RETURN->", this.jobManagerActiveTotalData);
|
||||
// debugger;
|
||||
switch (job_mode){
|
||||
case "ACTIVE":
|
||||
this.jobManagerActiveData = this.jobManagerActiveTotalData.result_list;
|
||||
this.total_active = this.jobManagerActiveData.length;
|
||||
break;
|
||||
case "PASTDUE":
|
||||
this.jobManagerPastDueData = this.jobManagerActiveTotalData.result_list;
|
||||
this.total_pastdue = this.jobManagerPastDueData.length;
|
||||
break;
|
||||
case "REVIEW":
|
||||
this.jobManagerReviewData = this.jobManagerActiveTotalData.result_list;
|
||||
this.total_review = this.jobManagerReviewData.length;
|
||||
break;
|
||||
}
|
||||
console.log("getManagerJobsData RETURN DATA->", this.jobManagerActiveData);
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user