diff --git a/REMEMBER.txt b/REMEMBER.txt index 38ce74d..01311c2 100644 --- a/REMEMBER.txt +++ b/REMEMBER.txt @@ -6,4 +6,5 @@ ionic generate page familylogin ionic generate page blogdetail ionic generate page marketdetail -ionic generate page activetask \ No newline at end of file +ionic generate page activetask +ionic generate page mytask \ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 0b2566c..bc295ba 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -150,6 +150,10 @@ const routes: Routes = [ path: 'family', loadChildren: () => import('./pages/family/family.module').then(m => m.FamilyPageModule) }, + { + path: 'mytasks', + loadChildren: () => import('./pages/mytasks/mytasks.module').then(m => m.MytasksPageModule) + }, ]; @NgModule({ diff --git a/src/app/pages/inbox/inbox.page.html b/src/app/pages/inbox/inbox.page.html index a2dd644..bba44a6 100644 --- a/src/app/pages/inbox/inbox.page.html +++ b/src/app/pages/inbox/inbox.page.html @@ -10,6 +10,7 @@ + diff --git a/src/app/pages/inbox/inbox.page.scss b/src/app/pages/inbox/inbox.page.scss index 938e135..6481421 100644 --- a/src/app/pages/inbox/inbox.page.scss +++ b/src/app/pages/inbox/inbox.page.scss @@ -1,11 +1,3 @@ -/* - Authors : initappz (Rahul Jograna) - Website : https://initappz.com/ - App Name : E-Learning App Template - This App Template Source code is licensed as per the - terms found in the Website https://initappz.com/license - Copyright and Good Faith Purchasers © 2021-present initappz. -*/ ion-header { ion-toolbar { --background: var(--ion-color-primary); diff --git a/src/app/pages/inbox/inbox.page.ts b/src/app/pages/inbox/inbox.page.ts index f7cc776..d61c10c 100644 --- a/src/app/pages/inbox/inbox.page.ts +++ b/src/app/pages/inbox/inbox.page.ts @@ -1,4 +1,3 @@ - import { Router } from '@angular/router'; import { Component, OnInit } from '@angular/core'; import { WrenchService } from 'src/app/services/wrench.service'; diff --git a/src/app/pages/mytasks/mytasks-routing.module.ts b/src/app/pages/mytasks/mytasks-routing.module.ts new file mode 100644 index 0000000..cc3ecc3 --- /dev/null +++ b/src/app/pages/mytasks/mytasks-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { MytasksPage } from './mytasks.page'; + +const routes: Routes = [ + { + path: '', + component: MytasksPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class MytasksPageRoutingModule {} diff --git a/src/app/pages/mytasks/mytasks.module.ts b/src/app/pages/mytasks/mytasks.module.ts new file mode 100644 index 0000000..bd9eb54 --- /dev/null +++ b/src/app/pages/mytasks/mytasks.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { MytasksPageRoutingModule } from './mytasks-routing.module'; + +import { MytasksPage } from './mytasks.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + MytasksPageRoutingModule + ], + declarations: [MytasksPage] +}) +export class MytasksPageModule {} diff --git a/src/app/pages/mytasks/mytasks.page.html b/src/app/pages/mytasks/mytasks.page.html new file mode 100644 index 0000000..3d2211b --- /dev/null +++ b/src/app/pages/mytasks/mytasks.page.html @@ -0,0 +1,138 @@ + + + + + + + + + My Tasks + + + + + + + + Active + + + Past Due + + + In Review + + + +
+ + + Silhouette of mountains + + Current Tasks + Card Subtitle + + + + Here's a small text description for the card content. Nothing more, nothing less. + + + +
+
+
+
+ {{item.title}} +
+ {{item.job_description}} + +
+
+
+ {{item.delivery_date}} +
+
+
+
+ + + +
+
+
+ +
+ + + Silhouette of mountains + + Past Due + Card Subtitle + + + + Here's a small text description for the card content. Nothing more, nothing less. + + + +
+
+
+
+ {{item.title}} +
+ {{item.job_description}} + +
+
+
+ {{item.delivery_date}} +
+
+
+
+ + + +
+
+
+ +
+ + + Silhouette of mountains + + In Review + Card Subtitle + + + + Here's a small text description for the card content. Nothing more, nothing less. + + + +
+
+
+
+ {{item.title}} +
+ {{item.job_description}} + +
+
+
+ {{item.delivery_date}} +
+
+
+
+ + + +
+
+
+
+ diff --git a/src/app/pages/mytasks/mytasks.page.scss b/src/app/pages/mytasks/mytasks.page.scss new file mode 100644 index 0000000..6481421 --- /dev/null +++ b/src/app/pages/mytasks/mytasks.page.scss @@ -0,0 +1,59 @@ +ion-header { + ion-toolbar { + --background: var(--ion-color-primary); + + ion-icon { + color: white; + } + + ion-title { + color: white; + } + } +} + +ion-content { + + .grey_text { + color: grey; + font-size: 13px; + } + + .small_text { + font-size: 12px; + } + + .color_text { + color: white; + background-color: var(--ion-color-primary); + width: 25px; + padding: 2px; + text-align: center; + border-radius: 10px; + font-size: 12px; + } + + .chat { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 1rem; + border-bottom: 1px solid lightgray; + padding-bottom: 10px; + + .flex { + display: flex; + align-items: center; + + .back_image { + height: 50px; + width: 50px; + border-radius: 100%; + } + } + } + + .call { + font-size: 20px; + } +} diff --git a/src/app/pages/mytasks/mytasks.page.spec.ts b/src/app/pages/mytasks/mytasks.page.spec.ts new file mode 100644 index 0000000..16ce30e --- /dev/null +++ b/src/app/pages/mytasks/mytasks.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { MytasksPage } from './mytasks.page'; + +describe('MytasksPage', () => { + let component: MytasksPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ MytasksPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(MytasksPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/mytasks/mytasks.page.ts b/src/app/pages/mytasks/mytasks.page.ts new file mode 100644 index 0000000..d64c18b --- /dev/null +++ b/src/app/pages/mytasks/mytasks.page.ts @@ -0,0 +1,104 @@ +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"; + +@Component({ + selector: 'app-mytasks', + templateUrl: './mytasks.page.html', + styleUrls: ['./mytasks.page.scss'], +}) +export class MytasksPage implements OnInit { + + + tabs: any = 'tasks'; + + constructor( + private router: Router, + public sessionDataProviderService: SessionDataProviderService, + private wrenchService: WrenchService + ) { } + + ngOnInit() { + this.getJobsData(); + this.getPastDueJobsData(); + this.getInReviewJobsData(); + } + + onCall() { + this.router.navigate(['call']); + } + + onMessage() { + this.router.navigate(['message']); + } + activeSeleted(item) { + this.router.navigate(['activetask'],{state: item}); + } + + usrData: { + action:11200, member_id: number, uid: string, sessionid: string, limit:20, page:0, offset: 0, job_mode: string + }; + + 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.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.blogDataService.setBlogData(this.blogResult.blog_data); + } + ); + + } + + 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); + } + ); + + } + + 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); + } + ); + + } + +} diff --git a/src/app/pages/tabs/tabs-routing.module.ts b/src/app/pages/tabs/tabs-routing.module.ts index 5559a93..e944141 100644 --- a/src/app/pages/tabs/tabs-routing.module.ts +++ b/src/app/pages/tabs/tabs-routing.module.ts @@ -35,6 +35,10 @@ const routes: Routes = [ path: 'tab5', loadChildren: () => import('../profile/profile.module').then(m => m.ProfilePageModule) }, + { + path: 'mytasks', + loadChildren:() => import('../mytasks/mytasks.module').then(m => m.MytasksPageModule) + }, { path: '', redirectTo: '/tabs/tab1', diff --git a/src/app/pages/tabs/tabs.page.html b/src/app/pages/tabs/tabs.page.html index ee6d6bc..9743ee0 100644 --- a/src/app/pages/tabs/tabs.page.html +++ b/src/app/pages/tabs/tabs.page.html @@ -12,7 +12,7 @@ Market - + Tasks