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='';
openOfferDetail(item){
if ( this.currOpenOffer != '' && this.currOpenOffer == item.offer_uid){
this.currOpenOffer = ''
this.currOpenOffer = '';
}else
{
this.currOpenOffer = item.offer_uid;
@@ -141,6 +141,7 @@ export class OffersReceivedComponent implements OnInit {
message: 'Processing',
duration: 3000,
});
this.currOpenOffer = ''; // c;ose the offer window
this.responseData = {
action:15010,
member_id: this.sessionDataProviderService.member_id,
@@ -157,13 +158,25 @@ export class OffersReceivedComponent implements OnInit {
console.log("offerRespData RETURN->", this.offerRespData);
const refresh_banner = new CustomEvent("app-banner-refresh-nocache");
dispatchEvent(refresh_banner);
if( respType == 100 ){ // only in acceptance approval
//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});
}
this.reduceOfferData();
else{
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", () => {
this.getBannersData();
this.getBannersData(true);
});