@infrab4a/connect-angular 4.14.0-beta.0 → 4.14.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1548,10 +1548,10 @@ class CartService {
|
|
|
1548
1548
|
.find({
|
|
1549
1549
|
filters: {
|
|
1550
1550
|
active: { operator: Where.EQUALS, value: true },
|
|
1551
|
-
shop: { operator: Where.EQUALS, value: this.defaultShop },
|
|
1551
|
+
// shop: { operator: Where.EQUALS, value: this.defaultShop },
|
|
1552
1552
|
},
|
|
1553
1553
|
})
|
|
1554
|
-
.then((data) => data.data);
|
|
1554
|
+
.then((data) => data.data.filter((campaign) => campaign.shop === Shops.ALL || campaign.shop === this.defaultShop));
|
|
1555
1555
|
if (!campaigns.length)
|
|
1556
1556
|
return { ...checkout, lineItems: notGiftItems };
|
|
1557
1557
|
const elegibleCampaigns = [];
|
|
@@ -1590,6 +1590,8 @@ class CartService {
|
|
|
1590
1590
|
elegibleCampaigns.push(campaign);
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
|
+
console.log('lineItens', notGiftItems.map((l) => [l.name, l.quantity]));
|
|
1594
|
+
console.log('elegibleCampaigns', elegibleCampaigns.map((c) => c.name));
|
|
1593
1595
|
if (!elegibleCampaigns.length)
|
|
1594
1596
|
return { ...checkout, lineItems: notGiftItems };
|
|
1595
1597
|
const campaingnProducts = [];
|