@open-tender/utils 0.4.76 → 0.4.78

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.
@@ -18,6 +18,7 @@ const useCartGuestForm = (loading, error, cartId, joinCart) => {
18
18
  { label: 'Last Name', name: 'last_name', type: 'text', required: true }
19
19
  ];
20
20
  (0, react_1.useEffect)(() => {
21
+ setData(Object.assign(Object.assign({}, initState), { cart_id: cartId }));
21
22
  return () => {
22
23
  setData(Object.assign(Object.assign({}, initState), { cart_id: cartId }));
23
24
  setErrors({});
@@ -8,7 +8,7 @@ export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavo
8
8
  isIncomplete: boolean;
9
9
  isSoldOut: boolean;
10
10
  allergenAlert: string | null;
11
- tagsAlert: string | null;
11
+ tagAlert: string | null;
12
12
  hasSelections: boolean;
13
13
  sizeOnly: boolean | undefined;
14
14
  cartCount: number;
@@ -10,7 +10,7 @@ const useOrderItem = (orderItem, favorite = null, allergenAlerts = [], cartCount
10
10
  const contains = allergens.filter(allergen => allergenAlerts.includes(allergen));
11
11
  const allergenAlert = contains.length ? `${contains.join(', ')}` : null;
12
12
  const containsTags = tags.filter(tag => tagsAllert.includes(tag));
13
- const tagsAlert = containsTags.length ? `${containsTags.join(', ')}` : null;
13
+ const tagAlert = containsTags.length ? `${containsTags.join(', ')}` : null;
14
14
  const sizeGroup = groups.find(i => i.isSize);
15
15
  const sizeOnly = sizeGroup && groups.length === 1;
16
16
  const defaultOption = !sizeGroup
@@ -49,7 +49,7 @@ const useOrderItem = (orderItem, favorite = null, allergenAlerts = [], cartCount
49
49
  isIncomplete,
50
50
  isSoldOut,
51
51
  allergenAlert,
52
- tagsAlert,
52
+ tagAlert,
53
53
  hasSelections,
54
54
  sizeOnly,
55
55
  cartCount });
@@ -15,6 +15,7 @@ export const useCartGuestForm = (loading, error, cartId, joinCart) => {
15
15
  { label: 'Last Name', name: 'last_name', type: 'text', required: true }
16
16
  ];
17
17
  useEffect(() => {
18
+ setData(Object.assign(Object.assign({}, initState), { cart_id: cartId }));
18
19
  return () => {
19
20
  setData(Object.assign(Object.assign({}, initState), { cart_id: cartId }));
20
21
  setErrors({});
@@ -8,7 +8,7 @@ export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavo
8
8
  isIncomplete: boolean;
9
9
  isSoldOut: boolean;
10
10
  allergenAlert: string | null;
11
- tagsAlert: string | null;
11
+ tagAlert: string | null;
12
12
  hasSelections: boolean;
13
13
  sizeOnly: boolean | undefined;
14
14
  cartCount: number;
@@ -7,7 +7,7 @@ export const useOrderItem = (orderItem, favorite = null, allergenAlerts = [], ca
7
7
  const contains = allergens.filter(allergen => allergenAlerts.includes(allergen));
8
8
  const allergenAlert = contains.length ? `${contains.join(', ')}` : null;
9
9
  const containsTags = tags.filter(tag => tagsAllert.includes(tag));
10
- const tagsAlert = containsTags.length ? `${containsTags.join(', ')}` : null;
10
+ const tagAlert = containsTags.length ? `${containsTags.join(', ')}` : null;
11
11
  const sizeGroup = groups.find(i => i.isSize);
12
12
  const sizeOnly = sizeGroup && groups.length === 1;
13
13
  const defaultOption = !sizeGroup
@@ -46,7 +46,7 @@ export const useOrderItem = (orderItem, favorite = null, allergenAlerts = [], ca
46
46
  isIncomplete,
47
47
  isSoldOut,
48
48
  allergenAlert,
49
- tagsAlert,
49
+ tagAlert,
50
50
  hasSelections,
51
51
  sizeOnly,
52
52
  cartCount });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.4.76",
3
+ "version": "0.4.78",
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",