@open-tender/utils 0.5.54 → 0.5.56

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.
@@ -382,6 +382,7 @@ const rehydrateOrderItem = (menuItem, simpleCartItem, soldOut = [], requestedAt
382
382
  const orderItem = (0, exports.makeOrderItem)(menuItem, true, soldOut, simpleCartItem, undefined, requestedAt);
383
383
  orderItem.quantity = simpleCartItem.quantity || 1;
384
384
  const groupsLookup = makeSimpleGroupsLookup(simpleCartItem.groups);
385
+ console.log('groupsLookup', simpleCartItem.groups, groupsLookup);
385
386
  if (groupsLookup) {
386
387
  orderItem.groups = rehydrateGroups(orderItem.groups, groupsLookup);
387
388
  }
@@ -400,6 +401,7 @@ const rehydrateCart = (menuItems, simpleCartItems, soldOut = []) => {
400
401
  });
401
402
  const cart = orderItems.map((i, index) => (Object.assign(Object.assign({}, i), { index })));
402
403
  const cartCounts = (0, exports.calcCartCounts)(cart);
404
+ console.log('rehydrated cart', cart);
403
405
  return { cart, cartCounts };
404
406
  };
405
407
  exports.rehydrateCart = rehydrateCart;
@@ -365,6 +365,7 @@ export const rehydrateOrderItem = (menuItem, simpleCartItem, soldOut = [], reque
365
365
  const orderItem = makeOrderItem(menuItem, true, soldOut, simpleCartItem, undefined, requestedAt);
366
366
  orderItem.quantity = simpleCartItem.quantity || 1;
367
367
  const groupsLookup = makeSimpleGroupsLookup(simpleCartItem.groups);
368
+ console.log('groupsLookup', simpleCartItem.groups, groupsLookup);
368
369
  if (groupsLookup) {
369
370
  orderItem.groups = rehydrateGroups(orderItem.groups, groupsLookup);
370
371
  }
@@ -382,6 +383,7 @@ export const rehydrateCart = (menuItems, simpleCartItems, soldOut = []) => {
382
383
  });
383
384
  const cart = orderItems.map((i, index) => (Object.assign(Object.assign({}, i), { index })));
384
385
  const cartCounts = calcCartCounts(cart);
386
+ console.log('rehydrated cart', cart);
385
387
  return { cart, cartCounts };
386
388
  };
387
389
  // TODO: maybe refactor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.5.54",
3
+ "version": "0.5.56",
4
4
  "description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",