From df25b2c59d14345b5f7ec8f056a7ecedc8eaa69a Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 23 Nov 2023 20:24:47 -0500 Subject: [PATCH] active tasks --- .../taskactivities.component.scss | 11 ++- .../taskactivities.component.ts | 7 +- src/app/pages/activetask/activetask.page.html | 91 +++++++++---------- src/app/pages/activetask/activetask.page.ts | 83 +++++++++-------- src/app/pages/ownersjob/ownersjob.page.ts | 10 +- .../pendingoffers/pendingoffers.module.ts | 3 +- .../pendingoffers/pendingoffers.page.html | 72 ++++++++------- .../pages/pendingoffers/pendingoffers.page.ts | 56 ++++++------ 8 files changed, 181 insertions(+), 152 deletions(-) diff --git a/src/app/components/taskactivities/taskactivities.component.scss b/src/app/components/taskactivities/taskactivities.component.scss index 8aad473..158c891 100644 --- a/src/app/components/taskactivities/taskactivities.component.scss +++ b/src/app/components/taskactivities/taskactivities.component.scss @@ -1,4 +1,4 @@ -.lesson { +.task_activity { margin-top: 20px; .bold { @@ -13,6 +13,11 @@ color: grey; } + .red { + color: red; + font-weight: bolder; + } + .sec { display: flex; justify-content: space-between; @@ -24,12 +29,14 @@ display: flex; justify-content: space-between; align-items: center; - background-color: white; + //background-color: white; padding: 15px; box-shadow: 0px 0px 20px 1px rgba(0, 0, 0, 0.1); border-radius: 10px; margin-top: 20px; + + .left { display: flex; } diff --git a/src/app/components/taskactivities/taskactivities.component.ts b/src/app/components/taskactivities/taskactivities.component.ts index cf07933..7d075d5 100644 --- a/src/app/components/taskactivities/taskactivities.component.ts +++ b/src/app/components/taskactivities/taskactivities.component.ts @@ -13,7 +13,12 @@ export class TaskactivitiesComponent implements OnInit { constructor( public sessionDataProviderService: SessionDataProviderService, private wrenchService: WrenchService - ) { } + ) { + addEventListener('app-taskactivities-refresh', () => { + this.activeJobMsgList(); + }); + + } ngOnInit() { console.log("IN COMPO ACT", this.jobData); diff --git a/src/app/pages/activetask/activetask.page.html b/src/app/pages/activetask/activetask.page.html index aea5dd3..2ac67b2 100644 --- a/src/app/pages/activetask/activetask.page.html +++ b/src/app/pages/activetask/activetask.page.html @@ -1,7 +1,17 @@ + + + + + + + + {{jobData.title}} + +
-
+
@@ -33,14 +43,14 @@
-
- +
+ + + Send Updates + Details - - Send Updates - Actions @@ -72,45 +82,37 @@
-
- - - - +
- - - - - - - - - - + + + + + + + + + + + + + + Send Updates + + + - Send Updates {{interest_msg_status}} - - - - - - - - - - - - - -
@@ -168,7 +170,6 @@
-
@@ -178,8 +179,6 @@ THis task is in review , the owner will give feedback soon.
- - @@ -187,11 +186,11 @@
- - -
- Return -
-
-
+ + + + + + + diff --git a/src/app/pages/activetask/activetask.page.ts b/src/app/pages/activetask/activetask.page.ts index 65df9a0..60012ee 100644 --- a/src/app/pages/activetask/activetask.page.ts +++ b/src/app/pages/activetask/activetask.page.ts @@ -12,9 +12,10 @@ import { WrenchService } from 'src/app/services/wrench.service'; }) export class ActivetaskPage implements OnInit { @ViewChild('yourmessage') yourmessage; - tabs = 'about'; + tabs = 'activities'; status_description:string=''; - + session_image_server:string=''; + curr_session:string=''; jobData: any; constructor( @@ -25,16 +26,18 @@ export class ActivetaskPage implements OnInit { private wrenchService: WrenchService, public blogDataService: BlogDataService ) { - + this.yourmessage=''; this.jobData = this.router.getCurrentNavigation().extras.state; console.log("XXXXX 1", this.router.getCurrentNavigation().extras); console.log("XXXXX 2", this.router.getCurrentNavigation().extras.state); //console.log("XXXXX 3", this.router.getCurrentNavigation().extras.state.ID); - this.status_description = this.jobData.status_description; + this.status_description = this.jobData?.status_description; } ngOnInit() { - this.activeJobMsgList(); + this.curr_session = this.sessionDataProviderService.session; + this.session_image_server = this.sessionDataProviderService.session_image_server; + //this.activeJobMsgList(); } onBack() { @@ -60,37 +63,37 @@ export class ActivetaskPage implements OnInit { */ - contrData: { - action:number, - member_id: number, - uid: string, - sessionid: string, - limit:20, - contract:string, - offset: 0 - }; - msgListTotalData:any; - msgListData: []; - activeJobMsgList(){ - this.contrData = { - action:14011, - member_id: this.sessionDataProviderService.member_id, - uid: this.sessionDataProviderService.member_uid, - sessionid: this.sessionDataProviderService.session , - limit:20, - contract: this.jobData.contract, - offset: 0} - - this.wrenchService.activeJobMsgList(this.contrData).subscribe( - msgListTotalData => { - this.msgListTotalData = msgListTotalData; - // console.log("REFER RETURN->", this.referTotalData); - this.msgListData = this.msgListTotalData.result_list; - console.log("REFER RETURN DATA->", this.msgListData); - } - ); - - } + // contrData: { + // action:number, + // member_id: number, + // uid: string, + // sessionid: string, + // limit:20, + // contract:string, + // offset: 0 + // }; + // msgListTotalData:any; + // msgListData: []; + // activeJobMsgList(){ + // this.contrData = { + // action:14011, + // member_id: this.sessionDataProviderService.member_id, + // uid: this.sessionDataProviderService.member_uid, + // sessionid: this.sessionDataProviderService.session , + // limit:20, + // contract: this.jobData.contract, + // offset: 0} + // + // this.wrenchService.activeJobMsgList(this.contrData).subscribe( + // msgListTotalData => { + // this.msgListTotalData = msgListTotalData; + // // console.log("REFER RETURN->", this.referTotalData); + // this.msgListData = this.msgListTotalData.result_list; + // console.log("REFER RETURN DATA->", this.msgListData); + // } + // ); + // + // } /* 'member_id' => int 1 @@ -113,7 +116,7 @@ export class ActivetaskPage implements OnInit { msgReqResult:any; sendActiveJobMessage(){ - if (this.yourmessage.length < 5){ + if (this.yourmessage == undefined || this.yourmessage?.length < 5){ alert("Enter Message to send"); return; } @@ -132,7 +135,11 @@ export class ActivetaskPage implements OnInit { this.msgReqResult = reqResult; console.log("msgReqResult RETURN->", this.msgReqResult); this.interest_msg_status = this.msgReqResult?.status; - this.activeJobMsgList(); + //this.activeJobMsgList(); + const event = new Event("app-taskactivities-refresh"); + // Dispatch the event. + dispatchEvent(event); + } ); } diff --git a/src/app/pages/ownersjob/ownersjob.page.ts b/src/app/pages/ownersjob/ownersjob.page.ts index 2c538b1..dbf0b5e 100644 --- a/src/app/pages/ownersjob/ownersjob.page.ts +++ b/src/app/pages/ownersjob/ownersjob.page.ts @@ -71,7 +71,7 @@ export class OwnersjobPage implements OnInit { email: this.job_recipient, assign_mode: 110033 }; - console.log('XXX-> ', this.reqData ); + // console.log('XXX-> ', this.reqData ); loading.present(); @@ -82,6 +82,9 @@ export class OwnersjobPage implements OnInit { if ( this.assigResult != undefined && this.assigResult.internal_return > 0){ this.assign_ind_result = "Task sent to the email - " +this.job_recipient; this.job_recipient=''; + const event = new Event("app-myjob-offers-refresh"); + // Dispatch the event. + dispatchEvent(event); setTimeout(() => { this.assign_ind_result =''; }, 3000); @@ -157,7 +160,10 @@ console.log('XXX-> ', this.reqData ); this.assigResult = assigResult; console.log("assigResult RETURN->", this.assigResult); if ( this.assigResult != undefined && this.assigResult.internal_return > 0){ - this.assign_mak_result = "Task sent to market;" + this.assign_mak_result = "Task sent to market"; + const event = new Event("app-myjob-offers-refresh"); + // Dispatch the event. + dispatchEvent(event); setTimeout(() => { this.assign_mak_result =''; }, 3000); diff --git a/src/app/pages/pendingoffers/pendingoffers.module.ts b/src/app/pages/pendingoffers/pendingoffers.module.ts index 95c5753..869f53a 100644 --- a/src/app/pages/pendingoffers/pendingoffers.module.ts +++ b/src/app/pages/pendingoffers/pendingoffers.module.ts @@ -7,6 +7,7 @@ import { IonicModule } from '@ionic/angular'; import { PendingoffersPageRoutingModule } from './pendingoffers-routing.module'; import { PendingoffersPage } from './pendingoffers.page'; +import {MyjobOffersComponent} from "../../components/myjob-offers/myjob-offers.component"; @NgModule({ imports: [ @@ -15,6 +16,6 @@ import { PendingoffersPage } from './pendingoffers.page'; IonicModule, PendingoffersPageRoutingModule ], - declarations: [PendingoffersPage] + declarations: [PendingoffersPage,MyjobOffersComponent] }) export class PendingoffersPageModule {} diff --git a/src/app/pages/pendingoffers/pendingoffers.page.html b/src/app/pages/pendingoffers/pendingoffers.page.html index db2f2ca..cb5af3c 100644 --- a/src/app/pages/pendingoffers/pendingoffers.page.html +++ b/src/app/pages/pendingoffers/pendingoffers.page.html @@ -14,11 +14,15 @@
-
- Pending Offers - +
+
+ Pending Offers +
+ +
+ @@ -29,39 +33,39 @@ -
- - - - - - - - - - - - -
+ + + + + + + + + + + + + + -
-
-
-
+ + + + -
- {{item.title}} - {{item.description}} - {{item.offer_code}} {{item.price*0.01}} {{item.currency}} - Expire: {{item.expire |date}} - Send to : {{item.job_to}} -
-
-
- -
-
-
+ + + + + + + + + + + + +
diff --git a/src/app/pages/pendingoffers/pendingoffers.page.ts b/src/app/pages/pendingoffers/pendingoffers.page.ts index cc7c567..943678d 100644 --- a/src/app/pages/pendingoffers/pendingoffers.page.ts +++ b/src/app/pages/pendingoffers/pendingoffers.page.ts @@ -22,7 +22,7 @@ export class PendingoffersPage implements OnInit { ) { } ngOnInit() { - this.getPendingOffersData(); + // this.getPendingOffersData(); } onBack() { @@ -30,32 +30,32 @@ export class PendingoffersPage implements OnInit { } - usrData: { - action:number, member_id: number, uid: string, sessionid: string, limit:20, page:1,offset: 0 - }; - - jobManagerOffersTotalData:any; - jobManagerOffersData: []; - getPendingOffersData(){ - this.curr_session = this.sessionDataProviderService.session; - this.usrData = {action:11309, - member_id: this.sessionDataProviderService.member_id, - uid: this.sessionDataProviderService.member_uid, - sessionid: this.sessionDataProviderService.session , - limit:20, page:1,offset: 0} - - this.wrenchService.jobmanageroffers(this.usrData).subscribe( - jobManagerOffersTotalData => { - this.jobManagerOffersTotalData = jobManagerOffersTotalData; - console.log("jobManagerOffersTotalData RETURN->", this.jobManagerOffersTotalData); - this.jobManagerOffersData = this.jobManagerOffersTotalData.result_list; - this.session_image_server = this.jobManagerOffersTotalData.session_image_server; - - // debugger; - console.log("jobManagerOffersData RETURN DATA->", this.jobManagerOffersTotalData); - } - ); - - } + // usrData: { + // action:number, member_id: number, uid: string, sessionid: string, limit:20, page:1,offset: 0 + // }; + // + // jobManagerOffersTotalData:any; + // jobManagerOffersData: []; + // getPendingOffersData(){ + // this.curr_session = this.sessionDataProviderService.session; + // this.usrData = {action:11309, + // member_id: this.sessionDataProviderService.member_id, + // uid: this.sessionDataProviderService.member_uid, + // sessionid: this.sessionDataProviderService.session , + // limit:20, page:1,offset: 0} + // + // this.wrenchService.jobmanageroffers(this.usrData).subscribe( + // jobManagerOffersTotalData => { + // this.jobManagerOffersTotalData = jobManagerOffersTotalData; + // console.log("jobManagerOffersTotalData RETURN->", this.jobManagerOffersTotalData); + // this.jobManagerOffersData = this.jobManagerOffersTotalData.result_list; + // this.session_image_server = this.jobManagerOffersTotalData.session_image_server; + // + // // debugger; + // console.log("jobManagerOffersData RETURN DATA->", this.jobManagerOffersTotalData); + // } + // ); + // + // } }