orderiom-api-package 0.3.44 → 0.3.45
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/modules/order.js +10 -7
package/package.json
CHANGED
package/src/modules/order.js
CHANGED
|
@@ -19,6 +19,7 @@ const state = () => ({
|
|
|
19
19
|
tableOrder: {},
|
|
20
20
|
externalTableOrders: [],
|
|
21
21
|
tablePaymentStatus: null,
|
|
22
|
+
externalTableOrdersFromPayment:{}
|
|
22
23
|
});
|
|
23
24
|
const mutations = {
|
|
24
25
|
setproductOrder(state, productOrder) {
|
|
@@ -57,6 +58,9 @@ const mutations = {
|
|
|
57
58
|
setTablePaymentStatus(state, paymentStatus) {
|
|
58
59
|
state.tablePaymentStatus = paymentStatus;
|
|
59
60
|
},
|
|
61
|
+
setExternalTableOrdersFromPayment(state, ordersInfo){
|
|
62
|
+
state.externalTableOrdersFromPayment = ordersInfo
|
|
63
|
+
}
|
|
60
64
|
};
|
|
61
65
|
const actions = {
|
|
62
66
|
async shoppingCartUpdateCallback({ dispatch, rootState }, data) {
|
|
@@ -884,8 +888,8 @@ const actions = {
|
|
|
884
888
|
});
|
|
885
889
|
},
|
|
886
890
|
getTableExternalOrder({ commit }, { restaurantId, tableName }) {
|
|
887
|
-
|
|
888
|
-
$http
|
|
891
|
+
commit("setExternalTableOrders", {});
|
|
892
|
+
return $http
|
|
889
893
|
.post("api/table-payments/create", {
|
|
890
894
|
restaurantId,
|
|
891
895
|
tableName,
|
|
@@ -899,7 +903,7 @@ const actions = {
|
|
|
899
903
|
{ rootState },
|
|
900
904
|
{ tablePaymentId, paymentType, qrcode = null, pin = null }
|
|
901
905
|
) {
|
|
902
|
-
$http
|
|
906
|
+
return $http
|
|
903
907
|
.post("/api/table-payments/pay", {
|
|
904
908
|
tablePaymentId,
|
|
905
909
|
paymentType,
|
|
@@ -909,7 +913,6 @@ const actions = {
|
|
|
909
913
|
}),
|
|
910
914
|
})
|
|
911
915
|
.then((res) => {
|
|
912
|
-
console.log(res);
|
|
913
916
|
window.location = res.data.data.paymentLink;
|
|
914
917
|
return {
|
|
915
918
|
type: "success",
|
|
@@ -918,10 +921,10 @@ const actions = {
|
|
|
918
921
|
})
|
|
919
922
|
.catch(commonErrorCallback());
|
|
920
923
|
},
|
|
921
|
-
updateTablePaymentStatus({ commit },
|
|
924
|
+
updateTablePaymentStatus({ commit }, { tablePaymentId, status }) {
|
|
922
925
|
return $http
|
|
923
926
|
.get(`/api/table-payments/update`, {
|
|
924
|
-
params: {
|
|
927
|
+
params: { tablePaymentId, status },
|
|
925
928
|
})
|
|
926
929
|
.then((res) => {
|
|
927
930
|
const status = res.data.data.status;
|
|
@@ -937,7 +940,7 @@ const actions = {
|
|
|
937
940
|
return $http
|
|
938
941
|
.get(`/api/table-payments`, { params: { tablePaymentId } })
|
|
939
942
|
.then((res) => {
|
|
940
|
-
commit("
|
|
943
|
+
commit("setExternalTableOrdersFromPayment", res.data.data);
|
|
941
944
|
return {
|
|
942
945
|
type: "success",
|
|
943
946
|
msg: "ok",
|