ordering-components-external 13.2.3 → 13.2.4
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.
- package/_bundles/{7.ordering-component.1cdfcec5953476752103.js → 7.ordering-component.b53a9e7347b877c40384.js} +1 -1
- package/_bundles/{ordering-component.1cdfcec5953476752103.js → ordering-component.b53a9e7347b877c40384.js} +2 -2
- package/_modules/components/BusinessAndProductList/index.js +2 -1
- package/package.json +1 -1
- package/src/components/BusinessAndProductList/index.js +10 -9
- /package/_bundles/{0.ordering-component.1cdfcec5953476752103.js → 0.ordering-component.b53a9e7347b877c40384.js} +0 -0
- /package/_bundles/{1.ordering-component.1cdfcec5953476752103.js → 1.ordering-component.b53a9e7347b877c40384.js} +0 -0
- /package/_bundles/{2.ordering-component.1cdfcec5953476752103.js → 2.ordering-component.b53a9e7347b877c40384.js} +0 -0
- /package/_bundles/{4.ordering-component.1cdfcec5953476752103.js → 4.ordering-component.b53a9e7347b877c40384.js} +0 -0
- /package/_bundles/{5.ordering-component.1cdfcec5953476752103.js → 5.ordering-component.b53a9e7347b877c40384.js} +0 -0
- /package/_bundles/{6.ordering-component.1cdfcec5953476752103.js → 6.ordering-component.b53a9e7347b877c40384.js} +0 -0
- /package/_bundles/{7.ordering-component.1cdfcec5953476752103.js.LICENSE.txt → 7.ordering-component.b53a9e7347b877c40384.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-component.1cdfcec5953476752103.js → 8.ordering-component.b53a9e7347b877c40384.js} +0 -0
- /package/_bundles/{ordering-component.1cdfcec5953476752103.js.LICENSE.txt → ordering-component.b53a9e7347b877c40384.js.LICENSE.txt} +0 -0
|
@@ -865,7 +865,8 @@ var BusinessAndProductList = exports.BusinessAndProductList = function BusinessA
|
|
|
865
865
|
requestsState.product = source;
|
|
866
866
|
parameters = {
|
|
867
867
|
type: ((_orderState$options5 = orderState.options) === null || _orderState$options5 === void 0 ? void 0 : _orderState$options5.type) || 1,
|
|
868
|
-
moment: ((_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : _orderState$options6.moment) || null
|
|
868
|
+
moment: ((_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : _orderState$options6.moment) || null,
|
|
869
|
+
version: 'v2'
|
|
869
870
|
};
|
|
870
871
|
if ((_orderState$options7 = orderState.options) !== null && _orderState$options7 !== void 0 && _orderState$options7.moment && isValidMoment((_orderState$options8 = orderState.options) === null || _orderState$options8 === void 0 ? void 0 : _orderState$options8.moment, 'YYYY-MM-DD HH:mm:ss')) {
|
|
871
872
|
moment = _dayjs.default.utc((_orderState$options9 = orderState.options) === null || _orderState$options9 === void 0 ? void 0 : _orderState$options9.moment, 'YYYY-MM-DD HH:mm:ss').local().unix();
|
package/package.json
CHANGED
|
@@ -657,7 +657,8 @@ export const BusinessAndProductList = (props) => {
|
|
|
657
657
|
requestsState.product = source
|
|
658
658
|
const parameters = {
|
|
659
659
|
type: orderState.options?.type || 1,
|
|
660
|
-
moment: orderState.options?.moment || null
|
|
660
|
+
moment: orderState.options?.moment || null,
|
|
661
|
+
version: 'v2'
|
|
661
662
|
}
|
|
662
663
|
|
|
663
664
|
if (orderState.options?.moment && isValidMoment(orderState.options?.moment, 'YYYY-MM-DD HH:mm:ss')) {
|
|
@@ -786,21 +787,21 @@ export const BusinessAndProductList = (props) => {
|
|
|
786
787
|
return {
|
|
787
788
|
...category,
|
|
788
789
|
...result
|
|
789
|
-
}
|
|
790
|
+
}
|
|
790
791
|
}
|
|
791
792
|
if (Array.isArray(category?.subcategories) && category.subcategories.length > 0) {
|
|
792
793
|
return {
|
|
793
794
|
...category,
|
|
794
|
-
subcategories: updateCategories(category.subcategories, result)
|
|
795
|
-
}
|
|
795
|
+
subcategories: updateCategories(category.subcategories, result)
|
|
796
|
+
}
|
|
796
797
|
}
|
|
797
|
-
return category
|
|
798
|
-
})
|
|
799
|
-
}
|
|
798
|
+
return category
|
|
799
|
+
})
|
|
800
|
+
}
|
|
800
801
|
|
|
801
802
|
const updateStoreProduct = async (categoryId, productId, updateParams = {}) => {
|
|
802
803
|
try {
|
|
803
|
-
const { content: { result, error } } = await ordering.businesses(businessState?.business?.id).categories(categoryId).products(productId).save(updateParams)
|
|
804
|
+
const { content: { result, error } } = await ordering.businesses(businessState?.business?.id).categories(categoryId).products(productId).save(updateParams)
|
|
804
805
|
|
|
805
806
|
if (!error) {
|
|
806
807
|
const updatedProducts = categoryState.products.map(product => {
|
|
@@ -829,7 +830,7 @@ export const BusinessAndProductList = (props) => {
|
|
|
829
830
|
const { content: { result, error } } = await ordering.businesses(businessState?.business?.id).categories(categoryId).save(updateParams)
|
|
830
831
|
|
|
831
832
|
if (!error) {
|
|
832
|
-
const updatedCategories = updateCategories(businessState?.business.categories, result)
|
|
833
|
+
const updatedCategories = updateCategories(businessState?.business.categories, result)
|
|
833
834
|
const updatedBusiness = { ...businessState?.business, categories: updatedCategories }
|
|
834
835
|
setBusinessState({ ...businessState, business: updatedBusiness })
|
|
835
836
|
showToast(ToastType.Success, result?.enabled
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|