diff --git a/REMEMBER.txt b/REMEMBER.txt index 8c97391..273e6db 100644 --- a/REMEMBER.txt +++ b/REMEMBER.txt @@ -22,8 +22,6 @@ ionic generate page jobactive ionic generate component taskactivities ionic generate component suggestedlist -ionic generate component extra2box - ionic generate page addjob diff --git a/src/app/components/jobowner-dash/jobowner-dash.component.html b/src/app/components/jobowner-dash/jobowner-dash.component.html new file mode 100644 index 0000000..6ffbae8 --- /dev/null +++ b/src/app/components/jobowner-dash/jobowner-dash.component.html @@ -0,0 +1,3 @@ +

+ +

diff --git a/src/app/components/jobowner-dash/jobowner-dash.component.scss b/src/app/components/jobowner-dash/jobowner-dash.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/jobowner-dash/jobowner-dash.component.spec.ts b/src/app/components/jobowner-dash/jobowner-dash.component.spec.ts new file mode 100644 index 0000000..ca2ba80 --- /dev/null +++ b/src/app/components/jobowner-dash/jobowner-dash.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { JobownerDashComponent } from './jobowner-dash.component'; + +describe('JobownerDashComponent', () => { + let component: JobownerDashComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ JobownerDashComponent ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(JobownerDashComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/jobowner-dash/jobowner-dash.component.ts b/src/app/components/jobowner-dash/jobowner-dash.component.ts new file mode 100644 index 0000000..f416d48 --- /dev/null +++ b/src/app/components/jobowner-dash/jobowner-dash.component.ts @@ -0,0 +1,14 @@ +import {Component, Input, OnInit} from '@angular/core'; + +@Component({ + selector: 'app-jobowner-dash', + templateUrl: './jobowner-dash.component.html', + styleUrls: ['./jobowner-dash.component.scss'], +}) +export class JobownerDashComponent implements OnInit { + @Input('bannerData') bannerData:any; + constructor() { } + + ngOnInit() {} + +} diff --git a/src/app/components/workers-dash/workers-dash.component.html b/src/app/components/workers-dash/workers-dash.component.html new file mode 100644 index 0000000..0b283d7 --- /dev/null +++ b/src/app/components/workers-dash/workers-dash.component.html @@ -0,0 +1,96 @@ +
+ + + +
+
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)
+
+
+
+
+ +
+ + + +
+
{{pastdue_job_count}} Past Due Task(s)
+
+
+ +
+
{{review_job_count}} Task(s) in Review
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ +
+ +
+ {{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 new file mode 100644 index 0000000..837a7ef --- /dev/null +++ b/src/app/components/workers-dash/workers-dash.component.scss @@ -0,0 +1,223 @@ +.p-w{ + height:180px; + background-color: rgba(46, 9, 52, 0.47); + border-radius: 10px; + box-shadow: 1px 1px lightgray; +} + +.extra-grid{ + margin: 10px 0px 10px 0px; + padding: 0px; + height: 160px; + .ext-col{ + padding: 5px; + + //background-color: #2dd36f; + height: 160px; + .ext-in{ + &.bg{ + background-image: url("https://www.wrenchboard.com/assets/images/apps/xt/task.png"); + background-size: cover; + } + &.l{ + background-color: #1f1f3b; + //background-image: linear-gradient(to right, #1f1f3b, #152f49,#152f49,#1f1f3b); + background-size: cover; + color: white; + &.past-due{ + background-image: url("https://www.wrenchboard.com/assets/images/apps/xt/pastdue.png"); + background-color: darkred; + } + } + &.r{ + background-color: #866508; + //background-image: linear-gradient(to right, #866508, #906D0B,#866508); + // background-image: url("https://www.wrenchboard.com/assets/images/apps/xt/wallet.png"); + background-size: cover; + color: white; + &.review{ + background-image: url("https://www.wrenchboard.com/assets/images/apps/xt/review.png"); + background-color: #866508; + } + } + background-color: antiquewhite; + height: 150px; + border-radius: 10px; + + box-shadow: 1px 1px lightgray; + text-align: center; + + .ban-text{ + font-size: 24px; + font-weight: bolder; + padding-top: 60px; + padding-left: 20px; + // color: #8b198e; + } + + } + } +} + +.bg_white { + display: flex; + align-items: flex-start; + background-color: white; + padding: 5px; + box-shadow: 0px 0px 20px 1px rgba(0, 0, 0, 0.1); + border-radius: 10px; + margin-bottom: 20px; + &.OFFERS{ + background-color: #186875; + .name{ + color: white; + } + .bg_text{ + --background-color: white; + } + } + &.INTEREST{ + background-color: #6b6b08; + .name{ + color: white; + } + } + &.PASTDUEJOB{ + background-color: #e0b4b4; + } + &.REVIEWJOB{ + background-color: #dbefda; + } + &.bg_alice{ + background-color: aliceblue; + padding: 1px; + ion-row{ + padding:1px; + } + .detail{ + font-size: 14px; + font-weight: bolder; + margin-top: 15px; + } + } + .list { + display: flex; + align-items: center; + width: 100%; + + .back_image { + height: 95px; + width: 95px; + border-radius: 10px; + } + .banner_image{ + min-width: 90px; + } + .detail { + width: 100%; + margin-left: 10px; + + .bg_text { + color: var(--ion-color-primary); + background-color: rgba(246, 246, 248, 0.9); + font-size: 12px; + padding: 2px 5px; + border-radius: 5px; + //width: 80px; + text-align: center; + height: 38px; + width: 100%; + overflow: hidden; + .ovf{ + overflow: hidden; + } + } + + .name { + font-family: 'bold'; + margin-top: 5px; + padding: 5px; + } + + .price { + margin-top: 3px; + color: var(--ion-color-primary); + font-family: 'semi-bold'; + } + + .row { + display: flex; + align-items: center; + margin-top: 3px; + + ion-icon { + font-size: 18px; + } + + .small { + margin-left: 8px; + color: grey; + font-size: 14px; + } + } + } + + } + .blog_list { + //background-color: lightgrey !important; + display: flex; + align-items: center; + + .back_image { + height: 95px; + width: 95px !important; + border-radius: 10px; + } + .banner_image{ + min-width: 90px; + //float: right; + //display: flex; + //justify-content: flex-end + } + .detail { + margin-left: 10px; + + .bg_text { + color: var(--ion-color-primary); + background-color: #dfe1f3; + font-size: 12px; + padding: 2px 5px; + border-radius: 5px; + //width: 80px; + text-align: center; + } + + .name { + font-family: 'bold'; + margin-top: 5px; + } + + .price { + margin-top: 3px; + color: var(--ion-color-primary); + font-family: 'semi-bold'; + } + + .row { + display: flex; + align-items: center; + margin-top: 3px; + + ion-icon { + font-size: 18px; + } + + .small { + margin-left: 8px; + color: grey; + font-size: 14px; + } + } + } + } +} diff --git a/src/app/components/workers-dash/workers-dash.component.spec.ts b/src/app/components/workers-dash/workers-dash.component.spec.ts new file mode 100644 index 0000000..82bcd23 --- /dev/null +++ b/src/app/components/workers-dash/workers-dash.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { WorkersDashComponent } from './workers-dash.component'; + +describe('WorkersDashComponent', () => { + let component: WorkersDashComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ WorkersDashComponent ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(WorkersDashComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/workers-dash/workers-dash.component.ts b/src/app/components/workers-dash/workers-dash.component.ts new file mode 100644 index 0000000..778a717 --- /dev/null +++ b/src/app/components/workers-dash/workers-dash.component.ts @@ -0,0 +1,143 @@ +import {Component, Input, OnInit} from '@angular/core'; +import {TasksDataService} from "../../store/tasks-data.service"; +import {UsersoffersDataService} from "../../store/usersoffers-data.service"; +import {SessionDataProviderService} from "../../store/session-data-provider.service"; +import {Router} from "@angular/router"; + +@Component({ + selector: 'app-workers-dash', + templateUrl: './workers-dash.component.html', + styleUrls: ['./workers-dash.component.scss'], +}) +export class WorkersDashComponent implements OnInit { + @Input('bannerData') bannerData: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=''; + jobsTotalInReviewData:any; + jobsInReviewData: []; + + jobsTotalPastDueData:any; + jobsPastDueData: []; + + jobsTotalData:any; + jobsData: []; + myOffersData :[]; + + BANNER_MODE: number =0; + + constructor( + public tasksDataService:TasksDataService, + private router: Router, + public sessionDataProviderService: SessionDataProviderService, + public usersoffersDataService:UsersoffersDataService) { + this.refreshJobsData(); + } + + ngOnInit() {} + + async refreshJobsData(){ + this.BANNER_MODE = 0; + + this.jobsData = this.tasksDataService.jobsData; + this.jobsPastDueData = this.tasksDataService.jobsPastDueData; + this.jobsInReviewData = this.tasksDataService.jobsInReviewData; + this.session_image_server = this.tasksDataService.session_image_server; + + this.active_job_count = this.tasksDataService.active_job_count; + this.pastdue_job_count = this.tasksDataService.pastdue_job_count; + this.review_job_count = this.tasksDataService.review_job_count; + + + this.myOffersData = this.usersoffersDataService.myOffersData; + + this.active_offers_count = this.usersoffersDataService.total_offers; + + + if ( this.active_job_count> 0 ){ + this.BANNER_MODE = this.BANNER_MODE +1; + } + + if ( this.pastdue_job_count > 0 ){ + this.BANNER_MODE = this.BANNER_MODE +1; + } + + if ( this.review_job_count > 0 ){ + this.BANNER_MODE = this.BANNER_MODE +1; + } + console.log("Any OFFERRRR-> :::: ",this.active_offers_count); + console.log("Any BANNER_MODE-> :::: ",this.BANNER_MODE); + } + async getJobsData(){ + + this.curr_session = this.sessionDataProviderService.session; + var interval = setInterval( ()=> { + this.refreshJobsData(); + }, 5000); + + } + + pastDue(){ + //this.router.navigate(['activetask'],{state: item}); + this.router.navigate(['tabs/mytasks']); + } + reView(){ +///tabs/mytasks + this.router.navigate(['tabs/mytasks']); + } + + activeTasks(){ + this.router.navigate(['tabs/mytasks']); + } + onDetails(item) { + // var pageToNavigate = 'detail'; + var pageToNavigate = ''; + // alert(item.link_path); + switch (item.link_path){ + case 'referral': + pageToNavigate = 'invite'; + break; + case 'mytask': // offers waiting to start + pageToNavigate = 'joboffers'; + break; + + case 'my-coupon': + pageToNavigate = 'mycoupons'; + break; + case 'blog-page': + // this.blogDetails(this.getOneBlog(item)); + // this.getOneBlog(item); + break; + + case 'my-review-jobs': + pageToNavigate = 'jobmanager'; + break + + case 'my-pastdue-jobs': + pageToNavigate = 'jobmanager'; + break + + case 'pend-interest': + pageToNavigate ='pendinterest'; + break; + + + + case 'offer-interest': + pageToNavigate = 'jobinterest'; + break + + case 'acc-family': + pageToNavigate = 'family'; + break; + + } + if(pageToNavigate !=''){ + this.router.navigate([pageToNavigate],{state: item}); + } + } + +} diff --git a/src/app/pages/home/home.module.ts b/src/app/pages/home/home.module.ts index 00bc0ca..f4373dc 100644 --- a/src/app/pages/home/home.module.ts +++ b/src/app/pages/home/home.module.ts @@ -20,6 +20,8 @@ import {FamiliyNotaskComponent} from "../../components/familycards/familiy-notas import {FamiliyAddfamilyComponent} from "../../components/familycards/familiy-addfamily/familiy-addfamily.component"; import {FamiliyAllowanceComponent} from "../../components/familycards/familiy-allowance/familiy-allowance.component"; import {DashToptoolComponent} from "../../components/dash-toptool/dash-toptool.component"; +import {JobownerDashComponent} from "../../components/jobowner-dash/jobowner-dash.component"; +import {WorkersDashComponent} from "../../components/workers-dash/workers-dash.component"; // @NgModule({ // schemas: [CUSTOM_ELEMENTS_SCHEMA] @@ -39,7 +41,9 @@ import {DashToptoolComponent} from "../../components/dash-toptool/dash-toptool.c FamiliyDashComponent,FamiliyNokidsComponent, FamiliyNotaskComponent,FamiliyAddfamilyComponent, FamiliyAllowanceComponent, - DashToptoolComponent + DashToptoolComponent, + JobownerDashComponent, + WorkersDashComponent ], schemas: [CUSTOM_ELEMENTS_SCHEMA] }) diff --git a/src/app/pages/home/home.page.html b/src/app/pages/home/home.page.html index 082b5a0..741889d 100644 --- a/src/app/pages/home/home.page.html +++ b/src/app/pages/home/home.page.html @@ -89,29 +89,29 @@
{{item.short_title}} {{item.short_description}}{{item.short_description}}
@@ -119,10 +119,18 @@
-
- - -
+
+ + +
+ +
+ +
+ +
+ +
@@ -130,9 +138,6 @@
- - -
Recent Blog See all diff --git a/src/app/pages/inbox/inbox.page.ts b/src/app/pages/inbox/inbox.page.ts index d61c10c..714e6c2 100644 --- a/src/app/pages/inbox/inbox.page.ts +++ b/src/app/pages/inbox/inbox.page.ts @@ -30,7 +30,7 @@ export class InboxPage implements OnInit { onMessage() { this.router.navigate(['message']); } - activeSeleted(item) { + activeSelected(item) { this.router.navigate(['activetask'],{state: item}); } diff --git a/src/app/pages/my-course/my-course.page.html b/src/app/pages/my-course/my-course.page.html index ff27915..111c57e 100644 --- a/src/app/pages/my-course/my-course.page.html +++ b/src/app/pages/my-course/my-course.page.html @@ -26,7 +26,6 @@
Available Task(s) -
diff --git a/src/app/pages/mytasks/mytasks.page.ts b/src/app/pages/mytasks/mytasks.page.ts index ec70936..6f86ab7 100644 --- a/src/app/pages/mytasks/mytasks.page.ts +++ b/src/app/pages/mytasks/mytasks.page.ts @@ -40,7 +40,7 @@ export class MytasksPage implements OnInit { startOfferPage(){ this.router.navigate(['joboffers']); } - activeSeleted(item) { + activeSelected(item) { this.router.navigate(['activetask'],{state: item}); } @@ -88,34 +88,6 @@ export class MytasksPage implements OnInit { this.refreshJobsData(); }, 5000); - // 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.curr_session = this.sessionDataProviderService.session; - // this.wrenchService.getMyActiveJobsData(this.usrData).subscribe( - // jobsTotalData => { - // this.jobsTotalData = jobsTotalData; - // console.log("getMyActiveJobsData RETURN->", this.jobsTotalData); - // this.session_image_server = this.jobsTotalData.session_image_server; - // - // 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.jobsInReviewData.length; - // this.pastdue_job_count = this.jobsPastDueData.length; - // // debugger; - // } - // ); }