@feedmepos/mf-payment 1.2.6 → 1.2.7

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 (49) hide show
  1. package/dist/{PayoutAccount-CFFgQ_65.js → PayoutAccount-90Fg0Eqb.js} +6 -6
  2. package/dist/{PayoutAccount-CSm0Ldg9.js → PayoutAccount-DS14d5_9.js} +5 -5
  3. package/dist/{PayoutAccountSetting-rO11Afiw.js → PayoutAccountSetting-PfKPX1B-.js} +3 -3
  4. package/dist/{Restaurant-CoNFB1rk.js → Restaurant-Dk0X2E1m.js} +4 -4
  5. package/dist/{RestaurantSetting-BQvg8S_p.js → RestaurantSetting-S0CcLhRS.js} +182 -185
  6. package/dist/{Settlement-DpmBq0V9.js → Settlement-DlFBQNQZ.js} +3 -3
  7. package/dist/{Settlement-DEKvU0zP.js → Settlement-DxI1z91R.js} +3 -3
  8. package/dist/{SettlementTransactions-3alZwucT.js → SettlementTransactions-CRFD0bFO.js} +3 -3
  9. package/dist/{SettlementTransactions-DugNdpd2.js → SettlementTransactions-DgOj_D8D.js} +3 -3
  10. package/dist/{Terminal-Dv7zS_te.js → Terminal-Ckx8vQ_3.js} +5 -5
  11. package/dist/TerminalSetting-DicoKPoS.js +572 -0
  12. package/dist/{Transaction-DCKhuoVw.js → Transaction-CF_sHrl6.js} +5 -5
  13. package/dist/{Transaction-CT8Be7FS.js → Transaction-Da1_AnWG.js} +7 -7
  14. package/dist/{TransactionOld-jkTy7Aeb.js → TransactionOld-6Nm8xhGh.js} +4 -4
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-B_By7BvK.js → TransactionTable.vue_vue_type_script_setup_true_lang-CaKdn0VN.js} +3 -3
  16. package/dist/{app-CiHNgoQY.js → app-C4_gin4V.js} +343 -343
  17. package/dist/app.js +1 -1
  18. package/dist/{assets-BqjaEXmB.js → assets-CkJwKbJo.js} +2 -2
  19. package/dist/{grafana-Bwx9Kj61.js → grafana-5rTce_2u.js} +1 -1
  20. package/dist/{index-CyMElhGL.js → index-B-dODLCP.js} +2 -2
  21. package/dist/{index-CZrwq9oF.js → index-B2K92QTs.js} +1 -1
  22. package/dist/{index-BIDuwnm_.js → index-CjFw5eYb.js} +1 -1
  23. package/dist/{index-1q4ZbRix.js → index-D_ZQysnD.js} +3909 -3907
  24. package/dist/{index-CN50SqVG.js → index-REZAHMM0.js} +1 -1
  25. package/dist/{index-C3fxBVdz.js → index-pQqLjJzo.js} +1 -1
  26. package/dist/{index-CCIVpogO.js → index-yHpeK6eL.js} +1 -1
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-DT8A92zR.js → index.vue_vue_type_script_setup_true_lang-B-LNPiqR.js} +1 -1
  28. package/dist/package.json +2 -2
  29. package/dist/{payout-account-cg0CKkbk.js → payout-account-DYhD0NF_.js} +3 -3
  30. package/dist/stores/payoutAccount.d.ts +2 -2
  31. package/dist/tsconfig.app.tsbuildinfo +1 -1
  32. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +2 -2
  33. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +6 -6
  34. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +6 -6
  35. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +2 -2
  36. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +2 -2
  37. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +6 -6
  38. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  39. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +2 -0
  40. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +4 -4
  41. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +4 -4
  42. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +4 -4
  43. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +4 -4
  44. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +4 -4
  45. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +4 -4
  46. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +4 -4
  47. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +4 -4
  48. package/package.json +2 -2
  49. package/dist/TerminalSetting-ChM9jB-O.js +0 -572
@@ -1,44 +1,44 @@
1
- import { defineComponent as T, ref as b, resolveComponent as s, openBlock as V, createBlock as x, withCtx as D, createVNode as o, unref as l, createElementVNode as R, createCommentVNode as U, computed as q, onMounted as $, createElementBlock as O, Fragment as Y, resolveDynamicComponent as B, normalizeProps as K, mergeProps as P, isRef as L } from "vue";
2
- import { g as A, b as M, u as N, e as k } from "./index-1q4ZbRix.js";
3
- import { _ as j } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
4
- import { useRouter as z } from "vue-router";
5
- import { u as H } from "./index-C3fxBVdz.js";
1
+ import { defineComponent as D, ref as x, resolveComponent as s, openBlock as F, createBlock as w, withCtx as k, createVNode as o, unref as a, createElementVNode as G, createCommentVNode as S, computed as q, onMounted as $, createElementBlock as O, Fragment as j, isRef as B, resolveDynamicComponent as K, normalizeProps as P, mergeProps as E } from "vue";
2
+ import { g as R, b as A, u as N, e as C } from "./index-D_ZQysnD.js";
3
+ import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
4
+ import { useRouter as H } from "vue-router";
5
+ import { u as Y } from "./index-pQqLjJzo.js";
6
6
  import { z as p, a as f } from "./validator-D5jtpt9A.js";
7
- import { useCoreStore as E } from "@feedmepos/mf-common";
7
+ import { useCoreStore as L } 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 h } from "./index-CCIVpogO.js";
11
- const G = {
10
+ import { r as h } from "./index-yHpeK6eL.js";
11
+ const T = {
12
12
  async get(n) {
13
- return A(
14
- await M().get(
13
+ return R(
14
+ await A().get(
15
15
  `restaurants/${n}/payment-gateway`
16
16
  )
17
17
  );
18
18
  },
19
- async upsert(n, d) {
20
- return A(
21
- await M().post(
19
+ async upsert(n, m) {
20
+ return R(
21
+ await A().post(
22
22
  `restaurants/${n}/payment-gateway`,
23
- { data: d }
23
+ { data: m }
24
24
  )
25
25
  );
26
26
  },
27
- async delete(n, d) {
28
- return A(
29
- await M().delete(
30
- `restaurants/${n}/payment-gateway/${d}`
27
+ async delete(n, m) {
28
+ return R(
29
+ await A().delete(
30
+ `restaurants/${n}/payment-gateway/${m}`
31
31
  )
32
32
  );
33
33
  },
34
34
  async grabSync(n) {
35
- return A(
36
- await M().post(
35
+ return R(
36
+ await A().post(
37
37
  `restaurants/${n}/payment-gateway/grab/sync`
38
38
  )
39
39
  );
40
40
  }
41
- }, J = { class: "flex mt-6 space-x-6" }, W = /* @__PURE__ */ T({
41
+ }, J = { class: "flex mt-6 space-x-6" }, W = /* @__PURE__ */ D({
42
42
  __name: "FiuuGateway",
43
43
  props: {
44
44
  onUpdate: {
@@ -56,7 +56,7 @@ const G = {
56
56
  },
57
57
  setup(n) {
58
58
  var g, c;
59
- const d = n, r = b(((g = d.gateway) == null ? void 0 : g.active) ?? !1), t = b(((c = d.gateway) == null ? void 0 : c.config) || {
59
+ const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((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 (m, e) => {
68
- const i = s("FmTextField"), w = s("FmSwitch"), v = s("FmButton"), y = s("FmForm");
69
- return V(), x(y, {
67
+ return (d, e) => {
68
+ const i = s("FmTextField"), V = s("FmSwitch"), y = s("FmButton"), v = s("FmForm");
69
+ return F(), w(v, {
70
70
  ref: "form",
71
71
  class: "flex flex-col gap-16",
72
72
  onValidationSuccess: e[7] || (e[7] = () => n.onUpdate(r.value, t.value))
73
73
  }, {
74
- default: D(() => [
74
+ default: k(() => [
75
75
  o(i, {
76
76
  modelValue: t.value.merchantId,
77
- "onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.merchantId = a),
77
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
78
78
  label: "Merchant ID",
79
- rules: l(p)(l(f).string())
79
+ rules: a(p)(a(f).string())
80
80
  }, null, 8, ["modelValue", "rules"]),
81
81
  o(i, {
82
82
  modelValue: t.value.uniqueId,
83
- "onUpdate:modelValue": e[1] || (e[1] = (a) => t.value.uniqueId = a),
83
+ "onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.uniqueId = l),
84
84
  label: "Unique ID",
85
- rules: l(p)(l(f).string())
85
+ rules: a(p)(a(f).string())
86
86
  }, null, 8, ["modelValue", "rules"]),
87
87
  o(i, {
88
88
  modelValue: t.value.verifyKey,
89
- "onUpdate:modelValue": e[2] || (e[2] = (a) => t.value.verifyKey = a),
89
+ "onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.verifyKey = l),
90
90
  label: "Verify Key",
91
- rules: l(p)(l(f).string())
91
+ rules: a(p)(a(f).string())
92
92
  }, null, 8, ["modelValue", "rules"]),
93
93
  o(i, {
94
94
  modelValue: t.value.secretKey,
95
- "onUpdate:modelValue": e[3] || (e[3] = (a) => t.value.secretKey = a),
95
+ "onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.secretKey = l),
96
96
  label: "Secret Key",
97
- rules: l(p)(l(f).string())
97
+ rules: a(p)(a(f).string())
98
98
  }, null, 8, ["modelValue", "rules"]),
99
99
  o(i, {
100
100
  modelValue: t.value.applicationCode,
101
- "onUpdate:modelValue": e[4] || (e[4] = (a) => t.value.applicationCode = a),
101
+ "onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.applicationCode = l),
102
102
  label: "Application Code ( Offline )",
103
- rules: l(p)(l(f).string())
103
+ rules: a(p)(a(f).string())
104
104
  }, null, 8, ["modelValue", "rules"]),
105
105
  o(i, {
106
106
  modelValue: t.value.offlineSecret,
107
- "onUpdate:modelValue": e[5] || (e[5] = (a) => t.value.offlineSecret = a),
107
+ "onUpdate:modelValue": e[5] || (e[5] = (l) => t.value.offlineSecret = l),
108
108
  label: "Offline Secret ( Offline )",
109
- rules: l(p)(l(f).string())
109
+ rules: a(p)(a(f).string())
110
110
  }, null, 8, ["modelValue", "rules"]),
111
- o(w, {
111
+ o(V, {
112
112
  modelValue: r.value,
113
- "onUpdate:modelValue": e[6] || (e[6] = (a) => r.value = a),
113
+ "onUpdate:modelValue": e[6] || (e[6] = (l) => r.value = l),
114
114
  label: "Is Active"
115
115
  }, null, 8, ["modelValue"]),
116
- R("div", J, [
117
- n.gateway ? (V(), x(v, {
116
+ G("div", J, [
117
+ n.gateway ? (F(), w(y, {
118
118
  key: 0,
119
119
  class: "flex-1",
120
120
  variant: "secondary",
121
121
  label: "Delete",
122
122
  onclick: () => n.onDelete(n.gateway)
123
- }, null, 8, ["onclick"])) : U("", !0),
124
- o(v, {
123
+ }, null, 8, ["onclick"])) : S("", !0),
124
+ o(y, {
125
125
  type: "submit",
126
126
  class: "flex-1",
127
127
  variant: "primary",
@@ -133,7 +133,7 @@ const G = {
133
133
  }, 512);
134
134
  };
135
135
  }
136
- }), X = { class: "flex mt-6 space-x-6" }, ee = /* @__PURE__ */ T({
136
+ }), X = { class: "flex mt-6 space-x-6" }, ee = /* @__PURE__ */ D({
137
137
  __name: "RevenueMonsterGateway",
138
138
  props: {
139
139
  onUpdate: {
@@ -151,57 +151,57 @@ const G = {
151
151
  },
152
152
  setup(n) {
153
153
  var g, c;
154
- const d = n, r = b(((g = d.gateway) == null ? void 0 : g.active) ?? !1), t = b(((c = d.gateway) == null ? void 0 : c.config) || {
154
+ const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((c = m.gateway) == null ? void 0 : c.config) || {
155
155
  storeId: "",
156
156
  clientId: "",
157
157
  clientSecret: "",
158
158
  clientPrivateKey: ""
159
159
  });
160
- return (m, e) => {
161
- const i = s("FmTextField"), w = s("FmTextarea"), v = s("FmSwitch"), y = s("FmButton"), a = s("FmForm");
162
- return V(), x(a, {
160
+ return (d, e) => {
161
+ const i = s("FmTextField"), V = s("FmTextarea"), y = s("FmSwitch"), v = s("FmButton"), l = s("FmForm");
162
+ return F(), w(l, {
163
163
  ref: "form",
164
164
  class: "flex flex-col gap-16",
165
165
  onValidationSuccess: e[5] || (e[5] = () => n.onUpdate(r.value, t.value))
166
166
  }, {
167
- default: D(() => [
167
+ default: k(() => [
168
168
  o(i, {
169
169
  modelValue: t.value.storeId,
170
170
  "onUpdate:modelValue": e[0] || (e[0] = (u) => t.value.storeId = u),
171
171
  label: "Store ID",
172
- rules: l(p)(l(f).string())
172
+ rules: a(p)(a(f).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] = (u) => t.value.clientId = u),
177
177
  label: "Client ID",
178
- rules: l(p)(l(f).string())
178
+ rules: a(p)(a(f).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] = (u) => t.value.clientSecret = u),
183
183
  label: "Client Secret",
184
- rules: l(p)(l(f).string())
184
+ rules: a(p)(a(f).string())
185
185
  }, null, 8, ["modelValue", "rules"]),
186
- o(w, {
186
+ o(V, {
187
187
  modelValue: t.value.clientPrivateKey,
188
188
  "onUpdate:modelValue": e[3] || (e[3] = (u) => t.value.clientPrivateKey = u),
189
189
  label: "Client Private Key"
190
190
  }, null, 8, ["modelValue"]),
191
- o(v, {
191
+ o(y, {
192
192
  modelValue: r.value,
193
193
  "onUpdate:modelValue": e[4] || (e[4] = (u) => r.value = u),
194
194
  label: "Is Active"
195
195
  }, null, 8, ["modelValue"]),
196
- R("div", X, [
197
- n.gateway ? (V(), x(y, {
196
+ G("div", X, [
197
+ n.gateway ? (F(), w(v, {
198
198
  key: 0,
199
199
  class: "flex-1",
200
200
  variant: "secondary",
201
201
  label: "Delete",
202
202
  onclick: () => n.onDelete(n.gateway)
203
- }, null, 8, ["onclick"])) : U("", !0),
204
- o(y, {
203
+ }, null, 8, ["onclick"])) : S("", !0),
204
+ o(v, {
205
205
  type: "submit",
206
206
  class: "flex-1",
207
207
  variant: "primary",
@@ -213,7 +213,7 @@ const G = {
213
213
  }, 512);
214
214
  };
215
215
  }
216
- }), te = { class: "flex mt-6 space-x-6" }, ae = /* @__PURE__ */ T({
216
+ }), te = { class: "flex mt-6 space-x-6" }, ae = /* @__PURE__ */ D({
217
217
  __name: "GhlGateway",
218
218
  props: {
219
219
  onUpdate: {
@@ -231,52 +231,52 @@ const G = {
231
231
  },
232
232
  setup(n) {
233
233
  var g, c;
234
- const d = n, r = b(((g = d.gateway) == null ? void 0 : g.active) ?? !1), t = b(((c = d.gateway) == null ? void 0 : c.config) || {
234
+ const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((c = m.gateway) == null ? void 0 : c.config) || {
235
235
  merchantId: "",
236
236
  terminalId: "",
237
237
  privateKey: ""
238
238
  });
239
- return (m, e) => {
240
- const i = s("FmTextField"), w = s("FmTextarea"), v = s("FmSwitch"), y = s("FmButton"), a = s("FmForm");
241
- return V(), x(a, {
239
+ return (d, e) => {
240
+ const i = s("FmTextField"), V = s("FmTextarea"), y = s("FmSwitch"), v = s("FmButton"), l = s("FmForm");
241
+ return F(), w(l, {
242
242
  ref: "form",
243
243
  class: "flex flex-col gap-16",
244
244
  onValidationSuccess: e[4] || (e[4] = () => n.onUpdate(r.value, t.value))
245
245
  }, {
246
- default: D(() => [
246
+ default: k(() => [
247
247
  o(i, {
248
248
  modelValue: t.value.merchantId,
249
249
  "onUpdate:modelValue": e[0] || (e[0] = (u) => t.value.merchantId = u),
250
250
  label: "Merchant ID",
251
- rules: l(p)(l(f).string())
251
+ rules: a(p)(a(f).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] = (u) => t.value.terminalId = u),
256
256
  label: "Terminal ID",
257
- rules: l(p)(l(f).string())
257
+ rules: a(p)(a(f).string())
258
258
  }, null, 8, ["modelValue", "rules"]),
259
- o(w, {
259
+ o(V, {
260
260
  id: "ghl_pkey",
261
261
  modelValue: t.value.privateKey,
262
262
  "onUpdate:modelValue": e[2] || (e[2] = (u) => t.value.privateKey = u),
263
263
  label: "Private Key",
264
- rules: l(p)(l(f).string())
264
+ rules: a(p)(a(f).string())
265
265
  }, null, 8, ["modelValue", "rules"]),
266
- o(v, {
266
+ o(y, {
267
267
  modelValue: r.value,
268
268
  "onUpdate:modelValue": e[3] || (e[3] = (u) => r.value = u),
269
269
  label: "Is Active"
270
270
  }, null, 8, ["modelValue"]),
271
- R("div", te, [
272
- n.gateway ? (V(), x(y, {
271
+ G("div", te, [
272
+ n.gateway ? (F(), w(v, {
273
273
  key: 0,
274
274
  class: "flex-1",
275
275
  variant: "secondary",
276
276
  label: "Delete",
277
277
  onclick: () => n.onDelete(n.gateway)
278
- }, null, 8, ["onclick"])) : U("", !0),
279
- o(y, {
278
+ }, null, 8, ["onclick"])) : S("", !0),
279
+ o(v, {
280
280
  type: "submit",
281
281
  class: "flex-1",
282
282
  variant: "primary",
@@ -288,7 +288,7 @@ const G = {
288
288
  }, 512);
289
289
  };
290
290
  }
291
- }), le = { class: "flex mt-6 space-x-6" }, ne = /* @__PURE__ */ T({
291
+ }), le = { class: "flex mt-6 space-x-6" }, ne = /* @__PURE__ */ D({
292
292
  __name: "MacauPassGateway",
293
293
  props: {
294
294
  onUpdate: {
@@ -306,65 +306,65 @@ const G = {
306
306
  },
307
307
  setup(n) {
308
308
  var g, c;
309
- const d = n, r = b(((g = d.gateway) == null ? void 0 : g.active) ?? !1), t = b(((c = d.gateway) == null ? void 0 : c.config) || {
309
+ const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((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 (m, e) => {
317
- const i = s("FmTextField"), w = s("FmSwitch"), v = s("FmButton"), y = s("FmForm");
318
- return V(), x(y, {
316
+ return (d, e) => {
317
+ const i = s("FmTextField"), V = s("FmSwitch"), y = s("FmButton"), v = s("FmForm");
318
+ return F(), w(v, {
319
319
  ref: "form",
320
320
  class: "flex flex-col gap-16",
321
321
  onValidationSuccess: e[6] || (e[6] = () => n.onUpdate(r.value, t.value))
322
322
  }, {
323
- default: D(() => [
323
+ default: k(() => [
324
324
  o(i, {
325
325
  modelValue: t.value.merchantId,
326
- "onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.merchantId = a),
326
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
327
327
  label: "Merchant ID",
328
- rules: l(p)(l(f).string())
328
+ rules: a(p)(a(f).string())
329
329
  }, null, 8, ["modelValue", "rules"]),
330
330
  o(i, {
331
331
  modelValue: t.value.merchantName,
332
- "onUpdate:modelValue": e[1] || (e[1] = (a) => t.value.merchantName = a),
332
+ "onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.merchantName = l),
333
333
  label: "Merchant Name",
334
- rules: l(p)(l(f).string())
334
+ rules: a(p)(a(f).string())
335
335
  }, null, 8, ["modelValue", "rules"]),
336
336
  o(i, {
337
337
  modelValue: t.value.merchantCategoryCode,
338
- "onUpdate:modelValue": e[2] || (e[2] = (a) => t.value.merchantCategoryCode = a),
338
+ "onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.merchantCategoryCode = l),
339
339
  label: "Merchant MCC",
340
- rules: l(p)(l(f).string())
340
+ rules: a(p)(a(f).string())
341
341
  }, null, 8, ["modelValue", "rules"]),
342
342
  o(i, {
343
343
  modelValue: t.value.storeID,
344
- "onUpdate:modelValue": e[3] || (e[3] = (a) => t.value.storeID = a),
344
+ "onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.storeID = l),
345
345
  label: "Store ID",
346
- rules: l(p)(l(f).string())
346
+ rules: a(p)(a(f).string())
347
347
  }, null, 8, ["modelValue", "rules"]),
348
348
  o(i, {
349
349
  modelValue: t.value.storeName,
350
- "onUpdate:modelValue": e[4] || (e[4] = (a) => t.value.storeName = a),
350
+ "onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.storeName = l),
351
351
  label: "Store Name",
352
- rules: l(p)(l(f).string())
352
+ rules: a(p)(a(f).string())
353
353
  }, null, 8, ["modelValue", "rules"]),
354
- o(w, {
354
+ o(V, {
355
355
  modelValue: r.value,
356
- "onUpdate:modelValue": e[5] || (e[5] = (a) => r.value = a),
356
+ "onUpdate:modelValue": e[5] || (e[5] = (l) => r.value = l),
357
357
  label: "Is Active"
358
358
  }, null, 8, ["modelValue"]),
359
- R("div", le, [
360
- n.gateway ? (V(), x(v, {
359
+ G("div", le, [
360
+ n.gateway ? (F(), w(y, {
361
361
  key: 0,
362
362
  class: "flex-1",
363
363
  variant: "secondary",
364
364
  label: "Delete",
365
365
  onclick: () => n.onDelete(n.gateway)
366
- }, null, 8, ["onclick"])) : U("", !0),
367
- o(v, {
366
+ }, null, 8, ["onclick"])) : S("", !0),
367
+ o(y, {
368
368
  type: "submit",
369
369
  class: "flex-1",
370
370
  variant: "primary",
@@ -376,10 +376,7 @@ const G = {
376
376
  }, 512);
377
377
  };
378
378
  }
379
- }), oe = {
380
- class: "flex items-end",
381
- '"': ""
382
- }, ue = { class: "flex mt-6 space-x-6" }, re = /* @__PURE__ */ T({
379
+ }), oe = { class: "flex items-end" }, ue = { class: "flex mt-6 space-x-6" }, re = /* @__PURE__ */ D({
383
380
  __name: "GrabGateway",
384
381
  props: {
385
382
  onUpdate: {
@@ -396,75 +393,75 @@ const G = {
396
393
  }
397
394
  },
398
395
  setup(n) {
399
- var w, v;
400
- const d = Z(), { isLoading: r, startAsyncCall: t } = N(), g = E(), c = n, m = b(((w = c.gateway) == null ? void 0 : w.active) ?? !1), e = b(((v = c.gateway) == null ? void 0 : v.config) || {
396
+ var V, y;
397
+ const m = Z(), { isLoading: r, startAsyncCall: t } = N(), g = L(), c = n, d = x(((V = c.gateway) == null ? void 0 : V.active) ?? !1), e = x(((y = c.gateway) == null ? void 0 : y.config) || {
401
398
  merchantId: ""
402
399
  });
403
400
  async function i() {
404
401
  t(async () => {
405
- var y;
402
+ var v;
406
403
  try {
407
- const { merchantID: a } = await G.grabSync(((y = g.currentRestaurant.value) == null ? void 0 : y._id) ?? "");
408
- e.value.merchantId = a, m.value = !0, d.open({
404
+ const { merchantID: l } = await T.grabSync(((v = g.currentRestaurant.value) == null ? void 0 : v._id) ?? "");
405
+ e.value.merchantId = l, d.value = !0, m.open({
409
406
  type: "success",
410
407
  title: "Grab Setting sync succesfully, you will still need to save the changes."
411
408
  });
412
- } catch (a) {
413
- d.open({
409
+ } catch (l) {
410
+ m.open({
414
411
  type: "error",
415
412
  title: "Error occurs when sync ordering settings",
416
- message: Q(a)
413
+ message: Q(l)
417
414
  });
418
415
  }
419
416
  });
420
417
  }
421
- return (y, a) => {
422
- const u = s("FmTextField"), F = s("FmButton"), S = s("FmTooltip"), _ = s("FmSwitch"), I = s("FmForm");
423
- return V(), x(I, {
418
+ return (v, l) => {
419
+ const u = s("FmTextField"), b = s("FmButton"), I = s("FmTooltip"), U = s("FmSwitch"), _ = s("FmForm");
420
+ return F(), w(_, {
424
421
  ref: "form",
425
422
  class: "flex flex-col gap-16",
426
- onValidationSuccess: a[2] || (a[2] = () => n.onUpdate(m.value, e.value))
423
+ onValidationSuccess: l[2] || (l[2] = () => n.onUpdate(d.value, e.value))
427
424
  }, {
428
- default: D(() => [
429
- R("div", oe, [
425
+ default: k(() => [
426
+ G("div", oe, [
430
427
  o(u, {
431
428
  modelValue: e.value.merchantId,
432
- "onUpdate:modelValue": a[0] || (a[0] = (C) => e.value.merchantId = C),
429
+ "onUpdate:modelValue": l[0] || (l[0] = (M) => e.value.merchantId = M),
433
430
  label: "Merchant ID",
434
- rules: l(p)(l(f).string())
431
+ rules: a(p)(a(f).string())
435
432
  }, null, 8, ["modelValue", "rules"]),
436
- o(S, {
433
+ o(I, {
437
434
  variant: "plain",
438
435
  placement: "right",
439
436
  content: "Sync from Ordering Settings"
440
437
  }, {
441
- default: D(() => [
442
- o(F, {
438
+ default: k(() => [
439
+ o(b, {
443
440
  class: "ml-2",
444
441
  type: "button",
445
442
  variant: "primary",
446
443
  icon: "sync",
447
- loading: l(r),
444
+ loading: a(r),
448
445
  onclick: () => i()
449
446
  }, null, 8, ["loading", "onclick"])
450
447
  ]),
451
448
  _: 1
452
449
  })
453
450
  ]),
454
- o(_, {
455
- modelValue: m.value,
456
- "onUpdate:modelValue": a[1] || (a[1] = (C) => m.value = C),
451
+ o(U, {
452
+ modelValue: d.value,
453
+ "onUpdate:modelValue": l[1] || (l[1] = (M) => d.value = M),
457
454
  label: "Is Active"
458
455
  }, null, 8, ["modelValue"]),
459
- R("div", ue, [
460
- n.gateway ? (V(), x(F, {
456
+ G("div", ue, [
457
+ n.gateway ? (F(), w(b, {
461
458
  key: 0,
462
459
  class: "flex-1",
463
460
  variant: "secondary",
464
461
  label: "Delete",
465
462
  onclick: () => n.onDelete(n.gateway)
466
- }, null, 8, ["onclick"])) : U("", !0),
467
- o(F, {
463
+ }, null, 8, ["onclick"])) : S("", !0),
464
+ o(b, {
468
465
  type: "submit",
469
466
  class: "flex-1",
470
467
  variant: "primary",
@@ -479,7 +476,7 @@ const G = {
479
476
  }), se = {
480
477
  key: 0,
481
478
  class: "flex items-center justify-center min-h-[80vh]"
482
- }, ie = /* @__PURE__ */ T({
479
+ }, ie = /* @__PURE__ */ D({
483
480
  __name: "PaymentGateway",
484
481
  props: {
485
482
  restaurant: {
@@ -488,89 +485,89 @@ const G = {
488
485
  }
489
486
  },
490
487
  setup(n) {
491
- const d = [
488
+ const m = [
492
489
  {
493
490
  label: "Fiuu",
494
491
  value: "RAZER_MERCHANT_SERVICE",
495
492
  form: W,
496
- region: [k.F_COUNTRY.enum.MY, k.F_COUNTRY.enum.SG]
493
+ region: [C.F_COUNTRY.enum.MY, C.F_COUNTRY.enum.SG]
497
494
  },
498
495
  {
499
496
  label: "Revenue Monster",
500
497
  value: "REVENUE_MONSTER",
501
498
  form: ee,
502
- region: [k.F_COUNTRY.enum.MY]
499
+ region: [C.F_COUNTRY.enum.MY]
503
500
  },
504
501
  {
505
502
  label: "GHL",
506
503
  value: "E_GHL",
507
504
  form: ae,
508
- region: [k.F_COUNTRY.enum.MY]
505
+ region: [C.F_COUNTRY.enum.MY]
509
506
  },
510
507
  {
511
508
  label: "Grab",
512
509
  value: "GRAB",
513
510
  form: re,
514
- region: [k.F_COUNTRY.enum.MY]
511
+ region: [C.F_COUNTRY.enum.MY]
515
512
  },
516
513
  {
517
514
  label: "Macau Pass",
518
515
  value: "MACAU_PASS",
519
516
  form: ne,
520
- region: [k.F_COUNTRY.enum.MO]
517
+ region: [C.F_COUNTRY.enum.MO]
521
518
  }
522
- ], r = n, t = E(), { isLoading: g, startAsyncCall: c } = N(), m = b(), e = b([]);
523
- async function i(u, F) {
519
+ ], r = n, t = L(), { isLoading: g, startAsyncCall: c } = N(), { activeGateway: d } = Y({
520
+ activeGateway: ""
521
+ }), e = x([]);
522
+ async function i(u, b) {
524
523
  await c(async () => {
525
- var I;
526
- const S = {
524
+ const I = {
527
525
  _id: "",
528
526
  _rev: "",
529
- paymentGateway: m.value,
530
- config: F,
527
+ paymentGateway: d.value,
528
+ config: b,
531
529
  active: u
532
- }, _ = e.value.find((C) => C.paymentGateway === m.value);
533
- _ && (S._id = _._id, S._rev = _._rev), await G.upsert(r.restaurant._id, S), e.value = await G.get(r.restaurant._id), m.value = (I = e.value.find((C) => C.active)) == null ? void 0 : I.paymentGateway;
530
+ }, U = e.value.find((_) => _.paymentGateway === d.value);
531
+ U && (I._id = U._id, I._rev = U._rev), await T.upsert(r.restaurant._id, I), e.value = await T.get(r.restaurant._id);
534
532
  });
535
533
  }
536
- async function w(u) {
534
+ async function V(u) {
537
535
  c(async () => {
538
- var F;
539
- await G.delete(r.restaurant._id, u._id), e.value = await G.get(r.restaurant._id), m.value = (F = e.value.find((S) => S.active)) == null ? void 0 : F.paymentGateway;
536
+ await T.delete(r.restaurant._id, u._id), e.value = await T.get(r.restaurant._id);
540
537
  });
541
538
  }
542
- const v = q(() => d.filter((u) => u.region.includes(t.currentCountry.value ?? k.F_COUNTRY.enum.MY)));
543
- function y() {
539
+ const y = q(() => m.filter((u) => u.region.includes(t.currentCountry.value ?? C.F_COUNTRY.enum.MY)));
540
+ function v() {
544
541
  c(async () => {
545
- e.value = await G.get(r.restaurant._id), v.value.length > 0 && (m.value = v.value[0].value);
542
+ e.value = await T.get(r.restaurant._id), y.value.length > 0 && (d.value = y.value[0].value);
546
543
  });
547
544
  }
548
- $(y);
549
- const a = q(() => {
545
+ $(v);
546
+ const l = q(() => {
550
547
  var u;
551
- return (u = d.find((F) => F.value === m.value)) == null ? void 0 : u.form;
548
+ return (u = m.find((b) => b.value === d.value)) == null ? void 0 : u.form;
552
549
  });
553
- return (u, F) => {
554
- const S = s("FmCircularProgress"), _ = s("FmTabs");
555
- return V(), O(Y, null, [
556
- l(g) ? (V(), O("div", se, [
557
- o(S, { size: "xxl" })
558
- ])) : U("", !0),
559
- o(_, {
550
+ return (u, b) => {
551
+ const I = s("FmCircularProgress"), U = s("FmTabs");
552
+ return F(), O(j, null, [
553
+ a(g) ? (F(), O("div", se, [
554
+ o(I, { size: "xxl" })
555
+ ])) : S("", !0),
556
+ o(U, {
560
557
  class: "mb-6",
561
- "model-value": m.value,
562
- "onUpdate:modelValue": F[0] || (F[0] = (I) => m.value = I),
563
- items: v.value
558
+ "model-value": a(d),
559
+ "onUpdate:modelValue": b[0] || (b[0] = (_) => B(d) ? d.value = _ : null),
560
+ items: y.value
564
561
  }, null, 8, ["model-value", "items"]),
565
- m.value ? (V(), x(B(a.value), K(P({ key: 1 }, {
566
- gateway: e.value.find((I) => I.paymentGateway === m.value),
567
- onDelete: w,
562
+ a(d) ? (F(), w(K(l.value), P(E({ key: 1 }, {
563
+ gateway: e.value.find((_) => _.paymentGateway === a(d)),
564
+ onDelete: V,
568
565
  onUpdate: i
569
- })), null, 16)) : U("", !0)
566
+ })), null, 16)) : S("", !0)
570
567
  ], 64);
571
568
  };
572
569
  }
573
- }), we = /* @__PURE__ */ T({
570
+ }), we = /* @__PURE__ */ D({
574
571
  __name: "RestaurantSetting",
575
572
  props: {
576
573
  restaurantId: {
@@ -579,9 +576,9 @@ const G = {
579
576
  }
580
577
  },
581
578
  setup(n) {
582
- const d = n, { tab: r } = H({
579
+ const m = n, { tab: r } = Y({
583
580
  tab: "payment-gateway"
584
- }), { isLoading: t, startAsyncCall: g } = N(!0), c = z(), m = b(), e = [
581
+ }), { isLoading: t, startAsyncCall: g } = N(!0), c = H(), d = x(), e = [
585
582
  {
586
583
  label: "Payment Gateway",
587
584
  value: "payment-gateway",
@@ -591,32 +588,32 @@ const G = {
591
588
  ];
592
589
  function i() {
593
590
  g(async () => {
594
- m.value = await h.readRestaurantById(d.restaurantId);
591
+ d.value = await h.readRestaurantById(m.restaurantId);
595
592
  });
596
593
  }
597
594
  $(i);
598
- const w = q(() => {
599
- var v;
600
- return (v = e.find((y) => y.value === r.value)) == null ? void 0 : v.render;
595
+ const V = q(() => {
596
+ var y;
597
+ return (y = e.find((v) => v.value === r.value)) == null ? void 0 : y.render;
601
598
  });
602
- return (v, y) => {
599
+ return (y, v) => {
603
600
  var u;
604
- const a = s("FmTabs");
605
- return V(), x(j, {
606
- title: `Restaurant (${(u = m.value) == null ? void 0 : u._id})`,
607
- loading: l(t),
608
- onBack: l(c).back
601
+ const l = s("FmTabs");
602
+ return F(), w(z, {
603
+ title: `Restaurant (${(u = d.value) == null ? void 0 : u._id})`,
604
+ loading: a(t),
605
+ onBack: a(c).back
609
606
  }, {
610
- default: D(() => [
611
- o(a, {
612
- "model-value": l(r),
613
- "onUpdate:modelValue": y[0] || (y[0] = (F) => L(r) ? r.value = F : null),
607
+ default: k(() => [
608
+ o(l, {
609
+ "model-value": a(r),
610
+ "onUpdate:modelValue": v[0] || (v[0] = (b) => B(r) ? r.value = b : null),
614
611
  class: "mb-6",
615
612
  items: e
616
613
  }, null, 8, ["model-value"]),
617
- l(r) && m.value ? (V(), x(B(w.value), K(P({ key: 0 }, {
618
- restaurant: m.value
619
- })), null, 16)) : U("", !0)
614
+ a(r) && d.value ? (F(), w(K(V.value), P(E({ key: 0 }, {
615
+ restaurant: d.value
616
+ })), null, 16)) : S("", !0)
620
617
  ]),
621
618
  _: 1
622
619
  }, 8, ["title", "loading", "onBack"]);