From 0842075a5fcdc52ae6bebdb733d6e9388716a605 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Tue, 21 Nov 2023 22:04:18 -0500 Subject: [PATCH] market detail --- REMEMBER.txt | 4 +++ .../latest-market.component.html | 12 +++++++++ .../latest-market.component.scss | 6 +++++ .../latest-market.component.spec.ts | 24 ++++++++++++++++++ .../latest-market/latest-market.component.ts | 25 +++++++++++++++++++ src/app/pages/home/home.module.ts | 3 ++- src/app/pages/home/home.page.html | 1 + src/app/pages/jobactive/jobactive.page.html | 14 +++++++++-- src/app/pages/jobpastdue/jobpastdue.page.html | 14 +++++++++-- src/app/pages/jobreview/jobreview.page.html | 14 +++++++++-- .../pages/marketdetail/marketdetail.page.html | 2 +- .../pages/marketdetail/marketdetail.page.ts | 13 +++++++--- 12 files changed, 121 insertions(+), 11 deletions(-) create mode 100644 src/app/components/latest-market/latest-market.component.html create mode 100644 src/app/components/latest-market/latest-market.component.scss create mode 100644 src/app/components/latest-market/latest-market.component.spec.ts create mode 100644 src/app/components/latest-market/latest-market.component.ts diff --git a/REMEMBER.txt b/REMEMBER.txt index a74eb61..dbcf3f4 100644 --- a/REMEMBER.txt +++ b/REMEMBER.txt @@ -64,6 +64,10 @@ ionic generate component tracking ionic generate page addcredit +ionic generate component latest-market + + + https://masteringionic.com/blog/working-with-capacitor-googlemaps-in-ionic ionic generate interface interfaces/location diff --git a/src/app/components/latest-market/latest-market.component.html b/src/app/components/latest-market/latest-market.component.html new file mode 100644 index 0000000..e254989 --- /dev/null +++ b/src/app/components/latest-market/latest-market.component.html @@ -0,0 +1,12 @@ +
+ + + + + + + + + + +
diff --git a/src/app/components/latest-market/latest-market.component.scss b/src/app/components/latest-market/latest-market.component.scss new file mode 100644 index 0000000..4da7c13 --- /dev/null +++ b/src/app/components/latest-market/latest-market.component.scss @@ -0,0 +1,6 @@ +ion-grid{ + margin: 0px; + background-color: #3dc2ff; + border-radius: 10px; + min-height: 120px; +} \ No newline at end of file diff --git a/src/app/components/latest-market/latest-market.component.spec.ts b/src/app/components/latest-market/latest-market.component.spec.ts new file mode 100644 index 0000000..877cd84 --- /dev/null +++ b/src/app/components/latest-market/latest-market.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { LatestMarketComponent } from './latest-market.component'; + +describe('LatestMarketComponent', () => { + let component: LatestMarketComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ LatestMarketComponent ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(LatestMarketComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/latest-market/latest-market.component.ts b/src/app/components/latest-market/latest-market.component.ts new file mode 100644 index 0000000..4a6c570 --- /dev/null +++ b/src/app/components/latest-market/latest-market.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core'; +import {MarketDataService} from "../../store/market-data.service"; + +@Component({ + selector: 'app-latest-market', + templateUrl: './latest-market.component.html', + styleUrls: ['./latest-market.component.scss'], +}) +export class LatestMarketComponent implements OnInit { + + show_activejob:boolean = false; + + constructor( public marketDataService:MarketDataService,) { } +jobData:[]; + ngOnInit() { + + this.jobData= this.marketDataService.jobsData; + // debugger; + } + + ionViewWillEnter(){ + this.jobData= this.marketDataService.jobsData; + } + +} diff --git a/src/app/pages/home/home.module.ts b/src/app/pages/home/home.module.ts index 22258a9..0cfca75 100644 --- a/src/app/pages/home/home.module.ts +++ b/src/app/pages/home/home.module.ts @@ -12,6 +12,7 @@ import {FamilypendingComponent} from "../../components/familypending/familypendi import { TrackingComponent } from "../../components/tracking/tracking.component"; import { FastrewardComponent } from "../../components/fastreward/fastreward.component"; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import {LatestMarketComponent} from "../../components/latest-market/latest-market.component"; // @NgModule({ // schemas: [CUSTOM_ELEMENTS_SCHEMA] @@ -24,7 +25,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; IonicModule, HomePageRoutingModule ], - declarations: [HomePage,SuggestedlistComponent,FamilypendingComponent,TrackingComponent,FastrewardComponent], + declarations: [HomePage,SuggestedlistComponent,FamilypendingComponent,TrackingComponent,FastrewardComponent,LatestMarketComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA] }) export class HomePageModule { } diff --git a/src/app/pages/home/home.page.html b/src/app/pages/home/home.page.html index 5399172..76fb89b 100644 --- a/src/app/pages/home/home.page.html +++ b/src/app/pages/home/home.page.html @@ -118,6 +118,7 @@ + diff --git a/src/app/pages/jobactive/jobactive.page.html b/src/app/pages/jobactive/jobactive.page.html index 0a8d5bc..c402822 100644 --- a/src/app/pages/jobactive/jobactive.page.html +++ b/src/app/pages/jobactive/jobactive.page.html @@ -1,8 +1,18 @@ + + + + + + + + {{jobData.title}} + +
- +
@@ -12,7 +22,7 @@
- {{jobData.title}} +
diff --git a/src/app/pages/jobpastdue/jobpastdue.page.html b/src/app/pages/jobpastdue/jobpastdue.page.html index 8c2f6ef..c815e7b 100644 --- a/src/app/pages/jobpastdue/jobpastdue.page.html +++ b/src/app/pages/jobpastdue/jobpastdue.page.html @@ -1,15 +1,25 @@ + + + + + + + + Past Due Task + +
- +
- Past Due Task +
diff --git a/src/app/pages/jobreview/jobreview.page.html b/src/app/pages/jobreview/jobreview.page.html index c7c1ea8..9f3ec6d 100644 --- a/src/app/pages/jobreview/jobreview.page.html +++ b/src/app/pages/jobreview/jobreview.page.html @@ -1,15 +1,25 @@ + + + + + + + + In Review + +
- +
- In Review +
diff --git a/src/app/pages/marketdetail/marketdetail.page.html b/src/app/pages/marketdetail/marketdetail.page.html index 11487c1..5adf4e1 100644 --- a/src/app/pages/marketdetail/marketdetail.page.html +++ b/src/app/pages/marketdetail/marketdetail.page.html @@ -104,7 +104,7 @@ - Send Interest Request to task + Send Interest Request to Owner {{interest_status}} diff --git a/src/app/pages/marketdetail/marketdetail.page.ts b/src/app/pages/marketdetail/marketdetail.page.ts index 50ad68a..ec4edd8 100644 --- a/src/app/pages/marketdetail/marketdetail.page.ts +++ b/src/app/pages/marketdetail/marketdetail.page.ts @@ -1,5 +1,5 @@ import {Component, OnInit, ViewChild} from '@angular/core'; -import {NavController} from "@ionic/angular"; +import {LoadingController, 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"; @@ -23,7 +23,8 @@ export class MarketdetailPage implements OnInit { private router: Router, public sessionDataProviderService: SessionDataProviderService, private wrenchService: WrenchService, - private waitingInterestService:WaitingInterestService + private waitingInterestService:WaitingInterestService, + private loadingCtrl: LoadingController ) { this.jobData = this.router.getCurrentNavigation().extras.state; @@ -66,7 +67,12 @@ export class MarketdetailPage implements OnInit { interest_msg_status:string = ""; InterestReqResult:any; - sendJobInterestMessage(){ + async sendJobInterestMessage(){ + const loading = await this.loadingCtrl.create({ + message: 'Sending Message', + duration: 3000, + }); + this.reqData = {action:13033, member_id: this.sessionDataProviderService.member_id, uid: this.sessionDataProviderService.member_uid, @@ -75,6 +81,7 @@ export class MarketdetailPage implements OnInit { offer_code:this.jobData.offer_code, yourmessage:''} + loading.present(); this.wrenchService.sendMarketInterest(this.reqData).subscribe( reqResult => { this.InterestReqResult = reqResult;