@feedmepos/mf-payment 1.1.5-beta.1 → 1.1.6

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 (35) hide show
  1. package/dist/{PayoutAccount-BERFCsMv.js → PayoutAccount-Bl2-Th-5.js} +3 -3
  2. package/dist/{PayoutAccount--j-jJWMQ.js → PayoutAccount-CBGLfBag.js} +5 -5
  3. package/dist/{PayoutAccountSetting-ChxkU61V.js → PayoutAccountSetting-DiMwWLwY.js} +3 -3
  4. package/dist/{Restaurant-DQjoEvF_.js → Restaurant-CdB7D9zA.js} +4 -4
  5. package/dist/{RestaurantSetting-Gr65NXud.js → RestaurantSetting-CQyXjYux.js} +3 -3
  6. package/dist/{Settlement-Cq_4_1ua.js → Settlement-7WRCiiQ4.js} +3 -3
  7. package/dist/Settlement-BA09mDyG.js +218 -0
  8. package/dist/{SettlementTransactions-CJbf1zL2.js → SettlementTransactions-B1dUvxhz.js} +3 -3
  9. package/dist/{SettlementTransactions-Db6_Nv3v.js → SettlementTransactions-CymvVBh8.js} +3 -3
  10. package/dist/{Terminal-xSZCzDZn.js → Terminal-DRKD8BO1.js} +6 -6
  11. package/dist/TerminalSetting-DUVbknAn.js +389 -0
  12. package/dist/{Transaction-BFgu4Xnf.js → Transaction-DQQI8kOT.js} +47 -52
  13. package/dist/{Transaction-CEh4Gnt5.js → Transaction-DcQQ_4ku.js} +6 -6
  14. package/dist/{TransactionOld-DH8MUGCs.js → TransactionOld-DJJIQo-i.js} +4 -4
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-CIqrGHo8.js → TransactionTable.vue_vue_type_script_setup_true_lang-C_3J1G8_.js} +3 -3
  16. package/dist/api/terminal/index.d.ts +0 -4
  17. package/dist/{app-D8ewtGn5.js → app-B1ZoKtpx.js} +275 -275
  18. package/dist/app.js +1 -1
  19. package/dist/{assets-DcSn4sMG.js → assets-ZXvnCE72.js} +1 -1
  20. package/dist/{grafana-DW4fh2g4.js → grafana-tSaEG-rZ.js} +7 -7
  21. package/dist/{index-uRv2m4ys.js → index-CGBOgV3E.js} +1 -1
  22. package/dist/{index-D3XaYCNd.js → index-D1dXyrdm.js} +1 -1
  23. package/dist/{index-Z5ts1fWJ.js → index-DEEbas1_.js} +1 -1
  24. package/dist/{index-Bg1fv5AY.js → index-DQcz6kdU.js} +2 -2
  25. package/dist/{index-JEYJrs6t.js → index-DlvE9K3G.js} +1 -9
  26. package/dist/{index-DcT1Yiz4.js → index-kEMG4SWc.js} +1 -1
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-BkqD1rLK.js → index.vue_vue_type_script_setup_true_lang-CwHVO04q.js} +1 -1
  28. package/dist/package.json +1 -1
  29. package/dist/{payout-account-4XGG8dyO.js → payout-account-BtTgqm7Q.js} +2 -2
  30. package/dist/tsconfig.app.tsbuildinfo +1 -1
  31. package/package.json +1 -1
  32. package/dist/Settlement-B-3O3EId.js +0 -194
  33. package/dist/TerminalSetting-BVojWrSJ.js +0 -489
  34. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +0 -87
  35. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +0 -87
@@ -0,0 +1,389 @@
1
+ import { defineComponent as T, openBlock as b, createElementBlock as N, Fragment as Y, createElementVNode as g, createTextVNode as V, toDisplayString as S, toRef as M, ref as F, watch as D, onMounted as G, computed as O, resolveComponent as f, unref as _, createVNode as I, createBlock as x, withCtx as q, createCommentVNode as B, isRef as h, resolveDynamicComponent as L, normalizeProps as j, mergeProps as z } from "vue";
2
+ import { u as R, e as U } from "./index-DQcz6kdU.js";
3
+ import { useRouter as E } from "vue-router";
4
+ import { t as C } from "./index-DlvE9K3G.js";
5
+ import { _ as A } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
6
+ import { u as H } from "./index-DEEbas1_.js";
7
+ import { useSnackbar as Q } from "@feedmepos/ui-library";
8
+ import { u as J } from "./error-K1CakhA9.js";
9
+ import { z as W, a as X } from "./validator-D5jtpt9A.js";
10
+ import { useCoreStore as $ } from "@feedmepos/mf-common";
11
+ const Z = /* @__PURE__ */ T({
12
+ __name: "Information",
13
+ props: {
14
+ terminal: {
15
+ type: Object,
16
+ required: !0
17
+ }
18
+ },
19
+ setup(y) {
20
+ return (d, e) => (b(), N(Y, null, [
21
+ e[0] || (e[0] = g("b", null, "Name", -1)),
22
+ V(": " + S(y.terminal.name), 1),
23
+ e[1] || (e[1] = g("br", null, null, -1)),
24
+ e[2] || (e[2] = g("b", null, "Status", -1)),
25
+ V(": " + S(y.terminal.status), 1),
26
+ e[3] || (e[3] = g("br", null, null, -1)),
27
+ e[4] || (e[4] = g("b", null, "Device ID", -1)),
28
+ V(": " + S(y.terminal.deviceId ?? "-"), 1),
29
+ e[5] || (e[5] = g("br", null, null, -1)),
30
+ e[6] || (e[6] = g("b", null, "Device Type", -1)),
31
+ V(": " + S(y.terminal.deviceType ?? "-"), 1),
32
+ e[7] || (e[7] = g("br", null, null, -1))
33
+ ], 64));
34
+ }
35
+ }), ee = {
36
+ key: 0,
37
+ class: "flex items-center justify-center min-h-[80vh]"
38
+ }, ae = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */ T({
39
+ __name: "TerminalGateway",
40
+ props: {
41
+ terminal: {
42
+ type: Object,
43
+ required: !0
44
+ },
45
+ onUpdate: {
46
+ type: Function,
47
+ required: !0
48
+ }
49
+ },
50
+ setup(y) {
51
+ const { isLoading: d, startAsyncCall: e } = R(), c = y, a = M(() => c.terminal), o = F(), v = F(), n = F(-1), p = F({
52
+ terminalId: ""
53
+ }), i = () => {
54
+ p.value.terminalId = "", n.value = -1;
55
+ }, l = () => {
56
+ if (e(async () => {
57
+ o.value = await C.getRestaurantTerminals(c.terminal.referenceId);
58
+ }), !c.terminal.ecrs)
59
+ return i();
60
+ const t = c.terminal.ecrs.findIndex((m) => m && m.gateway && m.gateway === "FeedMe");
61
+ if (t === -1)
62
+ return i();
63
+ n.value = t;
64
+ const r = c.terminal.ecrs.at(t);
65
+ r.gateway === "FeedMe" && r.config && (p.value = {
66
+ terminalId: r.config.terminalId
67
+ });
68
+ };
69
+ D(a, l), G(l);
70
+ const s = O(() => (o.value ?? []).map((t) => ({
71
+ label: t.name ?? t._id,
72
+ value: t._id
73
+ })));
74
+ async function u(t) {
75
+ var r;
76
+ (r = c.terminal.ecrs) == null || r.splice(t, 1), c.onUpdate(c.terminal);
77
+ }
78
+ return (t, r) => {
79
+ const m = f("FmCircularProgress"), k = f("FmSelect"), w = f("FmButton"), K = f("FmForm");
80
+ return _(d) ? (b(), N("div", ee, [
81
+ I(m, { size: "xxl" })
82
+ ])) : (b(), x(K, {
83
+ key: 1,
84
+ ref: v.value,
85
+ class: "flex flex-col gap-16 w-[500px]",
86
+ onValidationSuccess: r[1] || (r[1] = () => {
87
+ n.value > -1 ? a.value.ecrs[n.value] = { gateway: "FeedMe", config: p.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "FeedMe", config: p.value })), c.onUpdate(a.value);
88
+ })
89
+ }, {
90
+ default: q(() => [
91
+ I(k, {
92
+ modelValue: p.value.terminalId,
93
+ "onUpdate:modelValue": r[0] || (r[0] = (P) => p.value.terminalId = P),
94
+ label: "Terminal ID",
95
+ items: s.value,
96
+ rules: _(W)(_(X).string())
97
+ }, null, 8, ["modelValue", "items", "rules"]),
98
+ g("div", ae, [
99
+ n.value > -1 ? (b(), x(w, {
100
+ key: 0,
101
+ class: "flex-1",
102
+ variant: "secondary",
103
+ label: "Delete",
104
+ onclick: () => u(n.value)
105
+ }, null, 8, ["onclick"])) : B("", !0),
106
+ I(w, {
107
+ type: "submit",
108
+ class: "flex-1",
109
+ variant: "primary",
110
+ label: "Save"
111
+ })
112
+ ])
113
+ ]),
114
+ _: 1
115
+ }, 512));
116
+ };
117
+ }
118
+ }), ne = { class: "flex mt-6 space-x-6" }, le = /* @__PURE__ */ T({
119
+ __name: "FiuuGateway",
120
+ props: {
121
+ terminal: {
122
+ type: Object,
123
+ required: !0
124
+ },
125
+ onUpdate: {
126
+ type: Function,
127
+ required: !0
128
+ }
129
+ },
130
+ setup(y) {
131
+ const d = y, e = $().currentCountry, c = [
132
+ {
133
+ label: "Fiuu Malaysia",
134
+ value: "cc.feedme.payment.rms",
135
+ region: U.F_COUNTRY.enum.MY
136
+ },
137
+ {
138
+ label: "Fiuu Malaysia V2",
139
+ value: "cc.feedme.payment.fiuu_my",
140
+ region: U.F_COUNTRY.enum.MY
141
+ },
142
+ {
143
+ label: "Fiuu Singapore",
144
+ value: "cc.feedme.payment.fiuu_sg",
145
+ region: U.F_COUNTRY.enum.SG
146
+ }
147
+ ], a = M(() => d.terminal), o = F(), v = F(-1), n = F({
148
+ packageId: "",
149
+ uniqueId: ""
150
+ }), p = () => {
151
+ n.value.uniqueId = "", n.value.packageId = "", v.value = -1;
152
+ }, i = () => {
153
+ if (!a.value.gateways)
154
+ return p();
155
+ const s = a.value.gateways.findIndex((t) => t && t.gateway && t.gateway === "Fiuu");
156
+ if (s === -1)
157
+ return p();
158
+ v.value = s;
159
+ const u = a.value.gateways.at(s);
160
+ u.gateway === "Fiuu" && u.config && (n.value = {
161
+ packageId: u.config.packageId,
162
+ uniqueId: u.config.uniqueId
163
+ });
164
+ };
165
+ D(a, i), G(i);
166
+ async function l(s) {
167
+ var u;
168
+ (u = a.value.gateways) == null || u.splice(s, 1), d.onUpdate(a.value);
169
+ }
170
+ return (s, u) => {
171
+ const t = f("FmSelect"), r = f("FmTextField"), m = f("FmButton"), k = f("FmForm");
172
+ return b(), x(k, {
173
+ ref: o.value,
174
+ class: "flex flex-col gap-16 w-[500px]",
175
+ onValidationSuccess: u[2] || (u[2] = () => {
176
+ v.value > -1 ? a.value.gateways[v.value] = { gateway: "Fiuu", config: n.value } : (a.value.gateways || (a.value.gateways = []), a.value.gateways.push({ gateway: "Fiuu", config: n.value })), d.onUpdate(a.value);
177
+ })
178
+ }, {
179
+ default: q(() => [
180
+ I(t, {
181
+ modelValue: n.value.packageId,
182
+ "onUpdate:modelValue": u[0] || (u[0] = (w) => n.value.packageId = w),
183
+ label: "Package ID",
184
+ items: c.filter((w) => w.region === _(e))
185
+ }, null, 8, ["modelValue", "items"]),
186
+ I(r, {
187
+ modelValue: n.value.uniqueId,
188
+ "onUpdate:modelValue": u[1] || (u[1] = (w) => n.value.uniqueId = w),
189
+ label: "Unique ID"
190
+ }, null, 8, ["modelValue"]),
191
+ g("div", ne, [
192
+ v.value > -1 ? (b(), x(m, {
193
+ key: 0,
194
+ class: "flex-1",
195
+ variant: "secondary",
196
+ label: "Delete",
197
+ onclick: () => l(v.value)
198
+ }, null, 8, ["onclick"])) : B("", !0),
199
+ I(m, {
200
+ type: "submit",
201
+ class: "flex-1",
202
+ variant: "primary",
203
+ label: "Save"
204
+ })
205
+ ])
206
+ ]),
207
+ _: 1
208
+ }, 512);
209
+ };
210
+ }
211
+ }), re = { class: "flex mt-6 space-x-6" }, ue = /* @__PURE__ */ T({
212
+ __name: "GhlGateway",
213
+ props: {
214
+ terminal: {
215
+ type: Object,
216
+ required: !0
217
+ },
218
+ onUpdate: {
219
+ type: Function,
220
+ required: !0
221
+ }
222
+ },
223
+ setup(y) {
224
+ const d = y, e = M(() => d.terminal), c = F(), a = F(-1), o = F({
225
+ merchantId: "",
226
+ terminalId: "",
227
+ privateKey: ""
228
+ }), v = () => {
229
+ o.value.merchantId = "", o.value.terminalId = "", o.value.privateKey = "", a.value = -1;
230
+ }, n = () => {
231
+ if (!e.value.ecrs)
232
+ return v();
233
+ const i = e.value.ecrs.findIndex((s) => s && s.gateway && s.gateway === "Ghl");
234
+ if (i === -1)
235
+ return v();
236
+ a.value = i;
237
+ const l = e.value.ecrs.at(i);
238
+ l.gateway === "Ghl" && l.config && (o.value = {
239
+ merchantId: l.config.merchantId,
240
+ terminalId: l.config.terminalId,
241
+ privateKey: l.config.privateKey
242
+ });
243
+ };
244
+ D(e, n), G(n);
245
+ async function p(i) {
246
+ var l;
247
+ (l = e.value.ecrs) == null || l.splice(i, 1), d.onUpdate(e.value);
248
+ }
249
+ return (i, l) => {
250
+ const s = f("FmTextField"), u = f("FmTextarea"), t = f("FmButton"), r = f("FmForm");
251
+ return b(), x(r, {
252
+ ref: c.value,
253
+ class: "flex flex-col gap-16 w-[500px]",
254
+ onValidationSuccess: l[3] || (l[3] = () => {
255
+ a.value > -1 ? e.value.ecrs[a.value] = { gateway: "Ghl", config: o.value } : (e.value.ecrs || (e.value.ecrs = []), e.value.ecrs.push({ gateway: "Ghl", config: o.value })), d.onUpdate(e.value);
256
+ })
257
+ }, {
258
+ default: q(() => [
259
+ I(s, {
260
+ modelValue: o.value.merchantId,
261
+ "onUpdate:modelValue": l[0] || (l[0] = (m) => o.value.merchantId = m),
262
+ label: "Merchant ID"
263
+ }, null, 8, ["modelValue"]),
264
+ I(s, {
265
+ modelValue: o.value.terminalId,
266
+ "onUpdate:modelValue": l[1] || (l[1] = (m) => o.value.terminalId = m),
267
+ label: "Terminal ID"
268
+ }, null, 8, ["modelValue"]),
269
+ I(u, {
270
+ modelValue: o.value.privateKey,
271
+ "onUpdate:modelValue": l[2] || (l[2] = (m) => o.value.privateKey = m),
272
+ label: "Private Key"
273
+ }, null, 8, ["modelValue"]),
274
+ g("div", re, [
275
+ a.value > -1 ? (b(), x(t, {
276
+ key: 0,
277
+ class: "flex-1",
278
+ variant: "secondary",
279
+ label: "Delete",
280
+ onclick: () => p(a.value)
281
+ }, null, 8, ["onclick"])) : B("", !0),
282
+ I(t, {
283
+ type: "submit",
284
+ class: "flex-1",
285
+ variant: "primary",
286
+ label: "Save"
287
+ })
288
+ ])
289
+ ]),
290
+ _: 1
291
+ }, 512);
292
+ };
293
+ }
294
+ }), ge = /* @__PURE__ */ T({
295
+ __name: "TerminalSetting",
296
+ props: {
297
+ terminalId: {
298
+ type: String,
299
+ required: !0
300
+ }
301
+ },
302
+ setup(y) {
303
+ const d = y, { tab: e } = H({
304
+ tab: "information"
305
+ }), { isLoading: c, startAsyncCall: a } = R(!0), o = E(), v = Q(), n = F();
306
+ async function p(t) {
307
+ a(async () => {
308
+ try {
309
+ await C.updateById(
310
+ d.terminalId,
311
+ {
312
+ name: t.name,
313
+ status: t.status,
314
+ ecrs: t.ecrs ?? [],
315
+ gateways: t.gateways ?? []
316
+ }
317
+ ), n.value = await C.readById(d.terminalId), v.open({
318
+ type: "success",
319
+ message: "Terminal updated successfully"
320
+ });
321
+ } catch (r) {
322
+ v.open({
323
+ type: "error",
324
+ title: "Error occurs when update terminal",
325
+ message: J(r)
326
+ });
327
+ }
328
+ });
329
+ }
330
+ const i = [
331
+ {
332
+ label: "Information",
333
+ value: "information",
334
+ icon: "overview",
335
+ render: Z
336
+ },
337
+ {
338
+ label: "Fiuu",
339
+ value: "fiuu",
340
+ icon: "payment",
341
+ render: le
342
+ }
343
+ ], l = $().currentCountry, s = O(() => {
344
+ var t;
345
+ return (t = i.find((r) => r.value === e.value)) == null ? void 0 : t.render;
346
+ });
347
+ async function u() {
348
+ a(async () => {
349
+ n.value = await C.readById(d.terminalId), n.value.deviceType !== "TERMINAL" && (i.push({
350
+ label: "FeedMe Terminal",
351
+ value: "terminal",
352
+ icon: "shopping_cart_checkout",
353
+ render: te
354
+ }), l.value === U.F_COUNTRY.enum.MY && i.push({
355
+ label: "GHL Terminal (V2)",
356
+ value: "ghl",
357
+ icon: "shopping_cart_checkout",
358
+ render: ue
359
+ }));
360
+ });
361
+ }
362
+ return G(u), (t, r) => {
363
+ var k;
364
+ const m = f("FmTabs");
365
+ return b(), x(A, {
366
+ title: `Terminal (${(k = n.value) == null ? void 0 : k._id})`,
367
+ loading: _(c),
368
+ onBack: _(o).back
369
+ }, {
370
+ default: q(() => [
371
+ I(m, {
372
+ "model-value": _(e),
373
+ "onUpdate:modelValue": r[0] || (r[0] = (w) => h(e) ? e.value = w : null),
374
+ class: "mb-6",
375
+ items: i
376
+ }, null, 8, ["model-value"]),
377
+ _(e) ? (b(), x(L(s.value), j(z({ key: 0 }, {
378
+ terminal: n.value,
379
+ onUpdate: p
380
+ })), null, 16)) : B("", !0)
381
+ ]),
382
+ _: 1
383
+ }, 8, ["title", "loading", "onBack"]);
384
+ };
385
+ }
386
+ });
387
+ export {
388
+ ge as default
389
+ };
@@ -1,16 +1,16 @@
1
- import { defineComponent as b, resolveComponent as h, openBlock as m, createBlock as F, normalizeClass as R, withCtx as w, createElementVNode as _, toDisplayString as V, createElementBlock as S, unref as d, createVNode as f, Fragment as Y, renderList as C, ref as O, watch as v, isRef as I, h as y } from "vue";
2
- import { g as P, a as U, t as g, b as B, c as N } from "./assets-DcSn4sMG.js";
3
- import { h as T } from "./moment-h96o7c8I.js";
4
- import { u as G } from "./index-Z5ts1fWJ.js";
1
+ import { defineComponent as b, resolveComponent as h, openBlock as m, createBlock as F, normalizeClass as $, withCtx as T, createElementVNode as _, toDisplayString as V, createElementBlock as A, unref as d, createVNode as f, Fragment as Y, renderList as C, ref as O, watch as v, isRef as I, h as y } from "vue";
2
+ import { g as P, a as U, t as g, b as B, c as N } from "./assets-ZXvnCE72.js";
3
+ import { h as w } from "./moment-h96o7c8I.js";
4
+ import { u as G } from "./index-DEEbas1_.js";
5
5
  import { _ as L } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
6
6
  import { _ as j } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
7
7
  import { useSnackbar as Q, useDialog as z } from "@feedmepos/ui-library";
8
8
  import { w as k } from "./Modal-DB8M9o1T.js";
9
9
  import { u as x } from "./error-K1CakhA9.js";
10
10
  import { _ as H } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
11
- import { g as J } from "./grafana-DW4fh2g4.js";
12
- import { _ as W } from "./index.vue_vue_type_script_setup_true_lang-BkqD1rLK.js";
13
- import { e as D } from "./index-Bg1fv5AY.js";
11
+ import { g as J } from "./grafana-tSaEG-rZ.js";
12
+ import { _ as W } from "./index.vue_vue_type_script_setup_true_lang-CwHVO04q.js";
13
+ import { e as D } from "./index-DQcz6kdU.js";
14
14
  import { _ as X } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
15
15
  const Z = /* @__PURE__ */ b({
16
16
  __name: "Status",
@@ -23,14 +23,14 @@ const Z = /* @__PURE__ */ b({
23
23
  function o() {
24
24
  return a.data === D.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === D.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : a.data === D.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
25
25
  }
26
- return (i, s) => {
26
+ return (c, s) => {
27
27
  const p = h("FmBadge");
28
28
  return m(), F(p, {
29
29
  inline: "",
30
- class: R(o())
30
+ class: $(o())
31
31
  }, {
32
- default: w(() => [
33
- _("div", null, V(i.data), 1)
32
+ default: T(() => [
33
+ _("div", null, V(c.data), 1)
34
34
  ]),
35
35
  _: 1
36
36
  }, 8, ["class"]);
@@ -43,7 +43,7 @@ const Z = /* @__PURE__ */ b({
43
43
  data: {}
44
44
  },
45
45
  setup(u) {
46
- return (a, o) => (m(), S("img", {
46
+ return (a, o) => (m(), A("img", {
47
47
  class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
48
48
  src: d(P)(a.row.original.gateway)
49
49
  }, null, 8, ee));
@@ -55,7 +55,7 @@ const Z = /* @__PURE__ */ b({
55
55
  data: {}
56
56
  },
57
57
  setup(u) {
58
- return (a, o) => (m(), S("img", {
58
+ return (a, o) => (m(), A("img", {
59
59
  class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
60
60
  src: d(U)(a.row.original.method.issuer, a.row.original.method.variant)
61
61
  }, null, 8, ae));
@@ -93,25 +93,25 @@ const Z = /* @__PURE__ */ b({
93
93
  action: "history"
94
94
  }
95
95
  ];
96
- return (o, i) => {
97
- const s = h("FmIcon"), p = h("FmMenuItem"), A = h("FmMenu");
98
- return m(), S("div", {
99
- onClick: i[0] || (i[0] = (c) => {
100
- c.stopPropagation();
96
+ return (o, c) => {
97
+ const s = h("FmIcon"), p = h("FmMenuItem"), S = h("FmMenu");
98
+ return m(), A("div", {
99
+ onClick: c[0] || (c[0] = (i) => {
100
+ i.stopPropagation();
101
101
  })
102
102
  }, [
103
- f(A, null, {
104
- "menu-button": w(() => [
103
+ f(S, null, {
104
+ "menu-button": T(() => [
105
105
  f(s, { name: "settings" })
106
106
  ]),
107
- default: w(() => [
108
- (m(!0), S(Y, null, C(a.filter((c) => !!c), (c) => (m(), F(p, {
107
+ default: T(() => [
108
+ (m(!0), A(Y, null, C(a.filter((i) => !!i), (i) => (m(), F(p, {
109
109
  selectable: !0,
110
- key: c.label,
111
- sublabel: c.sublabel,
112
- label: c.label,
113
- icon: c.icon,
114
- onclick: () => o.onAction(c.action)
110
+ key: i.label,
111
+ sublabel: i.sublabel,
112
+ label: i.label,
113
+ icon: i.icon,
114
+ onclick: () => o.onAction(i.action)
115
115
  }, null, 8, ["sublabel", "label", "icon", "onclick"]))), 128))
116
116
  ]),
117
117
  _: 1
@@ -119,24 +119,24 @@ const Z = /* @__PURE__ */ b({
119
119
  ]);
120
120
  };
121
121
  }
122
- }), oe = { class: "flex justify-between mb-6 items-center" }, se = { class: "flex space-x-4" }, ce = { class: "flex space-x-4 self-center" }, ie = { class: "mb-6" }, Ae = /* @__PURE__ */ b({
122
+ }), oe = { class: "flex justify-between mb-6 items-center" }, se = { class: "flex space-x-4" }, ie = { class: "flex space-x-4 self-center" }, ce = { class: "mb-6" }, Se = /* @__PURE__ */ b({
123
123
  __name: "Transaction",
124
124
  setup(u) {
125
- const a = O(), { dateRange: o, searchKey: i } = G({
125
+ const a = O(), { dateRange: o, searchKey: c } = G({
126
126
  searchKey: "",
127
127
  dateRange: {
128
- startDate: T().startOf("day").format("YYYY-MM-DD"),
129
- endDate: T().endOf("day").format("YYYY-MM-DD")
128
+ startDate: w().startOf("day").format("YYYY-MM-DD"),
129
+ endDate: w().endOf("day").format("YYYY-MM-DD")
130
130
  }
131
- }), s = Q(), p = z(), A = async (t, e) => {
131
+ }), s = Q(), p = z(), S = async (t, e) => {
132
132
  let r = parseInt(e);
133
133
  Number.isNaN(r) && (r = 1);
134
134
  const n = await g.readTransactions({
135
- start: T(o.value.startDate).startOf("day").toISOString(),
136
- end: T(o.value.endDate).endOf("day").toISOString(),
135
+ start: w(o.value.startDate).startOf("day").toISOString(),
136
+ end: w(o.value.endDate).endOf("day").toISOString(),
137
137
  limit: t,
138
138
  skip: (r - 1) * t,
139
- search: i.value
139
+ search: c.value
140
140
  }), l = n.length == t;
141
141
  return {
142
142
  data: B(n),
@@ -149,9 +149,9 @@ const Z = /* @__PURE__ */ b({
149
149
  var t;
150
150
  (t = a.value) == null || t.reset();
151
151
  });
152
- let c;
153
- v(i, async () => {
154
- c && clearTimeout(c), c = setTimeout(() => {
152
+ let i;
153
+ v(c, async () => {
154
+ i && clearTimeout(i), i = setTimeout(() => {
155
155
  var t;
156
156
  (t = a.value) == null || t.reset();
157
157
  }, 700);
@@ -269,7 +269,7 @@ const Z = /* @__PURE__ */ b({
269
269
  ], e.transactionAt);
270
270
  window.open(r, "_blank");
271
271
  }
272
- const $ = [
272
+ const R = [
273
273
  {
274
274
  header: () => "Transaction ID",
275
275
  accessorKey: "id",
@@ -321,11 +321,6 @@ const Z = /* @__PURE__ */ b({
321
321
  accessorKey: "source",
322
322
  cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
323
323
  },
324
- {
325
- header: () => "Source",
326
- accessorKey: "source",
327
- cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
328
- },
329
324
  {
330
325
  header: () => "Transaction At",
331
326
  accessorKey: "transactionAt",
@@ -375,18 +370,18 @@ const Z = /* @__PURE__ */ b({
375
370
  title: "Transactions",
376
371
  loading: !1
377
372
  }, {
378
- default: w(() => [
373
+ default: T(() => [
379
374
  _("div", oe, [
380
375
  _("div", se, [
381
376
  f(r, {
382
- "model-value": d(i),
383
- "onUpdate:modelValue": e[0] || (e[0] = (n) => I(i) ? i.value = n : null),
377
+ "model-value": d(c),
378
+ "onUpdate:modelValue": e[0] || (e[0] = (n) => I(c) ? c.value = n : null),
384
379
  class: "mr-8",
385
380
  label: "Search",
386
381
  placeholder: "Search Transactions ..."
387
382
  }, null, 8, ["model-value"])
388
383
  ]),
389
- _("div", ce, [
384
+ _("div", ie, [
390
385
  f(j, {
391
386
  button: {
392
387
  appendIcon: "file_download",
@@ -402,7 +397,7 @@ const Z = /* @__PURE__ */ b({
402
397
  }, null, 8, ["handler"])
403
398
  ])
404
399
  ]),
405
- _("div", ie, [
400
+ _("div", ce, [
406
401
  f(H, {
407
402
  modelValue: d(o),
408
403
  "onUpdate:modelValue": e[1] || (e[1] = (n) => I(o) ? o.value = n : null)
@@ -411,9 +406,9 @@ const Z = /* @__PURE__ */ b({
411
406
  f(W, {
412
407
  ref_key: "controller",
413
408
  ref: a,
414
- "column-defs": $,
409
+ "column-defs": R,
415
410
  "rows-defs": (n) => n,
416
- paginate: A
411
+ paginate: S
417
412
  }, null, 8, ["rows-defs"])
418
413
  ]),
419
414
  _: 1
@@ -422,5 +417,5 @@ const Z = /* @__PURE__ */ b({
422
417
  }
423
418
  });
424
419
  export {
425
- Ae as default
420
+ Se as default
426
421
  };
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as B, ref as g, watch as E, computed as I, onMounted as J, resolveComponent as y, openBlock as v, createElementBlock as P, Fragment as Y, unref as t, createBlock as N, createCommentVNode as O, withCtx as T, createVNode as i, renderList as k, createElementVNode as V, isRef as b } from "vue";
2
- import { t as L, b as G } from "./assets-DcSn4sMG.js";
3
- import { u as K, _ as C } from "./index-Bg1fv5AY.js";
4
- import { _ as Q } from "./TransactionTable.vue_vue_type_script_setup_true_lang-CIqrGHo8.js";
2
+ import { t as L, b as G } from "./assets-ZXvnCE72.js";
3
+ import { u as K, _ as C } from "./index-DQcz6kdU.js";
4
+ import { _ as Q } from "./TransactionTable.vue_vue_type_script_setup_true_lang-C_3J1G8_.js";
5
5
  import { h as $ } from "./moment-h96o7c8I.js";
6
6
  import { useI18n as j, useCoreStore as q } from "@feedmepos/mf-common";
7
7
  import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
8
- import { u as W } from "./index-Z5ts1fWJ.js";
8
+ import { u as W } from "./index-DEEbas1_.js";
9
9
  import { _ as X } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
10
10
  import { _ as Z } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
11
11
  import { _ as ee } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
12
- import { p as te } from "./index-DcT1Yiz4.js";
13
- import { t as ae } from "./index-JEYJrs6t.js";
12
+ import { p as te } from "./index-kEMG4SWc.js";
13
+ import { t as ae } from "./index-DlvE9K3G.js";
14
14
  const ne = /* @__PURE__ */ B({
15
15
  __name: "SourceSelector",
16
16
  props: {
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as T, ref as h, onMounted as Y, watch as f, resolveComponent as V, openBlock as C, createBlock as M, unref as t, withCtx as O, createElementVNode as u, createVNode as i, isRef as y } from "vue";
2
- import { t as g, b as S } from "./assets-DcSn4sMG.js";
3
- import { u as $ } from "./index-Bg1fv5AY.js";
4
- import { _ as N } from "./TransactionTable.vue_vue_type_script_setup_true_lang-CIqrGHo8.js";
2
+ import { t as g, b as S } from "./assets-ZXvnCE72.js";
3
+ import { u as $ } from "./index-DQcz6kdU.js";
4
+ import { _ as N } from "./TransactionTable.vue_vue_type_script_setup_true_lang-C_3J1G8_.js";
5
5
  import { h as x } from "./moment-h96o7c8I.js";
6
6
  import { useCoreStore as k, useI18n as E } from "@feedmepos/mf-common";
7
7
  import { _ as L } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
8
- import { u as P } from "./index-Z5ts1fWJ.js";
8
+ import { u as P } from "./index-DEEbas1_.js";
9
9
  import { _ as A } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
10
10
  import { _ as B } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-hJAJYKmE.js";
11
11
  import { _ as F } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as m, resolveComponent as d, openBlock as l, createBlock as f, normalizeClass as v, withCtx as y, createElementVNode as x, toDisplayString as P, createElementBlock as w, unref as E, createVNode as I, Fragment as R, renderList as V, ref as D, h as p } from "vue";
2
2
  import { useSnackbar as U, useDialog as B } from "@feedmepos/ui-library";
3
- import { g as $, a as L, t as b, c as N } from "./assets-DcSn4sMG.js";
4
- import { e as h } from "./index-Bg1fv5AY.js";
5
- import { g as G } from "./grafana-DW4fh2g4.js";
3
+ import { g as $, a as L, t as b, c as N } from "./assets-ZXvnCE72.js";
4
+ import { e as h } from "./index-DQcz6kdU.js";
5
+ import { g as G } from "./grafana-tSaEG-rZ.js";
6
6
  import { w as k } from "./Modal-DB8M9o1T.js";
7
7
  import { u as T } from "./error-K1CakhA9.js";
8
8
  import { useCoreStore as O, useI18n as Y } from "@feedmepos/mf-common";
@@ -17,8 +17,4 @@ export declare const temrinalApi: {
17
17
  delete(id: string): Promise<any>;
18
18
  getBusinessTerminals(): Promise<FdoPortalTerminal[]>;
19
19
  getRestaurantTerminals(restaurantId: string): Promise<FdoPortalTerminal[]>;
20
- kioskModeRequest(id: string, payload: {
21
- enable: boolean;
22
- password?: string;
23
- }): Promise<FdoPortalTerminal>;
24
20
  };