ordering-components-external 13.1.0 → 13.1.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.
- package/_bundles/{7.ordering-component.f37d15fa8e300460de8e.js → 7.ordering-component.cee21c14783d67e34145.js} +1 -1
- package/_bundles/{ordering-component.f37d15fa8e300460de8e.js → ordering-component.cee21c14783d67e34145.js} +2 -2
- package/_modules/contexts/OrderContext/index.js +7 -2
- package/package.json +1 -1
- package/src/contexts/OrderContext/index.js +6 -2
- /package/_bundles/{0.ordering-component.f37d15fa8e300460de8e.js → 0.ordering-component.cee21c14783d67e34145.js} +0 -0
- /package/_bundles/{1.ordering-component.f37d15fa8e300460de8e.js → 1.ordering-component.cee21c14783d67e34145.js} +0 -0
- /package/_bundles/{2.ordering-component.f37d15fa8e300460de8e.js → 2.ordering-component.cee21c14783d67e34145.js} +0 -0
- /package/_bundles/{4.ordering-component.f37d15fa8e300460de8e.js → 4.ordering-component.cee21c14783d67e34145.js} +0 -0
- /package/_bundles/{5.ordering-component.f37d15fa8e300460de8e.js → 5.ordering-component.cee21c14783d67e34145.js} +0 -0
- /package/_bundles/{6.ordering-component.f37d15fa8e300460de8e.js → 6.ordering-component.cee21c14783d67e34145.js} +0 -0
- /package/_bundles/{7.ordering-component.f37d15fa8e300460de8e.js.LICENSE.txt → 7.ordering-component.cee21c14783d67e34145.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-component.f37d15fa8e300460de8e.js → 8.ordering-component.cee21c14783d67e34145.js} +0 -0
- /package/_bundles/{ordering-component.f37d15fa8e300460de8e.js.LICENSE.txt → ordering-component.cee21c14783d67e34145.js.LICENSE.txt} +0 -0
|
@@ -107,7 +107,9 @@ var OrderProvider = exports.OrderProvider = function OrderProvider(_ref) {
|
|
|
107
107
|
pickup: 2,
|
|
108
108
|
eatin: 3,
|
|
109
109
|
curbside: 4,
|
|
110
|
-
drivethru: 5
|
|
110
|
+
drivethru: 5,
|
|
111
|
+
catering_delivery: 7,
|
|
112
|
+
catering_pickup: 8
|
|
111
113
|
};
|
|
112
114
|
var _useState5 = (0, _react.useState)({
|
|
113
115
|
loading: true,
|
|
@@ -2268,9 +2270,12 @@ var OrderProvider = exports.OrderProvider = function OrderProvider(_ref) {
|
|
|
2268
2270
|
} : {
|
|
2269
2271
|
type: configTypes[0]
|
|
2270
2272
|
});
|
|
2273
|
+
if (!session.auth) {
|
|
2274
|
+
var _configState$configs6;
|
|
2275
|
+
changeType(validDefaultValue ? configState === null || configState === void 0 || (_configState$configs6 = configState.configs) === null || _configState$configs6 === void 0 || (_configState$configs6 = _configState$configs6.default_order_type) === null || _configState$configs6 === void 0 ? void 0 : _configState$configs6.type : configTypes[0]);
|
|
2276
|
+
}
|
|
2271
2277
|
}
|
|
2272
2278
|
}, [configTypes === null || configTypes === void 0 ? void 0 : configTypes.length, state.options.type]);
|
|
2273
|
-
|
|
2274
2279
|
/**
|
|
2275
2280
|
* Update carts from sockets
|
|
2276
2281
|
*/
|
package/package.json
CHANGED
|
@@ -42,7 +42,9 @@ export const OrderProvider = ({ Alert, children, strategy, isAlsea, isDisableToa
|
|
|
42
42
|
pickup: 2,
|
|
43
43
|
eatin: 3,
|
|
44
44
|
curbside: 4,
|
|
45
|
-
drivethru: 5
|
|
45
|
+
drivethru: 5,
|
|
46
|
+
catering_delivery: 7,
|
|
47
|
+
catering_pickup: 8
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
const [state, setState] = useState({
|
|
@@ -1264,9 +1266,11 @@ export const OrderProvider = ({ Alert, children, strategy, isAlsea, isDisableToa
|
|
|
1264
1266
|
if (configTypes?.length > 0 && state.options.type && !configTypes.includes(state.options.type)) {
|
|
1265
1267
|
const validDefaultValue = configTypes.includes(configState?.configs?.default_order_type?.type)
|
|
1266
1268
|
updateOrderOptions(validDefaultValue ? { type: configState?.configs?.default_order_type?.type } : { type: configTypes[0] })
|
|
1269
|
+
if (!session.auth) {
|
|
1270
|
+
changeType(validDefaultValue ? configState?.configs?.default_order_type?.type : configTypes[0])
|
|
1271
|
+
}
|
|
1267
1272
|
}
|
|
1268
1273
|
}, [configTypes?.length, state.options.type])
|
|
1269
|
-
|
|
1270
1274
|
/**
|
|
1271
1275
|
* Update carts from sockets
|
|
1272
1276
|
*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|