-
{{item.title}}
-
Expiration : {{item.expire | date}}
-
Price : {{item.price*0.01| number : '1.2-2'}} {{item.currency}}
+
+
+
+

+
+
+
+
{{item.title}}
+
Reward : {{item.price*0.01| number : '1.2-2'}} {{item.currency}}
+
+
Expires : {{item.expire | date}}
+
+ View
+
-
- {{(item.job_description.length<95)? item.job_description :item.job_description.substring(0,95)+'...' }}
-
-
-
-
-
-
-
-
-
-
- Reject
-
-
-
-
-
- Start Now
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{(item.job_description.length<95)? item.job_description :item.job_description.substring(0,95)+'...' }}
+
+
+
+
+ Reject
+
+
+ Start Now
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/components/offers-received/offers-received.component.scss b/src/app/components/offers-received/offers-received.component.scss
index 6fefa3e..6cb6f75 100644
--- a/src/app/components/offers-received/offers-received.component.scss
+++ b/src/app/components/offers-received/offers-received.component.scss
@@ -1,3 +1,26 @@
+.offerBanner{
+ box-shadow: 3px 2px 2px #bbadad;
+ background-color: aliceblue;
+ border-radius: 10px;
+ border-color: #383a3e;
+ //display: flex;
+ .offer_title{
+ font-size: 18px;
+ font-weight: bolder;
+ }
+ .price{
+ margin-top: 5px;
+ margin-bottom: 5px;
+ color:green;
+ font-size: 14px;
+ }
+ .expire{
+ font-weight: bold;
+ color: red;
+ font-size: 14px;
+ }
+}
+
.offers_div{
background-color: aliceblue;
border-radius: 10px;
diff --git a/src/app/components/offers-received/offers-received.component.ts b/src/app/components/offers-received/offers-received.component.ts
index 0a5051b..0cb1d5f 100644
--- a/src/app/components/offers-received/offers-received.component.ts
+++ b/src/app/components/offers-received/offers-received.component.ts
@@ -1,8 +1,9 @@
-import { Component, OnInit } from '@angular/core';
+import {Component, OnInit, ViewChild} from '@angular/core';
import {AlertController, LoadingController, NavController} from "@ionic/angular";
import {Router} from "@angular/router";
import {SessionDataProviderService} from "../../store/session-data-provider.service";
import {WrenchService} from "../../services/wrench.service";
+import { BannersDataService } from "../../store/banners-data.service";
@Component({
selector: 'app-offers-received',
@@ -10,6 +11,7 @@ import {WrenchService} from "../../services/wrench.service";
styleUrls: ['./offers-received.component.scss'],
})
export class OffersReceivedComponent implements OnInit {
+@ViewChild('offerData') offerData: [];
constructor(
private navctrl: NavController,
@@ -17,9 +19,15 @@ export class OffersReceivedComponent implements OnInit {
public sessionDataProviderService: SessionDataProviderService,
private alertController:AlertController,
private wrenchService: WrenchService,
- private loadingCtrl: LoadingController
+ private loadingCtrl: LoadingController,
+ public bannersDataService: BannersDataService
) {
- this.getMyOffersData();
+ // this.getMyOffersData();
+ this.session_image_server = this.sessionDataProviderService.session_image_server;
+ setInterval(()=>{
+ this.offerData = this.bannersDataService.offerData;
+ this.session_image_server = this.sessionDataProviderService.session_image_server;
+ }, 5000);
}
ngOnInit() {
@@ -35,31 +43,34 @@ export class OffersReceivedComponent implements OnInit {
limit:20,
page:1, offset:number
};
- total_offers:number = 0;
- myOffersTotalData:any;
- myOffersData: [];
- getMyOffersData(){
- this.usrData = {action:15010,
- member_id: this.sessionDataProviderService.member_id,
- uid: this.sessionDataProviderService.member_uid,
- sessionid: this.sessionDataProviderService.session ,
- limit:20, page:1,offset: 0}
+ // total_offers:number = 0;
+ // myOffersTotalData:any;
+ // myOffersData: [];
+ // getMyOffersData(){
+ // this.usrData = {action:15010,
+ // member_id: this.sessionDataProviderService.member_id,
+ // uid: this.sessionDataProviderService.member_uid,
+ // sessionid: this.sessionDataProviderService.session ,
+ // limit:20, page:1,offset: 0}
+ //
+ // this.curr_session = this.sessionDataProviderService.session;
+ // this.wrenchService.getMyOffers(this.usrData).subscribe(
+ // myOffersTotalData => {
+ // this.myOffersTotalData = myOffersTotalData;
+ // this.session_image_server = this.myOffersTotalData.session_image_server;
+ // console.log("myOffersTotalData RETURN->", this.myOffersTotalData);
+ // this.myOffersData = this.myOffersTotalData.result_list;
+ // console.log("myOffersData RETURN DATA->", this.myOffersData);
+ // this.total_offers = this.myOffersData?.length;
+ // }
+ // );
+ //
+ // }
- this.curr_session = this.sessionDataProviderService.session;
- this.wrenchService.getMyOffers(this.usrData).subscribe(
- myOffersTotalData => {
- this.myOffersTotalData = myOffersTotalData;
- this.session_image_server = this.myOffersTotalData.session_image_server;
- console.log("myOffersTotalData RETURN->", this.myOffersTotalData);
- this.myOffersData = this.myOffersTotalData.result_list;
- console.log("myOffersData RETURN DATA->", this.myOffersData);
- this.total_offers = this.myOffersData?.length;
- }
- );
+ openOfferDetail(item){
}
-
async requestStart(item) {
const alert = await this.alertController.create({
header: "Ready to start",
@@ -69,14 +80,16 @@ export class OffersReceivedComponent implements OnInit {
text: "Cancel",
role: "cancel",
handler: () => {
- this.getMyOffersData();
+ // this.getMyOffersData();
+ this.offerData = this.bannersDataService.offerData;
},
},
{
text: "Start Now",
handler: () => {
this.sendOfferResponse(item, 100);
- this.getMyOffersData();
+ // this.getMyOffersData();
+ this.offerData = this.bannersDataService.offerData;
},
},
],
@@ -93,14 +106,16 @@ export class OffersReceivedComponent implements OnInit {
text: "Cancel",
role: "cancel",
handler: () => {
- this.getMyOffersData();
+ //this.getMyOffersData();
+ this.offerData = this.bannersDataService.offerData;
},
},
{
text: "Reject",
handler: () => {
this.sendOfferResponse(item, 333);
- this.getMyOffersData();
+ //this.getMyOffersData();
+ this.offerData = this.bannersDataService.offerData;
},
},
],
@@ -139,7 +154,8 @@ export class OffersReceivedComponent implements OnInit {
offerRespData => {
this.offerRespData = offerRespData;
console.log("offerRespData RETURN->", this.offerRespData);
- this.getMyOffersData();
+ // this.getMyOffersData();
+ this.offerData = this.bannersDataService.offerData;
}
);
}
diff --git a/src/app/pages/home/home.page.html b/src/app/pages/home/home.page.html
index 9bc8f2d..bc71e5b 100644
--- a/src/app/pages/home/home.page.html
+++ b/src/app/pages/home/home.page.html
@@ -78,7 +78,7 @@