@feedmepos/mf-payment 1.1.18-beta.1 → 1.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{PayoutAccount-D2NcNg91.js → PayoutAccount-BrMo_bdc.js} +6 -6
  2. package/dist/{PayoutAccount-CYUar8zQ.js → PayoutAccount-ClQ35qju.js} +5 -5
  3. package/dist/{PayoutAccountSetting-B8Ft-hoB.js → PayoutAccountSetting-DBMWIQ6u.js} +3 -3
  4. package/dist/{Restaurant-CMMKMrnT.js → Restaurant-DudOcIKg.js} +4 -4
  5. package/dist/{RestaurantSetting-BLwmLgOR.js → RestaurantSetting-BJo_ixHt.js} +3 -3
  6. package/dist/{Settlement-CUSjuu8C.js → Settlement-CAKn73UQ.js} +3 -3
  7. package/dist/{Settlement-bCEYFWso.js → Settlement-CJdBUfbZ.js} +3 -3
  8. package/dist/{SettlementTransactions-nPXutj2k.js → SettlementTransactions-BCzKxoIi.js} +3 -3
  9. package/dist/{SettlementTransactions-9XyCio40.js → SettlementTransactions-pgo_qyD-.js} +3 -3
  10. package/dist/{Terminal-DxCsGi1_.js → Terminal-BGLOmnl_.js} +6 -6
  11. package/dist/{TerminalSetting-BQ91QNdH.js → TerminalSetting-CiyAJdLj.js} +211 -203
  12. package/dist/{Transaction-Jrjmd8fl.js → Transaction-DwxmCKcG.js} +7 -7
  13. package/dist/{Transaction-DfGd5rN5.js → Transaction-qyJAJekb.js} +5 -5
  14. package/dist/{TransactionOld-CWSGrz6z.js → TransactionOld-LES765mv.js} +4 -4
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BFPE-UNi.js → TransactionTable.vue_vue_type_script_setup_true_lang-BEHZCoq6.js} +3 -3
  16. package/dist/{app-BiGh687U.js → app-YY9yj-vq.js} +325 -325
  17. package/dist/app.js +1 -1
  18. package/dist/{assets-DiROg_K1.js → assets-Bka69roC.js} +2 -2
  19. package/dist/{grafana-lpqL2dP6.js → grafana-CZhYcWzi.js} +2 -2
  20. package/dist/{index-DcLKzByC.js → index-BkOR4M1w.js} +1 -1
  21. package/dist/{index-DrRMYnvp.js → index-CGg0eJIr.js} +1489 -1489
  22. package/dist/{index-CzWea4hZ.js → index-CtbszYV4.js} +1 -1
  23. package/dist/{index-iE5dQPjZ.js → index-DIG1I3Ka.js} +1 -1
  24. package/dist/{index-DKDnCFKf.js → index-DSsEAgyG.js} +1 -1
  25. package/dist/{index-dX5YU5Km.js → index-F2ifB2oW.js} +1 -1
  26. package/dist/{index-CR7ZBkKW.js → index-ZXI0wUjr.js} +2 -2
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-D6gVt-7r.js → index.vue_vue_type_script_setup_true_lang-DMZricqL.js} +1 -1
  28. package/dist/package.json +1 -1
  29. package/dist/{payout-account-CxOH7cEO.js → payout-account-9HPKjwEG.js} +3 -3
  30. package/dist/tsconfig.app.tsbuildinfo +1 -1
  31. package/dist/views/admin/terminal/tabs/SoftspaceGateway.vue.d.ts +2 -2
  32. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
- import { defineComponent as V, openBlock as w, createElementBlock as C, Fragment as R, createElementVNode as F, createTextVNode as U, toDisplayString as N, toRef as D, ref as b, watch as G, onMounted as O, computed as B, resolveComponent as f, unref as _, createVNode as g, createBlock as k, withCtx as M, createCommentVNode as T, isRef as P, resolveDynamicComponent as $, normalizeProps as j, mergeProps as L } from "vue";
2
- import { u as Y, e as x } from "./index-DrRMYnvp.js";
1
+ import { defineComponent as U, 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-CGg0eJIr.js";
3
3
  import { useRouter as J } from "vue-router";
4
- import { t as q } from "./index-CzWea4hZ.js";
4
+ import { t as C } from "./index-CtbszYV4.js";
5
5
  import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
6
- import { u as A } from "./index-iE5dQPjZ.js";
7
- import { useSnackbar as E } from "@feedmepos/ui-library";
6
+ import { u as E } from "./index-DIG1I3Ka.js";
7
+ import { useSnackbar as z } 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 K } from "@feedmepos/mf-common";
11
- const Z = /* @__PURE__ */ V({
10
+ import { useCoreStore as P } from "@feedmepos/mf-common";
11
+ const Z = /* @__PURE__ */ U({
12
12
  __name: "Information",
13
13
  props: {
14
14
  terminal: {
@@ -16,26 +16,26 @@ const Z = /* @__PURE__ */ V({
16
16
  required: !0
17
17
  }
18
18
  },
19
- setup(I) {
20
- return (m, t) => (w(), C(R, null, [
19
+ setup(y) {
20
+ return (i, t) => (b(), O(B, null, [
21
21
  t[0] || (t[0] = F("b", null, "Name", -1)),
22
- U(": " + N(I.terminal.name), 1),
22
+ q(": " + D(y.terminal.name), 1),
23
23
  t[1] || (t[1] = F("br", null, null, -1)),
24
24
  t[2] || (t[2] = F("b", null, "Status", -1)),
25
- U(": " + N(I.terminal.status), 1),
25
+ q(": " + D(y.terminal.status), 1),
26
26
  t[3] || (t[3] = F("br", null, null, -1)),
27
27
  t[4] || (t[4] = F("b", null, "Device ID", -1)),
28
- U(": " + N(I.terminal.deviceId ?? "-"), 1),
28
+ q(": " + D(y.terminal.deviceId ?? "-"), 1),
29
29
  t[5] || (t[5] = F("br", null, null, -1)),
30
30
  t[6] || (t[6] = F("b", null, "Device Type", -1)),
31
- U(": " + N(I.terminal.deviceType ?? "-"), 1),
31
+ q(": " + D(y.terminal.deviceType ?? "-"), 1),
32
32
  t[7] || (t[7] = F("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__ */ U({
39
39
  __name: "TerminalGateway",
40
40
  props: {
41
41
  terminal: {
@@ -47,63 +47,63 @@ const Z = /* @__PURE__ */ V({
47
47
  required: !0
48
48
  }
49
49
  },
50
- setup(I) {
51
- const { isLoading: m, startAsyncCall: t } = Y(), v = I, e = D(() => v.terminal), c = b(), u = b(), a = b(-1), o = b({
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({
52
52
  terminalId: ""
53
- }), d = () => {
53
+ }), c = () => {
54
54
  o.value.terminalId = "", a.value = -1;
55
55
  }, s = () => {
56
56
  if (t(async () => {
57
- c.value = await q.getRestaurantTerminals(v.terminal.referenceId);
58
- }), !v.terminal.ecrs)
59
- return d();
60
- const l = v.terminal.ecrs.findIndex((y) => y && y.gateway && y.gateway === "FeedMe");
57
+ m.value = await C.getRestaurantTerminals(p.terminal.referenceId);
58
+ }), !p.terminal.ecrs)
59
+ return c();
60
+ const l = p.terminal.ecrs.findIndex((g) => g && g.gateway && g.gateway === "FeedMe");
61
61
  if (l === -1)
62
- return d();
62
+ return c();
63
63
  a.value = l;
64
- const r = v.terminal.ecrs.at(l);
65
- r.gateway === "FeedMe" && r.config && (o.value = {
66
- terminalId: r.config.terminalId
64
+ const u = p.terminal.ecrs.at(l);
65
+ u.gateway === "FeedMe" && u.config && (o.value = {
66
+ terminalId: u.config.terminalId
67
67
  });
68
68
  };
69
- G(e, s), O(s);
70
- const p = B(() => (c.value ?? []).map((l) => ({
69
+ R(e, s), M(s);
70
+ const d = Y(() => (m.value ?? []).map((l) => ({
71
71
  label: l.name ?? l._id,
72
72
  value: l._id
73
73
  })));
74
74
  async function n(l) {
75
- var r;
76
- (r = v.terminal.ecrs) == null || r.splice(l, 1), v.onUpdate(v.terminal);
75
+ var u;
76
+ (u = p.terminal.ecrs) == null || u.splice(l, 1), p.onUpdate(p.terminal);
77
77
  }
78
- return (l, r) => {
79
- const y = f("FmCircularProgress"), S = f("FmSelect"), i = f("FmButton"), z = f("FmForm");
80
- return _(m) ? (w(), C("div", ee, [
81
- g(y, { size: "xxl" })
82
- ])) : (w(), k(z, {
78
+ return (l, u) => {
79
+ const g = v("FmCircularProgress"), V = v("FmSelect"), I = v("FmButton"), _ = v("FmForm");
80
+ return k(i) ? (b(), O("div", ee, [
81
+ f(g, { size: "xxl" })
82
+ ])) : (b(), x(_, {
83
83
  key: 1,
84
- ref: u.value,
84
+ ref: r.value,
85
85
  class: "flex flex-col gap-16 w-[500px]",
86
- onValidationSuccess: r[1] || (r[1] = () => {
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 })), v.onUpdate(e.value);
86
+ onValidationSuccess: u[1] || (u[1] = () => {
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: M(() => [
91
- g(S, {
90
+ default: N(() => [
91
+ f(V, {
92
92
  modelValue: o.value.terminalId,
93
- "onUpdate:modelValue": r[0] || (r[0] = (h) => o.value.terminalId = h),
93
+ "onUpdate:modelValue": u[0] || (u[0] = (h) => o.value.terminalId = h),
94
94
  label: "Terminal ID",
95
- items: p.value,
96
- rules: _(W)(_(X).string())
95
+ items: d.value,
96
+ rules: k(W)(k(X).string())
97
97
  }, null, 8, ["modelValue", "items", "rules"]),
98
98
  F("div", ae, [
99
- a.value > -1 ? (w(), k(i, {
99
+ a.value > -1 ? (b(), x(I, {
100
100
  key: 0,
101
101
  class: "flex-1",
102
102
  variant: "secondary",
103
103
  label: "Delete",
104
104
  onclick: () => n(a.value)
105
105
  }, null, 8, ["onclick"])) : T("", !0),
106
- g(i, {
106
+ f(I, {
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__ */ U({
119
119
  __name: "FiuuGateway",
120
120
  props: {
121
121
  terminal: {
@@ -127,76 +127,76 @@ const Z = /* @__PURE__ */ V({
127
127
  required: !0
128
128
  }
129
129
  },
130
- setup(I) {
131
- const m = I, t = K().currentCountry, v = [
130
+ setup(y) {
131
+ const i = y, t = P().currentCountry, p = [
132
132
  {
133
133
  label: "Fiuu Malaysia",
134
134
  value: "cc.feedme.payment.rms",
135
- region: x.F_COUNTRY.enum.MY
135
+ region: S.F_COUNTRY.enum.MY
136
136
  },
137
137
  {
138
138
  label: "Fiuu Malaysia V2",
139
139
  value: "cc.feedme.payment.fiuu_my",
140
- region: x.F_COUNTRY.enum.MY
140
+ region: S.F_COUNTRY.enum.MY
141
141
  },
142
142
  {
143
143
  label: "Fiuu Singapore",
144
144
  value: "cc.feedme.payment.fiuu_sg",
145
- region: x.F_COUNTRY.enum.SG
145
+ region: S.F_COUNTRY.enum.SG
146
146
  }
147
- ], e = D(() => m.terminal), c = b(), u = b(-1), a = b({
147
+ ], e = G(() => i.terminal), m = w(), r = w(-1), a = w({
148
148
  packageId: "",
149
149
  uniqueId: ""
150
150
  }), o = () => {
151
- a.value.uniqueId = "", a.value.packageId = "", u.value = -1;
152
- }, d = () => {
151
+ a.value.uniqueId = "", a.value.packageId = "", r.value = -1;
152
+ }, c = () => {
153
153
  if (!e.value.gateways)
154
154
  return o();
155
- const p = e.value.gateways.findIndex((l) => l && l.gateway && l.gateway === "Fiuu");
156
- if (p === -1)
155
+ const d = e.value.gateways.findIndex((l) => l && l.gateway && l.gateway === "Fiuu");
156
+ if (d === -1)
157
157
  return o();
158
- u.value = p;
159
- const n = e.value.gateways.at(p);
158
+ r.value = d;
159
+ const n = e.value.gateways.at(d);
160
160
  n.gateway === "Fiuu" && n.config && (a.value = {
161
161
  packageId: n.config.packageId,
162
162
  uniqueId: n.config.uniqueId
163
163
  });
164
164
  };
165
- G(e, d), O(d);
166
- async function s(p) {
165
+ R(e, c), M(c);
166
+ async function s(d) {
167
167
  var n;
168
- (n = e.value.gateways) == null || n.splice(p, 1), m.onUpdate(e.value);
168
+ (n = e.value.gateways) == null || n.splice(d, 1), i.onUpdate(e.value);
169
169
  }
170
- return (p, n) => {
171
- const l = f("FmSelect"), r = f("FmTextField"), y = f("FmButton"), S = f("FmForm");
172
- return w(), k(S, {
173
- ref: c.value,
170
+ return (d, n) => {
171
+ const l = v("FmSelect"), u = v("FmTextField"), g = v("FmButton"), V = v("FmForm");
172
+ return b(), x(V, {
173
+ ref: m.value,
174
174
  class: "flex flex-col gap-16 w-[500px]",
175
175
  onValidationSuccess: n[2] || (n[2] = () => {
176
- u.value > -1 ? e.value.gateways[u.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);
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);
177
177
  })
178
178
  }, {
179
- default: M(() => [
180
- g(l, {
179
+ default: N(() => [
180
+ f(l, {
181
181
  modelValue: a.value.packageId,
182
- "onUpdate:modelValue": n[0] || (n[0] = (i) => a.value.packageId = i),
182
+ "onUpdate:modelValue": n[0] || (n[0] = (I) => a.value.packageId = I),
183
183
  label: "Package ID",
184
- items: v.filter((i) => i.region === _(t))
184
+ items: p.filter((I) => I.region === k(t))
185
185
  }, null, 8, ["modelValue", "items"]),
186
- g(r, {
186
+ f(u, {
187
187
  modelValue: a.value.uniqueId,
188
- "onUpdate:modelValue": n[1] || (n[1] = (i) => a.value.uniqueId = i),
188
+ "onUpdate:modelValue": n[1] || (n[1] = (I) => a.value.uniqueId = I),
189
189
  label: "Unique ID"
190
190
  }, null, 8, ["modelValue"]),
191
191
  F("div", ne, [
192
- u.value > -1 ? (w(), k(y, {
192
+ r.value > -1 ? (b(), x(g, {
193
193
  key: 0,
194
194
  class: "flex-1",
195
195
  variant: "secondary",
196
196
  label: "Delete",
197
- onclick: () => s(u.value)
197
+ onclick: () => s(r.value)
198
198
  }, null, 8, ["onclick"])) : T("", !0),
199
- g(y, {
199
+ f(g, {
200
200
  type: "submit",
201
201
  class: "flex-1",
202
202
  variant: "primary",
@@ -208,7 +208,7 @@ const Z = /* @__PURE__ */ V({
208
208
  }, 512);
209
209
  };
210
210
  }
211
- }), oe = { class: "flex mt-6 space-x-6" }, re = /* @__PURE__ */ V({
211
+ }), oe = { class: "flex mt-6 space-x-6" }, ue = /* @__PURE__ */ U({
212
212
  __name: "GhlGateway",
213
213
  props: {
214
214
  terminal: {
@@ -220,66 +220,66 @@ const Z = /* @__PURE__ */ V({
220
220
  required: !0
221
221
  }
222
222
  },
223
- setup(I) {
224
- const m = I, t = D(() => m.terminal), v = b(), e = b(-1), c = b({
223
+ setup(y) {
224
+ const i = y, t = G(() => i.terminal), p = w(), e = w(-1), m = w({
225
225
  merchantId: "",
226
226
  terminalId: "",
227
227
  privateKey: ""
228
- }), u = () => {
229
- c.value.merchantId = "", c.value.terminalId = "", c.value.privateKey = "", e.value = -1;
228
+ }), r = () => {
229
+ m.value.merchantId = "", m.value.terminalId = "", m.value.privateKey = "", e.value = -1;
230
230
  }, a = () => {
231
231
  if (!t.value.ecrs)
232
- return u();
233
- const d = t.value.ecrs.findIndex((p) => p && p.gateway && p.gateway === "Ghl");
234
- if (d === -1)
235
- return u();
236
- e.value = d;
237
- const s = t.value.ecrs.at(d);
238
- s.gateway === "Ghl" && s.config && (c.value = {
232
+ return r();
233
+ const c = t.value.ecrs.findIndex((d) => d && d.gateway && d.gateway === "Ghl");
234
+ if (c === -1)
235
+ return r();
236
+ e.value = c;
237
+ const s = t.value.ecrs.at(c);
238
+ s.gateway === "Ghl" && s.config && (m.value = {
239
239
  merchantId: s.config.merchantId,
240
240
  terminalId: s.config.terminalId,
241
241
  privateKey: s.config.privateKey
242
242
  });
243
243
  };
244
- G(t, a), O(a);
245
- async function o(d) {
244
+ R(t, a), M(a);
245
+ async function o(c) {
246
246
  var s;
247
- (s = t.value.ecrs) == null || s.splice(d, 1), m.onUpdate(t.value);
247
+ (s = t.value.ecrs) == null || s.splice(c, 1), i.onUpdate(t.value);
248
248
  }
249
- return (d, s) => {
250
- const p = f("FmTextField"), n = f("FmTextarea"), l = f("FmButton"), r = f("FmForm");
251
- return w(), k(r, {
252
- ref: v.value,
249
+ return (c, s) => {
250
+ const d = v("FmTextField"), n = v("FmTextarea"), l = v("FmButton"), u = v("FmForm");
251
+ return b(), x(u, {
252
+ ref: p.value,
253
253
  class: "flex flex-col gap-16 w-[500px]",
254
254
  onValidationSuccess: s[3] || (s[3] = () => {
255
- e.value > -1 ? t.value.ecrs[e.value] = { gateway: "Ghl", config: c.value } : (t.value.ecrs || (t.value.ecrs = []), t.value.ecrs.push({ gateway: "Ghl", config: c.value })), m.onUpdate(t.value);
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
256
  })
257
257
  }, {
258
- default: M(() => [
259
- g(p, {
260
- modelValue: c.value.merchantId,
261
- "onUpdate:modelValue": s[0] || (s[0] = (y) => c.value.merchantId = y),
258
+ default: N(() => [
259
+ f(d, {
260
+ modelValue: m.value.merchantId,
261
+ "onUpdate:modelValue": s[0] || (s[0] = (g) => m.value.merchantId = g),
262
262
  label: "Merchant ID"
263
263
  }, null, 8, ["modelValue"]),
264
- g(p, {
265
- modelValue: c.value.terminalId,
266
- "onUpdate:modelValue": s[1] || (s[1] = (y) => c.value.terminalId = y),
264
+ f(d, {
265
+ modelValue: m.value.terminalId,
266
+ "onUpdate:modelValue": s[1] || (s[1] = (g) => m.value.terminalId = g),
267
267
  label: "Terminal ID"
268
268
  }, null, 8, ["modelValue"]),
269
- g(n, {
270
- modelValue: c.value.privateKey,
271
- "onUpdate:modelValue": s[2] || (s[2] = (y) => c.value.privateKey = y),
269
+ f(n, {
270
+ modelValue: m.value.privateKey,
271
+ "onUpdate:modelValue": s[2] || (s[2] = (g) => m.value.privateKey = g),
272
272
  label: "Private Key"
273
273
  }, null, 8, ["modelValue"]),
274
274
  F("div", oe, [
275
- e.value > -1 ? (w(), k(l, {
275
+ e.value > -1 ? (b(), x(l, {
276
276
  key: 0,
277
277
  class: "flex-1",
278
278
  variant: "secondary",
279
279
  label: "Delete",
280
280
  onclick: () => o(e.value)
281
281
  }, null, 8, ["onclick"])) : T("", !0),
282
- g(l, {
282
+ f(l, {
283
283
  type: "submit",
284
284
  class: "flex-1",
285
285
  variant: "primary",
@@ -291,7 +291,7 @@ const Z = /* @__PURE__ */ V({
291
291
  }, 512);
292
292
  };
293
293
  }
294
- }), ue = { key: 0 }, se = { class: "mt-6 space-x-6" }, ie = /* @__PURE__ */ V({
294
+ }), re = { key: 0 }, se = { class: "mt-6 space-x-6" }, ie = /* @__PURE__ */ U({
295
295
  __name: "KioskMode",
296
296
  props: {
297
297
  terminal: {
@@ -299,13 +299,13 @@ const Z = /* @__PURE__ */ V({
299
299
  required: !0
300
300
  }
301
301
  },
302
- setup(I) {
303
- const { isLoading: m, startAsyncCall: t } = Y(!1), v = E(), e = b({
302
+ setup(y) {
303
+ const { isLoading: i, startAsyncCall: t } = K(!1), p = z(), e = w({
304
304
  enable: !1,
305
305
  password: []
306
- }), c = I;
307
- function u() {
308
- return e.value.enable && e.value.password.filter((a) => !!a).length !== 6 ? v.open({
306
+ }), m = y;
307
+ function r() {
308
+ return e.value.enable && e.value.password.filter((a) => !!a).length !== 6 ? p.open({
309
309
  type: "error",
310
310
  message: "Unlock PIN is required when setting up kiosk mode for terminal."
311
311
  }) : t(async () => {
@@ -313,44 +313,44 @@ const Z = /* @__PURE__ */ V({
313
313
  a.enable && Object.assign(a, {
314
314
  password: e.value.password.join("")
315
315
  });
316
- const o = await q.kioskModeRequest(c.terminal._id, a);
316
+ const o = await C.kioskModeRequest(m.terminal._id, a);
317
317
  if (o === "OK")
318
- return v.open({ type: "info", message: "Kiosk mode applied successfully." });
319
- let d = o;
320
- return o === "client_not_connected" && (d = "Terminal not connected to the websocket server."), o.startsWith("terminal: ") && (d = o.replaceAll("terminal: ", "")), v.open({
318
+ 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({
321
321
  type: "error",
322
- message: d
322
+ message: c
323
323
  });
324
324
  });
325
325
  }
326
326
  return (a, o) => {
327
- const d = f("FmSwitch"), s = f("FmPinField"), p = f("FmButton");
328
- return w(), C(R, null, [
329
- g(d, {
327
+ const c = v("FmSwitch"), s = v("FmPinField"), d = v("FmButton");
328
+ return b(), O(B, null, [
329
+ f(c, {
330
330
  modelValue: e.value.enable,
331
331
  "onUpdate:modelValue": o[0] || (o[0] = (n) => e.value.enable = n),
332
332
  label: "Enable Kiosk Mode?"
333
333
  }, null, 8, ["modelValue"]),
334
- e.value.enable ? (w(), C("div", ue, [
334
+ e.value.enable ? (b(), O("div", re, [
335
335
  o[2] || (o[2] = F("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
336
- g(s, {
336
+ f(s, {
337
337
  modelValue: e.value.password,
338
338
  "onUpdate:modelValue": o[1] || (o[1] = (n) => e.value.password = n)
339
339
  }, null, 8, ["modelValue"])
340
340
  ])) : T("", !0),
341
341
  F("div", se, [
342
- g(p, {
342
+ f(d, {
343
343
  variant: "primary",
344
344
  label: "Send",
345
345
  icon: "send",
346
- loading: _(m),
347
- onclick: u
346
+ loading: k(i),
347
+ onclick: r
348
348
  }, null, 8, ["loading"])
349
349
  ])
350
350
  ], 64);
351
351
  };
352
352
  }
353
- }), me = /* @__PURE__ */ V({
353
+ }), me = /* @__PURE__ */ U({
354
354
  __name: "SettingRequest",
355
355
  props: {
356
356
  terminal: {
@@ -358,8 +358,8 @@ const Z = /* @__PURE__ */ V({
358
358
  required: !0
359
359
  }
360
360
  },
361
- setup(I) {
362
- const { settingTab: m } = A({
361
+ setup(y) {
362
+ const { settingTab: i } = E({
363
363
  settingTab: "kiosk_mode"
364
364
  }), t = [
365
365
  {
@@ -367,26 +367,26 @@ const Z = /* @__PURE__ */ V({
367
367
  value: "kiosk_mode",
368
368
  render: ie
369
369
  }
370
- ], v = I, e = B(() => t.find((c) => c.value === m.value));
371
- return (c, u) => {
370
+ ], p = y, e = Y(() => t.find((m) => m.value === i.value));
371
+ return (m, r) => {
372
372
  var o;
373
- const a = f("FmTabs");
374
- return w(), C(R, null, [
375
- u[1] || (u[1] = F("p", { className: "mt-1 my-6 text-gray-600" }, [
373
+ 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
376
  F("b", null, "Note: "),
377
- U(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
377
+ q(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
378
378
  ], -1)),
379
- g(a, {
380
- "model-value": _(m),
381
- "onUpdate:modelValue": u[0] || (u[0] = (d) => P(m) ? m.value = d : null),
379
+ f(a, {
380
+ "model-value": k(i),
381
+ "onUpdate:modelValue": r[0] || (r[0] = (c) => $(i) ? i.value = c : null),
382
382
  class: "mb-6",
383
383
  items: t
384
384
  }, null, 8, ["model-value"]),
385
- _(m) ? (w(), k($((o = e.value) == null ? void 0 : o.render), j(L({ key: 0 }, { terminal: v.terminal })), null, 16)) : T("", !0)
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
386
  ], 64);
387
387
  };
388
388
  }
389
- }), ce = { class: "flex mt-6 space-x-6" }, de = /* @__PURE__ */ V({
389
+ }), ce = { class: "flex mt-6 space-x-6" }, de = /* @__PURE__ */ U({
390
390
  __name: "SoftspaceGateway",
391
391
  props: {
392
392
  terminal: {
@@ -398,77 +398,85 @@ const Z = /* @__PURE__ */ V({
398
398
  required: !0
399
399
  }
400
400
  },
401
- setup(I) {
402
- const m = I, t = K().currentCountry, v = [
401
+ setup(y) {
402
+ const i = y, t = P().currentCountry, p = [
403
403
  {
404
404
  label: "Softspace Malaysia",
405
405
  value: "cc.feedme.payment.softspace_my",
406
- region: x.F_COUNTRY.enum.MY
406
+ region: S.F_COUNTRY.enum.MY
407
407
  }
408
- ], e = D(() => m.terminal), c = b(), u = b(-1), a = b({
408
+ ], e = G(() => i.terminal), m = w(), r = w(-1), a = w({
409
409
  packageId: "",
410
410
  uniqueId: "",
411
- developerId: ""
411
+ developerId: "",
412
+ isUat: !1
412
413
  }), o = () => {
413
- a.value.uniqueId = "", a.value.packageId = "", a.value.developerId = "", u.value = -1;
414
- }, d = () => {
414
+ a.value.uniqueId = "", a.value.packageId = "", a.value.developerId = "", r.value = -1;
415
+ }, c = () => {
415
416
  if (!e.value.gateways)
416
417
  return o();
417
- const p = e.value.gateways.findIndex((r) => r && r.gateway && r.gateway === "Softspace");
418
- if (p === -1)
418
+ const d = e.value.gateways.findIndex((u) => u && u.gateway && u.gateway === "Softspace");
419
+ if (d === -1)
419
420
  return o();
420
- u.value = p;
421
- const n = e.value.gateways.at(p);
421
+ r.value = d;
422
+ const n = e.value.gateways.at(d);
422
423
  if (n.gateway !== "Softspace" || !n.config)
423
424
  return;
424
425
  const l = JSON.parse(n.config.uniqueId);
425
426
  a.value = {
426
427
  packageId: n.config.packageId,
427
428
  uniqueId: l.uniqueId,
428
- developerId: l.developerId
429
+ developerId: l.developerId,
430
+ isUat: l.isUat
429
431
  };
430
432
  };
431
- G(e, d), O(d);
432
- async function s(p) {
433
+ R(e, c), M(c);
434
+ async function s(d) {
433
435
  var n;
434
- (n = e.value.gateways) == null || n.splice(p, 1), m.onUpdate(e.value);
436
+ (n = e.value.gateways) == null || n.splice(d, 1), i.onUpdate(e.value);
435
437
  }
436
- return (p, n) => {
437
- const l = f("FmSelect"), r = f("FmTextField"), y = f("FmButton"), S = f("FmForm");
438
- return w(), k(S, {
439
- ref: c.value,
438
+ return (d, n) => {
439
+ const l = v("FmSelect"), u = v("FmTextField"), g = v("FmCheckbox"), V = v("FmButton"), I = v("FmForm");
440
+ return b(), x(I, {
441
+ ref: m.value,
440
442
  class: "flex flex-col gap-16 w-[500px]",
441
- onValidationSuccess: n[3] || (n[3] = () => {
442
- const i = { gateway: "Softspace", config: { packageId: a.value.packageId, uniqueId: JSON.stringify({ uniqueId: a.value.uniqueId, developerId: a.value.developerId }) } };
443
- u.value > -1 ? e.value.gateways[u.value] = i : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push(i)), m.onUpdate(e.value);
443
+ onValidationSuccess: n[4] || (n[4] = () => {
444
+ const _ = { gateway: "Softspace", config: { packageId: a.value.packageId, uniqueId: JSON.stringify({ uniqueId: a.value.uniqueId, developerId: a.value.developerId }) } };
445
+ r.value > -1 ? e.value.gateways[r.value] = _ : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push(_)), i.onUpdate(e.value);
444
446
  })
445
447
  }, {
446
- default: M(() => [
447
- g(l, {
448
+ default: N(() => [
449
+ f(l, {
448
450
  modelValue: a.value.packageId,
449
- "onUpdate:modelValue": n[0] || (n[0] = (i) => a.value.packageId = i),
451
+ "onUpdate:modelValue": n[0] || (n[0] = (_) => a.value.packageId = _),
450
452
  label: "Package ID",
451
- items: v.filter((i) => i.region === _(t))
453
+ items: p.filter((_) => _.region === k(t))
452
454
  }, null, 8, ["modelValue", "items"]),
453
- g(r, {
455
+ f(u, {
454
456
  modelValue: a.value.developerId,
455
- "onUpdate:modelValue": n[1] || (n[1] = (i) => a.value.developerId = i),
457
+ "onUpdate:modelValue": n[1] || (n[1] = (_) => a.value.developerId = _),
456
458
  label: "Developer ID (MID)"
457
459
  }, null, 8, ["modelValue"]),
458
- g(r, {
460
+ f(u, {
459
461
  modelValue: a.value.uniqueId,
460
- "onUpdate:modelValue": n[2] || (n[2] = (i) => a.value.uniqueId = i),
462
+ "onUpdate:modelValue": n[2] || (n[2] = (_) => a.value.uniqueId = _),
461
463
  label: "Unique ID (TID)"
462
464
  }, null, 8, ["modelValue"]),
465
+ f(g, {
466
+ modelValue: a.value.isUat,
467
+ "onUpdate:modelValue": n[3] || (n[3] = (_) => a.value.isUat = _),
468
+ label: "Is UAT (Test)",
469
+ value: "1"
470
+ }, null, 8, ["modelValue"]),
463
471
  F("div", ce, [
464
- u.value > -1 ? (w(), k(y, {
472
+ r.value > -1 ? (b(), x(V, {
465
473
  key: 0,
466
474
  class: "flex-1",
467
475
  variant: "secondary",
468
476
  label: "Delete",
469
- onclick: () => s(u.value)
477
+ onclick: () => s(r.value)
470
478
  }, null, 8, ["onclick"])) : T("", !0),
471
- g(y, {
479
+ f(V, {
472
480
  type: "submit",
473
481
  class: "flex-1",
474
482
  variant: "primary",
@@ -480,7 +488,7 @@ const Z = /* @__PURE__ */ V({
480
488
  }, 512);
481
489
  };
482
490
  }
483
- }), ke = /* @__PURE__ */ V({
491
+ }), ke = /* @__PURE__ */ U({
484
492
  __name: "TerminalSetting",
485
493
  props: {
486
494
  terminalId: {
@@ -488,35 +496,35 @@ const Z = /* @__PURE__ */ V({
488
496
  required: !0
489
497
  }
490
498
  },
491
- setup(I) {
492
- const m = I, { tab: t } = A({
499
+ setup(y) {
500
+ const i = y, { tab: t } = E({
493
501
  tab: "information"
494
- }), { isLoading: v, startAsyncCall: e } = Y(!0), c = J(), u = E(), a = b();
502
+ }), { isLoading: p, startAsyncCall: e } = K(!0), m = J(), r = z(), a = w();
495
503
  async function o(l) {
496
504
  e(async () => {
497
505
  try {
498
- await q.updateById(
499
- m.terminalId,
506
+ await C.updateById(
507
+ i.terminalId,
500
508
  {
501
509
  name: l.name,
502
510
  status: l.status,
503
511
  ecrs: l.ecrs ?? [],
504
512
  gateways: l.gateways ?? []
505
513
  }
506
- ), a.value = await q.readById(m.terminalId), u.open({
514
+ ), a.value = await C.readById(i.terminalId), r.open({
507
515
  type: "success",
508
516
  message: "Terminal updated successfully"
509
517
  });
510
- } catch (r) {
511
- u.open({
518
+ } catch (u) {
519
+ r.open({
512
520
  type: "error",
513
521
  title: "Error occurs when update terminal",
514
- message: Q(r)
522
+ message: Q(u)
515
523
  });
516
524
  }
517
525
  });
518
526
  }
519
- const d = [
527
+ const c = [
520
528
  {
521
529
  label: "Information",
522
530
  value: "information",
@@ -535,14 +543,14 @@ const Z = /* @__PURE__ */ V({
535
543
  value: "fiuu",
536
544
  icon: "payment",
537
545
  render: le,
538
- region: [x.F_COUNTRY.enum.MY, x.F_COUNTRY.enum.SG]
546
+ region: [S.F_COUNTRY.enum.MY, S.F_COUNTRY.enum.SG]
539
547
  },
540
548
  {
541
549
  label: "Softspace",
542
550
  value: "softspace",
543
551
  icon: "payment",
544
552
  render: de,
545
- region: [x.F_COUNTRY.enum.MY, x.F_COUNTRY.enum.SG]
553
+ region: [S.F_COUNTRY.enum.MY, S.F_COUNTRY.enum.SG]
546
554
  },
547
555
  {
548
556
  label: "FeedMe Terminal",
@@ -555,35 +563,35 @@ const Z = /* @__PURE__ */ V({
555
563
  label: "GHL Terminal (V2)",
556
564
  value: "ghl",
557
565
  icon: "shopping_cart_checkout",
558
- render: re,
566
+ render: ue,
559
567
  onlyFor: ["POS", "KIOSK"],
560
- region: [x.F_COUNTRY.enum.MY]
568
+ region: [S.F_COUNTRY.enum.MY]
561
569
  }
562
- ], s = K().currentCountry, p = B(() => {
570
+ ], s = P().currentCountry, d = Y(() => {
563
571
  var l;
564
- return (l = d.find((r) => r.value === t.value)) == null ? void 0 : l.render;
572
+ return (l = c.find((u) => u.value === t.value)) == null ? void 0 : l.render;
565
573
  });
566
574
  async function n() {
567
575
  e(async () => {
568
- a.value = await q.readById(m.terminalId);
576
+ a.value = await C.readById(i.terminalId);
569
577
  });
570
578
  }
571
- return O(n), (l, r) => {
572
- var S;
573
- const y = f("FmTabs");
574
- return w(), k(H, {
575
- title: `Terminal (${(S = a.value) == null ? void 0 : S._id})`,
576
- loading: _(v),
577
- onBack: _(c).back
579
+ return M(n), (l, u) => {
580
+ var V;
581
+ const g = v("FmTabs");
582
+ return b(), x(H, {
583
+ title: `Terminal (${(V = a.value) == null ? void 0 : V._id})`,
584
+ loading: k(p),
585
+ onBack: k(m).back
578
586
  }, {
579
- default: M(() => [
580
- g(y, {
581
- "model-value": _(t),
582
- "onUpdate:modelValue": r[0] || (r[0] = (i) => P(t) ? t.value = i : null),
587
+ default: N(() => [
588
+ f(g, {
589
+ "model-value": k(t),
590
+ "onUpdate:modelValue": u[0] || (u[0] = (I) => $(t) ? t.value = I : null),
583
591
  class: "mb-6",
584
- items: d.filter((i) => !i.onlyFor || i.onlyFor.includes(a.value.deviceType)).filter((i) => !i.region || i.region.includes(_(s) ?? _(x.F_COUNTRY).enum.MY))
592
+ 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))
585
593
  }, null, 8, ["model-value", "items"]),
586
- _(t) ? (w(), k($(p.value), j(L({ key: 0 }, {
594
+ k(t) ? (b(), x(j(d.value), A(L({ key: 0 }, {
587
595
  terminal: a.value,
588
596
  onUpdate: o
589
597
  })), null, 16)) : T("", !0)