offer refresh
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export class BannersDataService {
|
||||
|
||||
|
||||
addEventListener(" app-banner-refresh-nocache", () => {
|
||||
this.getBannersData();
|
||||
this.getBannersData(true);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user