ordering-components-external 13.2.12 → 13.2.14

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.
Files changed (16) hide show
  1. package/_bundles/{7.ordering-component.42ec5fef3ccdf425c509.js → 7.ordering-component.71fcc1b93f7c954870c3.js} +1 -1
  2. package/_bundles/{ordering-component.42ec5fef3ccdf425c509.js → ordering-component.71fcc1b93f7c954870c3.js} +2 -2
  3. package/_modules/components/BusinessSearchList/index.js +3 -2
  4. package/_modules/components/OrderListGroups/index.js +3 -3
  5. package/package.json +1 -1
  6. package/src/components/BusinessSearchList/index.js +3 -2
  7. package/src/components/OrderListGroups/index.js +3 -3
  8. /package/_bundles/{0.ordering-component.42ec5fef3ccdf425c509.js → 0.ordering-component.71fcc1b93f7c954870c3.js} +0 -0
  9. /package/_bundles/{1.ordering-component.42ec5fef3ccdf425c509.js → 1.ordering-component.71fcc1b93f7c954870c3.js} +0 -0
  10. /package/_bundles/{2.ordering-component.42ec5fef3ccdf425c509.js → 2.ordering-component.71fcc1b93f7c954870c3.js} +0 -0
  11. /package/_bundles/{4.ordering-component.42ec5fef3ccdf425c509.js → 4.ordering-component.71fcc1b93f7c954870c3.js} +0 -0
  12. /package/_bundles/{5.ordering-component.42ec5fef3ccdf425c509.js → 5.ordering-component.71fcc1b93f7c954870c3.js} +0 -0
  13. /package/_bundles/{6.ordering-component.42ec5fef3ccdf425c509.js → 6.ordering-component.71fcc1b93f7c954870c3.js} +0 -0
  14. /package/_bundles/{7.ordering-component.42ec5fef3ccdf425c509.js.LICENSE.txt → 7.ordering-component.71fcc1b93f7c954870c3.js.LICENSE.txt} +0 -0
  15. /package/_bundles/{8.ordering-component.42ec5fef3ccdf425c509.js → 8.ordering-component.71fcc1b93f7c954870c3.js} +0 -0
  16. /package/_bundles/{ordering-component.42ec5fef3ccdf425c509.js.LICENSE.txt → ordering-component.71fcc1b93f7c954870c3.js.LICENSE.txt} +0 -0
@@ -41,7 +41,8 @@ var BusinessSearchList = exports.BusinessSearchList = function BusinessSearchLis
41
41
  lazySearch = props.lazySearch,
42
42
  defaultTerm = props.defaultTerm,
43
43
  defaultLocation = props.defaultLocation,
44
- brandId = props.brandId;
44
+ brandId = props.brandId,
45
+ isIos = props.isIos;
45
46
  var _useState = (0, _react.useState)({
46
47
  businesses: [],
47
48
  loading: true,
@@ -190,7 +191,7 @@ var BusinessSearchList = exports.BusinessSearchList = function BusinessSearchLis
190
191
  while (1) switch (_context.prev = _context.next) {
191
192
  case 0:
192
193
  _context.prev = 0;
193
- filtParams = (val === null || val === void 0 ? void 0 : val.length) >= 3 ? "&term=".concat(val) : '';
194
+ filtParams = (val === null || val === void 0 ? void 0 : val.length) >= 3 ? "&term=".concat(isIos ? val : encodeURI(val)) : '';
194
195
  Object.keys(filters).map(function (key) {
195
196
  var _filters$key;
196
197
  if (!filters[key] && filters[key] !== 0 || filters[key] === 'default' || ((_filters$key = filters[key]) === null || _filters$key === void 0 ? void 0 : _filters$key.length) === 0) return;
@@ -904,7 +904,7 @@ var OrderListGroups = exports.OrderListGroups = function OrderListGroups(props)
904
904
  });
905
905
  return ordersSorted;
906
906
  };
907
- var filterByIdUnique = function filterByIdUnique(array) {
907
+ var filterByIdUnique = function filterByIdUnique(array, currentTabSelected) {
908
908
  var _ordersGroupStatus$cu;
909
909
  if (!array) return [];
910
910
  var tempObj = {};
@@ -949,7 +949,7 @@ var OrderListGroups = exports.OrderListGroups = function OrderListGroups(props)
949
949
  }).filter(function (item) {
950
950
  return item;
951
951
  });
952
- return options !== null && options !== void 0 && options.allStatusses ? totalOrders : filterByIdUnique(totalOrders);
952
+ return options !== null && options !== void 0 && options.allStatusses ? totalOrders : filterByIdUnique(totalOrders, currentTabSelected);
953
953
  };
954
954
  var getStatusById = function getStatusById(id) {
955
955
  var _orderGroupStatusCust6, _orderGroupStatusCust7, _orderGroupStatusCust8, _orderGroupStatusCust9;
@@ -994,7 +994,7 @@ var OrderListGroups = exports.OrderListGroups = function OrderListGroups(props)
994
994
  }
995
995
  setOrdersGroup(function (prevState) {
996
996
  return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty(_defineProperty({
997
- orders: filterByIdUnique(sortOrders(orders))
997
+ orders: filterByIdUnique(sortOrders(orders), status)
998
998
  }, status, _objectSpread(_objectSpread({}, prevState[status]), {}, {
999
999
  orders: sortOrders(orders),
1000
1000
  pagination: _pagination
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-components-external",
3
- "version": "13.2.12",
3
+ "version": "13.2.14",
4
4
  "description": "Ordering Internal Dashboard",
5
5
  "main": "./_modules/index.js",
6
6
  "scripts": {
@@ -13,7 +13,8 @@ export const BusinessSearchList = (props) => {
13
13
  lazySearch,
14
14
  defaultTerm,
15
15
  defaultLocation,
16
- brandId
16
+ brandId,
17
+ isIos
17
18
  } = props
18
19
 
19
20
  const [businessesSearchList, setBusinessesSearchList] = useState({ businesses: [], loading: true, error: null, lengthError: true })
@@ -135,7 +136,7 @@ export const BusinessSearchList = (props) => {
135
136
 
136
137
  const handleSearchbusinessAndProducts = async (newFetch, options, val) => {
137
138
  try {
138
- let filtParams = val?.length >= 3 ? `&term=${val}` : ''
139
+ let filtParams = val?.length >= 3 ? `&term=${isIos ? val : encodeURI(val)}` : ''
139
140
  Object.keys(filters).map(key => {
140
141
  if ((!filters[key] && filters[key] !== 0) || filters[key] === 'default' || filters[key]?.length === 0) return
141
142
  Array.isArray(filters[key]) ? filtParams = filtParams + `&${key}=[${filters[key]}]` : filtParams = filtParams + `&${key}=${filters[key]}`
@@ -629,7 +629,7 @@ export const OrderListGroups = (props) => {
629
629
  return ordersSorted
630
630
  }
631
631
 
632
- const filterByIdUnique = (array) => {
632
+ const filterByIdUnique = (array, currentTabSelected) => {
633
633
  if (!array) return []
634
634
 
635
635
  const tempObj = {}
@@ -670,7 +670,7 @@ export const OrderListGroups = (props) => {
670
670
  if (_item) ordersGroupids.push(item?.cart_group_id)
671
671
  return _item
672
672
  }).filter(item => item)
673
- return options?.allStatusses ? totalOrders : filterByIdUnique(totalOrders)
673
+ return options?.allStatusses ? totalOrders : filterByIdUnique(totalOrders, currentTabSelected)
674
674
  }
675
675
 
676
676
  const getStatusById = (id) => {
@@ -723,7 +723,7 @@ export const OrderListGroups = (props) => {
723
723
  }
724
724
  setOrdersGroup((prevState) => ({
725
725
  ...prevState,
726
- orders: filterByIdUnique(sortOrders(orders)),
726
+ orders: filterByIdUnique(sortOrders(orders), status),
727
727
  [status]: {
728
728
  ...prevState[status],
729
729
  orders: sortOrders(orders),