@feedmepos/mf-payment 1.2.16 → 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-CvMczmij.js → PayoutAccount-BDTAihoB.js} +6 -6
  2. package/dist/{PayoutAccount-bF6506mg.js → PayoutAccount-BlvYGFmj.js} +5 -5
  3. package/dist/{PayoutAccountSetting-Di_Rohl7.js → PayoutAccountSetting-BZ_dtEzF.js} +3 -3
  4. package/dist/{Restaurant-BgfJ4kMh.js → Restaurant-IvTxzEEg.js} +4 -4
  5. package/dist/{RestaurantSetting-DLB_GBbu.js → RestaurantSetting-CYkbYnib.js} +210 -200
  6. package/dist/{Settlement-Mf5XJrXc.js → Settlement-CgQP9j_O.js} +3 -3
  7. package/dist/{Settlement-DqwyJFk-.js → Settlement-Wbsxz3c3.js} +3 -3
  8. package/dist/{SettlementTransactions-DvzbSvA9.js → SettlementTransactions-CDrPZEsp.js} +3 -3
  9. package/dist/{SettlementTransactions-6vkA8-4o.js → SettlementTransactions-TULTM98h.js} +3 -3
  10. package/dist/{Terminal-DC6alAxg.js → Terminal-Kbwkii3s.js} +5 -5
  11. package/dist/{TerminalSetting-BE9fFg4j.js → TerminalSetting-APSwdYlY.js} +3 -3
  12. package/dist/{Transaction-BXynWN9l.js → Transaction-CP5nDC93.js} +5 -5
  13. package/dist/{Transaction-BPVSJWdM.js → Transaction-DHBP5DBt.js} +7 -7
  14. package/dist/{TransactionOld-aJqwnMYJ.js → TransactionOld-CZTpxwtD.js} +4 -4
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-CX5eNJPx.js → TransactionTable.vue_vue_type_script_setup_true_lang-DQLCyJE1.js} +3 -3
  16. package/dist/{app-l69fYMyZ.js → app-DxcyIR9L.js} +360 -360
  17. package/dist/app.js +1 -1
  18. package/dist/{assets-CRA5IzdW.js → assets-BPRFwA_x.js} +2 -2
  19. package/dist/{grafana-AnUnO24M.js → grafana-C6rWA8aV.js} +1 -1
  20. package/dist/{index-k7EwR1PN.js → index-BasV9ckt.js} +1 -1
  21. package/dist/{index-DmI9Gt5s.js → index-CFcmWPUa.js} +2003 -2003
  22. package/dist/{index-8V-GavUD.js → index-CV4mrBvQ.js} +1 -1
  23. package/dist/{index-BrtYLN-t.js → index-Cl3iKnij.js} +1 -1
  24. package/dist/{index-DayhN_i6.js → index-CqxWxkx3.js} +1 -1
  25. package/dist/{index-Cer_6J8b.js → index-dd-QHobb.js} +1 -1
  26. package/dist/{index-34hQY02y.js → index-pcbXwdTo.js} +2 -2
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-BZvBvJ7L.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-HJH4ybUc.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 s, openBlock as V, createBlock as w, withCtx as U, createVNode as o, unref as l, createElementVNode as D, createCommentVNode as S, computed as R, 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 M, u as A, e as I } from "./index-DmI9Gt5s.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-Cer_6J8b.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-k7EwR1PN.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
- await M().get(
15
- `restaurants/${a}/payment-gateway`
14
+ await A().get(
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
- await M().post(
22
- `restaurants/${a}/payment-gateway`,
23
- { data: c }
21
+ await A().post(
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
- await M().delete(
30
- `restaurants/${a}/payment-gateway/${c}`
29
+ await A().delete(
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
- await M().post(
37
- `restaurants/${a}/payment-gateway/grab/sync`
36
+ await A().post(
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 v, m;
59
- const c = a, u = b(((v = c.gateway) == null ? void 0 : v.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 = s("FmTextField"), F = s("FmSwitch"), p = s("FmButton"), y = s("FmForm");
69
- return V(), w(y, {
67
+ return (y, e) => {
68
+ const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
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
- o(F, {
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 ? (V(), w(p, {
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(p, {
124
+ o(d, {
125
125
  type: "submit",
126
126
  class: "flex-1",
127
127
  variant: "primary",
@@ -149,59 +149,59 @@ const G = {
149
149
  required: !0
150
150
  }
151
151
  },
152
- setup(a) {
153
- var v, m;
154
- const c = a, u = b(((v = c.gateway) == null ? void 0 : v.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 = s("FmTextField"), F = s("FmTextarea"), p = s("FmSwitch"), y = s("FmButton"), n = s("FmForm");
162
- return V(), 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
- "onUpdate:modelValue": e[0] || (e[0] = (r) => t.value.storeId = r),
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
- "onUpdate:modelValue": e[1] || (e[1] = (r) => t.value.clientId = r),
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
- "onUpdate:modelValue": e[2] || (e[2] = (r) => t.value.clientSecret = r),
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
- o(F, {
186
+ o(V, {
187
187
  modelValue: t.value.clientPrivateKey,
188
- "onUpdate:modelValue": e[3] || (e[3] = (r) => t.value.clientPrivateKey = r),
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(p, {
191
+ o(d, {
192
192
  modelValue: u.value,
193
- "onUpdate:modelValue": e[4] || (e[4] = (r) => u.value = r),
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 ? (V(), w(y, {
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
- o(y, {
204
+ o(v, {
205
205
  type: "submit",
206
206
  class: "flex-1",
207
207
  variant: "primary",
@@ -229,54 +229,54 @@ const G = {
229
229
  required: !0
230
230
  }
231
231
  },
232
- setup(a) {
233
- var v, m;
234
- const c = a, u = b(((v = c.gateway) == null ? void 0 : v.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 = s("FmTextField"), F = s("FmTextarea"), p = s("FmSwitch"), y = s("FmButton"), n = s("FmForm");
241
- return V(), 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
- "onUpdate:modelValue": e[0] || (e[0] = (r) => t.value.merchantId = r),
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
- "onUpdate:modelValue": e[1] || (e[1] = (r) => t.value.terminalId = r),
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
- o(F, {
259
+ o(V, {
260
260
  id: "ghl_pkey",
261
261
  modelValue: t.value.privateKey,
262
- "onUpdate:modelValue": e[2] || (e[2] = (r) => t.value.privateKey = r),
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(p, {
266
+ o(d, {
267
267
  modelValue: u.value,
268
- "onUpdate:modelValue": e[3] || (e[3] = (r) => u.value = r),
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 ? (V(), w(y, {
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
- o(y, {
279
+ o(v, {
280
280
  type: "submit",
281
281
  class: "flex-1",
282
282
  variant: "primary",
@@ -304,67 +304,67 @@ const G = {
304
304
  required: !0
305
305
  }
306
306
  },
307
- setup(a) {
308
- var v, m;
309
- const c = a, u = b(((v = c.gateway) == null ? void 0 : v.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 = s("FmTextField"), F = s("FmSwitch"), p = s("FmButton"), y = s("FmForm");
318
- return V(), w(y, {
316
+ return (y, e) => {
317
+ const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
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
- o(F, {
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 ? (V(), w(p, {
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(p, {
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 F, p;
397
- const c = Z(), { isLoading: u, startAsyncCall: t } = A(), v = j(), m = a, d = b(((F = m.gateway) == null ? void 0 : F.active) ?? !1), e = b(((p = m.gateway) == null ? void 0 : p.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
- var y;
402
+ var v;
403
403
  try {
404
- const { merchantID: n } = await G.grabSync(((y = v.currentRestaurant.value) == null ? void 0 : y._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 (y, n) => {
419
- const r = s("FmTextField"), x = s("FmButton"), C = s("FmTooltip"), T = s("FmSwitch"), k = s("FmForm");
420
- return V(), w(k, {
418
+ return (v, a) => {
419
+ const s = r("FmTextField"), x = r("FmButton"), C = r("FmTooltip"), T = r("FmSwitch"), k = r("FmForm");
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
- o(r, {
427
+ o(s, {
428
428
  modelValue: e.value.merchantId,
429
- "onUpdate:modelValue": n[0] || (n[0] = (O) => e.value.merchantId = O),
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] = (O) => d.value = O),
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 ? (V(), 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,41 +489,46 @@ const G = {
489
489
  required: !0
490
490
  }
491
491
  },
492
- setup(a) {
493
- var v, m;
494
- const c = a, u = b(((v = c.gateway) == null ? void 0 : v.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 = s("FmTextField"), F = s("FmButton"), p = s("FmForm");
500
- return V(), w(p, {
498
+ return (y, e) => {
499
+ const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
500
+ return F(), w(v, {
501
501
  ref: "form",
502
502
  class: "flex flex-col gap-16",
503
- onValidationSuccess: e[2] || (e[2] = () => 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] = (y) => t.value.mid = y),
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] = (y) => t.value.tid = y),
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
+ o(V, {
519
+ modelValue: u.value,
520
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => u.value = a),
521
+ label: "Is Active"
522
+ }, null, 8, ["modelValue"]),
518
523
  D("div", se, [
519
- a.gateway ? (V(), w(F, {
524
+ l.gateway ? (F(), w(d, {
520
525
  key: 0,
521
526
  class: "flex-1",
522
527
  variant: "secondary",
523
528
  label: "Delete",
524
- onclick: () => a.onDelete(a.gateway)
529
+ onclick: () => l.onDelete(l.gateway)
525
530
  }, null, 8, ["onclick"])) : S("", !0),
526
- o(F, {
531
+ o(d, {
527
532
  type: "submit",
528
533
  class: "flex-1",
529
534
  variant: "primary",
@@ -551,34 +556,39 @@ const G = {
551
556
  required: !0
552
557
  }
553
558
  },
554
- setup(a) {
555
- var t;
556
- 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) || {
557
562
  merchantId: ""
558
563
  });
559
- return (v, m) => {
560
- const d = s("FmTextField"), e = s("FmButton"), i = s("FmForm");
561
- return V(), 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, {
562
567
  ref: "form",
563
568
  class: "flex flex-col gap-16",
564
- onValidationSuccess: m[1] || (m[1] = () => a.onUpdate(u.value))
569
+ onValidationSuccess: e[2] || (e[2] = () => l.onUpdate(u.value, t.value))
565
570
  }, {
566
571
  default: U(() => [
567
- o(d, {
568
- modelValue: u.value.merchantId,
569
- "onUpdate:modelValue": m[0] || (m[0] = (F) => u.value.merchantId = F),
572
+ o(i, {
573
+ modelValue: t.value.merchantId,
574
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.merchantId = a),
570
575
  label: "Merchant ID",
571
- rules: l(f)(l(g).string())
576
+ rules: n(f)(n(g).string())
572
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"]),
573
583
  D("div", me, [
574
- a.gateway ? (V(), w(e, {
584
+ l.gateway ? (F(), w(d, {
575
585
  key: 0,
576
586
  class: "flex-1",
577
587
  variant: "secondary",
578
588
  label: "Delete",
579
- onclick: () => a.onDelete()
589
+ onclick: () => l.onDelete(l.gateway)
580
590
  }, null, 8, ["onclick"])) : S("", !0),
581
- o(e, {
591
+ o(d, {
582
592
  type: "submit",
583
593
  class: "flex-1",
584
594
  variant: "primary",
@@ -601,8 +611,8 @@ const G = {
601
611
  required: !0
602
612
  }
603
613
  },
604
- setup(a) {
605
- const c = [
614
+ setup(l) {
615
+ const m = [
606
616
  {
607
617
  label: "Fiuu",
608
618
  value: "RAZER_MERCHANT_SERVICE",
@@ -645,52 +655,52 @@ const G = {
645
655
  form: ce,
646
656
  region: [I.F_COUNTRY.enum.TH]
647
657
  }
648
- ], u = a, t = j(), { isLoading: v, startAsyncCall: m } = A(), { activeGateway: d } = E({
658
+ ], u = l, t = j(), { isLoading: p, startAsyncCall: c } = R(), { activeGateway: y } = E({
649
659
  activeGateway: ""
650
660
  }), e = b([]);
651
- async function i(r, x) {
652
- await m(async () => {
661
+ async function i(s, x) {
662
+ await c(async () => {
653
663
  const C = {
654
664
  _id: "",
655
665
  _rev: "",
656
- paymentGateway: d.value,
666
+ paymentGateway: y.value,
657
667
  config: x,
658
- active: r
659
- }, T = e.value.find((k) => k.paymentGateway === d.value);
668
+ active: s
669
+ }, T = e.value.find((k) => k.paymentGateway === y.value);
660
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);
661
671
  });
662
672
  }
663
- async function F(r) {
664
- m(async () => {
665
- await G.delete(u.restaurant._id, r._id), e.value = await G.get(u.restaurant._id);
673
+ async function V(s) {
674
+ c(async () => {
675
+ await G.delete(u.restaurant._id, s._id), e.value = await G.get(u.restaurant._id);
666
676
  });
667
677
  }
668
- const p = R(() => c.filter((r) => r.region.includes(t.currentCountry.value ?? I.F_COUNTRY.enum.MY)));
669
- function y() {
670
- m(async () => {
671
- e.value = await G.get(u.restaurant._id), p.value.length > 0 && (d.value = p.value[0].value);
678
+ const d = O(() => m.filter((s) => s.region.includes(t.currentCountry.value ?? I.F_COUNTRY.enum.MY)));
679
+ function v() {
680
+ c(async () => {
681
+ e.value = await G.get(u.restaurant._id), d.value.length > 0 && (y.value = d.value[0].value);
672
682
  });
673
683
  }
674
- $(y);
675
- const n = R(() => {
676
- var r;
677
- return (r = c.find((x) => x.value === d.value)) == null ? void 0 : r.form;
684
+ $(v);
685
+ const a = O(() => {
686
+ var s;
687
+ return (s = m.find((x) => x.value === y.value)) == null ? void 0 : s.form;
678
688
  });
679
- return (r, x) => {
680
- const C = s("FmCircularProgress"), T = s("FmTabs");
681
- return V(), N(L, null, [
682
- l(v) ? (V(), N("div", de, [
689
+ return (s, x) => {
690
+ const C = r("FmCircularProgress"), T = r("FmTabs");
691
+ return F(), N(L, null, [
692
+ n(p) ? (F(), N("div", de, [
683
693
  o(C, { size: "xxl" })
684
694
  ])) : S("", !0),
685
695
  o(T, {
686
696
  class: "mb-6",
687
- "model-value": l(d),
688
- "onUpdate:modelValue": x[0] || (x[0] = (k) => B(d) ? d.value = k : null),
689
- items: p.value
697
+ "model-value": n(y),
698
+ "onUpdate:modelValue": x[0] || (x[0] = (k) => B(y) ? y.value = k : null),
699
+ items: d.value
690
700
  }, null, 8, ["model-value", "items"]),
691
- l(d) ? (V(), w(P(n.value), K(Y({ key: 1 }, {
692
- gateway: e.value.find((k) => k.paymentGateway === l(d)),
693
- onDelete: F,
701
+ n(y) ? (F(), w(P(a.value), K(Y({ key: 1 }, {
702
+ gateway: e.value.find((k) => k.paymentGateway === n(y)),
703
+ onDelete: V,
694
704
  onUpdate: i
695
705
  })), null, 16)) : S("", !0)
696
706
  ], 64);
@@ -704,10 +714,10 @@ const G = {
704
714
  required: !0
705
715
  }
706
716
  },
707
- setup(a) {
708
- const c = a, { tab: u } = E({
717
+ setup(l) {
718
+ const m = l, { tab: u } = E({
709
719
  tab: "payment-gateway"
710
- }), { isLoading: t, startAsyncCall: v } = A(!0), m = H(), d = b(), e = [
720
+ }), { isLoading: t, startAsyncCall: p } = R(!0), c = H(), y = b(), e = [
711
721
  {
712
722
  label: "Payment Gateway",
713
723
  value: "payment-gateway",
@@ -716,32 +726,32 @@ const G = {
716
726
  }
717
727
  ];
718
728
  function i() {
719
- v(async () => {
720
- d.value = await J.readRestaurantById(c.restaurantId);
729
+ p(async () => {
730
+ y.value = await J.readRestaurantById(m.restaurantId);
721
731
  });
722
732
  }
723
733
  $(i);
724
- const F = R(() => {
725
- var p;
726
- return (p = e.find((y) => y.value === u.value)) == null ? void 0 : p.render;
734
+ const V = O(() => {
735
+ var d;
736
+ return (d = e.find((v) => v.value === u.value)) == null ? void 0 : d.render;
727
737
  });
728
- return (p, y) => {
729
- var r;
730
- const n = s("FmTabs");
731
- return V(), w(z, {
732
- title: `Restaurant (${(r = d.value) == null ? void 0 : r._id})`,
733
- loading: l(t),
734
- onBack: l(m).back
738
+ return (d, v) => {
739
+ var s;
740
+ const a = r("FmTabs");
741
+ return F(), w(z, {
742
+ title: `Restaurant (${(s = y.value) == null ? void 0 : s._id})`,
743
+ loading: n(t),
744
+ onBack: n(c).back
735
745
  }, {
736
746
  default: U(() => [
737
- o(n, {
738
- "model-value": l(u),
739
- "onUpdate:modelValue": y[0] || (y[0] = (x) => B(u) ? u.value = x : null),
747
+ o(a, {
748
+ "model-value": n(u),
749
+ "onUpdate:modelValue": v[0] || (v[0] = (x) => B(u) ? u.value = x : null),
740
750
  class: "mb-6",
741
751
  items: e
742
752
  }, null, 8, ["model-value"]),
743
- l(u) && d.value ? (V(), w(P(F.value), K(Y({ key: 0 }, {
744
- restaurant: d.value
753
+ n(u) && y.value ? (F(), w(P(V.value), K(Y({ key: 0 }, {
754
+ restaurant: y.value
745
755
  })), null, 16)) : S("", !0)
746
756
  ]),
747
757
  _: 1