From eddaa760fd71562c8b05ab693c9d5cd9c9338799 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 11 Feb 2024 13:29:22 -0500 Subject: [PATCH] Style for work worker --- .../workers-dash/workers-dash.component.html | 149 +++++++++--------- .../workers-dash/workers-dash.component.scss | 16 +- .../workers-dash/workers-dash.component.ts | 7 + src/app/pages/mytasks/mytasks.page.ts | 122 +++++++------- 4 files changed, 157 insertions(+), 137 deletions(-) diff --git a/src/app/components/workers-dash/workers-dash.component.html b/src/app/components/workers-dash/workers-dash.component.html index 769be47..aa2bd8b 100644 --- a/src/app/components/workers-dash/workers-dash.component.html +++ b/src/app/components/workers-dash/workers-dash.component.html @@ -1,53 +1,60 @@ -
- - - -
-
Go to active task(s)
-
You have {{active_job_count}} active task(s)
-
-
-
- - -
-
{{pastdue_job_count}} Past Due Task(s)
-
-
- -
-
{{review_job_count}} Task(s) in Review
-
-
-
-
+
+ + + +
+
Go to Active Task(s)
+
+ You have {{ active_job_count }} active task(s) +
+
+
+
+ + +
+
{{ pastdue_job_count }} Past Due Task(s)
+
+
+ +
+
{{ review_job_count }} Task(s) in Review
+
+
+
+
-
- - - -
You have {{active_job_count}} active task(s)
-
-
-
+
+ + + +
+
Go to Active Task(s)
+
+ You have {{ active_job_count }} active task(s) +
+
+
+
+
-
- - - -
-
{{pastdue_job_count}} Past Due Task(s)
-
-
- -
-
{{review_job_count}} Task(s) in Review
-
-
-
-
+
+ + + +
+
{{ pastdue_job_count }} Past Due Task(s)
+
+
+ +
+
{{ review_job_count }} Task(s) in Review
+
+
+
+
@@ -66,31 +73,31 @@
-
-
- - -
-
- -
- -
- {{item.short_title}} - {{item.short_description}} -
+
+
+ +
- +
+ +
+ +
+ {{ item.short_title }} + {{ + item.short_description + }} +
+
+
diff --git a/src/app/components/workers-dash/workers-dash.component.scss b/src/app/components/workers-dash/workers-dash.component.scss index 6b3b10f..c61eac9 100644 --- a/src/app/components/workers-dash/workers-dash.component.scss +++ b/src/app/components/workers-dash/workers-dash.component.scss @@ -1,5 +1,5 @@ .p-w{ - height:180px; + height:170px; background-color: rgba(46, 9, 52, 0.47); border-radius: 10px; box-shadow: 1px 1px lightgray; @@ -8,12 +8,12 @@ .extra-grid{ margin: 10px 0px 10px 0px; padding: 0px; - height: 140px; + height: 130px; .ext-col{ padding: 5px; //background-color: #2dd36f; - height: 140px; + height: 130px; .ext-in{ &.bg{ background-image: url("https://www.wrenchboard.com/assets/images/apps/xt/task.png"); @@ -26,7 +26,8 @@ color: white; &.past-due{ background-image: url("https://www.wrenchboard.com/assets/images/apps/xt/pastdue.png"); - background-color: darkred; + background-color: #d510106b; + color:black; } } &.r{ @@ -37,18 +38,19 @@ color: white; &.review{ background-image: url("https://www.wrenchboard.com/assets/images/apps/xt/review.png"); - background-color: #866508; + background-color: #08860f8f; + color: black; } } background-color: antiquewhite; - height: 130px; + height: 120px; border-radius: 10px; box-shadow: 1px 1px lightgray; text-align: center; .ban-text{ - font-size: 24px; + font-size: 22px; font-weight: bolder; padding-top: 40px; padding-left: 20px; diff --git a/src/app/components/workers-dash/workers-dash.component.ts b/src/app/components/workers-dash/workers-dash.component.ts index 4b7ef39..f8a04e0 100644 --- a/src/app/components/workers-dash/workers-dash.component.ts +++ b/src/app/components/workers-dash/workers-dash.component.ts @@ -85,12 +85,14 @@ export class WorkersDashComponent implements OnInit { let item: { 'tab': 'PASTDUE' }; + dispatchEvent(new Event("mytask_tab_pastdue")); this.router.navigate(['tabs/mytasks'],{state: item}); } reView(){ let item: { 'tab': 'REVIEW' }; + dispatchEvent(new Event("mytask_tab_review")); this.router.navigate(['tabs/mytasks'],{state: item}); } @@ -98,6 +100,7 @@ export class WorkersDashComponent implements OnInit { let item: { 'tab': 'ACTIVE' }; + dispatchEvent(new Event("mytask_tab_active")); this.router.navigate(['tabs/mytasks'],{state: item}); } onDetails(item) { @@ -149,3 +152,7 @@ export class WorkersDashComponent implements OnInit { } } + + + + diff --git a/src/app/pages/mytasks/mytasks.page.ts b/src/app/pages/mytasks/mytasks.page.ts index f885049..0625e25 100644 --- a/src/app/pages/mytasks/mytasks.page.ts +++ b/src/app/pages/mytasks/mytasks.page.ts @@ -1,73 +1,83 @@ -import { Router } from '@angular/router'; -import { Component, OnInit } from '@angular/core'; -import { WrenchService } from 'src/app/services/wrench.service'; -import {SessionDataProviderService} from "../../store/session-data-provider.service"; -import {TasksDataService} from "../../store/tasks-data.service"; -import {UsersoffersDataService} from "../../store/usersoffers-data.service"; +import { Router } from "@angular/router"; +import { Component, OnInit } from "@angular/core"; +import { WrenchService } from "src/app/services/wrench.service"; +import { SessionDataProviderService } from "../../store/session-data-provider.service"; +import { TasksDataService } from "../../store/tasks-data.service"; +import { UsersoffersDataService } from "../../store/usersoffers-data.service"; @Component({ - selector: 'app-mytasks', - templateUrl: './mytasks.page.html', - styleUrls: ['./mytasks.page.scss'], + selector: "app-mytasks", + templateUrl: "./mytasks.page.html", + styleUrls: ["./mytasks.page.scss"], }) export class MytasksPage implements OnInit { - - - tabs: any = 'tasks'; - extraData:any; - active_offers_count:number =0; - active_job_count:number =0; - pastdue_job_count:number =0; - review_job_count:number =0; - session_image_server:string=''; - curr_session:string=''; + tabs: any = "tasks"; + extraData: any; + active_offers_count: number = 0; + active_job_count: number = 0; + pastdue_job_count: number = 0; + review_job_count: number = 0; + session_image_server: string = ""; + curr_session: string = ""; constructor( - private router: Router, - public sessionDataProviderService: SessionDataProviderService, - private wrenchService: WrenchService, - public tasksDataService:TasksDataService, - public usersoffersDataService:UsersoffersDataService + private router: Router, + public sessionDataProviderService: SessionDataProviderService, + private wrenchService: WrenchService, + public tasksDataService: TasksDataService, + public usersoffersDataService: UsersoffersDataService ) { - // this.extraData = this.router.getCurrentNavigation().extras.state; - // debugger; + addEventListener('mytask_tab_pastdue', () => { + this.tabs="pastdue"; + }); + + addEventListener('mytask_tab_review', () => { + this.tabs="review"; + }); + + addEventListener('mytask_tab_active', () => { + this.tabs="tasks"; + }); + + } - myOffersData :[]; + myOffersData: []; ngOnInit() { // debugger; this.refreshJobsData(); this.getJobsData(); } - startOfferPage(){ - this.router.navigate(['joboffers']); + startOfferPage() { + this.router.navigate(["joboffers"]); } activeSelected(item) { - this.router.navigate(['activetask'],{state: item}); + this.router.navigate(["activetask"], { state: item }); } usrData: { - action:number, - member_id: number, - uid: string, sessionid: string, - limit:20, - page:0, - offset: 0, - job_mode: string, - allstatus: number + action: number; + member_id: number; + uid: string; + sessionid: string; + limit: 20; + page: 0; + offset: 0; + job_mode: string; + allstatus: number; }; - jobsTotalInReviewData:any; - jobsInReviewData: []; + jobsTotalInReviewData: any; + jobsInReviewData: []; - jobsTotalPastDueData:any; - jobsPastDueData: []; + jobsTotalPastDueData: any; + jobsPastDueData: []; - jobsTotalData:any; - jobsData: []; + jobsTotalData: any; + jobsData: []; - async refreshJobsData(){ + async refreshJobsData() { this.jobsData = this.tasksDataService.jobsData; this.jobsPastDueData = this.tasksDataService.jobsPastDueData; this.jobsInReviewData = this.tasksDataService.jobsInReviewData; @@ -77,27 +87,23 @@ export class MytasksPage implements OnInit { this.pastdue_job_count = this.tasksDataService.pastdue_job_count; this.review_job_count = this.tasksDataService.review_job_count; + this.myOffersData = this.usersoffersDataService.myOffersData; - this.myOffersData = this.usersoffersDataService.myOffersData; + this.active_offers_count = this.usersoffersDataService.total_offers; - this.active_offers_count = this.usersoffersDataService.total_offers; - - console.log("Any OFFERRRR-> :::: ",this.active_offers_count); + console.log("Any OFFERRRR-> :::: ", this.active_offers_count); } - async getJobsData(){ - - this.curr_session = this.sessionDataProviderService.session; - var interval = setInterval( ()=> { - this.refreshJobsData(); + async getJobsData() { + this.curr_session = this.sessionDataProviderService.session; + var interval = setInterval(() => { + this.refreshJobsData(); }, 5000); - } activeSeleted(item) { - this.router.navigate(['activetask'],{state: item}); + this.router.navigate(["activetask"], { state: item }); } - // getPastDueJobsData(){ // // this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_id, uid: this.sessionDataProviderService.member_uid, @@ -115,7 +121,6 @@ export class MytasksPage implements OnInit { // // } - // getInReviewJobsData(){ // // this.usrData = {action:11200, @@ -135,5 +140,4 @@ export class MytasksPage implements OnInit { // ); // // } - }