new page fix

This commit is contained in:
CHIEFSOFT\ameye
2025-08-15 18:37:24 -04:00
parent b92f1520d4
commit 3cc9ed330f
9 changed files with 104 additions and 31 deletions
@@ -1,8 +1,8 @@
<div class="top-tool" style="width: 100%; display: flex; padding: 7px;" *ngIf="walletDescription !='' || active_job_count != 0">
<div style="text-align: left; width: 50%;">
<div style="text-align: left; width: 75%;">
<ion-button
*ngIf="walletDescription !='' "
style="border-radius: 10px; font-weight: bolder; font-size: 12px"
style="border-radius: 10px; font-weight: bolder; font-size: 12px; margin: 0 3px 0 3px;"
fill="solid"
size="small"
@@ -11,19 +11,30 @@
<ion-icon slot="end" name="wallet"></ion-icon>
{{walletDescription}}
</ion-button>
<!-- <div style="padding: 0 3px 0 3px; ">|</div>-->
<ion-button
*ngIf="walletDescription =='' "
style="border-radius: 10px; font-weight: bolder; font-size: 12px"
style="border-radius: 10px; font-weight: bolder; font-size: 12px; margin: 0 3px 0 3px;"
fill="solid"
size="small"
color="primary"
(click)="myWallet()">
(click)="myOffers()">
<ion-icon slot="end" name="wallet"></ion-icon>
Offers
</ion-button>
<ion-button
*ngIf="walletDescription =='' "
style="border-radius: 10px; font-weight: bolder; font-size: 12px"
fill="solid"
size="small"
color="primary"
(click)="myWallet()">
<ion-icon slot="end" name="wallet"></ion-icon>
Wallet
</ion-button>
</div>
<div style="text-align: right; width: 50%;">
<div style="text-align: right; width: 25%;">
<ion-button
*ngIf="active_job_count != 0"
style="border-radius: 15px; font-weight: bolder; font-size: 12px"
@@ -41,6 +41,10 @@ export class DashToptoolComponent implements OnInit {
myJobs(jmode){
dispatchEvent(new Event("dash_tool_myjobs"));
}
myOffers(){
dispatchEvent(new Event("dash_tool_myoffers"));
}
myWallet(){
dispatchEvent(new Event("dash_tool_mywallet"));
}
@@ -62,4 +62,5 @@
margin-right: 10px;
}
}
}
@@ -2,21 +2,21 @@
<ion-label class="bold_text">You have {{total_offers}} Offer(s)</ion-label>
</div>
<div *ngFor="let item of offerDataReduced">
<div *ngFor="let item of myOffersData">
<div class="offerBanner">
<div style="padding: 5px 0 5px 10px; color: red; font-weight: bolder; font-size: 16px;"> New Offer Expires : {{item.expire | date}}</div>
<div style="display: flex; padding-bottom: 5px;">
<div style="min-width: 90px; padding: 10px; max-width: 90px; max-height: 90px;" ><img
class="bg_image back_image banner_image"
alt="job banner" src="{{session_image_server+'/'+curr_session+'/job/'+item.job_uid}}" />
</div>
<div style="padding: 5px 0 5px 10px; color: red; font-weight: normal; font-size: 16px;"> This Offer Expires : {{item.expire | date}}</div>
<div style="padding-bottom: 5px; width: 100%">
<!-- <div style="min-width: 50px; padding: 10px; max-width: 50px; max-height: 50px;" ><img-->
<!-- class="bg_image back_image banner_image"-->
<!-- alt="job banner" src="{{session_image_server+'/'+curr_session+'/job/'+item.job_uid}}" />-->
<!-- </div>-->
<div>
<div style="width: 100%; flex-direction: column;">
<div class="offer_title">{{(item.title.length > 65) ? item.title.substring(0,64)+"...": item.title }}</div>
<div class="offer_title" style="padding-left: 5px;">{{(item.title.length > 65) ? item.title.substring(0,64)+"...": item.title }}</div>
<div style="display: flex; width: 100%;">
<div style="width: 150px;" class="price">{{item.price*0.01| number : '1.2-2'}} {{item.currency}}</div>
<div style="text-align: right; padding: 0 0 0 5px;">
<div style="width: 50%;" class="price">{{item.price*0.01| number : '1.2-2'}} {{item.currency}}</div>
<div style="text-align: right; padding: 0 5px 0 5px; width: 50%; ">
<ion-button
size="small"
(click)="openOfferDetail(item)"
@@ -54,7 +54,7 @@
<div>
<div style="display: flex; padding: 5px; width: 100%;">
<div style="width: 50%;">
<ion-button size="small" (click)="requestReject(item)" color="danger" fill="clear" shape="round">Reject</ion-button>
<ion-button size="small" (click)="requestReject(item)" color="danger" fill="clear" shape="round"><b>Reject</b></ion-button>
</div>
<div style="width: 50%; text-align: right;">
<ion-button size="small" (click)="requestStart(item)" color="success" fill="solid" shape="round">Start Now</ion-button>
@@ -25,17 +25,25 @@ export class OffersReceivedComponent implements OnInit {
private loadingCtrl: LoadingController,
public bannersDataService: BannersDataService
) {
this.curr_session = this.sessionDataProviderService.session;
addEventListener('app-banner-ready', (data:any) => {
console.log("BANNER DATA ", data);
console.log("OFFER BANNER DATA ", data);
// debugger;
console.log("BANNER REFRESH SEEN ********* OFFER RECIEVED");
this.reduceOfferData();
console.log("OFFER BANNER REFRESH SEEN ********* OFFER RECIEVED");
// this.reduceOfferData();
this.getMyOffersData();
});
addEventListener('force-offers-refresh', (data) => {
console.log("OFFER FORCE BANNER DATA ", data);
this.getMyOffersData();
});
this.session_image_server = this.sessionDataProviderService.session_image_server;
setInterval(()=>{
this.reduceOfferData();
//this.reduceOfferData();
this.getMyOffersData();
this.session_image_server = this.sessionDataProviderService.session_image_server;
}, 35000);
}
@@ -44,6 +52,7 @@ export class OffersReceivedComponent implements OnInit {
this.reduceOfferData();
}
session_image_server:string='';
curr_session:string='';
@@ -158,7 +167,6 @@ export class OffersReceivedComponent implements OnInit {
console.log("offerRespData RETURN->", this.offerRespData);
const refresh_banner = new CustomEvent("app-banner-refresh-nocache");
dispatchEvent(refresh_banner);
//debugger;
if( respType == 100 && this.offerRespData?.contract != undefined && this.offerRespData?.contract !='' ){ // only in acceptance approval
this.findRemoveItemInArray(this.responseData.contract)
this.router.navigate(['activetask'],{state: this.offerRespData});
@@ -174,9 +182,44 @@ export class OffersReceivedComponent implements OnInit {
// console.log("AMEYE OFFER CODE ->", offer_code);
//console.log("AMEYE BEFORE ->", this.offerData);
this.offerData = this.offerData.filter((item)=> item.contract !== offer_code )
//console.log("AMEYE AFTER ->", this.offerData);
console.log("OFFER FOR ME AFTER ->", this.offerData);
//debugger;
this.reduceOfferData();
}
usrOfferData: {
action:number, member_id: number, uid: string,
sessionid: string,
limit:20,
page:1, offset:number
};
myOffersTotalData:any;
myOffersData: [];
async getMyOffersData(){
this.usrOfferData = {action:15010,
member_id: this.sessionDataProviderService.member_id,
uid: this.sessionDataProviderService.member_uid,
sessionid: this.curr_session ,
limit:20, page:1,offset: 0}
console.log("OFFER this.usrOfferData DATA ", this.usrOfferData);
//this.curr_session = this.sessionDataProviderService.session;
this.wrenchService.getMyOffers(this.usrOfferData).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;
}
);
}
}
+7
View File
@@ -71,6 +71,10 @@ export class HomePage implements OnInit {
addEventListener("dash_tool_mywallet", () => {
this.myWallet();
});
addEventListener("dash_tool_myoffers", () => {
this.myOffersPage();
});
//
addEventListener("force_profile_refresh", () => {
this.forceProfileRefresh();
@@ -282,6 +286,9 @@ export class HomePage implements OnInit {
}
}
myOffersPage() {
this.router.navigate(["/joboffers"]);
}
myWallet() {
this.router.navigate(["tabs/tab4"]);
}
@@ -1,5 +1,6 @@
ion-content {
.offers_div{
background-color: aliceblue;
border-radius: 10px;
+7 -1
View File
@@ -25,9 +25,15 @@ export class JoboffersPage implements OnInit {
) { }
ngOnInit() {
// this.getMyOffersData();
const offer_refresh = new CustomEvent("force-offers-refresh", {detail: {
offers: this.myOffersData
}});
dispatchEvent(offer_refresh);
}
onBack() {
this.navctr.back();
}
+7 -7
View File
@@ -63,8 +63,8 @@
<ion-grid>
<ion-row style="background-color: #f1ecec; border-radius: 10px">
<ion-col size="4" class="side_lb">Depends on :</ion-col>
<ion-col size="8">
<ion-col size="6" class="side_lb">Depends on :</ion-col>
<ion-col size="6">
<ion-select
interface="popover"
(ionChange)="verifyEntry()"
@@ -80,8 +80,8 @@
</ion-row>
<ion-row>
<ion-col size="4" class="side_lb">Duration :</ion-col>
<ion-col size="8">
<ion-col size="6" class="side_lb">Market Duration :</ion-col>
<ion-col size="6">
<ion-select
class="job_duration"
[(ngModel)]='job_duration'
@@ -105,8 +105,8 @@
</ion-row>
<ion-row>
<ion-col size="4" class="side_lb">Timeline :</ion-col>
<ion-col size="8">
<ion-col size="6" class="side_lb">Timeline Strictness :</ion-col>
<ion-col size="6">
<ion-select
value="{{strict_timeline}}"
class="job_duration"
@@ -129,7 +129,7 @@
<ion-button size="small"
shape="round"
color="secondary"
(click)="sendOfferToMarket()">Place Task to the Market</ion-button></ion-col>
(click)="sendOfferToMarket()"><b>Place Task to the Market</b></ion-button></ion-col>
</ion-row>
<ion-row>
<ion-col class="result">{{assign_mak_result}}</ion-col>