ordering-components-external 13.1.9 → 13.2.1

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.9450050bf4eab3324098.js → 7.ordering-component.ede8de0eb9f9a2b40bec.js} +1 -1
  2. package/_bundles/{ordering-component.9450050bf4eab3324098.js → ordering-component.ede8de0eb9f9a2b40bec.js} +2 -2
  3. package/_modules/components/BusinessAndProductList/index.js +5 -1
  4. package/_modules/components/OrderList/index.js +18 -6
  5. package/package.json +1 -1
  6. package/src/components/BusinessAndProductList/index.js +3 -1
  7. package/src/components/OrderList/index.js +22 -8
  8. /package/_bundles/{0.ordering-component.9450050bf4eab3324098.js → 0.ordering-component.ede8de0eb9f9a2b40bec.js} +0 -0
  9. /package/_bundles/{1.ordering-component.9450050bf4eab3324098.js → 1.ordering-component.ede8de0eb9f9a2b40bec.js} +0 -0
  10. /package/_bundles/{2.ordering-component.9450050bf4eab3324098.js → 2.ordering-component.ede8de0eb9f9a2b40bec.js} +0 -0
  11. /package/_bundles/{4.ordering-component.9450050bf4eab3324098.js → 4.ordering-component.ede8de0eb9f9a2b40bec.js} +0 -0
  12. /package/_bundles/{5.ordering-component.9450050bf4eab3324098.js → 5.ordering-component.ede8de0eb9f9a2b40bec.js} +0 -0
  13. /package/_bundles/{6.ordering-component.9450050bf4eab3324098.js → 6.ordering-component.ede8de0eb9f9a2b40bec.js} +0 -0
  14. /package/_bundles/{7.ordering-component.9450050bf4eab3324098.js.LICENSE.txt → 7.ordering-component.ede8de0eb9f9a2b40bec.js.LICENSE.txt} +0 -0
  15. /package/_bundles/{8.ordering-component.9450050bf4eab3324098.js → 8.ordering-component.ede8de0eb9f9a2b40bec.js} +0 -0
  16. /package/_bundles/{ordering-component.9450050bf4eab3324098.js.LICENSE.txt → ordering-component.ede8de0eb9f9a2b40bec.js.LICENSE.txt} +0 -0
@@ -680,7 +680,11 @@ var BusinessAndProductList = exports.BusinessAndProductList = function BusinessA
680
680
  totalPages: categorySelected.id === 'featured' ? featuredRes === null || featuredRes === void 0 || (_featuredRes$content12 = featuredRes.content) === null || _featuredRes$content12 === void 0 || (_featuredRes$content12 = _featuredRes$content12.pagination) === null || _featuredRes$content12 === void 0 ? void 0 : _featuredRes$content12.total_pages : pagination === null || pagination === void 0 ? void 0 : pagination.total_pages
681
681
  }),
682
682
  loading: false,
683
- products: categorySelected.id === 'featured' ? productsListFeatured : searchValue ? [].concat(_toConsumableArray(productsListFeatured), _toConsumableArray(productsList)) : [].concat(_toConsumableArray(productsListFeatured), _toConsumableArray(curCategoryState.products.concat(productsList)))
683
+ products: categorySelected.id === 'featured' ? productsListFeatured : searchValue ? [].concat(_toConsumableArray(productsListFeatured), _toConsumableArray(productsList)).filter(function (product, i, _hash) {
684
+ return _hash.findIndex(function (_product) {
685
+ return (_product === null || _product === void 0 ? void 0 : _product.id) === (product === null || product === void 0 ? void 0 : product.id);
686
+ }) === i;
687
+ }) : [].concat(_toConsumableArray(productsListFeatured), _toConsumableArray(curCategoryState.products.concat(productsList)))
684
688
  };
685
689
  categoriesState[categoryKey] = _newcategoryState;
686
690
  setCategoryState(_objectSpread({}, _newcategoryState));
@@ -347,13 +347,25 @@ var OrderList = exports.OrderList = function OrderList(props) {
347
347
  }
348
348
  if (noGiftCardOrders) {
349
349
  searchConditions.push({
350
- attribute: 'products',
350
+ conector: 'OR',
351
351
  conditions: [{
352
- attribute: 'type',
353
- value: {
354
- condition: '=',
355
- value: 'item'
356
- }
352
+ attribute: 'products',
353
+ conditions: [{
354
+ attribute: 'type',
355
+ value: {
356
+ condition: '=',
357
+ value: 'item'
358
+ }
359
+ }]
360
+ }, {
361
+ attribute: 'products',
362
+ conditions: [{
363
+ attribute: 'type',
364
+ value: {
365
+ condition: '=',
366
+ value: 'service'
367
+ }
368
+ }]
357
369
  }]
358
370
  });
359
371
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-components-external",
3
- "version": "13.1.9",
3
+ "version": "13.2.1",
4
4
  "description": "Ordering Internal Dashboard",
5
5
  "main": "./_modules/index.js",
6
6
  "scripts": {
@@ -516,7 +516,9 @@ export const BusinessAndProductList = (props) => {
516
516
  loading: false,
517
517
  products: categorySelected.id === 'featured'
518
518
  ? productsListFeatured
519
- : searchValue ? [...productsListFeatured, ...productsList] : [...productsListFeatured, ...curCategoryState.products.concat(productsList)]
519
+ : searchValue
520
+ ? [...productsListFeatured, ...productsList].filter((product, i, _hash) => _hash.findIndex(_product => _product?.id === product?.id) === i)
521
+ : [...productsListFeatured, ...curCategoryState.products.concat(productsList)]
520
522
  }
521
523
 
522
524
  categoriesState[categoryKey] = newcategoryState
@@ -158,14 +158,28 @@ export const OrderList = props => {
158
158
  }
159
159
  if (noGiftCardOrders) {
160
160
  searchConditions.push({
161
- attribute: 'products',
162
- conditions: [{
163
- attribute: 'type',
164
- value: {
165
- condition: '=',
166
- value: 'item'
167
- }
168
- }]
161
+ conector: 'OR',
162
+ conditions: [
163
+ {
164
+ attribute: 'products',
165
+ conditions: [{
166
+ attribute: 'type',
167
+ value: {
168
+ condition: '=',
169
+ value: 'item'
170
+ }
171
+ }]
172
+ },
173
+ {
174
+ attribute: 'products',
175
+ conditions: [{
176
+ attribute: 'type',
177
+ value: {
178
+ condition: '=',
179
+ value: 'service'
180
+ }
181
+ }]
182
+ }]
169
183
  })
170
184
  }
171
185
  if (searchConditions.length) {