@feedmepos/mf-payment 1.2.1 → 1.2.2

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 (61) hide show
  1. package/dist/{PDFViewer-BQfgFexr.js → PDFViewer-xrBtzrlR.js} +1 -2
  2. package/dist/{PayoutAccount-D8R2kieb.js → PayoutAccount-C1eI-Tha.js} +6 -6
  3. package/dist/{PayoutAccount-CajKtGCP.js → PayoutAccount-QY9LkR0r.js} +7 -7
  4. package/dist/PayoutAccountSetting-Bt-BBfpF.js +970 -0
  5. package/dist/{Restaurant-Dbp_UTNd.js → Restaurant-DMEt0GSf.js} +4 -4
  6. package/dist/RestaurantSetting-Bjgjx7_c.js +487 -0
  7. package/dist/{Settlement-D47q_Wmh.js → Settlement-DHczxjKA.js} +3 -3
  8. package/dist/{Settlement-CIl7p5BM.js → Settlement-PYl2xRrw.js} +3 -3
  9. package/dist/{SettlementTransactions-BSN_bqJ2.js → SettlementTransactions-B6eUs4ay.js} +3 -3
  10. package/dist/{SettlementTransactions-VhSpt9Ya.js → SettlementTransactions-Bn2-iO30.js} +3 -3
  11. package/dist/{Terminal-DhDp8CZP.js → Terminal-q9AtQVTw.js} +36 -36
  12. package/dist/{TerminalSetting-Z4Yf71s4.js → TerminalSetting-DKvLKsrH.js} +218 -212
  13. package/dist/{Transaction-DfqdJTc4.js → Transaction-BSDhGkTu.js} +5 -5
  14. package/dist/{Transaction-DodA1Rsr.js → Transaction-DlkiWPJt.js} +7 -7
  15. package/dist/{TransactionOld-BVC2EZES.js → TransactionOld-B93Kp78J.js} +4 -4
  16. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BSQyjy9r.js → TransactionTable.vue_vue_type_script_setup_true_lang-DEgiifDL.js} +3 -3
  17. package/dist/{app-DO-yUYMX.js → app-B1yXzXMJ.js} +361 -361
  18. package/dist/app.js +1 -1
  19. package/dist/{assets-Afjskent.js → assets-DbCf2oTj.js} +2 -2
  20. package/dist/{grafana-Bx1CNAeG.js → grafana-CxvNheOh.js} +1 -1
  21. package/dist/{index-eVDNyUp0.js → index-BoafQG_3.js} +1 -1
  22. package/dist/{index-DcA8mNkW.js → index-BwmZGhzh.js} +7830 -7804
  23. package/dist/{index-CWjhBRl-.js → index-C9YbV874.js} +1 -1
  24. package/dist/{index-DjMmMfFw.js → index-DJx90D2_.js} +1 -1
  25. package/dist/{index-9ImIPLpT.js → index-DQ6y1YEM.js} +1 -1
  26. package/dist/{index-BG-pqgpq.js → index-DoWYy-5F.js} +2 -2
  27. package/dist/{index-DJFB47Iu.js → index-DrVrxzsm.js} +1 -1
  28. package/dist/{index.vue_vue_type_script_setup_true_lang-Pj1GGD11.js → index.vue_vue_type_script_setup_true_lang-BJAdIBCX.js} +1 -1
  29. package/dist/package.json +4 -4
  30. package/dist/{payout-account-1UTg_py3.js → payout-account-Cy0D7ycP.js} +3 -3
  31. package/dist/stores/payoutAccount.d.ts +62 -12
  32. package/dist/tsconfig.app.tsbuildinfo +1 -1
  33. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +62 -12
  34. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +38 -20
  35. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +38 -20
  36. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +62 -12
  37. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +62 -12
  38. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +38 -20
  39. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
  40. package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +46 -1
  41. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  42. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
  43. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +2 -2
  44. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +50 -0
  45. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +2 -2
  46. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  47. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +12 -12
  48. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +14 -12
  49. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +12 -12
  50. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +12 -12
  51. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +12 -12
  52. package/dist/views/admin/terminal/tabs/SoftspaceGateway.vue.d.ts +12 -12
  53. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +12 -12
  54. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +12 -12
  55. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +124 -24
  56. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +36 -36
  57. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +18 -18
  58. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  59. package/package.json +4 -4
  60. package/dist/PayoutAccountSetting-DQqH71Pj.js +0 -890
  61. package/dist/RestaurantSetting-dem9GccJ.js +0 -412
@@ -1,14 +1,14 @@
1
- import { defineComponent as V, openBlock as b, createElementBlock as O, Fragment as B, createElementVNode as F, createTextVNode as q, toDisplayString as D, toRef as G, ref as w, watch as R, onMounted as M, computed as Y, resolveComponent as v, unref as k, createVNode as f, createBlock as x, withCtx as N, createCommentVNode as T, isRef as $, resolveDynamicComponent as j, normalizeProps as A, mergeProps as L } from "vue";
2
- import { u as K, e as S } from "./index-DcA8mNkW.js";
1
+ import { defineComponent as T, openBlock as F, createElementBlock as N, Fragment as K, createElementVNode as I, createTextVNode as O, toDisplayString as R, toRef as B, ref as b, watch as Y, onMounted as D, computed as C, resolveComponent as v, unref as S, createVNode as f, createBlock as _, withCtx as G, createCommentVNode as q, isRef as j, resolveDynamicComponent as A, normalizeProps as L, mergeProps as E } from "vue";
2
+ import { u as P, e as x } from "./index-BwmZGhzh.js";
3
3
  import { useRouter as J } from "vue-router";
4
- import { t as C } from "./index-DjMmMfFw.js";
4
+ import { t as M } from "./index-DJx90D2_.js";
5
5
  import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
6
- import { u as E } from "./index-9ImIPLpT.js";
7
- import { useSnackbar as z } from "@feedmepos/ui-library";
6
+ import { u as z } from "./index-DQ6y1YEM.js";
7
+ import { useSnackbar as h } from "@feedmepos/ui-library";
8
8
  import { u as Q } from "./error-K1CakhA9.js";
9
9
  import { z as W, a as X } from "./validator-D5jtpt9A.js";
10
- import { useCoreStore as P } from "@feedmepos/mf-common";
11
- const Z = /* @__PURE__ */ V({
10
+ import { useCoreStore as $ } from "@feedmepos/mf-common";
11
+ const Z = /* @__PURE__ */ T({
12
12
  __name: "Information",
13
13
  props: {
14
14
  terminal: {
@@ -17,25 +17,25 @@ const Z = /* @__PURE__ */ V({
17
17
  }
18
18
  },
19
19
  setup(y) {
20
- return (i, t) => (b(), O(B, null, [
21
- t[0] || (t[0] = F("b", null, "Name", -1)),
22
- q(": " + D(y.terminal.name), 1),
23
- t[1] || (t[1] = F("br", null, null, -1)),
24
- t[2] || (t[2] = F("b", null, "Status", -1)),
25
- q(": " + D(y.terminal.status), 1),
26
- t[3] || (t[3] = F("br", null, null, -1)),
27
- t[4] || (t[4] = F("b", null, "Device ID", -1)),
28
- q(": " + D(y.terminal.deviceId ?? "-"), 1),
29
- t[5] || (t[5] = F("br", null, null, -1)),
30
- t[6] || (t[6] = F("b", null, "Device Type", -1)),
31
- q(": " + D(y.terminal.deviceType ?? "-"), 1),
32
- t[7] || (t[7] = F("br", null, null, -1))
20
+ return (m, n) => (F(), N(K, null, [
21
+ n[0] || (n[0] = I("b", null, "Name", -1)),
22
+ O(": " + R(y.terminal.name), 1),
23
+ n[1] || (n[1] = I("br", null, null, -1)),
24
+ n[2] || (n[2] = I("b", null, "Status", -1)),
25
+ O(": " + R(y.terminal.status), 1),
26
+ n[3] || (n[3] = I("br", null, null, -1)),
27
+ n[4] || (n[4] = I("b", null, "Device ID", -1)),
28
+ O(": " + R(y.terminal.deviceId ?? "-"), 1),
29
+ n[5] || (n[5] = I("br", null, null, -1)),
30
+ n[6] || (n[6] = I("b", null, "Device Type", -1)),
31
+ O(": " + R(y.terminal.deviceType ?? "-"), 1),
32
+ n[7] || (n[7] = I("br", null, null, -1))
33
33
  ], 64));
34
34
  }
35
35
  }), ee = {
36
36
  key: 0,
37
37
  class: "flex items-center justify-center min-h-[80vh]"
38
- }, ae = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */ V({
38
+ }, ae = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */ T({
39
39
  __name: "TerminalGateway",
40
40
  props: {
41
41
  terminal: {
@@ -48,62 +48,62 @@ const Z = /* @__PURE__ */ V({
48
48
  }
49
49
  },
50
50
  setup(y) {
51
- const { isLoading: i, startAsyncCall: t } = K(), p = y, e = G(() => p.terminal), m = w(), r = w(), a = w(-1), o = w({
51
+ const { isLoading: m, startAsyncCall: n } = P(), p = y, e = B(() => p.terminal), c = b(), r = b(), a = b(-1), o = b({
52
52
  terminalId: ""
53
- }), c = () => {
53
+ }), d = () => {
54
54
  o.value.terminalId = "", a.value = -1;
55
55
  }, s = () => {
56
- if (t(async () => {
57
- m.value = await C.getRestaurantTerminals(p.terminal.referenceId);
56
+ if (n(async () => {
57
+ c.value = await M.getRestaurantTerminals(p.terminal.referenceId);
58
58
  }), !p.terminal.ecrs)
59
- return c();
60
- const l = p.terminal.ecrs.findIndex((g) => g && g.gateway && g.gateway === "FeedMe");
61
- if (l === -1)
62
- return c();
63
- a.value = l;
64
- const u = p.terminal.ecrs.at(l);
65
- u.gateway === "FeedMe" && u.config && (o.value = {
66
- terminalId: u.config.terminalId
59
+ return d();
60
+ const t = p.terminal.ecrs.findIndex((u) => u && u.gateway && u.gateway === "FeedMe");
61
+ if (t === -1)
62
+ return d();
63
+ a.value = t;
64
+ const l = p.terminal.ecrs.at(t);
65
+ l.gateway === "FeedMe" && l.config && (o.value = {
66
+ terminalId: l.config.terminalId
67
67
  });
68
68
  };
69
- R(e, s), M(s);
70
- const d = Y(() => (m.value ?? []).map((l) => ({
71
- label: l.name ?? l._id,
72
- value: l._id
69
+ Y(e, s), D(s);
70
+ const g = C(() => (c.value ?? []).map((t) => ({
71
+ label: t.name ?? t._id,
72
+ value: t._id
73
73
  })));
74
- async function n(l) {
75
- var u;
76
- (u = p.terminal.ecrs) == null || u.splice(l, 1), p.onUpdate(p.terminal);
74
+ async function i(t) {
75
+ var l;
76
+ (l = p.terminal.ecrs) == null || l.splice(t, 1), p.onUpdate(p.terminal);
77
77
  }
78
- return (l, u) => {
79
- const g = v("FmCircularProgress"), U = v("FmSelect"), I = v("FmButton"), _ = v("FmForm");
80
- return k(i) ? (b(), O("div", ee, [
81
- f(g, { size: "xxl" })
82
- ])) : (b(), x(_, {
78
+ return (t, l) => {
79
+ const u = v("FmCircularProgress"), V = v("FmSelect"), k = v("FmButton"), U = v("FmForm");
80
+ return S(m) ? (F(), N("div", ee, [
81
+ f(u, { size: "xxl" })
82
+ ])) : (F(), _(U, {
83
83
  key: 1,
84
84
  ref: r.value,
85
85
  class: "flex flex-col gap-16 w-[500px]",
86
- onValidationSuccess: u[1] || (u[1] = () => {
86
+ onValidationSuccess: l[1] || (l[1] = () => {
87
87
  a.value > -1 ? e.value.ecrs[a.value] = { gateway: "FeedMe", config: o.value } : (e.value.ecrs || (e.value.ecrs = []), e.value.ecrs.push({ gateway: "FeedMe", config: o.value })), p.onUpdate(e.value);
88
88
  })
89
89
  }, {
90
- default: N(() => [
91
- f(U, {
90
+ default: G(() => [
91
+ f(V, {
92
92
  modelValue: o.value.terminalId,
93
- "onUpdate:modelValue": u[0] || (u[0] = (h) => o.value.terminalId = h),
93
+ "onUpdate:modelValue": l[0] || (l[0] = (w) => o.value.terminalId = w),
94
94
  label: "Terminal ID",
95
- items: d.value,
96
- rules: k(W)(k(X).string())
95
+ items: g.value,
96
+ rules: S(W)(S(X).string())
97
97
  }, null, 8, ["modelValue", "items", "rules"]),
98
- F("div", ae, [
99
- a.value > -1 ? (b(), x(I, {
98
+ I("div", ae, [
99
+ a.value > -1 ? (F(), _(k, {
100
100
  key: 0,
101
101
  class: "flex-1",
102
102
  variant: "secondary",
103
103
  label: "Delete",
104
- onclick: () => n(a.value)
105
- }, null, 8, ["onclick"])) : T("", !0),
106
- f(I, {
104
+ onclick: () => i(a.value)
105
+ }, null, 8, ["onclick"])) : q("", !0),
106
+ f(k, {
107
107
  type: "submit",
108
108
  class: "flex-1",
109
109
  variant: "primary",
@@ -115,7 +115,7 @@ const Z = /* @__PURE__ */ V({
115
115
  }, 512));
116
116
  };
117
117
  }
118
- }), ne = { class: "flex mt-6 space-x-6" }, le = /* @__PURE__ */ V({
118
+ }), ne = { class: "flex mt-6 space-x-6" }, le = /* @__PURE__ */ T({
119
119
  __name: "FiuuGateway",
120
120
  props: {
121
121
  terminal: {
@@ -128,75 +128,76 @@ const Z = /* @__PURE__ */ V({
128
128
  }
129
129
  },
130
130
  setup(y) {
131
- const i = y, t = P().currentCountry, p = [
131
+ const m = y, n = $().currentCountry, p = [
132
132
  {
133
133
  label: "Fiuu Malaysia",
134
134
  value: "cc.feedme.payment.rms",
135
- region: S.F_COUNTRY.enum.MY
135
+ region: x.F_COUNTRY.enum.MY
136
136
  },
137
137
  {
138
138
  label: "Fiuu Malaysia V2",
139
139
  value: "cc.feedme.payment.fiuu_my",
140
- region: S.F_COUNTRY.enum.MY
140
+ region: x.F_COUNTRY.enum.MY
141
141
  },
142
142
  {
143
143
  label: "Fiuu Singapore",
144
144
  value: "cc.feedme.payment.fiuu_sg",
145
- region: S.F_COUNTRY.enum.SG
145
+ region: x.F_COUNTRY.enum.SG
146
146
  }
147
- ], e = G(() => i.terminal), m = w(), r = w(-1), a = w({
147
+ ], e = B(() => m.terminal), c = b(), r = b(-1), a = b({
148
148
  packageId: "",
149
149
  uniqueId: ""
150
150
  }), o = () => {
151
151
  a.value.uniqueId = "", a.value.packageId = "", r.value = -1;
152
- }, c = () => {
152
+ }, d = () => {
153
153
  if (!e.value.gateways)
154
154
  return o();
155
- const d = e.value.gateways.findIndex((l) => l && l.gateway && l.gateway === "Fiuu");
156
- if (d === -1)
155
+ const i = e.value.gateways.findIndex((l) => l && l.gateway && l.gateway === "Fiuu");
156
+ if (i === -1)
157
157
  return o();
158
- r.value = d;
159
- const n = e.value.gateways.at(d);
160
- n.gateway === "Fiuu" && n.config && (a.value = {
161
- packageId: n.config.packageId,
162
- uniqueId: n.config.uniqueId
158
+ r.value = i;
159
+ const t = e.value.gateways.at(i);
160
+ t.gateway === "Fiuu" && t.config && (a.value = {
161
+ packageId: t.config.packageId,
162
+ uniqueId: t.config.uniqueId
163
163
  });
164
164
  };
165
- R(e, c), M(c);
166
- async function s(d) {
167
- var n;
168
- (n = e.value.gateways) == null || n.splice(d, 1), i.onUpdate(e.value);
165
+ Y(e, d), D(d);
166
+ async function s(i) {
167
+ var t;
168
+ (t = e.value.gateways) == null || t.splice(i, 1), m.onUpdate(e.value);
169
169
  }
170
- return (d, n) => {
171
- const l = v("FmSelect"), u = v("FmTextField"), g = v("FmButton"), U = v("FmForm");
172
- return b(), x(U, {
173
- ref: m.value,
170
+ const g = C(() => p.filter((i) => i.region === n.value));
171
+ return (i, t) => {
172
+ const l = v("FmSelect"), u = v("FmTextField"), V = v("FmButton"), k = v("FmForm");
173
+ return F(), _(k, {
174
+ ref: c.value,
174
175
  class: "flex flex-col gap-16 w-[500px]",
175
- onValidationSuccess: n[2] || (n[2] = () => {
176
- r.value > -1 ? e.value.gateways[r.value] = { gateway: "Fiuu", config: a.value } : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push({ gateway: "Fiuu", config: a.value })), i.onUpdate(e.value);
176
+ onValidationSuccess: t[2] || (t[2] = () => {
177
+ r.value > -1 ? e.value.gateways[r.value] = { gateway: "Fiuu", config: a.value } : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push({ gateway: "Fiuu", config: a.value })), m.onUpdate(e.value);
177
178
  })
178
179
  }, {
179
- default: N(() => [
180
+ default: G(() => [
180
181
  f(l, {
181
182
  modelValue: a.value.packageId,
182
- "onUpdate:modelValue": n[0] || (n[0] = (I) => a.value.packageId = I),
183
+ "onUpdate:modelValue": t[0] || (t[0] = (U) => a.value.packageId = U),
183
184
  label: "Package ID",
184
- items: p.filter((I) => I.region === k(t))
185
+ items: g.value
185
186
  }, null, 8, ["modelValue", "items"]),
186
187
  f(u, {
187
188
  modelValue: a.value.uniqueId,
188
- "onUpdate:modelValue": n[1] || (n[1] = (I) => a.value.uniqueId = I),
189
+ "onUpdate:modelValue": t[1] || (t[1] = (U) => a.value.uniqueId = U),
189
190
  label: "Unique ID"
190
191
  }, null, 8, ["modelValue"]),
191
- F("div", ne, [
192
- r.value > -1 ? (b(), x(g, {
192
+ I("div", ne, [
193
+ r.value > -1 ? (F(), _(V, {
193
194
  key: 0,
194
195
  class: "flex-1",
195
196
  variant: "secondary",
196
197
  label: "Delete",
197
198
  onclick: () => s(r.value)
198
- }, null, 8, ["onclick"])) : T("", !0),
199
- f(g, {
199
+ }, null, 8, ["onclick"])) : q("", !0),
200
+ f(V, {
200
201
  type: "submit",
201
202
  class: "flex-1",
202
203
  variant: "primary",
@@ -208,7 +209,7 @@ const Z = /* @__PURE__ */ V({
208
209
  }, 512);
209
210
  };
210
211
  }
211
- }), oe = { class: "flex mt-6 space-x-6" }, ue = /* @__PURE__ */ V({
212
+ }), oe = { class: "flex mt-6 space-x-6" }, ue = /* @__PURE__ */ T({
212
213
  __name: "GhlGateway",
213
214
  props: {
214
215
  terminal: {
@@ -221,65 +222,65 @@ const Z = /* @__PURE__ */ V({
221
222
  }
222
223
  },
223
224
  setup(y) {
224
- const i = y, t = G(() => i.terminal), p = w(), e = w(-1), m = w({
225
+ const m = y, n = B(() => m.terminal), p = b(), e = b(-1), c = b({
225
226
  merchantId: "",
226
227
  terminalId: "",
227
228
  privateKey: ""
228
229
  }), r = () => {
229
- m.value.merchantId = "", m.value.terminalId = "", m.value.privateKey = "", e.value = -1;
230
+ c.value.merchantId = "", c.value.terminalId = "", c.value.privateKey = "", e.value = -1;
230
231
  }, a = () => {
231
- if (!t.value.ecrs)
232
+ if (!n.value.ecrs)
232
233
  return r();
233
- const c = t.value.ecrs.findIndex((d) => d && d.gateway && d.gateway === "Ghl");
234
- if (c === -1)
234
+ const d = n.value.ecrs.findIndex((g) => g && g.gateway && g.gateway === "Ghl");
235
+ if (d === -1)
235
236
  return r();
236
- e.value = c;
237
- const s = t.value.ecrs.at(c);
238
- s.gateway === "Ghl" && s.config && (m.value = {
237
+ e.value = d;
238
+ const s = n.value.ecrs.at(d);
239
+ s.gateway === "Ghl" && s.config && (c.value = {
239
240
  merchantId: s.config.merchantId,
240
241
  terminalId: s.config.terminalId,
241
242
  privateKey: s.config.privateKey
242
243
  });
243
244
  };
244
- R(t, a), M(a);
245
- async function o(c) {
245
+ Y(n, a), D(a);
246
+ async function o(d) {
246
247
  var s;
247
- (s = t.value.ecrs) == null || s.splice(c, 1), i.onUpdate(t.value);
248
+ (s = n.value.ecrs) == null || s.splice(d, 1), m.onUpdate(n.value);
248
249
  }
249
- return (c, s) => {
250
- const d = v("FmTextField"), n = v("FmTextarea"), l = v("FmButton"), u = v("FmForm");
251
- return b(), x(u, {
250
+ return (d, s) => {
251
+ const g = v("FmTextField"), i = v("FmTextarea"), t = v("FmButton"), l = v("FmForm");
252
+ return F(), _(l, {
252
253
  ref: p.value,
253
254
  class: "flex flex-col gap-16 w-[500px]",
254
255
  onValidationSuccess: s[3] || (s[3] = () => {
255
- e.value > -1 ? t.value.ecrs[e.value] = { gateway: "Ghl", config: m.value } : (t.value.ecrs || (t.value.ecrs = []), t.value.ecrs.push({ gateway: "Ghl", config: m.value })), i.onUpdate(t.value);
256
+ e.value > -1 ? n.value.ecrs[e.value] = { gateway: "Ghl", config: c.value } : (n.value.ecrs || (n.value.ecrs = []), n.value.ecrs.push({ gateway: "Ghl", config: c.value })), m.onUpdate(n.value);
256
257
  })
257
258
  }, {
258
- default: N(() => [
259
- f(d, {
260
- modelValue: m.value.merchantId,
261
- "onUpdate:modelValue": s[0] || (s[0] = (g) => m.value.merchantId = g),
259
+ default: G(() => [
260
+ f(g, {
261
+ modelValue: c.value.merchantId,
262
+ "onUpdate:modelValue": s[0] || (s[0] = (u) => c.value.merchantId = u),
262
263
  label: "Merchant ID"
263
264
  }, null, 8, ["modelValue"]),
264
- f(d, {
265
- modelValue: m.value.terminalId,
266
- "onUpdate:modelValue": s[1] || (s[1] = (g) => m.value.terminalId = g),
265
+ f(g, {
266
+ modelValue: c.value.terminalId,
267
+ "onUpdate:modelValue": s[1] || (s[1] = (u) => c.value.terminalId = u),
267
268
  label: "Terminal ID"
268
269
  }, null, 8, ["modelValue"]),
269
- f(n, {
270
- modelValue: m.value.privateKey,
271
- "onUpdate:modelValue": s[2] || (s[2] = (g) => m.value.privateKey = g),
270
+ f(i, {
271
+ modelValue: c.value.privateKey,
272
+ "onUpdate:modelValue": s[2] || (s[2] = (u) => c.value.privateKey = u),
272
273
  label: "Private Key"
273
274
  }, null, 8, ["modelValue"]),
274
- F("div", oe, [
275
- e.value > -1 ? (b(), x(l, {
275
+ I("div", oe, [
276
+ e.value > -1 ? (F(), _(t, {
276
277
  key: 0,
277
278
  class: "flex-1",
278
279
  variant: "secondary",
279
280
  label: "Delete",
280
281
  onclick: () => o(e.value)
281
- }, null, 8, ["onclick"])) : T("", !0),
282
- f(l, {
282
+ }, null, 8, ["onclick"])) : q("", !0),
283
+ f(t, {
283
284
  type: "submit",
284
285
  class: "flex-1",
285
286
  variant: "primary",
@@ -291,7 +292,7 @@ const Z = /* @__PURE__ */ V({
291
292
  }, 512);
292
293
  };
293
294
  }
294
- }), re = { key: 0 }, se = { class: "mt-6 space-x-6" }, ie = /* @__PURE__ */ V({
295
+ }), re = { key: 0 }, se = { class: "mt-6 space-x-6" }, ie = /* @__PURE__ */ T({
295
296
  __name: "KioskMode",
296
297
  props: {
297
298
  terminal: {
@@ -300,57 +301,57 @@ const Z = /* @__PURE__ */ V({
300
301
  }
301
302
  },
302
303
  setup(y) {
303
- const { isLoading: i, startAsyncCall: t } = K(!1), p = z(), e = w({
304
+ const { isLoading: m, startAsyncCall: n } = P(!1), p = h(), e = b({
304
305
  enable: !1,
305
306
  password: []
306
- }), m = y;
307
+ }), c = y;
307
308
  function r() {
308
309
  return e.value.enable && e.value.password.filter((a) => !!a).length !== 6 ? p.open({
309
310
  type: "error",
310
311
  message: "Unlock PIN is required when setting up kiosk mode for terminal."
311
- }) : t(async () => {
312
+ }) : n(async () => {
312
313
  const a = { enable: e.value.enable };
313
314
  a.enable && Object.assign(a, {
314
315
  password: e.value.password.join("")
315
316
  });
316
- const o = await C.kioskModeRequest(m.terminal._id, a);
317
+ const o = await M.kioskModeRequest(c.terminal._id, a);
317
318
  if (o === "OK")
318
319
  return p.open({ type: "info", message: "Kiosk mode applied successfully." });
319
- let c = o;
320
- return o === "client_not_connected" && (c = "Terminal not connected to the websocket server."), o.startsWith("terminal: ") && (c = o.replaceAll("terminal: ", "")), p.open({
320
+ let d = o;
321
+ return o === "client_not_connected" && (d = "Terminal not connected to the websocket server."), o.startsWith("terminal: ") && (d = o.replaceAll("terminal: ", "")), p.open({
321
322
  type: "error",
322
- message: c
323
+ message: d
323
324
  });
324
325
  });
325
326
  }
326
327
  return (a, o) => {
327
- const c = v("FmSwitch"), s = v("FmPinField"), d = v("FmButton");
328
- return b(), O(B, null, [
329
- f(c, {
328
+ const d = v("FmSwitch"), s = v("FmPinField"), g = v("FmButton");
329
+ return F(), N(K, null, [
330
+ f(d, {
330
331
  modelValue: e.value.enable,
331
- "onUpdate:modelValue": o[0] || (o[0] = (n) => e.value.enable = n),
332
+ "onUpdate:modelValue": o[0] || (o[0] = (i) => e.value.enable = i),
332
333
  label: "Enable Kiosk Mode?"
333
334
  }, null, 8, ["modelValue"]),
334
- e.value.enable ? (b(), O("div", re, [
335
- o[2] || (o[2] = F("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
335
+ e.value.enable ? (F(), N("div", re, [
336
+ o[2] || (o[2] = I("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
336
337
  f(s, {
337
338
  modelValue: e.value.password,
338
- "onUpdate:modelValue": o[1] || (o[1] = (n) => e.value.password = n)
339
+ "onUpdate:modelValue": o[1] || (o[1] = (i) => e.value.password = i)
339
340
  }, null, 8, ["modelValue"])
340
- ])) : T("", !0),
341
- F("div", se, [
342
- f(d, {
341
+ ])) : q("", !0),
342
+ I("div", se, [
343
+ f(g, {
343
344
  variant: "primary",
344
345
  label: "Send",
345
346
  icon: "send",
346
- loading: k(i),
347
+ loading: S(m),
347
348
  onclick: r
348
349
  }, null, 8, ["loading"])
349
350
  ])
350
351
  ], 64);
351
352
  };
352
353
  }
353
- }), me = /* @__PURE__ */ V({
354
+ }), me = /* @__PURE__ */ T({
354
355
  __name: "SettingRequest",
355
356
  props: {
356
357
  terminal: {
@@ -359,34 +360,34 @@ const Z = /* @__PURE__ */ V({
359
360
  }
360
361
  },
361
362
  setup(y) {
362
- const { settingTab: i } = E({
363
+ const { settingTab: m } = z({
363
364
  settingTab: "kiosk_mode"
364
- }), t = [
365
+ }), n = [
365
366
  {
366
367
  label: "Kiosk Mode",
367
368
  value: "kiosk_mode",
368
369
  render: ie
369
370
  }
370
- ], p = y, e = Y(() => t.find((m) => m.value === i.value));
371
- return (m, r) => {
371
+ ], p = y, e = C(() => n.find((c) => c.value === m.value));
372
+ return (c, r) => {
372
373
  var o;
373
374
  const a = v("FmTabs");
374
- return b(), O(B, null, [
375
- r[1] || (r[1] = F("p", { className: "mt-1 my-6 text-gray-600" }, [
376
- F("b", null, "Note: "),
377
- q(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
375
+ return F(), N(K, null, [
376
+ r[1] || (r[1] = I("p", { className: "mt-1 my-6 text-gray-600" }, [
377
+ I("b", null, "Note: "),
378
+ O(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
378
379
  ], -1)),
379
380
  f(a, {
380
- "model-value": k(i),
381
- "onUpdate:modelValue": r[0] || (r[0] = (c) => $(i) ? i.value = c : null),
381
+ "model-value": S(m),
382
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => j(m) ? m.value = d : null),
382
383
  class: "mb-6",
383
- items: t
384
+ items: n
384
385
  }, null, 8, ["model-value"]),
385
- k(i) ? (b(), x(j((o = e.value) == null ? void 0 : o.render), A(L({ key: 0 }, { terminal: p.terminal })), null, 16)) : T("", !0)
386
+ S(m) ? (F(), _(A((o = e.value) == null ? void 0 : o.render), L(E({ key: 0 }, { terminal: p.terminal })), null, 16)) : q("", !0)
386
387
  ], 64);
387
388
  };
388
389
  }
389
- }), ce = { class: "flex mt-6 space-x-6" }, de = /* @__PURE__ */ V({
390
+ }), ce = { class: "flex mt-6 space-x-6" }, de = /* @__PURE__ */ T({
390
391
  __name: "SoftspaceGateway",
391
392
  props: {
392
393
  terminal: {
@@ -399,90 +400,91 @@ const Z = /* @__PURE__ */ V({
399
400
  }
400
401
  },
401
402
  setup(y) {
402
- const i = y, t = P().currentCountry, p = [
403
+ const m = y, n = $().currentCountry, p = [
403
404
  {
404
405
  label: "Softspace Malaysia",
405
406
  value: "cc.feedme.payment.softspace_my",
406
- region: S.F_COUNTRY.enum.MY
407
+ region: x.F_COUNTRY.enum.MY
407
408
  }
408
- ], e = G(() => i.terminal), m = w(), r = w(-1), a = w({
409
+ ], e = B(() => m.terminal), c = b(), r = b(-1), a = b({
409
410
  packageId: "",
410
411
  uniqueId: "",
411
412
  developerId: "",
412
413
  isUat: !1
413
414
  }), o = () => {
414
415
  a.value.uniqueId = "", a.value.packageId = "", a.value.developerId = "", r.value = -1;
415
- }, c = () => {
416
+ }, d = () => {
416
417
  if (!e.value.gateways)
417
418
  return o();
418
- const d = e.value.gateways.findIndex((u) => u && u.gateway && u.gateway === "Softspace");
419
- if (d === -1)
419
+ const i = e.value.gateways.findIndex((u) => u && u.gateway && u.gateway === "Softspace");
420
+ if (i === -1)
420
421
  return o();
421
- r.value = d;
422
- const n = e.value.gateways.at(d);
423
- if (n.gateway !== "Softspace" || !n.config)
422
+ r.value = i;
423
+ const t = e.value.gateways.at(i);
424
+ if (t.gateway !== "Softspace" || !t.config)
424
425
  return;
425
- const l = JSON.parse(n.config.uniqueId);
426
+ const l = JSON.parse(t.config.uniqueId);
426
427
  a.value = {
427
- packageId: n.config.packageId,
428
+ packageId: t.config.packageId,
428
429
  uniqueId: l.uniqueId,
429
430
  developerId: l.developerId,
430
431
  isUat: l.isUat
431
432
  };
432
433
  };
433
- R(e, c), M(c);
434
- async function s(d) {
435
- var n;
436
- (n = e.value.gateways) == null || n.splice(d, 1), i.onUpdate(e.value);
434
+ Y(e, d), D(d);
435
+ async function s(i) {
436
+ var t;
437
+ (t = e.value.gateways) == null || t.splice(i, 1), m.onUpdate(e.value);
437
438
  }
438
- return (d, n) => {
439
- const l = v("FmSelect"), u = v("FmTextField"), g = v("FmCheckbox"), U = v("FmButton"), I = v("FmForm");
440
- return b(), x(I, {
441
- ref: m.value,
439
+ const g = C(() => p.filter((i) => i.region === n.value));
440
+ return (i, t) => {
441
+ const l = v("FmSelect"), u = v("FmTextField"), V = v("FmCheckbox"), k = v("FmButton"), U = v("FmForm");
442
+ return F(), _(U, {
443
+ ref: c.value,
442
444
  class: "flex flex-col gap-16 w-[500px]",
443
- onValidationSuccess: n[4] || (n[4] = () => {
444
- const _ = {
445
+ onValidationSuccess: t[4] || (t[4] = () => {
446
+ const w = {
445
447
  gateway: "Softspace",
446
448
  config: {
447
449
  packageId: a.value.packageId,
448
450
  uniqueId: JSON.stringify({ uniqueId: a.value.uniqueId, developerId: a.value.developerId, isUat: a.value.isUat })
449
451
  }
450
452
  };
451
- r.value > -1 ? e.value.gateways[r.value] = _ : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push(_)), i.onUpdate(e.value);
453
+ r.value > -1 ? e.value.gateways[r.value] = w : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push(w)), m.onUpdate(e.value);
452
454
  })
453
455
  }, {
454
- default: N(() => [
456
+ default: G(() => [
455
457
  f(l, {
456
458
  modelValue: a.value.packageId,
457
- "onUpdate:modelValue": n[0] || (n[0] = (_) => a.value.packageId = _),
459
+ "onUpdate:modelValue": t[0] || (t[0] = (w) => a.value.packageId = w),
458
460
  label: "Package ID",
459
- items: p.filter((_) => _.region === k(t))
461
+ items: g.value
460
462
  }, null, 8, ["modelValue", "items"]),
461
463
  f(u, {
462
464
  modelValue: a.value.developerId,
463
- "onUpdate:modelValue": n[1] || (n[1] = (_) => a.value.developerId = _),
465
+ "onUpdate:modelValue": t[1] || (t[1] = (w) => a.value.developerId = w),
464
466
  label: "Developer ID (MID)"
465
467
  }, null, 8, ["modelValue"]),
466
468
  f(u, {
467
469
  modelValue: a.value.uniqueId,
468
- "onUpdate:modelValue": n[2] || (n[2] = (_) => a.value.uniqueId = _),
470
+ "onUpdate:modelValue": t[2] || (t[2] = (w) => a.value.uniqueId = w),
469
471
  label: "Unique ID (TID)"
470
472
  }, null, 8, ["modelValue"]),
471
- f(g, {
473
+ f(V, {
472
474
  modelValue: a.value.isUat,
473
- "onUpdate:modelValue": n[3] || (n[3] = (_) => a.value.isUat = _),
475
+ "onUpdate:modelValue": t[3] || (t[3] = (w) => a.value.isUat = w),
474
476
  label: "Is UAT (Test)",
475
477
  value: "1"
476
478
  }, null, 8, ["modelValue"]),
477
- F("div", ce, [
478
- r.value > -1 ? (b(), x(U, {
479
+ I("div", ce, [
480
+ r.value > -1 ? (F(), _(k, {
479
481
  key: 0,
480
482
  class: "flex-1",
481
483
  variant: "secondary",
482
484
  label: "Delete",
483
485
  onclick: () => s(r.value)
484
- }, null, 8, ["onclick"])) : T("", !0),
485
- f(U, {
486
+ }, null, 8, ["onclick"])) : q("", !0),
487
+ f(k, {
486
488
  type: "submit",
487
489
  class: "flex-1",
488
490
  variant: "primary",
@@ -494,7 +496,7 @@ const Z = /* @__PURE__ */ V({
494
496
  }, 512);
495
497
  };
496
498
  }
497
- }), ke = /* @__PURE__ */ V({
499
+ }), ke = /* @__PURE__ */ T({
498
500
  __name: "TerminalSetting",
499
501
  props: {
500
502
  terminalId: {
@@ -503,21 +505,21 @@ const Z = /* @__PURE__ */ V({
503
505
  }
504
506
  },
505
507
  setup(y) {
506
- const i = y, { tab: t } = E({
508
+ const m = y, { tab: n } = z({
507
509
  tab: "information"
508
- }), { isLoading: p, startAsyncCall: e } = K(!0), m = J(), r = z(), a = w();
510
+ }), { isLoading: p, startAsyncCall: e } = P(!0), c = J(), r = h(), a = b();
509
511
  async function o(l) {
510
512
  e(async () => {
511
513
  try {
512
- await C.updateById(
513
- i.terminalId,
514
+ await M.updateById(
515
+ m.terminalId,
514
516
  {
515
517
  name: l.name,
516
518
  status: l.status,
517
519
  ecrs: l.ecrs ?? [],
518
520
  gateways: l.gateways ?? []
519
521
  }
520
- ), a.value = await C.readById(i.terminalId), r.open({
522
+ ), a.value = await M.readById(m.terminalId), r.open({
521
523
  type: "success",
522
524
  message: "Terminal updated successfully"
523
525
  });
@@ -530,7 +532,7 @@ const Z = /* @__PURE__ */ V({
530
532
  }
531
533
  });
532
534
  }
533
- const c = [
535
+ const d = [
534
536
  {
535
537
  label: "Information",
536
538
  value: "information",
@@ -549,14 +551,14 @@ const Z = /* @__PURE__ */ V({
549
551
  value: "fiuu",
550
552
  icon: "payment",
551
553
  render: le,
552
- region: [S.F_COUNTRY.enum.MY, S.F_COUNTRY.enum.SG]
554
+ region: [x.F_COUNTRY.enum.MY, x.F_COUNTRY.enum.SG]
553
555
  },
554
556
  {
555
557
  label: "Softspace",
556
558
  value: "softspace",
557
559
  icon: "payment",
558
560
  render: de,
559
- region: [S.F_COUNTRY.enum.MY, S.F_COUNTRY.enum.SG]
561
+ region: [x.F_COUNTRY.enum.MY, x.F_COUNTRY.enum.SG]
560
562
  },
561
563
  {
562
564
  label: "FeedMe Terminal",
@@ -571,36 +573,40 @@ const Z = /* @__PURE__ */ V({
571
573
  icon: "shopping_cart_checkout",
572
574
  render: ue,
573
575
  onlyFor: ["POS", "KIOSK"],
574
- region: [S.F_COUNTRY.enum.MY]
576
+ region: [x.F_COUNTRY.enum.MY]
575
577
  }
576
- ], s = P().currentCountry, d = Y(() => {
578
+ ], s = $().currentCountry, g = C(() => {
577
579
  var l;
578
- return (l = c.find((u) => u.value === t.value)) == null ? void 0 : l.render;
580
+ return (l = d.find((u) => u.value === n.value)) == null ? void 0 : l.render;
579
581
  });
580
- async function n() {
582
+ async function i() {
581
583
  e(async () => {
582
- a.value = await C.readById(i.terminalId);
584
+ a.value = await M.readById(m.terminalId);
583
585
  });
584
586
  }
585
- return M(n), (l, u) => {
586
- var U;
587
- const g = v("FmTabs");
588
- return b(), x(H, {
589
- title: `Terminal (${(U = a.value) == null ? void 0 : U._id})`,
590
- loading: k(p),
591
- onBack: k(m).back
587
+ const t = C(() => d.filter((l) => {
588
+ var u;
589
+ return !l.onlyFor || l.onlyFor.includes(((u = a.value) == null ? void 0 : u.deviceType) ?? "");
590
+ }).filter((l) => !l.region || l.region.includes(s.value ?? x.F_COUNTRY.enum.MY)));
591
+ return D(i), (l, u) => {
592
+ var k;
593
+ const V = v("FmTabs");
594
+ return F(), _(H, {
595
+ title: `Terminal (${(k = a.value) == null ? void 0 : k._id})`,
596
+ loading: S(p),
597
+ onBack: S(c).back
592
598
  }, {
593
- default: N(() => [
594
- f(g, {
595
- "model-value": k(t),
596
- "onUpdate:modelValue": u[0] || (u[0] = (I) => $(t) ? t.value = I : null),
599
+ default: G(() => [
600
+ f(V, {
601
+ "model-value": S(n),
602
+ "onUpdate:modelValue": u[0] || (u[0] = (U) => j(n) ? n.value = U : null),
597
603
  class: "mb-6",
598
- items: c.filter((I) => !I.onlyFor || I.onlyFor.includes(a.value.deviceType)).filter((I) => !I.region || I.region.includes(k(s) ?? k(S.F_COUNTRY).enum.MY))
604
+ items: t.value
599
605
  }, null, 8, ["model-value", "items"]),
600
- k(t) ? (b(), x(j(d.value), A(L({ key: 0 }, {
606
+ S(n) ? (F(), _(A(g.value), L(E({ key: 0 }, {
601
607
  terminal: a.value,
602
608
  onUpdate: o
603
- })), null, 16)) : T("", !0)
609
+ })), null, 16)) : q("", !0)
604
610
  ]),
605
611
  _: 1
606
612
  }, 8, ["title", "loading", "onBack"]);