offer refresh

This commit is contained in:
CHIEFSOFT\ameye
2024-10-02 08:30:18 -04:00
parent df4d194e91
commit 80e4f70de2
2 changed files with 19 additions and 6 deletions
@@ -57,7 +57,7 @@ export class OffersReceivedComponent implements OnInit {
currOpenOffer:string=''; currOpenOffer:string='';
openOfferDetail(item){ openOfferDetail(item){
if ( this.currOpenOffer != '' && this.currOpenOffer == item.offer_uid){ if ( this.currOpenOffer != '' && this.currOpenOffer == item.offer_uid){
this.currOpenOffer = '' this.currOpenOffer = '';
}else }else
{ {
this.currOpenOffer = item.offer_uid; this.currOpenOffer = item.offer_uid;
@@ -141,6 +141,7 @@ export class OffersReceivedComponent implements OnInit {
message: 'Processing', message: 'Processing',
duration: 3000, duration: 3000,
}); });
this.currOpenOffer = ''; // c;ose the offer window
this.responseData = { this.responseData = {
action:15010, action:15010,
member_id: this.sessionDataProviderService.member_id, member_id: this.sessionDataProviderService.member_id,
@@ -157,13 +158,25 @@ export class OffersReceivedComponent implements OnInit {
console.log("offerRespData RETURN->", this.offerRespData); console.log("offerRespData RETURN->", this.offerRespData);
const refresh_banner = new CustomEvent("app-banner-refresh-nocache"); const refresh_banner = new CustomEvent("app-banner-refresh-nocache");
dispatchEvent(refresh_banner); dispatchEvent(refresh_banner);
//debugger;
if( respType == 100 ){ // only in acceptance approval 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}); this.router.navigate(['activetask'],{state: this.offerRespData});
} }
else{
this.reduceOfferData(); this.reduceOfferData();
}
} }
); );
} }
findRemoveItemInArray(offer_code:any){
// 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);
//debugger;
this.reduceOfferData();
}
} }
+1 -1
View File
@@ -20,7 +20,7 @@ export class BannersDataService {
addEventListener(" app-banner-refresh-nocache", () => { addEventListener(" app-banner-refresh-nocache", () => {
this.getBannersData(); this.getBannersData(true);
}); });