orderiom-api-package 0.4.32 → 0.4.33

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orderiom-api-package",
3
- "version": "0.4.32",
3
+ "version": "0.4.33",
4
4
  "description": "This package will install all necessary API calls for every orderiom restaurant",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -11,6 +11,7 @@ import {
11
11
  const state = () => ({
12
12
  // Loading
13
13
  changingDeliveryTime: false,
14
+ submittingReview: false,
14
15
  // Others
15
16
  productOrder: null,
16
17
  userOrder: {},
@@ -69,7 +70,10 @@ const mutations = {
69
70
  },
70
71
  setChangingDeliveryTime(state, value) {
71
72
  state.changingDeliveryTime = value;
72
- }
73
+ },
74
+ setSubmittingReview(state, value){
75
+ state.submittingReview = value;
76
+ }
73
77
  };
74
78
  const actions = {
75
79
  async shoppingCartUpdateCallback({ dispatch, rootState }, data) {
@@ -857,6 +861,17 @@ const actions = {
857
861
  })
858
862
  .catch(commonErrorCallback());
859
863
  },
864
+ addReview({commit}, data) {
865
+ commit('setSubmittingReview', true);
866
+ return $http.post("testimonials/create", data).then(() => ({
867
+ type: 'success',
868
+ msg: '',
869
+ })).catch(
870
+ commonErrorCallback()
871
+ ).finally(() => {
872
+ commit('setSubmittingReview', true);
873
+ });
874
+ },
860
875
  addVoucher({ rootState, dispatch }, data) {
861
876
  let basketId = undefined;
862
877
  try {