@open-tender/utils 0.5.53 → 0.5.55
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.
package/dist/cjs/utils/cart.d.ts
CHANGED
package/dist/cjs/utils/cart.js
CHANGED
|
@@ -400,6 +400,7 @@ const rehydrateCart = (menuItems, simpleCartItems, soldOut = []) => {
|
|
|
400
400
|
});
|
|
401
401
|
const cart = orderItems.map((i, index) => (Object.assign(Object.assign({}, i), { index })));
|
|
402
402
|
const cartCounts = (0, exports.calcCartCounts)(cart);
|
|
403
|
+
console.log('rehydrated cart', cart);
|
|
403
404
|
return { cart, cartCounts };
|
|
404
405
|
};
|
|
405
406
|
exports.rehydrateCart = rehydrateCart;
|
|
@@ -680,6 +681,7 @@ const makeSimpleGroups = (groups) => {
|
|
|
680
681
|
.map(o => ({
|
|
681
682
|
id: o.id,
|
|
682
683
|
quantity: o.quantity,
|
|
684
|
+
pos_ext_id: o.pos_ext_id,
|
|
683
685
|
groups: makeSimpleGroups(o.groups || [])
|
|
684
686
|
}));
|
|
685
687
|
return { id: g.id, options: options };
|
package/dist/esm/utils/cart.d.ts
CHANGED
package/dist/esm/utils/cart.js
CHANGED
|
@@ -382,6 +382,7 @@ export const rehydrateCart = (menuItems, simpleCartItems, soldOut = []) => {
|
|
|
382
382
|
});
|
|
383
383
|
const cart = orderItems.map((i, index) => (Object.assign(Object.assign({}, i), { index })));
|
|
384
384
|
const cartCounts = calcCartCounts(cart);
|
|
385
|
+
console.log('rehydrated cart', cart);
|
|
385
386
|
return { cart, cartCounts };
|
|
386
387
|
};
|
|
387
388
|
// TODO: maybe refactor
|
|
@@ -645,6 +646,7 @@ const makeSimpleGroups = (groups) => {
|
|
|
645
646
|
.map(o => ({
|
|
646
647
|
id: o.id,
|
|
647
648
|
quantity: o.quantity,
|
|
649
|
+
pos_ext_id: o.pos_ext_id,
|
|
648
650
|
groups: makeSimpleGroups(o.groups || [])
|
|
649
651
|
}));
|
|
650
652
|
return { id: g.id, options: options };
|
package/package.json
CHANGED