@feedmepos/mf-payment 1.0.0-beta.9 → 1.0.1-beta.1

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 (43) hide show
  1. package/dist/{AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js → AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js} +8 -9
  2. package/dist/{PayoutAccount-_d3TfUSc.js → PayoutAccount-CyVXI1Sx.js} +5 -5
  3. package/dist/{PayoutAccount-DgN3EHTj.js → PayoutAccount-DGUnImHC.js} +4 -4
  4. package/dist/{PayoutAccountSetting-CmgVLhdp.js → PayoutAccountSetting-BbtOFbsd.js} +161 -183
  5. package/dist/Restaurant-ewsvVw3P.js +262 -0
  6. package/dist/RestaurantSetting-BboKM1iG.js +389 -0
  7. package/dist/{Settlement-B1-WmCwC.js → Settlement-DsJlFpCC.js} +4 -4
  8. package/dist/{Settlement-BSOQRlp1.js → Settlement-Hr7jN3EL.js} +4 -4
  9. package/dist/{SettlementTransactions-Cqd2raea.js → SettlementTransactions-BncoGGQ3.js} +10 -10
  10. package/dist/{SettlementTransactions-JTwD_Vuq.js → SettlementTransactions-Bz9ZVYfq.js} +41 -41
  11. package/dist/{Terminal-De69bTKY.js → Terminal-D-U0BVTe.js} +121 -108
  12. package/dist/{TerminalSetting-DlRHaEZh.js → TerminalSetting-JD3sbXOB.js} +3 -3
  13. package/dist/{TerminalTransaction-CZCsCpEp.js → TerminalTransaction-B5iY_F-3.js} +18 -18
  14. package/dist/{TerminalTransaction-C1egvX6I.js → TerminalTransaction-DHmD5x8e.js} +12 -12
  15. package/dist/{Transaction-B3ZWKg6Q.js → Transaction-BedQtv8p.js} +64 -64
  16. package/dist/{Transaction-B_0nUmpf.js → Transaction-DA_TB9zD.js} +11 -11
  17. package/dist/api/restaurant/index.d.ts +6 -0
  18. package/dist/{app-B-XC_fSK.js → app-CpyZU23J.js} +164 -147
  19. package/dist/app.js +1 -1
  20. package/dist/{assets-BCAivOTo.js → assets-8c19wXSV.js} +22 -21
  21. package/dist/components/PagingTable/FmTableSelection.vue.d.ts +13 -0
  22. package/dist/components/PagingTable/index.vue.d.ts +48 -0
  23. package/dist/{index-4meiCsRz.js → index-1fXAFo2E.js} +31211 -31211
  24. package/dist/index-BIXuzGa9.js +19 -0
  25. package/dist/{index-BFYq3eq8.js → index-Cb1zVhcH.js} +1 -1
  26. package/dist/{index-CbsnpMWl.js → index-DEpszFWF.js} +1 -1
  27. package/dist/{index-BwFHcZlm.js → index-DdJrUqkm.js} +1 -1
  28. package/dist/{index-CBa6eapm.js → index-DeU3Qyca.js} +1 -1
  29. package/dist/{index-CETCXB6X.js → index-DoAIw4wM.js} +1 -1
  30. package/dist/index-DsLFmVsY.js +28 -0
  31. package/dist/{index.vue_vue_type_script_setup_true_lang-CKOlikHb.js → index.vue_vue_type_script_setup_true_lang-GT2x04Bn.js} +64 -61
  32. package/dist/package.json +2 -2
  33. package/dist/{payout-account-CKhGpN_d.js → payout-account-BbheLTUt.js} +2 -2
  34. package/dist/{transaction-COjHU7aN.js → transaction-W49zE8RL.js} +3 -3
  35. package/dist/tsconfig.app.tsbuildinfo +1 -1
  36. package/dist/views/admin/restaurant/Restaurant.vue.d.ts +2 -0
  37. package/dist/views/admin/restaurant/RestaurantSetting.vue.d.ts +12 -0
  38. package/dist/views/admin/restaurant/cell/IsActive.vue.d.ts +7 -0
  39. package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +803 -0
  40. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +56 -0
  41. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +50 -0
  42. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +52 -0
  43. package/package.json +2 -2
@@ -1,15 +1,16 @@
1
- import { defineComponent as I, resolveComponent as m, openBlock as g, createElementBlock as R, Fragment as D, createElementVNode as s, createVNode as u, withCtx as x, createTextVNode as C, toDisplayString as P, createCommentVNode as U, createBlock as V, ref as k, watch as O, computed as K, unref as r, isRef as j, h as q, onMounted as Y, resolveDynamicComponent as z, normalizeProps as H, mergeProps as L } from "vue";
2
- import { p as N } from "./index-BFYq3eq8.js";
3
- import { g as B, b as E, u as Q, e as $ } from "./index-4meiCsRz.js";
4
- import { _ as Z } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
5
- import { useRouter as J } from "vue-router";
6
- import { u as W } from "./index-BwFHcZlm.js";
7
- import { P as M } from "./PDFViewer-xrBtzrlR.js";
8
- import { useSnackbar as X } from "@feedmepos/ui-library";
9
- import { u as h } from "./error-K1CakhA9.js";
1
+ import { defineComponent as I, resolveComponent as i, openBlock as F, createElementBlock as R, Fragment as N, createElementVNode as s, createVNode as u, withCtx as x, createTextVNode as C, toDisplayString as P, createCommentVNode as U, createBlock as V, ref as k, watch as q, computed as B, unref as r, isRef as M, h as E, onMounted as O, resolveDynamicComponent as j, normalizeProps as Y, mergeProps as z } from "vue";
2
+ import { p as $ } from "./index-Cb1zVhcH.js";
3
+ import { u as H, e as D } from "./index-1fXAFo2E.js";
4
+ import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
5
+ import { useRouter as W } from "vue-router";
6
+ import { u as L } from "./index-DdJrUqkm.js";
7
+ import { P as K } from "./PDFViewer-xrBtzrlR.js";
8
+ import { useSnackbar as Z } from "@feedmepos/ui-library";
9
+ import { u as J } from "./error-K1CakhA9.js";
10
+ import { p as _ } from "./index-DsLFmVsY.js";
10
11
  import { z as A, a as S } from "./validator-D5jtpt9A.js";
11
- import { useCoreStore as ee } from "@feedmepos/mf-common";
12
- const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
12
+ import { useCoreStore as X } from "@feedmepos/mf-common";
13
+ const h = { class: "flex gap-16 mb-6" }, ee = ["src"], te = /* @__PURE__ */ I({
13
14
  __name: "Information",
14
15
  props: {
15
16
  payoutAccount: {
@@ -18,10 +19,10 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
18
19
  }
19
20
  },
20
21
  setup(a) {
21
- return (i, e) => {
22
- const d = m("FmCardHeader"), c = m("FmCardSection"), t = m("FmCard");
23
- return g(), R(D, null, [
24
- s("div", te, [
22
+ return (m, e) => {
23
+ const d = i("FmCardHeader"), c = i("FmCardSection"), t = i("FmCard");
24
+ return F(), R(N, null, [
25
+ s("div", h, [
25
26
  u(t, {
26
27
  horizontal: "",
27
28
  class: "flex-1 p-6",
@@ -37,16 +38,16 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
37
38
  }),
38
39
  u(c, { class: "p-0" }, {
39
40
  default: x(() => {
40
- var l, v, y, o, n;
41
+ var n, v, y, o, l;
41
42
  return [
42
43
  e[0] || (e[0] = s("b", null, "For", -1)),
43
- C(": " + P((v = (l = a.payoutAccount) == null ? void 0 : l.store) == null ? void 0 : v.event) + " ", 1),
44
+ C(": " + P((v = (n = a.payoutAccount) == null ? void 0 : n.store) == null ? void 0 : v.event) + " ", 1),
44
45
  e[1] || (e[1] = s("br", null, null, -1)),
45
46
  e[2] || (e[2] = s("b", null, "Reference", -1)),
46
47
  C(": " + P((o = (y = a.payoutAccount) == null ? void 0 : y.store) == null ? void 0 : o.id), 1),
47
48
  e[3] || (e[3] = s("br", null, null, -1)),
48
49
  e[4] || (e[4] = s("b", null, "Business", -1)),
49
- C(": " + P((n = a.payoutAccount) == null ? void 0 : n.businessId), 1),
50
+ C(": " + P((l = a.payoutAccount) == null ? void 0 : l.businessId), 1),
50
51
  e[5] || (e[5] = s("br", null, null, -1))
51
52
  ];
52
53
  }),
@@ -73,13 +74,13 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
73
74
  }),
74
75
  u(c, { class: "p-0" }, {
75
76
  default: x(() => {
76
- var l, v, y, o, n, f, p, b;
77
+ var n, v, y, o, l, f, p, b;
77
78
  return [
78
79
  e[6] || (e[6] = s("b", null, "Email", -1)),
79
- C(": " + P((y = (v = (l = a.payoutAccount) == null ? void 0 : l.store) == null ? void 0 : v.keyPerson) == null ? void 0 : y.email) + " ", 1),
80
+ C(": " + P((y = (v = (n = a.payoutAccount) == null ? void 0 : n.store) == null ? void 0 : v.keyPerson) == null ? void 0 : y.email) + " ", 1),
80
81
  e[7] || (e[7] = s("br", null, null, -1)),
81
82
  e[8] || (e[8] = s("b", null, "Name", -1)),
82
- C(": " + P((f = (n = (o = a.payoutAccount) == null ? void 0 : o.store) == null ? void 0 : n.keyPerson) == null ? void 0 : f.name), 1),
83
+ C(": " + P((f = (l = (o = a.payoutAccount) == null ? void 0 : o.store) == null ? void 0 : l.keyPerson) == null ? void 0 : f.name), 1),
83
84
  e[9] || (e[9] = s("br", null, null, -1)),
84
85
  e[10] || (e[10] = s("b", null, "Phone", -1)),
85
86
  C(": " + P((b = (p = a.payoutAccount) == null ? void 0 : p.store.keyPerson) == null ? void 0 : b.phone), 1),
@@ -96,14 +97,14 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
96
97
  })
97
98
  ]),
98
99
  e[12] || (e[12] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Exterior Photo", -1)),
99
- a.payoutAccount.store.exteriorPhoto ? (g(), R("img", {
100
+ a.payoutAccount.store.exteriorPhoto ? (F(), R("img", {
100
101
  key: 0,
101
102
  src: a.payoutAccount.store.exteriorPhoto
102
- }, null, 8, ae)) : U("", !0)
103
+ }, null, 8, ee)) : U("", !0)
103
104
  ], 64);
104
105
  };
105
106
  }
106
- }), le = { class: "flex gap-16" }, oe = { class: "flex-1" }, ue = { class: "flex-1" }, re = /* @__PURE__ */ I({
107
+ }), ae = { class: "flex gap-16" }, le = { class: "flex-1" }, ne = { class: "flex-1" }, oe = /* @__PURE__ */ I({
107
108
  __name: "Settlement",
108
109
  props: {
109
110
  payoutAccount: {
@@ -112,9 +113,9 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
112
113
  }
113
114
  },
114
115
  setup(a) {
115
- return (i, e) => {
116
- const d = m("FmCardHeader"), c = m("FmCardSection"), t = m("FmCard");
117
- return g(), R(D, null, [
116
+ return (m, e) => {
117
+ const d = i("FmCardHeader"), c = i("FmCardSection"), t = i("FmCard");
118
+ return F(), R(N, null, [
118
119
  u(t, {
119
120
  horizontal: "",
120
121
  class: "flex-1 p-6 mx-6 mb-6",
@@ -130,16 +131,16 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
130
131
  }),
131
132
  u(c, { class: "p-0" }, {
132
133
  default: x(() => {
133
- var l, v, y, o, n, f;
134
+ var n, v, y, o, l, f;
134
135
  return [
135
136
  e[0] || (e[0] = s("b", null, "Bank", -1)),
136
- C(": " + P((v = (l = a.payoutAccount) == null ? void 0 : l.store.bank) == null ? void 0 : v.name), 1),
137
+ C(": " + P((v = (n = a.payoutAccount) == null ? void 0 : n.store.bank) == null ? void 0 : v.name), 1),
137
138
  e[1] || (e[1] = s("br", null, null, -1)),
138
139
  e[2] || (e[2] = s("b", null, "Name", -1)),
139
140
  C(": " + P((o = (y = a.payoutAccount) == null ? void 0 : y.store.bank) == null ? void 0 : o.holderName), 1),
140
141
  e[3] || (e[3] = s("br", null, null, -1)),
141
142
  e[4] || (e[4] = s("b", null, "Number", -1)),
142
- C(": " + P((f = (n = a.payoutAccount) == null ? void 0 : n.store.bank) == null ? void 0 : f.accountNumber), 1)
143
+ C(": " + P((f = (l = a.payoutAccount) == null ? void 0 : l.store.bank) == null ? void 0 : f.accountNumber), 1)
143
144
  ];
144
145
  }),
145
146
  _: 1
@@ -150,19 +151,19 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
150
151
  ]),
151
152
  _: 1
152
153
  }),
153
- s("div", le, [
154
- s("div", oe, [
154
+ s("div", ae, [
155
+ s("div", le, [
155
156
  e[5] || (e[5] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
156
- a.payoutAccount.store.ssm ? (g(), V(M, {
157
+ a.payoutAccount.store.ssm ? (F(), V(K, {
157
158
  key: 0,
158
159
  pdf: a.payoutAccount.store.ssm,
159
160
  "disable-text-layer": !0,
160
161
  "disable-annotation-layer": !0
161
162
  }, null, 8, ["pdf"])) : U("", !0)
162
163
  ]),
163
- s("div", ue, [
164
+ s("div", ne, [
164
165
  e[6] || (e[6] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
165
- a.payoutAccount.store.bankStatement ? (g(), V(M, {
166
+ a.payoutAccount.store.bankStatement ? (F(), V(K, {
166
167
  key: 0,
167
168
  pdf: a.payoutAccount.store.bankStatement,
168
169
  "disable-text-layer": !0,
@@ -173,22 +174,22 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
173
174
  ], 64);
174
175
  };
175
176
  }
176
- }), se = /* @__PURE__ */ I({
177
+ }), ue = /* @__PURE__ */ I({
177
178
  __name: "RateInput",
178
179
  props: {
179
180
  data: {},
180
181
  onChange: { type: Function }
181
182
  },
182
183
  setup(a) {
183
- const i = a, e = k(i.data.toString());
184
- return O(e, (d) => {
185
- i.onChange(parseFloat(d));
184
+ const m = a, e = k(m.data.toString());
185
+ return q(e, (d) => {
186
+ m.onChange(parseFloat(d));
186
187
  }), (d, c) => {
187
- const t = m("FmTextField");
188
- return g(), V(t, {
188
+ const t = i("FmTextField");
189
+ return F(), V(t, {
189
190
  inputmode: "decimal",
190
191
  modelValue: e.value,
191
- "onUpdate:modelValue": c[0] || (c[0] = (l) => e.value = l)
192
+ "onUpdate:modelValue": c[0] || (c[0] = (n) => e.value = n)
192
193
  }, {
193
194
  append: x(() => c[1] || (c[1] = [
194
195
  C("%")
@@ -197,26 +198,26 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
197
198
  }, 8, ["modelValue"]);
198
199
  };
199
200
  }
200
- }), ie = /* @__PURE__ */ I({
201
+ }), re = /* @__PURE__ */ I({
201
202
  __name: "TPlusInput",
202
203
  props: {
203
204
  data: {},
204
205
  onChange: { type: Function }
205
206
  },
206
207
  setup(a) {
207
- const i = a, e = k(i.data.toString());
208
- return O(e, (d) => {
209
- i.onChange(parseInt(d));
208
+ const m = a, e = k(m.data.toString());
209
+ return q(e, (d) => {
210
+ m.onChange(parseInt(d));
210
211
  }), (d, c) => {
211
- const t = m("FmTextField");
212
- return g(), V(t, {
212
+ const t = i("FmTextField");
213
+ return F(), V(t, {
213
214
  inputmode: "numeric",
214
215
  modelValue: e.value,
215
- "onUpdate:modelValue": c[0] || (c[0] = (l) => e.value = l)
216
+ "onUpdate:modelValue": c[0] || (c[0] = (n) => e.value = n)
216
217
  }, null, 8, ["modelValue"]);
217
218
  };
218
219
  }
219
- }), me = { class: "flex gap-16 mt-6" }, de = { class: "flex-1" }, ce = { class: "flex-1" }, pe = { class: "my-6 w-full flex justify-end" }, ye = { class: "w-[320px]" }, fe = /* @__PURE__ */ I({
220
+ }), se = { class: "flex gap-16 mt-6" }, ie = { class: "flex-1" }, me = { class: "flex-1" }, de = { class: "my-6 w-full flex justify-end" }, ce = { class: "w-[320px]" }, pe = /* @__PURE__ */ I({
220
221
  __name: "PaymentStatus",
221
222
  props: {
222
223
  onUpdate: {
@@ -229,26 +230,26 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
229
230
  }
230
231
  },
231
232
  setup(a) {
232
- const i = a, e = k(!1), d = X(), c = async (o) => {
233
+ const m = a, e = k(!1), d = Z(), c = async (o) => {
233
234
  try {
234
- e.value = !0, await i.onUpdate(o), d.open({
235
+ e.value = !0, await m.onUpdate(o), d.open({
235
236
  type: "success",
236
237
  title: "Payout account update succesfully"
237
238
  });
238
- } catch (n) {
239
+ } catch (l) {
239
240
  d.open({
240
241
  type: "error",
241
242
  title: "Error occurs when updating payout account",
242
- message: h(n)
243
+ message: J(l)
243
244
  });
244
245
  } finally {
245
246
  e.value = !1;
246
247
  }
247
- }, { search: t } = W({
248
+ }, { search: t } = L({
248
249
  search: ""
249
- }), l = K(() => {
250
- const { ssm: o, bank: n, bankStatement: f } = i.payoutAccount.store;
251
- return o && n && n.name && n.accountNumber && n.holderName && f;
250
+ }), n = B(() => {
251
+ const { ssm: o, bank: l, bankStatement: f } = m.payoutAccount.store;
252
+ return o && l && l.name && l.accountNumber && l.holderName && f;
252
253
  }), v = k(""), y = [
253
254
  {
254
255
  header: () => "Payment Method",
@@ -259,11 +260,11 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
259
260
  header: () => "Rate",
260
261
  accessorKey: "rate",
261
262
  cell: ({ row: o }) => {
262
- let n = 0;
263
- return o.original.rate && (n = o.original.rate.amount / Math.pow(10, o.original.rate.precision)), q(se, {
264
- data: n,
263
+ let l = 0;
264
+ return o.original.rate && (l = o.original.rate.amount / Math.pow(10, o.original.rate.precision)), E(ue, {
265
+ data: l,
265
266
  onChange: (f) => {
266
- const p = i.payoutAccount.methods.at(o.index);
267
+ const p = m.payoutAccount.methods.at(o.index);
267
268
  p.rate || (p.rate = {
268
269
  amount: 0,
269
270
  precision: 4
@@ -275,23 +276,23 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
275
276
  {
276
277
  header: () => "T plus",
277
278
  accessorKey: "tPlus",
278
- cell: ({ row: o }) => q(ie, {
279
+ cell: ({ row: o }) => E(re, {
279
280
  data: o.original.tPlus ?? 0,
280
- onChange: (n) => {
281
- const f = i.payoutAccount.methods.at(o.index);
282
- f.tPlus = n;
281
+ onChange: (l) => {
282
+ const f = m.payoutAccount.methods.at(o.index);
283
+ f.tPlus = l;
283
284
  }
284
285
  })
285
286
  }
286
287
  ];
287
- return (o, n) => {
288
- const f = m("FmRadio"), p = m("FmRadioGroup"), b = m("FmSwitch"), w = m("FmSearch"), T = m("FmTable"), F = m("FmButton");
289
- return g(), R(D, null, [
290
- s("div", me, [
291
- s("div", de, [
288
+ return (o, l) => {
289
+ const f = i("FmRadio"), p = i("FmRadioGroup"), b = i("FmSwitch"), w = i("FmSearch"), T = i("FmTable"), g = i("FmButton");
290
+ return F(), R(N, null, [
291
+ s("div", se, [
292
+ s("div", ie, [
292
293
  u(p, {
293
294
  modelValue: a.payoutAccount.status,
294
- "onUpdate:modelValue": n[0] || (n[0] = (G) => a.payoutAccount.status = G),
295
+ "onUpdate:modelValue": l[0] || (l[0] = (G) => a.payoutAccount.status = G),
295
296
  label: "Account Status"
296
297
  }, {
297
298
  default: x(() => [
@@ -311,22 +312,22 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
311
312
  _: 1
312
313
  }, 8, ["modelValue"])
313
314
  ]),
314
- s("div", ce, [
315
+ s("div", me, [
315
316
  u(b, {
316
317
  modelValue: a.payoutAccount.enable,
317
- "onUpdate:modelValue": n[1] || (n[1] = (G) => a.payoutAccount.enable = G),
318
- disabled: !l.value,
318
+ "onUpdate:modelValue": l[1] || (l[1] = (G) => a.payoutAccount.enable = G),
319
+ disabled: !n.value,
319
320
  label: "Enabled",
320
321
  sublabel: "Merchant can use online features such as e-payment, settlement"
321
322
  }, null, 8, ["modelValue", "disabled"])
322
323
  ])
323
324
  ]),
324
- a.payoutAccount.enable ? (g(), R(D, { key: 0 }, [
325
- s("div", pe, [
326
- s("div", ye, [
325
+ a.payoutAccount.enable ? (F(), R(N, { key: 0 }, [
326
+ s("div", de, [
327
+ s("div", ce, [
327
328
  u(w, {
328
329
  modelValue: r(t),
329
- "onUpdate:modelValue": n[2] || (n[2] = (G) => j(t) ? t.value = G : null),
330
+ "onUpdate:modelValue": l[2] || (l[2] = (G) => M(t) ? t.value = G : null),
330
331
  placeholder: "Search Method ..."
331
332
  }, null, 8, ["modelValue"])
332
333
  ])
@@ -334,13 +335,13 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
334
335
  u(T, {
335
336
  class: "mt-6",
336
337
  modelValue: v.value,
337
- "onUpdate:modelValue": n[3] || (n[3] = (G) => v.value = G),
338
+ "onUpdate:modelValue": l[3] || (l[3] = (G) => v.value = G),
338
339
  "search-value": r(t),
339
340
  "row-data": a.payoutAccount.methods,
340
341
  "column-defs": y
341
342
  }, null, 8, ["modelValue", "search-value", "row-data"])
342
343
  ], 64)) : U("", !0),
343
- u(F, {
344
+ u(g, {
344
345
  class: "w-full mt-6",
345
346
  variant: "primary",
346
347
  label: "Save",
@@ -350,30 +351,7 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
350
351
  ], 64);
351
352
  };
352
353
  }
353
- }), _ = {
354
- async get(a) {
355
- return B(
356
- await E().get(
357
- `restaurants/${a}/payment-gateway`
358
- )
359
- );
360
- },
361
- async upsert(a, i) {
362
- return B(
363
- await E().post(
364
- `restaurants/${a}/payment-gateway`,
365
- { data: i }
366
- )
367
- );
368
- },
369
- async delete(a, i) {
370
- return B(
371
- await E().delete(
372
- `restaurants/${a}/payment-gateway/${i}`
373
- )
374
- );
375
- }
376
- }, ve = { class: "flex mt-6 space-x-6" }, be = /* @__PURE__ */ I({
354
+ }), ye = { class: "flex mt-6 space-x-6" }, fe = /* @__PURE__ */ I({
377
355
  __name: "FiuuGateway",
378
356
  props: {
379
357
  onUpdate: {
@@ -400,51 +378,51 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
400
378
  offlineSecret: ""
401
379
  });
402
380
  return (c, t) => {
403
- const l = m("FmTextField"), v = m("FmButton"), y = m("FmForm");
404
- return g(), V(y, {
381
+ const n = i("FmTextField"), v = i("FmButton"), y = i("FmForm");
382
+ return F(), V(y, {
405
383
  ref: "form",
406
384
  class: "flex flex-col gap-16",
407
385
  onValidationSuccess: t[6] || (t[6] = () => a.onUpdate(e.value))
408
386
  }, {
409
387
  default: x(() => [
410
- u(l, {
388
+ u(n, {
411
389
  modelValue: e.value.merchantId,
412
390
  "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.merchantId = o),
413
391
  label: "Merchant ID",
414
392
  rules: r(A)(r(S).string())
415
393
  }, null, 8, ["modelValue", "rules"]),
416
- u(l, {
394
+ u(n, {
417
395
  modelValue: e.value.uniqueId,
418
396
  "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.uniqueId = o),
419
397
  label: "Unique ID",
420
398
  rules: r(A)(r(S).string())
421
399
  }, null, 8, ["modelValue", "rules"]),
422
- u(l, {
400
+ u(n, {
423
401
  modelValue: e.value.verifyKey,
424
402
  "onUpdate:modelValue": t[2] || (t[2] = (o) => e.value.verifyKey = o),
425
403
  label: "Verify Key",
426
404
  rules: r(A)(r(S).string())
427
405
  }, null, 8, ["modelValue", "rules"]),
428
- u(l, {
406
+ u(n, {
429
407
  modelValue: e.value.secretKey,
430
408
  "onUpdate:modelValue": t[3] || (t[3] = (o) => e.value.secretKey = o),
431
409
  label: "Secret Key",
432
410
  rules: r(A)(r(S).string())
433
411
  }, null, 8, ["modelValue", "rules"]),
434
- u(l, {
412
+ u(n, {
435
413
  modelValue: e.value.applicationCode,
436
414
  "onUpdate:modelValue": t[4] || (t[4] = (o) => e.value.applicationCode = o),
437
415
  label: "Application Code ( Offline )",
438
416
  rules: r(A)(r(S).string())
439
417
  }, null, 8, ["modelValue", "rules"]),
440
- u(l, {
418
+ u(n, {
441
419
  modelValue: e.value.offlineSecret,
442
420
  "onUpdate:modelValue": t[5] || (t[5] = (o) => e.value.offlineSecret = o),
443
421
  label: "Offline Secret ( Offline )",
444
422
  rules: r(A)(r(S).string())
445
423
  }, null, 8, ["modelValue", "rules"]),
446
- s("div", ve, [
447
- a.gateway ? (g(), V(v, {
424
+ s("div", ye, [
425
+ a.gateway ? (F(), V(v, {
448
426
  key: 0,
449
427
  class: "flex-1",
450
428
  variant: "secondary",
@@ -463,7 +441,7 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
463
441
  }, 512);
464
442
  };
465
443
  }
466
- }), ge = { class: "flex mt-6 space-x-6" }, Fe = /* @__PURE__ */ I({
444
+ }), ve = { class: "flex mt-6 space-x-6" }, be = /* @__PURE__ */ I({
467
445
  __name: "RevenueMonsterGateway",
468
446
  props: {
469
447
  onUpdate: {
@@ -488,38 +466,38 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
488
466
  clientPrivateKey: ""
489
467
  });
490
468
  return (c, t) => {
491
- const l = m("FmTextField"), v = m("FmTextarea"), y = m("FmButton"), o = m("FmForm");
492
- return g(), V(o, {
469
+ const n = i("FmTextField"), v = i("FmTextarea"), y = i("FmButton"), o = i("FmForm");
470
+ return F(), V(o, {
493
471
  ref: "form",
494
472
  class: "flex flex-col gap-16",
495
473
  onValidationSuccess: t[4] || (t[4] = () => a.onUpdate(e.value))
496
474
  }, {
497
475
  default: x(() => [
498
- u(l, {
476
+ u(n, {
499
477
  modelValue: e.value.storeId,
500
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.storeId = n),
478
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => e.value.storeId = l),
501
479
  label: "Store ID",
502
480
  rules: r(A)(r(S).string())
503
481
  }, null, 8, ["modelValue", "rules"]),
504
- u(l, {
482
+ u(n, {
505
483
  modelValue: e.value.clientId,
506
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.clientId = n),
484
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => e.value.clientId = l),
507
485
  label: "Client ID",
508
486
  rules: r(A)(r(S).string())
509
487
  }, null, 8, ["modelValue", "rules"]),
510
- u(l, {
488
+ u(n, {
511
489
  modelValue: e.value.clientSecret,
512
- "onUpdate:modelValue": t[2] || (t[2] = (n) => e.value.clientSecret = n),
490
+ "onUpdate:modelValue": t[2] || (t[2] = (l) => e.value.clientSecret = l),
513
491
  label: "Client Secret",
514
492
  rules: r(A)(r(S).string())
515
493
  }, null, 8, ["modelValue", "rules"]),
516
494
  u(v, {
517
495
  modelValue: e.value.clientPrivateKey,
518
- "onUpdate:modelValue": t[3] || (t[3] = (n) => e.value.clientPrivateKey = n),
496
+ "onUpdate:modelValue": t[3] || (t[3] = (l) => e.value.clientPrivateKey = l),
519
497
  label: "Client Private Key"
520
498
  }, null, 8, ["modelValue"]),
521
- s("div", ge, [
522
- a.gateway ? (g(), V(y, {
499
+ s("div", ve, [
500
+ a.gateway ? (F(), V(y, {
523
501
  key: 0,
524
502
  class: "flex-1",
525
503
  variant: "secondary",
@@ -538,7 +516,7 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
538
516
  }, 512);
539
517
  };
540
518
  }
541
- }), xe = { class: "flex mt-6 space-x-6" }, Ve = /* @__PURE__ */ I({
519
+ }), Fe = { class: "flex mt-6 space-x-6" }, ge = /* @__PURE__ */ I({
542
520
  __name: "GhlGateway",
543
521
  props: {
544
522
  onUpdate: {
@@ -562,33 +540,33 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
562
540
  privateKey: ""
563
541
  });
564
542
  return (c, t) => {
565
- const l = m("FmTextField"), v = m("FmTextarea"), y = m("FmButton"), o = m("FmForm");
566
- return g(), V(o, {
543
+ const n = i("FmTextField"), v = i("FmTextarea"), y = i("FmButton"), o = i("FmForm");
544
+ return F(), V(o, {
567
545
  ref: "form",
568
546
  class: "flex flex-col gap-16",
569
547
  onValidationSuccess: t[3] || (t[3] = () => a.onUpdate(e.value))
570
548
  }, {
571
549
  default: x(() => [
572
- u(l, {
550
+ u(n, {
573
551
  modelValue: e.value.merchantId,
574
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.merchantId = n),
552
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => e.value.merchantId = l),
575
553
  label: "Merchant ID",
576
554
  rules: r(A)(r(S).string())
577
555
  }, null, 8, ["modelValue", "rules"]),
578
- u(l, {
556
+ u(n, {
579
557
  modelValue: e.value.terminalId,
580
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.terminalId = n),
558
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => e.value.terminalId = l),
581
559
  label: "Terminal ID",
582
560
  rules: r(A)(r(S).string())
583
561
  }, null, 8, ["modelValue", "rules"]),
584
562
  u(v, {
585
563
  modelValue: e.value.privateKey,
586
- "onUpdate:modelValue": t[2] || (t[2] = (n) => e.value.privateKey = n),
564
+ "onUpdate:modelValue": t[2] || (t[2] = (l) => e.value.privateKey = l),
587
565
  label: "Private Key",
588
566
  rules: r(A)(r(S).string())
589
567
  }, null, 8, ["modelValue", "rules"]),
590
- s("div", xe, [
591
- a.gateway ? (g(), V(y, {
568
+ s("div", Fe, [
569
+ a.gateway ? (F(), V(y, {
592
570
  key: 0,
593
571
  class: "flex-1",
594
572
  variant: "secondary",
@@ -607,10 +585,10 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
607
585
  }, 512);
608
586
  };
609
587
  }
610
- }), we = {
588
+ }), xe = {
611
589
  key: 0,
612
590
  class: "flex items-center justify-center min-h-[80vh]"
613
- }, Ae = /* @__PURE__ */ I({
591
+ }, Ve = /* @__PURE__ */ I({
614
592
  __name: "PaymentGateway",
615
593
  props: {
616
594
  payoutAccount: {
@@ -619,11 +597,11 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
619
597
  }
620
598
  },
621
599
  setup(a) {
622
- const i = a, e = ee(), { isLoading: d, startAsyncCall: c } = Q(), t = k(), l = k([]);
600
+ const m = a, e = X(), { isLoading: d, startAsyncCall: c } = H(), t = k(), n = k([]);
623
601
  function v() {
624
602
  c(async () => {
625
603
  var p;
626
- l.value = await _.get(i.payoutAccount.store.id), t.value = (p = l.value.find((b) => b.active)) == null ? void 0 : p.paymentGateway;
604
+ n.value = await _.get(m.payoutAccount.store.id), t.value = (p = n.value.find((b) => b.active)) == null ? void 0 : p.paymentGateway;
627
605
  });
628
606
  }
629
607
  async function y(p) {
@@ -635,62 +613,62 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
635
613
  paymentGateway: t.value,
636
614
  config: p,
637
615
  active: !0
638
- }, w = l.value.find((F) => F.paymentGateway === t.value);
616
+ }, w = n.value.find((g) => g.paymentGateway === t.value);
639
617
  w && (b._id = w._id, b._rev = w._rev), await Promise.all(
640
- l.value.map(async (F) => {
641
- F.active && F.paymentGateway !== b.paymentGateway && await _.upsert(i.payoutAccount.store.id, {
642
- ...F,
618
+ n.value.map(async (g) => {
619
+ g.active && g.paymentGateway !== b.paymentGateway && await _.upsert(m.payoutAccount.store.id, {
620
+ ...g,
643
621
  active: !1
644
622
  });
645
623
  })
646
- ), await _.upsert(i.payoutAccount.store.id, b), l.value = await _.get(i.payoutAccount.store.id), t.value = (T = l.value.find((F) => F.active)) == null ? void 0 : T.paymentGateway;
624
+ ), await _.upsert(m.payoutAccount.store.id, b), n.value = await _.get(m.payoutAccount.store.id), t.value = (T = n.value.find((g) => g.active)) == null ? void 0 : T.paymentGateway;
647
625
  });
648
626
  }
649
627
  async function o(p) {
650
628
  c(async () => {
651
629
  var b;
652
- await _.delete(i.payoutAccount.store.id, p._id), l.value = await _.get(i.payoutAccount.store.id), t.value = (b = l.value.find((w) => w.active)) == null ? void 0 : b.paymentGateway;
630
+ await _.delete(m.payoutAccount.store.id, p._id), n.value = await _.get(m.payoutAccount.store.id), t.value = (b = n.value.find((w) => w.active)) == null ? void 0 : b.paymentGateway;
653
631
  });
654
632
  }
655
- Y(v);
656
- const n = [
633
+ O(v);
634
+ const l = [
657
635
  {
658
636
  label: "Fiuu",
659
637
  value: "RAZER_MERCHANT_SERVICE",
660
- form: be,
661
- region: [$.F_COUNTRY.enum.MY, $.F_COUNTRY.enum.SG]
638
+ form: fe,
639
+ region: [D.F_COUNTRY.enum.MY, D.F_COUNTRY.enum.SG]
662
640
  },
663
641
  {
664
642
  label: "Revenue Monster",
665
643
  value: "REVENUE_MONSTER",
666
- form: Fe,
667
- region: [$.F_COUNTRY.enum.MY]
644
+ form: be,
645
+ region: [D.F_COUNTRY.enum.MY]
668
646
  },
669
647
  {
670
648
  label: "GHL",
671
649
  value: "E_GHL",
672
- form: Ve,
673
- region: [$.F_COUNTRY.enum.MY]
650
+ form: ge,
651
+ region: [D.F_COUNTRY.enum.MY]
674
652
  }
675
- ], f = K(() => {
653
+ ], f = B(() => {
676
654
  var p;
677
- return (p = n.find((b) => b.value === t.value)) == null ? void 0 : p.form;
655
+ return (p = l.find((b) => b.value === t.value)) == null ? void 0 : p.form;
678
656
  });
679
657
  return (p, b) => {
680
- const w = m("FmCircularProgress"), T = m("FmSelect");
681
- return g(), R(D, null, [
682
- r(d) ? (g(), R("div", we, [
658
+ const w = i("FmCircularProgress"), T = i("FmSelect");
659
+ return F(), R(N, null, [
660
+ r(d) ? (F(), R("div", xe, [
683
661
  u(w, { size: "xxl" })
684
- ])) : (g(), V(T, {
662
+ ])) : (F(), V(T, {
685
663
  key: 1,
686
664
  modelValue: t.value,
687
- "onUpdate:modelValue": b[0] || (b[0] = (F) => t.value = F),
665
+ "onUpdate:modelValue": b[0] || (b[0] = (g) => t.value = g),
688
666
  class: "mb-6",
689
667
  label: "Payment Service Provider",
690
- items: n.filter((F) => F.region.includes(r(e).currentCountry.value ?? r($.F_COUNTRY).enum.MY))
668
+ items: l.filter((g) => g.region.includes(r(e).currentCountry.value ?? r(D.F_COUNTRY).enum.MY))
691
669
  }, null, 8, ["modelValue", "items"])),
692
- t.value ? (g(), V(z(f.value), H(L({ key: 2 }, {
693
- gateway: l.value.find((F) => F.paymentGateway === t.value),
670
+ t.value ? (F(), V(j(f.value), Y(z({ key: 2 }, {
671
+ gateway: n.value.find((g) => g.paymentGateway === t.value),
694
672
  onDelete: o,
695
673
  onUpdate: y
696
674
  })), null, 16)) : U("", !0)
@@ -706,67 +684,67 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
706
684
  }
707
685
  },
708
686
  setup(a) {
709
- const i = a, { tab: e } = W({
687
+ const m = a, { tab: e } = L({
710
688
  tab: "information"
711
- }), { isLoading: d, startAsyncCall: c } = Q(!0), t = J(), l = k();
689
+ }), { isLoading: d, startAsyncCall: c } = H(!0), t = W(), n = k();
712
690
  async function v(f) {
713
- await N.updateById(
714
- i.accountId,
691
+ await $.updateById(
692
+ m.accountId,
715
693
  f
716
- ), l.value = await N.readById(i.accountId);
694
+ ), n.value = await $.readById(m.accountId);
717
695
  }
718
696
  const y = [
719
697
  {
720
698
  label: "Information",
721
699
  value: "information",
722
700
  icon: "overview",
723
- render: ne
701
+ render: te
724
702
  },
725
703
  {
726
704
  label: "Settlement",
727
705
  value: "settlement",
728
706
  icon: "payments",
729
- render: re
707
+ render: oe
730
708
  },
731
709
  {
732
710
  label: "MDR Status",
733
711
  value: "payment",
734
712
  icon: "account_box",
735
- render: fe
713
+ render: pe
736
714
  }
737
715
  ];
738
716
  function o() {
739
717
  c(async () => {
740
- l.value = await N.readById(i.accountId), l.value.store.event === "ORDERING" && y.push({
718
+ n.value = await $.readById(m.accountId), n.value.store.event === "ORDERING" && y.push({
741
719
  label: "Payment Gateway",
742
720
  value: "payment-gateway",
743
721
  icon: "assured_workload",
744
- render: Ae
722
+ render: Ve
745
723
  });
746
724
  });
747
725
  }
748
- Y(o);
749
- const n = K(() => {
726
+ O(o);
727
+ const l = B(() => {
750
728
  var f;
751
729
  return (f = y.find((p) => p.value === e.value)) == null ? void 0 : f.render;
752
730
  });
753
731
  return (f, p) => {
754
732
  var w;
755
- const b = m("FmTabs");
756
- return g(), V(Z, {
757
- title: `Payout Account (${(w = l.value) == null ? void 0 : w._id})`,
733
+ const b = i("FmTabs");
734
+ return F(), V(Q, {
735
+ title: `Payout Account (${(w = n.value) == null ? void 0 : w._id})`,
758
736
  loading: r(d),
759
737
  onBack: r(t).back
760
738
  }, {
761
739
  default: x(() => [
762
740
  u(b, {
763
741
  "model-value": r(e),
764
- "onUpdate:modelValue": p[0] || (p[0] = (T) => j(e) ? e.value = T : null),
742
+ "onUpdate:modelValue": p[0] || (p[0] = (T) => M(e) ? e.value = T : null),
765
743
  class: "mb-6",
766
744
  items: y
767
745
  }, null, 8, ["model-value"]),
768
- r(e) ? (g(), V(z(n.value), H(L({ key: 0 }, {
769
- payoutAccount: l.value,
746
+ r(e) ? (F(), V(j(l.value), Y(z({ key: 0 }, {
747
+ payoutAccount: n.value,
770
748
  onUpdate: v
771
749
  })), null, 16)) : U("", !0)
772
750
  ]),