orderiom-api-package 0.4.103 → 0.4.105
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/package.json +1 -1
- package/src/common.js +0 -1
- package/src/modules/auth.js +1 -1
- package/src/modules/order.js +0 -4
- package/src/modules/product.js +2 -3
package/package.json
CHANGED
package/src/common.js
CHANGED
|
@@ -59,7 +59,6 @@ export function updateBasket({commit, basketId, res, restaurantId}){
|
|
|
59
59
|
commit(`product/setServiceDuration`, basketInfo.duration, { root: true });
|
|
60
60
|
commit(`product/setVoucherCode`, basketInfo.voucher_code, { root: true });
|
|
61
61
|
commit(`product/setVoucherValue`, basketInfo.voucherValue, { root: true });
|
|
62
|
-
commit(`product/setTotalWithDiscount`, basketInfo.totalWithDiscount, { root: true });
|
|
63
62
|
commit(`product/setDelivertType`, basketInfo.deliveryType, { root: true });
|
|
64
63
|
commit(`product/setPostalCode`, basketInfo.postalCode, { root: true });
|
|
65
64
|
commit(`product/setTip`, basketInfo.tip, { root: true });
|
package/src/modules/auth.js
CHANGED
|
@@ -126,7 +126,7 @@ const actions = {
|
|
|
126
126
|
tryAutoLogin({commit, dispatch}) {
|
|
127
127
|
const pt = window.localStorage.getItem("privateToken") || null
|
|
128
128
|
if (!pt || isTokenExpired(pt)) return;
|
|
129
|
-
dispatch('fetchUser')
|
|
129
|
+
return dispatch('fetchUser')
|
|
130
130
|
},
|
|
131
131
|
logout({commit, state, dispatch}, restaurantId) {
|
|
132
132
|
if (!window.localStorage.getItem("privateToken") && !state.user.id) return;
|
package/src/modules/order.js
CHANGED
|
@@ -737,10 +737,6 @@ const actions = {
|
|
|
737
737
|
res.data.data.shippingPrice.toString(),
|
|
738
738
|
{ root: true }
|
|
739
739
|
);
|
|
740
|
-
if (res.data.data.totalWithDiscount) {
|
|
741
|
-
const value = Number(res.data.data.totalWithDiscount).toFixed(2);
|
|
742
|
-
commit("product/setTotalWithDiscount", value, { root: true });
|
|
743
|
-
}
|
|
744
740
|
|
|
745
741
|
return res;
|
|
746
742
|
})
|
package/src/modules/product.js
CHANGED
|
@@ -15,7 +15,6 @@ const state = () => ({
|
|
|
15
15
|
attributeItems: null,
|
|
16
16
|
voucherCode: null,
|
|
17
17
|
VoucherValue: null,
|
|
18
|
-
totalWithDiscount: null,
|
|
19
18
|
productPackage: null,
|
|
20
19
|
deliveryType: null,
|
|
21
20
|
basketInfo: {},
|
|
@@ -231,8 +230,8 @@ const mutations = {
|
|
|
231
230
|
setVoucherValue(state, VoucherValue) {
|
|
232
231
|
state.VoucherValue = VoucherValue
|
|
233
232
|
},
|
|
234
|
-
setTotalWithDiscount(
|
|
235
|
-
|
|
233
|
+
setTotalWithDiscount() {
|
|
234
|
+
console.error('Deprecated: setTotalWithDiscount is deprecated and does nothing.')
|
|
236
235
|
},
|
|
237
236
|
setProductPackage(state, productPackage) {
|
|
238
237
|
state.productPackage = productPackage
|