@feedmepos/mf-payment 1.2.17 → 1.2.18

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.
Files changed (32) hide show
  1. package/dist/{PayoutAccount-9M0rbMxQ.js → PayoutAccount-BDTAihoB.js} +6 -6
  2. package/dist/{PayoutAccount-CLUo0Ulz.js → PayoutAccount-BlvYGFmj.js} +5 -5
  3. package/dist/{PayoutAccountSetting-CUSnIj68.js → PayoutAccountSetting-BZ_dtEzF.js} +3 -3
  4. package/dist/{Restaurant-CTLkTgah.js → Restaurant-IvTxzEEg.js} +4 -4
  5. package/dist/{RestaurantSetting-DujOQvSV.js → RestaurantSetting-CYkbYnib.js} +164 -159
  6. package/dist/{Settlement-CZb5S23k.js → Settlement-CgQP9j_O.js} +3 -3
  7. package/dist/{Settlement-BSf_6o6G.js → Settlement-Wbsxz3c3.js} +3 -3
  8. package/dist/{SettlementTransactions-BjEwIVuM.js → SettlementTransactions-CDrPZEsp.js} +3 -3
  9. package/dist/{SettlementTransactions-BRCNPglh.js → SettlementTransactions-TULTM98h.js} +3 -3
  10. package/dist/{Terminal-CvTDdi1v.js → Terminal-Kbwkii3s.js} +5 -5
  11. package/dist/{TerminalSetting-BcIGtwC6.js → TerminalSetting-APSwdYlY.js} +3 -3
  12. package/dist/{Transaction-3trhn_Zc.js → Transaction-CP5nDC93.js} +5 -5
  13. package/dist/{Transaction-BWkIXreZ.js → Transaction-DHBP5DBt.js} +7 -7
  14. package/dist/{TransactionOld-DLhqBVIl.js → TransactionOld-CZTpxwtD.js} +4 -4
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-Cup19PFp.js → TransactionTable.vue_vue_type_script_setup_true_lang-DQLCyJE1.js} +3 -3
  16. package/dist/{app-DAE_5nD5.js → app-DxcyIR9L.js} +330 -330
  17. package/dist/app.js +1 -1
  18. package/dist/{assets-B4vtlKYE.js → assets-BPRFwA_x.js} +2 -2
  19. package/dist/{grafana-DV8B0DQp.js → grafana-C6rWA8aV.js} +1 -1
  20. package/dist/{index-QlMsszeQ.js → index-BasV9ckt.js} +1 -1
  21. package/dist/{index-C8dj5wuz.js → index-CFcmWPUa.js} +2003 -2003
  22. package/dist/{index-BRBuCpqm.js → index-CV4mrBvQ.js} +1 -1
  23. package/dist/{index-CJPkFMrY.js → index-Cl3iKnij.js} +1 -1
  24. package/dist/{index-ux7UbRaU.js → index-CqxWxkx3.js} +1 -1
  25. package/dist/{index-CAkhGbuS.js → index-dd-QHobb.js} +1 -1
  26. package/dist/{index-BWggDsdo.js → index-pcbXwdTo.js} +2 -2
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-BSJZOVa7.js → index.vue_vue_type_script_setup_true_lang-BcbAchQx.js} +1 -1
  28. package/dist/package.json +1 -1
  29. package/dist/{payout-account-BwypT3rI.js → payout-account-Bwm4cqox.js} +3 -3
  30. package/dist/tsconfig.app.tsbuildinfo +1 -1
  31. package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +5 -4
  32. package/package.json +1 -1
@@ -1,40 +1,40 @@
1
- import { defineComponent as _, ref as b, resolveComponent as r, openBlock as F, createBlock as w, withCtx as U, createVNode as o, unref as l, createElementVNode as D, createCommentVNode as S, computed as O, onMounted as $, createElementBlock as N, Fragment as L, isRef as B, resolveDynamicComponent as P, normalizeProps as K, mergeProps as Y } from "vue";
2
- import { g as q, b as A, u as R, e as I } from "./index-C8dj5wuz.js";
1
+ import { defineComponent as _, ref as b, resolveComponent as r, openBlock as F, createBlock as w, withCtx as U, createVNode as o, unref as n, createElementVNode as D, createCommentVNode as S, computed as O, onMounted as $, createElementBlock as N, Fragment as L, isRef as B, resolveDynamicComponent as P, normalizeProps as K, mergeProps as Y } from "vue";
2
+ import { g as q, b as A, u as R, e as I } from "./index-CFcmWPUa.js";
3
3
  import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
4
4
  import { useRouter as H } from "vue-router";
5
- import { u as E } from "./index-CAkhGbuS.js";
5
+ import { u as E } from "./index-dd-QHobb.js";
6
6
  import { z as f, a as g } from "./validator-D5jtpt9A.js";
7
7
  import { useCoreStore as j } from "@feedmepos/mf-common";
8
8
  import { u as Q } from "./error-K1CakhA9.js";
9
9
  import { useSnackbar as Z } from "@feedmepos/ui-library";
10
- import { r as J } from "./index-QlMsszeQ.js";
10
+ import { r as J } from "./index-BasV9ckt.js";
11
11
  const G = {
12
- async get(a) {
12
+ async get(l) {
13
13
  return q(
14
14
  await A().get(
15
- `restaurants/${a}/payment-gateway`
15
+ `restaurants/${l}/payment-gateway`
16
16
  )
17
17
  );
18
18
  },
19
- async upsert(a, c) {
19
+ async upsert(l, m) {
20
20
  return q(
21
21
  await A().post(
22
- `restaurants/${a}/payment-gateway`,
23
- { data: c }
22
+ `restaurants/${l}/payment-gateway`,
23
+ { data: m }
24
24
  )
25
25
  );
26
26
  },
27
- async delete(a, c) {
27
+ async delete(l, m) {
28
28
  return q(
29
29
  await A().delete(
30
- `restaurants/${a}/payment-gateway/${c}`
30
+ `restaurants/${l}/payment-gateway/${m}`
31
31
  )
32
32
  );
33
33
  },
34
- async grabSync(a) {
34
+ async grabSync(l) {
35
35
  return q(
36
36
  await A().post(
37
- `restaurants/${a}/payment-gateway/grab/sync`
37
+ `restaurants/${l}/payment-gateway/grab/sync`
38
38
  )
39
39
  );
40
40
  }
@@ -54,9 +54,9 @@ const G = {
54
54
  required: !0
55
55
  }
56
56
  },
57
- setup(a) {
58
- var p, m;
59
- const c = a, u = b(((p = c.gateway) == null ? void 0 : p.active) ?? !1), t = b(((m = c.gateway) == null ? void 0 : m.config) || {
57
+ setup(l) {
58
+ var p, c;
59
+ const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((c = m.gateway) == null ? void 0 : c.config) || {
60
60
  merchantId: "",
61
61
  uniqueId: "",
62
62
  verifyKey: "",
@@ -64,64 +64,64 @@ const G = {
64
64
  applicationCode: "",
65
65
  offlineSecret: ""
66
66
  });
67
- return (d, e) => {
68
- const i = r("FmTextField"), V = r("FmSwitch"), y = r("FmButton"), v = r("FmForm");
67
+ return (y, e) => {
68
+ const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
69
69
  return F(), w(v, {
70
70
  ref: "form",
71
71
  class: "flex flex-col gap-16",
72
- onValidationSuccess: e[7] || (e[7] = () => a.onUpdate(u.value, t.value))
72
+ onValidationSuccess: e[7] || (e[7] = () => l.onUpdate(u.value, t.value))
73
73
  }, {
74
74
  default: U(() => [
75
75
  o(i, {
76
76
  modelValue: t.value.merchantId,
77
- "onUpdate:modelValue": e[0] || (e[0] = (n) => t.value.merchantId = n),
77
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.merchantId = a),
78
78
  label: "Merchant ID",
79
- rules: l(f)(l(g).string())
79
+ rules: n(f)(n(g).string())
80
80
  }, null, 8, ["modelValue", "rules"]),
81
81
  o(i, {
82
82
  modelValue: t.value.uniqueId,
83
- "onUpdate:modelValue": e[1] || (e[1] = (n) => t.value.uniqueId = n),
83
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => t.value.uniqueId = a),
84
84
  label: "Unique ID",
85
- rules: l(f)(l(g).string())
85
+ rules: n(f)(n(g).string())
86
86
  }, null, 8, ["modelValue", "rules"]),
87
87
  o(i, {
88
88
  modelValue: t.value.verifyKey,
89
- "onUpdate:modelValue": e[2] || (e[2] = (n) => t.value.verifyKey = n),
89
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => t.value.verifyKey = a),
90
90
  label: "Verify Key",
91
- rules: l(f)(l(g).string())
91
+ rules: n(f)(n(g).string())
92
92
  }, null, 8, ["modelValue", "rules"]),
93
93
  o(i, {
94
94
  modelValue: t.value.secretKey,
95
- "onUpdate:modelValue": e[3] || (e[3] = (n) => t.value.secretKey = n),
95
+ "onUpdate:modelValue": e[3] || (e[3] = (a) => t.value.secretKey = a),
96
96
  label: "Secret Key",
97
- rules: l(f)(l(g).string())
97
+ rules: n(f)(n(g).string())
98
98
  }, null, 8, ["modelValue", "rules"]),
99
99
  o(i, {
100
100
  modelValue: t.value.applicationCode,
101
- "onUpdate:modelValue": e[4] || (e[4] = (n) => t.value.applicationCode = n),
101
+ "onUpdate:modelValue": e[4] || (e[4] = (a) => t.value.applicationCode = a),
102
102
  label: "Application Code ( Offline )",
103
- rules: l(f)(l(g).string())
103
+ rules: n(f)(n(g).string())
104
104
  }, null, 8, ["modelValue", "rules"]),
105
105
  o(i, {
106
106
  modelValue: t.value.offlineSecret,
107
- "onUpdate:modelValue": e[5] || (e[5] = (n) => t.value.offlineSecret = n),
107
+ "onUpdate:modelValue": e[5] || (e[5] = (a) => t.value.offlineSecret = a),
108
108
  label: "Offline Secret ( Offline )",
109
- rules: l(f)(l(g).string())
109
+ rules: n(f)(n(g).string())
110
110
  }, null, 8, ["modelValue", "rules"]),
111
111
  o(V, {
112
112
  modelValue: u.value,
113
- "onUpdate:modelValue": e[6] || (e[6] = (n) => u.value = n),
113
+ "onUpdate:modelValue": e[6] || (e[6] = (a) => u.value = a),
114
114
  label: "Is Active"
115
115
  }, null, 8, ["modelValue"]),
116
116
  D("div", W, [
117
- a.gateway ? (F(), w(y, {
117
+ l.gateway ? (F(), w(d, {
118
118
  key: 0,
119
119
  class: "flex-1",
120
120
  variant: "secondary",
121
121
  label: "Delete",
122
- onclick: () => a.onDelete(a.gateway)
122
+ onclick: () => l.onDelete(l.gateway)
123
123
  }, null, 8, ["onclick"])) : S("", !0),
124
- o(y, {
124
+ o(d, {
125
125
  type: "submit",
126
126
  class: "flex-1",
127
127
  variant: "primary",
@@ -149,57 +149,57 @@ const G = {
149
149
  required: !0
150
150
  }
151
151
  },
152
- setup(a) {
153
- var p, m;
154
- const c = a, u = b(((p = c.gateway) == null ? void 0 : p.active) ?? !1), t = b(((m = c.gateway) == null ? void 0 : m.config) || {
152
+ setup(l) {
153
+ var p, c;
154
+ const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((c = m.gateway) == null ? void 0 : c.config) || {
155
155
  storeId: "",
156
156
  clientId: "",
157
157
  clientSecret: "",
158
158
  clientPrivateKey: ""
159
159
  });
160
- return (d, e) => {
161
- const i = r("FmTextField"), V = r("FmTextarea"), y = r("FmSwitch"), v = r("FmButton"), n = r("FmForm");
162
- return F(), w(n, {
160
+ return (y, e) => {
161
+ const i = r("FmTextField"), V = r("FmTextarea"), d = r("FmSwitch"), v = r("FmButton"), a = r("FmForm");
162
+ return F(), w(a, {
163
163
  ref: "form",
164
164
  class: "flex flex-col gap-16",
165
- onValidationSuccess: e[5] || (e[5] = () => a.onUpdate(u.value, t.value))
165
+ onValidationSuccess: e[5] || (e[5] = () => l.onUpdate(u.value, t.value))
166
166
  }, {
167
167
  default: U(() => [
168
168
  o(i, {
169
169
  modelValue: t.value.storeId,
170
170
  "onUpdate:modelValue": e[0] || (e[0] = (s) => t.value.storeId = s),
171
171
  label: "Store ID",
172
- rules: l(f)(l(g).string())
172
+ rules: n(f)(n(g).string())
173
173
  }, null, 8, ["modelValue", "rules"]),
174
174
  o(i, {
175
175
  modelValue: t.value.clientId,
176
176
  "onUpdate:modelValue": e[1] || (e[1] = (s) => t.value.clientId = s),
177
177
  label: "Client ID",
178
- rules: l(f)(l(g).string())
178
+ rules: n(f)(n(g).string())
179
179
  }, null, 8, ["modelValue", "rules"]),
180
180
  o(i, {
181
181
  modelValue: t.value.clientSecret,
182
182
  "onUpdate:modelValue": e[2] || (e[2] = (s) => t.value.clientSecret = s),
183
183
  label: "Client Secret",
184
- rules: l(f)(l(g).string())
184
+ rules: n(f)(n(g).string())
185
185
  }, null, 8, ["modelValue", "rules"]),
186
186
  o(V, {
187
187
  modelValue: t.value.clientPrivateKey,
188
188
  "onUpdate:modelValue": e[3] || (e[3] = (s) => t.value.clientPrivateKey = s),
189
189
  label: "Client Private Key"
190
190
  }, null, 8, ["modelValue"]),
191
- o(y, {
191
+ o(d, {
192
192
  modelValue: u.value,
193
193
  "onUpdate:modelValue": e[4] || (e[4] = (s) => u.value = s),
194
194
  label: "Is Active"
195
195
  }, null, 8, ["modelValue"]),
196
196
  D("div", h, [
197
- a.gateway ? (F(), w(v, {
197
+ l.gateway ? (F(), w(v, {
198
198
  key: 0,
199
199
  class: "flex-1",
200
200
  variant: "secondary",
201
201
  label: "Delete",
202
- onclick: () => a.onDelete(a.gateway)
202
+ onclick: () => l.onDelete(l.gateway)
203
203
  }, null, 8, ["onclick"])) : S("", !0),
204
204
  o(v, {
205
205
  type: "submit",
@@ -229,52 +229,52 @@ const G = {
229
229
  required: !0
230
230
  }
231
231
  },
232
- setup(a) {
233
- var p, m;
234
- const c = a, u = b(((p = c.gateway) == null ? void 0 : p.active) ?? !1), t = b(((m = c.gateway) == null ? void 0 : m.config) || {
232
+ setup(l) {
233
+ var p, c;
234
+ const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((c = m.gateway) == null ? void 0 : c.config) || {
235
235
  merchantId: "",
236
236
  terminalId: "",
237
237
  privateKey: ""
238
238
  });
239
- return (d, e) => {
240
- const i = r("FmTextField"), V = r("FmTextarea"), y = r("FmSwitch"), v = r("FmButton"), n = r("FmForm");
241
- return F(), w(n, {
239
+ return (y, e) => {
240
+ const i = r("FmTextField"), V = r("FmTextarea"), d = r("FmSwitch"), v = r("FmButton"), a = r("FmForm");
241
+ return F(), w(a, {
242
242
  ref: "form",
243
243
  class: "flex flex-col gap-16",
244
- onValidationSuccess: e[4] || (e[4] = () => a.onUpdate(u.value, t.value))
244
+ onValidationSuccess: e[4] || (e[4] = () => l.onUpdate(u.value, t.value))
245
245
  }, {
246
246
  default: U(() => [
247
247
  o(i, {
248
248
  modelValue: t.value.merchantId,
249
249
  "onUpdate:modelValue": e[0] || (e[0] = (s) => t.value.merchantId = s),
250
250
  label: "Merchant ID",
251
- rules: l(f)(l(g).string())
251
+ rules: n(f)(n(g).string())
252
252
  }, null, 8, ["modelValue", "rules"]),
253
253
  o(i, {
254
254
  modelValue: t.value.terminalId,
255
255
  "onUpdate:modelValue": e[1] || (e[1] = (s) => t.value.terminalId = s),
256
256
  label: "Terminal ID",
257
- rules: l(f)(l(g).string())
257
+ rules: n(f)(n(g).string())
258
258
  }, null, 8, ["modelValue", "rules"]),
259
259
  o(V, {
260
260
  id: "ghl_pkey",
261
261
  modelValue: t.value.privateKey,
262
262
  "onUpdate:modelValue": e[2] || (e[2] = (s) => t.value.privateKey = s),
263
263
  label: "Private Key",
264
- rules: l(f)(l(g).string())
264
+ rules: n(f)(n(g).string())
265
265
  }, null, 8, ["modelValue", "rules"]),
266
- o(y, {
266
+ o(d, {
267
267
  modelValue: u.value,
268
268
  "onUpdate:modelValue": e[3] || (e[3] = (s) => u.value = s),
269
269
  label: "Is Active"
270
270
  }, null, 8, ["modelValue"]),
271
271
  D("div", te, [
272
- a.gateway ? (F(), w(v, {
272
+ l.gateway ? (F(), w(v, {
273
273
  key: 0,
274
274
  class: "flex-1",
275
275
  variant: "secondary",
276
276
  label: "Delete",
277
- onclick: () => a.onDelete(a.gateway)
277
+ onclick: () => l.onDelete(l.gateway)
278
278
  }, null, 8, ["onclick"])) : S("", !0),
279
279
  o(v, {
280
280
  type: "submit",
@@ -304,67 +304,67 @@ const G = {
304
304
  required: !0
305
305
  }
306
306
  },
307
- setup(a) {
308
- var p, m;
309
- const c = a, u = b(((p = c.gateway) == null ? void 0 : p.active) ?? !1), t = b(((m = c.gateway) == null ? void 0 : m.config) || {
307
+ setup(l) {
308
+ var p, c;
309
+ const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((c = m.gateway) == null ? void 0 : c.config) || {
310
310
  merchantId: "",
311
311
  merchantName: "",
312
312
  merchantCategoryCode: "",
313
313
  storeID: "",
314
314
  storeName: ""
315
315
  });
316
- return (d, e) => {
317
- const i = r("FmTextField"), V = r("FmSwitch"), y = r("FmButton"), v = r("FmForm");
316
+ return (y, e) => {
317
+ const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
318
318
  return F(), w(v, {
319
319
  ref: "form",
320
320
  class: "flex flex-col gap-16",
321
- onValidationSuccess: e[6] || (e[6] = () => a.onUpdate(u.value, t.value))
321
+ onValidationSuccess: e[6] || (e[6] = () => l.onUpdate(u.value, t.value))
322
322
  }, {
323
323
  default: U(() => [
324
324
  o(i, {
325
325
  modelValue: t.value.merchantId,
326
- "onUpdate:modelValue": e[0] || (e[0] = (n) => t.value.merchantId = n),
326
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.merchantId = a),
327
327
  label: "Merchant ID",
328
- rules: l(f)(l(g).string())
328
+ rules: n(f)(n(g).string())
329
329
  }, null, 8, ["modelValue", "rules"]),
330
330
  o(i, {
331
331
  modelValue: t.value.merchantName,
332
- "onUpdate:modelValue": e[1] || (e[1] = (n) => t.value.merchantName = n),
332
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => t.value.merchantName = a),
333
333
  label: "Merchant Name",
334
- rules: l(f)(l(g).string())
334
+ rules: n(f)(n(g).string())
335
335
  }, null, 8, ["modelValue", "rules"]),
336
336
  o(i, {
337
337
  modelValue: t.value.merchantCategoryCode,
338
- "onUpdate:modelValue": e[2] || (e[2] = (n) => t.value.merchantCategoryCode = n),
338
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => t.value.merchantCategoryCode = a),
339
339
  label: "Merchant MCC",
340
- rules: l(f)(l(g).string())
340
+ rules: n(f)(n(g).string())
341
341
  }, null, 8, ["modelValue", "rules"]),
342
342
  o(i, {
343
343
  modelValue: t.value.storeID,
344
- "onUpdate:modelValue": e[3] || (e[3] = (n) => t.value.storeID = n),
344
+ "onUpdate:modelValue": e[3] || (e[3] = (a) => t.value.storeID = a),
345
345
  label: "Store ID",
346
- rules: l(f)(l(g).string())
346
+ rules: n(f)(n(g).string())
347
347
  }, null, 8, ["modelValue", "rules"]),
348
348
  o(i, {
349
349
  modelValue: t.value.storeName,
350
- "onUpdate:modelValue": e[4] || (e[4] = (n) => t.value.storeName = n),
350
+ "onUpdate:modelValue": e[4] || (e[4] = (a) => t.value.storeName = a),
351
351
  label: "Store Name",
352
- rules: l(f)(l(g).string())
352
+ rules: n(f)(n(g).string())
353
353
  }, null, 8, ["modelValue", "rules"]),
354
354
  o(V, {
355
355
  modelValue: u.value,
356
- "onUpdate:modelValue": e[5] || (e[5] = (n) => u.value = n),
356
+ "onUpdate:modelValue": e[5] || (e[5] = (a) => u.value = a),
357
357
  label: "Is Active"
358
358
  }, null, 8, ["modelValue"]),
359
359
  D("div", le, [
360
- a.gateway ? (F(), w(y, {
360
+ l.gateway ? (F(), w(d, {
361
361
  key: 0,
362
362
  class: "flex-1",
363
363
  variant: "secondary",
364
364
  label: "Delete",
365
- onclick: () => a.onDelete(a.gateway)
365
+ onclick: () => l.onDelete(l.gateway)
366
366
  }, null, 8, ["onclick"])) : S("", !0),
367
- o(y, {
367
+ o(d, {
368
368
  type: "submit",
369
369
  class: "flex-1",
370
370
  variant: "primary",
@@ -392,43 +392,43 @@ const G = {
392
392
  required: !0
393
393
  }
394
394
  },
395
- setup(a) {
396
- var V, y;
397
- const c = Z(), { isLoading: u, startAsyncCall: t } = R(), p = j(), m = a, d = b(((V = m.gateway) == null ? void 0 : V.active) ?? !1), e = b(((y = m.gateway) == null ? void 0 : y.config) || {
395
+ setup(l) {
396
+ var V, d;
397
+ const m = Z(), { isLoading: u, startAsyncCall: t } = R(), p = j(), c = l, y = b(((V = c.gateway) == null ? void 0 : V.active) ?? !1), e = b(((d = c.gateway) == null ? void 0 : d.config) || {
398
398
  merchantId: ""
399
399
  });
400
400
  async function i() {
401
401
  t(async () => {
402
402
  var v;
403
403
  try {
404
- const { merchantID: n } = await G.grabSync(((v = p.currentRestaurant.value) == null ? void 0 : v._id) ?? "");
405
- e.value.merchantId = n, d.value = !0, c.open({
404
+ const { merchantID: a } = await G.grabSync(((v = p.currentRestaurant.value) == null ? void 0 : v._id) ?? "");
405
+ e.value.merchantId = a, y.value = !0, m.open({
406
406
  type: "success",
407
407
  title: "Grab Setting sync succesfully, you will still need to save the changes."
408
408
  });
409
- } catch (n) {
410
- c.open({
409
+ } catch (a) {
410
+ m.open({
411
411
  type: "error",
412
412
  title: "Error occurs when sync ordering settings",
413
- message: Q(n)
413
+ message: Q(a)
414
414
  });
415
415
  }
416
416
  });
417
417
  }
418
- return (v, n) => {
418
+ return (v, a) => {
419
419
  const s = r("FmTextField"), x = r("FmButton"), C = r("FmTooltip"), T = r("FmSwitch"), k = r("FmForm");
420
420
  return F(), w(k, {
421
421
  ref: "form",
422
422
  class: "flex flex-col gap-16",
423
- onValidationSuccess: n[2] || (n[2] = () => a.onUpdate(d.value, e.value))
423
+ onValidationSuccess: a[2] || (a[2] = () => l.onUpdate(y.value, e.value))
424
424
  }, {
425
425
  default: U(() => [
426
426
  D("div", oe, [
427
427
  o(s, {
428
428
  modelValue: e.value.merchantId,
429
- "onUpdate:modelValue": n[0] || (n[0] = (M) => e.value.merchantId = M),
429
+ "onUpdate:modelValue": a[0] || (a[0] = (M) => e.value.merchantId = M),
430
430
  label: "Merchant ID",
431
- rules: l(f)(l(g).string())
431
+ rules: n(f)(n(g).string())
432
432
  }, null, 8, ["modelValue", "rules"]),
433
433
  o(C, {
434
434
  variant: "plain",
@@ -441,7 +441,7 @@ const G = {
441
441
  type: "button",
442
442
  variant: "primary",
443
443
  icon: "sync",
444
- loading: l(u),
444
+ loading: n(u),
445
445
  onclick: () => i()
446
446
  }, null, 8, ["loading", "onclick"])
447
447
  ]),
@@ -449,17 +449,17 @@ const G = {
449
449
  })
450
450
  ]),
451
451
  o(T, {
452
- modelValue: d.value,
453
- "onUpdate:modelValue": n[1] || (n[1] = (M) => d.value = M),
452
+ modelValue: y.value,
453
+ "onUpdate:modelValue": a[1] || (a[1] = (M) => y.value = M),
454
454
  label: "Is Active"
455
455
  }, null, 8, ["modelValue"]),
456
456
  D("div", ue, [
457
- a.gateway ? (F(), w(x, {
457
+ l.gateway ? (F(), w(x, {
458
458
  key: 0,
459
459
  class: "flex-1",
460
460
  variant: "secondary",
461
461
  label: "Delete",
462
- onclick: () => a.onDelete(a.gateway)
462
+ onclick: () => l.onDelete(l.gateway)
463
463
  }, null, 8, ["onclick"])) : S("", !0),
464
464
  o(x, {
465
465
  type: "submit",
@@ -489,46 +489,46 @@ const G = {
489
489
  required: !0
490
490
  }
491
491
  },
492
- setup(a) {
493
- var p, m;
494
- const c = a, u = b(((p = c.gateway) == null ? void 0 : p.active) ?? !1), t = b(((m = c.gateway) == null ? void 0 : m.config) || {
492
+ setup(l) {
493
+ var p, c;
494
+ const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((c = m.gateway) == null ? void 0 : c.config) || {
495
495
  mid: "",
496
496
  tid: ""
497
497
  });
498
- return (d, e) => {
499
- const i = r("FmTextField"), V = r("FmSwitch"), y = r("FmButton"), v = r("FmForm");
498
+ return (y, e) => {
499
+ const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
500
500
  return F(), w(v, {
501
501
  ref: "form",
502
502
  class: "flex flex-col gap-16",
503
- onValidationSuccess: e[3] || (e[3] = () => a.onUpdate(u.value, t.value))
503
+ onValidationSuccess: e[3] || (e[3] = () => l.onUpdate(u.value, t.value))
504
504
  }, {
505
505
  default: U(() => [
506
506
  o(i, {
507
507
  modelValue: t.value.mid,
508
- "onUpdate:modelValue": e[0] || (e[0] = (n) => t.value.mid = n),
508
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.mid = a),
509
509
  label: "MID",
510
- rules: l(f)(l(g).string())
510
+ rules: n(f)(n(g).string())
511
511
  }, null, 8, ["modelValue", "rules"]),
512
512
  o(i, {
513
513
  modelValue: t.value.tid,
514
- "onUpdate:modelValue": e[1] || (e[1] = (n) => t.value.tid = n),
514
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => t.value.tid = a),
515
515
  label: "TID",
516
- rules: l(f)(l(g).string())
516
+ rules: n(f)(n(g).string())
517
517
  }, null, 8, ["modelValue", "rules"]),
518
518
  o(V, {
519
519
  modelValue: u.value,
520
- "onUpdate:modelValue": e[2] || (e[2] = (n) => u.value = n),
520
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => u.value = a),
521
521
  label: "Is Active"
522
522
  }, null, 8, ["modelValue"]),
523
523
  D("div", se, [
524
- a.gateway ? (F(), w(y, {
524
+ l.gateway ? (F(), w(d, {
525
525
  key: 0,
526
526
  class: "flex-1",
527
527
  variant: "secondary",
528
528
  label: "Delete",
529
- onclick: () => a.onDelete(a.gateway)
529
+ onclick: () => l.onDelete(l.gateway)
530
530
  }, null, 8, ["onclick"])) : S("", !0),
531
- o(y, {
531
+ o(d, {
532
532
  type: "submit",
533
533
  class: "flex-1",
534
534
  variant: "primary",
@@ -556,34 +556,39 @@ const G = {
556
556
  required: !0
557
557
  }
558
558
  },
559
- setup(a) {
560
- var t;
561
- const u = b(((t = a.gateway) == null ? void 0 : t.config) || {
559
+ setup(l) {
560
+ var p, c;
561
+ const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((c = m.gateway) == null ? void 0 : c.config) || {
562
562
  merchantId: ""
563
563
  });
564
- return (p, m) => {
565
- const d = r("FmTextField"), e = r("FmButton"), i = r("FmForm");
566
- return F(), w(i, {
564
+ return (y, e) => {
565
+ const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
566
+ return F(), w(v, {
567
567
  ref: "form",
568
568
  class: "flex flex-col gap-16",
569
- onValidationSuccess: m[1] || (m[1] = () => a.onUpdate(u.value))
569
+ onValidationSuccess: e[2] || (e[2] = () => l.onUpdate(u.value, t.value))
570
570
  }, {
571
571
  default: U(() => [
572
- o(d, {
573
- modelValue: u.value.merchantId,
574
- "onUpdate:modelValue": m[0] || (m[0] = (V) => u.value.merchantId = V),
572
+ o(i, {
573
+ modelValue: t.value.merchantId,
574
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.merchantId = a),
575
575
  label: "Merchant ID",
576
- rules: l(f)(l(g).string())
576
+ rules: n(f)(n(g).string())
577
577
  }, null, 8, ["modelValue", "rules"]),
578
+ o(V, {
579
+ modelValue: u.value,
580
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => u.value = a),
581
+ label: "Is Active"
582
+ }, null, 8, ["modelValue"]),
578
583
  D("div", me, [
579
- a.gateway ? (F(), w(e, {
584
+ l.gateway ? (F(), w(d, {
580
585
  key: 0,
581
586
  class: "flex-1",
582
587
  variant: "secondary",
583
588
  label: "Delete",
584
- onclick: () => a.onDelete()
589
+ onclick: () => l.onDelete(l.gateway)
585
590
  }, null, 8, ["onclick"])) : S("", !0),
586
- o(e, {
591
+ o(d, {
587
592
  type: "submit",
588
593
  class: "flex-1",
589
594
  variant: "primary",
@@ -606,8 +611,8 @@ const G = {
606
611
  required: !0
607
612
  }
608
613
  },
609
- setup(a) {
610
- const c = [
614
+ setup(l) {
615
+ const m = [
611
616
  {
612
617
  label: "Fiuu",
613
618
  value: "RAZER_MERCHANT_SERVICE",
@@ -650,51 +655,51 @@ const G = {
650
655
  form: ce,
651
656
  region: [I.F_COUNTRY.enum.TH]
652
657
  }
653
- ], u = a, t = j(), { isLoading: p, startAsyncCall: m } = R(), { activeGateway: d } = E({
658
+ ], u = l, t = j(), { isLoading: p, startAsyncCall: c } = R(), { activeGateway: y } = E({
654
659
  activeGateway: ""
655
660
  }), e = b([]);
656
661
  async function i(s, x) {
657
- await m(async () => {
662
+ await c(async () => {
658
663
  const C = {
659
664
  _id: "",
660
665
  _rev: "",
661
- paymentGateway: d.value,
666
+ paymentGateway: y.value,
662
667
  config: x,
663
668
  active: s
664
- }, T = e.value.find((k) => k.paymentGateway === d.value);
669
+ }, T = e.value.find((k) => k.paymentGateway === y.value);
665
670
  T && (C._id = T._id, C._rev = T._rev), await G.upsert(u.restaurant._id, C), e.value = await G.get(u.restaurant._id);
666
671
  });
667
672
  }
668
673
  async function V(s) {
669
- m(async () => {
674
+ c(async () => {
670
675
  await G.delete(u.restaurant._id, s._id), e.value = await G.get(u.restaurant._id);
671
676
  });
672
677
  }
673
- const y = O(() => c.filter((s) => s.region.includes(t.currentCountry.value ?? I.F_COUNTRY.enum.MY)));
678
+ const d = O(() => m.filter((s) => s.region.includes(t.currentCountry.value ?? I.F_COUNTRY.enum.MY)));
674
679
  function v() {
675
- m(async () => {
676
- e.value = await G.get(u.restaurant._id), y.value.length > 0 && (d.value = y.value[0].value);
680
+ c(async () => {
681
+ e.value = await G.get(u.restaurant._id), d.value.length > 0 && (y.value = d.value[0].value);
677
682
  });
678
683
  }
679
684
  $(v);
680
- const n = O(() => {
685
+ const a = O(() => {
681
686
  var s;
682
- return (s = c.find((x) => x.value === d.value)) == null ? void 0 : s.form;
687
+ return (s = m.find((x) => x.value === y.value)) == null ? void 0 : s.form;
683
688
  });
684
689
  return (s, x) => {
685
690
  const C = r("FmCircularProgress"), T = r("FmTabs");
686
691
  return F(), N(L, null, [
687
- l(p) ? (F(), N("div", de, [
692
+ n(p) ? (F(), N("div", de, [
688
693
  o(C, { size: "xxl" })
689
694
  ])) : S("", !0),
690
695
  o(T, {
691
696
  class: "mb-6",
692
- "model-value": l(d),
693
- "onUpdate:modelValue": x[0] || (x[0] = (k) => B(d) ? d.value = k : null),
694
- items: y.value
697
+ "model-value": n(y),
698
+ "onUpdate:modelValue": x[0] || (x[0] = (k) => B(y) ? y.value = k : null),
699
+ items: d.value
695
700
  }, null, 8, ["model-value", "items"]),
696
- l(d) ? (F(), w(P(n.value), K(Y({ key: 1 }, {
697
- gateway: e.value.find((k) => k.paymentGateway === l(d)),
701
+ n(y) ? (F(), w(P(a.value), K(Y({ key: 1 }, {
702
+ gateway: e.value.find((k) => k.paymentGateway === n(y)),
698
703
  onDelete: V,
699
704
  onUpdate: i
700
705
  })), null, 16)) : S("", !0)
@@ -709,10 +714,10 @@ const G = {
709
714
  required: !0
710
715
  }
711
716
  },
712
- setup(a) {
713
- const c = a, { tab: u } = E({
717
+ setup(l) {
718
+ const m = l, { tab: u } = E({
714
719
  tab: "payment-gateway"
715
- }), { isLoading: t, startAsyncCall: p } = R(!0), m = H(), d = b(), e = [
720
+ }), { isLoading: t, startAsyncCall: p } = R(!0), c = H(), y = b(), e = [
716
721
  {
717
722
  label: "Payment Gateway",
718
723
  value: "payment-gateway",
@@ -722,31 +727,31 @@ const G = {
722
727
  ];
723
728
  function i() {
724
729
  p(async () => {
725
- d.value = await J.readRestaurantById(c.restaurantId);
730
+ y.value = await J.readRestaurantById(m.restaurantId);
726
731
  });
727
732
  }
728
733
  $(i);
729
734
  const V = O(() => {
730
- var y;
731
- return (y = e.find((v) => v.value === u.value)) == null ? void 0 : y.render;
735
+ var d;
736
+ return (d = e.find((v) => v.value === u.value)) == null ? void 0 : d.render;
732
737
  });
733
- return (y, v) => {
738
+ return (d, v) => {
734
739
  var s;
735
- const n = r("FmTabs");
740
+ const a = r("FmTabs");
736
741
  return F(), w(z, {
737
- title: `Restaurant (${(s = d.value) == null ? void 0 : s._id})`,
738
- loading: l(t),
739
- onBack: l(m).back
742
+ title: `Restaurant (${(s = y.value) == null ? void 0 : s._id})`,
743
+ loading: n(t),
744
+ onBack: n(c).back
740
745
  }, {
741
746
  default: U(() => [
742
- o(n, {
743
- "model-value": l(u),
747
+ o(a, {
748
+ "model-value": n(u),
744
749
  "onUpdate:modelValue": v[0] || (v[0] = (x) => B(u) ? u.value = x : null),
745
750
  class: "mb-6",
746
751
  items: e
747
752
  }, null, 8, ["model-value"]),
748
- l(u) && d.value ? (F(), w(P(V.value), K(Y({ key: 0 }, {
749
- restaurant: d.value
753
+ n(u) && y.value ? (F(), w(P(V.value), K(Y({ key: 0 }, {
754
+ restaurant: y.value
750
755
  })), null, 16)) : S("", !0)
751
756
  ]),
752
757
  _: 1