orderiom-api-package 0.3.37 → 0.3.39

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.3.37",
3
+ "version": "0.3.39",
4
4
  "description": "This package will install all necessary API calls for every orderiom restaurant",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -385,7 +385,11 @@ const actions = {
385
385
  .post("api/order/create-order", {
386
386
  ...basketId,
387
387
  ...restaurantID,
388
- paymentType: data.paymentType
388
+ paymentType: data.paymentType,
389
+ ...(data.paymentType === 'payFix' && {
390
+ qrCode: data.payfix_qrcode,
391
+ pin: data.payfix_pin
392
+ }),
389
393
  })
390
394
  .then((res) => {
391
395
  // localStorage.setItem("orderId", res.data.data.order.id);
@@ -145,52 +145,6 @@ const mutations = {
145
145
  };
146
146
  const actions = {
147
147
  // TODO: note the $http in loop
148
- // Orderiom api doesn't use this function
149
- // check whether ordermood is using this function or not
150
- getCategoriesWithProducts({ commit, dispatch }, restaurantId) {
151
- return $http
152
- .get("api/restaurant/category", { params: { restaurantId: restaurantId } })
153
- .then((res) => {
154
- let categories = res.data.data
155
- commit("setSelectedCategory", categories[0]);
156
- $http
157
- .get("api/restaurant/category", { params: { restaurantId: restaurantId, extra: 1 } })
158
- .then((res) => {
159
- if (res.data.data.length) {
160
- categories = [...categories, ...res.data.data];
161
- for (let i = 0; i < categories.length; i++) {
162
- const element = categories[i];
163
- dispatch("getProducts", {
164
- category: element,
165
- restaurantId: restaurantId,
166
- })
167
- .then((res) => {
168
- Vue.set(element, 'products', res.data);
169
- });
170
- }
171
- commit('setCategories', categories);
172
- }
173
- else {
174
- commit('setCategories', categories);
175
- for (let i = 0; i < categories.length; i++) {
176
- const element = categories[i];
177
- dispatch("getProducts", {
178
- category: element,
179
- restaurantId: restaurantId,
180
- })
181
- .then((res) => {
182
- Vue.set(element, 'products', res.data)
183
- });
184
- }
185
- }
186
-
187
- })
188
- })
189
- .catch(
190
- commonErrorCallback()
191
- );
192
- },
193
-
194
148
  getCategories({ commit, dispatch }, restaurantId) {
195
149
  return $http
196
150
  .get("api/restaurant/category", { params: { restaurantId: restaurantId } })