@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.
@@ -200,6 +200,7 @@ export declare const makeSimpleCart: <C extends {
200
200
  }, K extends {
201
201
  id: number;
202
202
  quantity: number;
203
+ pos_ext_id?: string | null | undefined;
203
204
  groups: T[];
204
205
  }>(cart: C) => {
205
206
  id: number;
@@ -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 };
@@ -200,6 +200,7 @@ export declare const makeSimpleCart: <C extends {
200
200
  }, K extends {
201
201
  id: number;
202
202
  quantity: number;
203
+ pos_ext_id?: string | null | undefined;
203
204
  groups: T[];
204
205
  }>(cart: C) => {
205
206
  id: number;
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.5.53",
3
+ "version": "0.5.55",
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",