@feedmepos/mf-payment 0.0.0-beta.37 → 0.0.0-beta.39

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ import { p as z } from "./index-ApzEWD1P.js";
3
3
  import { _ as I, u as S, c as h } from "./index-Cnxt2xmc.js";
4
4
  import { defineStore as _ } from "pinia";
5
5
  import { useCoreStore as $ } from "@feedmepos/mf-common";
6
- import { c as AA, P as j } from "./payout-account-DKm-YncB.js";
6
+ import { c as AA, P as j } from "./payout-account-yu8hGM_j.js";
7
7
  import { useDialogChild as sA, useDialog as eA } from "@feedmepos/ui-library";
8
8
  import { z as f, a as q } from "./validator-D5jtpt9A.js";
9
9
  import { P as K } from "./PDFViewer-CjH_C1uT.js";
@@ -2,10 +2,10 @@ import { defineComponent as b, resolveComponent as m, openBlock as g, createBloc
2
2
  import { u as S } from "./index-BgnU5ezY.js";
3
3
  import { _ as O } from "./index-Cnxt2xmc.js";
4
4
  import { _ as K } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
5
- import { P as V } from "./payout-account-DKm-YncB.js";
5
+ import { P as V } from "./payout-account-yu8hGM_j.js";
6
6
  import { p as D } from "./index-ApzEWD1P.js";
7
7
  import "@feedmepos/ui-library";
8
- import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-B8eGz19R.js";
8
+ import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-D2Eefuww.js";
9
9
  import { useRouter as $ } from "vue-router";
10
10
  const G = /* @__PURE__ */ b({
11
11
  __name: "Status",
@@ -2,7 +2,7 @@ import { defineComponent as x, openBlock as f, createElementBlock as B, createTe
2
2
  import "./index-Cnxt2xmc.js";
3
3
  import { h as Y } from "./moment-h96o7c8I.js";
4
4
  import { u as j } from "./index-BgnU5ezY.js";
5
- import { _ as q } from "./index.vue_vue_type_script_setup_true_lang-B8eGz19R.js";
5
+ import { _ as q } from "./index.vue_vue_type_script_setup_true_lang-D2Eefuww.js";
6
6
  import { _ as Q } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
7
7
  import { useSnackbar as $, useDialogChild as G, useDialog as H } from "@feedmepos/ui-library";
8
8
  import { t as A } from "./index-CBFVJirn.js";
@@ -1,8 +1,8 @@
1
- import { defineComponent as I, openBlock as y, createElementBlock as w, unref as i, createCommentVNode as V, createElementVNode as h, resolveComponent as g, createBlock as v, normalizeClass as K, withCtx as N, toDisplayString as C, createVNode as p, Fragment as $, renderList as L, ref as P, watch as R, isRef as x, h as A } from "vue";
1
+ import { defineComponent as I, openBlock as y, createElementBlock as h, unref as c, createCommentVNode as V, createElementVNode as w, resolveComponent as g, createBlock as v, normalizeClass as K, withCtx as N, toDisplayString as C, createVNode as p, Fragment as $, renderList as L, ref as P, watch as F, isRef as x, h as A } from "vue";
2
2
  import { e as f } from "./index-Cnxt2xmc.js";
3
- import { h as F } from "./moment-h96o7c8I.js";
3
+ import { h as R } from "./moment-h96o7c8I.js";
4
4
  import { u as B } from "./index-BgnU5ezY.js";
5
- import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-B8eGz19R.js";
5
+ import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-D2Eefuww.js";
6
6
  import { _ as U } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
7
7
  import { useSnackbar as Y, useDialog as Q } from "@feedmepos/ui-library";
8
8
  import { g as W } from "./assets-sX1_K-nt.js";
@@ -20,15 +20,15 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
20
20
  data: {}
21
21
  },
22
22
  setup(T) {
23
- return (a, m) => (y(), w("div", ee, [
24
- a.row.original.ecrGateway ? (y(), w("img", {
23
+ return (a, m) => (y(), h("div", ee, [
24
+ a.row.original.ecrGateway ? (y(), h("img", {
25
25
  key: 0,
26
26
  class: "bg-fm-color-overlay-background rounded-md m-auto border-transparent w-[32px] h-[32px]",
27
- src: i(j)
27
+ src: c(j)
28
28
  }, null, 8, te)) : V("", !0),
29
- h("img", {
29
+ w("img", {
30
30
  class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
31
- src: i(W)(a.row.original.gateway)
31
+ src: c(W)(a.row.original.gateway)
32
32
  }, null, 8, ae)
33
33
  ]));
34
34
  }
@@ -43,14 +43,14 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
43
43
  function m() {
44
44
  return a.data === f.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === f.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : a.data === f.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
45
45
  }
46
- return (r, l) => {
46
+ return (o, l) => {
47
47
  const s = g("FmBadge");
48
48
  return y(), v(s, {
49
49
  inline: "",
50
50
  class: K(m())
51
51
  }, {
52
52
  default: N(() => [
53
- h("div", null, C(r.data.toUpperCase()), 1)
53
+ w("div", null, C(o.data.toUpperCase()), 1)
54
54
  ]),
55
55
  _: 1
56
56
  }, 8, ["class"]);
@@ -64,13 +64,13 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
64
64
  },
65
65
  setup(T) {
66
66
  const a = T, m = X();
67
- function r() {
67
+ function o() {
68
68
  m.push(a.route);
69
69
  }
70
- return (l, s) => (y(), w("div", {
70
+ return (l, s) => (y(), h("div", {
71
71
  class: "fm-typo-en-link-md-600",
72
72
  onClick: s[0] || (s[0] = (u) => {
73
- u.stopPropagation(), r();
73
+ u.stopPropagation(), o();
74
74
  })
75
75
  }, C(l.data), 1));
76
76
  }
@@ -94,11 +94,11 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
94
94
  action: "refund"
95
95
  }
96
96
  ];
97
- return (m, r) => {
97
+ return (m, o) => {
98
98
  const l = g("FmIcon"), s = g("FmMenuItem"), u = g("FmMenu");
99
- return y(), w("div", {
100
- onClick: r[0] || (r[0] = (c) => {
101
- c.stopPropagation();
99
+ return y(), h("div", {
100
+ onClick: o[0] || (o[0] = (i) => {
101
+ i.stopPropagation();
102
102
  })
103
103
  }, [
104
104
  p(u, null, {
@@ -106,13 +106,13 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
106
106
  p(l, { name: "settings" })
107
107
  ]),
108
108
  default: N(() => [
109
- (y(), w($, null, L(a, (c) => p(s, {
109
+ (y(), h($, null, L(a, (i) => p(s, {
110
110
  selectable: !0,
111
- key: c.label,
112
- sublabel: c.sublabel,
113
- label: c.label,
114
- icon: c.icon,
115
- onclick: () => m.onAction(c.action)
111
+ key: i.label,
112
+ sublabel: i.sublabel,
113
+ label: i.label,
114
+ icon: i.icon,
115
+ onclick: () => m.onAction(i.action)
116
116
  }, null, 8, ["sublabel", "label", "icon", "onclick"])), 64))
117
117
  ]),
118
118
  _: 1
@@ -120,34 +120,34 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
120
120
  ]);
121
121
  };
122
122
  }
123
- }), le = { class: "flex justify-between mb-6 items-start" }, ce = { class: "flex space-x-4 items-start" }, ie = { class: "flex space-x-4" }, xe = /* @__PURE__ */ I({
123
+ }), le = { class: "flex justify-between mb-6 items-start" }, ie = { class: "flex space-x-4 items-start" }, ce = { class: "flex space-x-4" }, xe = /* @__PURE__ */ I({
124
124
  __name: "TerminalTransaction",
125
125
  setup(T) {
126
- const a = Y(), m = Q(), r = P(), { dateRange: l, status: s, searchKey: u } = B({
126
+ const a = Y(), m = Q(), o = P(), { dateRange: l, status: s, searchKey: u } = B({
127
127
  searchKey: "",
128
128
  status: [f.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
129
129
  dateRange: {
130
- startDate: F().startOf("day").toISOString(),
131
- endDate: F().endOf("day").toISOString()
130
+ startDate: R().startOf("day").toISOString(),
131
+ endDate: R().endOf("day").toISOString()
132
132
  }
133
133
  });
134
- R([l, s], () => {
134
+ F([l, s], () => {
135
135
  var e;
136
- return (e = r.value) == null ? void 0 : e.reset();
136
+ return (e = o.value) == null ? void 0 : e.reset();
137
137
  });
138
- let c;
139
- R(u, async () => {
140
- c && clearTimeout(c), c = setTimeout(
138
+ let i;
139
+ F(u, async () => {
140
+ i && clearTimeout(i), i = setTimeout(
141
141
  () => {
142
142
  var e;
143
- return (e = r.value) == null ? void 0 : e.reset();
143
+ return (e = o.value) == null ? void 0 : e.reset();
144
144
  },
145
145
  700
146
146
  );
147
147
  });
148
- async function E(e) {
149
- var o, d, _;
150
- const t = (d = (o = r.value) == null ? void 0 : o.pageData()) == null ? void 0 : d.at(e);
148
+ async function k(e) {
149
+ var r, d, _;
150
+ const t = (d = (r = o.value) == null ? void 0 : r.pageData()) == null ? void 0 : d.at(e);
151
151
  if (!t) {
152
152
  a.open({
153
153
  type: "error",
@@ -166,7 +166,7 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
166
166
  }
167
167
  try {
168
168
  const n = await b.queryTransaction(t._id);
169
- (_ = r.value) == null || _.replaceData(e, n), a.open({
169
+ (_ = o.value) == null || _.replaceData(e, n), a.open({
170
170
  type: "success",
171
171
  title: "Transaction queried and updated successfully."
172
172
  });
@@ -178,9 +178,9 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
178
178
  });
179
179
  }
180
180
  }
181
- async function k(e) {
182
- var o, d;
183
- const t = (d = (o = r.value) == null ? void 0 : o.pageData()) == null ? void 0 : d.at(e);
181
+ async function E(e) {
182
+ var r, d;
183
+ const t = (d = (r = o.value) == null ? void 0 : r.pageData()) == null ? void 0 : d.at(e);
184
184
  if (!t) {
185
185
  a.open({
186
186
  type: "error",
@@ -209,7 +209,7 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
209
209
  reason: "portal transaction refund",
210
210
  amount: t.details.amount
211
211
  });
212
- (_ = r.value) == null || _.replaceData(e, n), a.open({
212
+ (_ = o.value) == null || _.replaceData(e, n), a.open({
213
213
  type: "success",
214
214
  title: "Transaction queried and updated successfully."
215
215
  });
@@ -242,17 +242,17 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
242
242
  }
243
243
  ], D = function(e) {
244
244
  const t = e;
245
- let o = "-";
246
- return t.details && t.details.amount && (o = z(t.details.amount).toFormat("$0.00")), {
245
+ let r = "-";
246
+ return t.details && t.details.amount && (r = z(t.details.amount).toFormat("$0.00")), {
247
247
  id: e._id,
248
248
  refId: e.refId,
249
249
  owner: e.owner,
250
250
  terminalId: e.terminalId,
251
- transactionAt: F(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
251
+ transactionAt: R(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
252
252
  action: e.action,
253
253
  gateway: e.gateway,
254
254
  ecrGateway: e.ecrGateway,
255
- amount: o
255
+ amount: r
256
256
  };
257
257
  }, M = [
258
258
  {
@@ -269,13 +269,13 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
269
269
  meta: {
270
270
  textAlign: "left"
271
271
  },
272
- cell: ({ cell: e }) => {
273
- const t = e.getValue();
272
+ cell: ({ cell: e, row: t }) => {
273
+ const r = e.getValue();
274
274
  return A(oe, {
275
- data: t,
275
+ data: r,
276
276
  route: {
277
277
  name: "mf-payment-admin.terminal-setting",
278
- params: { terminalId: t }
278
+ params: { terminalId: r }
279
279
  }
280
280
  });
281
281
  }
@@ -333,12 +333,12 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
333
333
  if (e.original.gateway === "ScanPay")
334
334
  return A(se, {
335
335
  onAction: (t) => {
336
- const o = e.index;
336
+ const r = e.index;
337
337
  switch (t) {
338
338
  case "query":
339
- return E(o);
339
+ return k(r);
340
340
  case "refund":
341
- return k(o);
341
+ return E(r);
342
342
  }
343
343
  }
344
344
  });
@@ -346,23 +346,23 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
346
346
  }
347
347
  ];
348
348
  return (e, t) => {
349
- const o = g("FmSearch"), d = g("FmSelect"), _ = g("FmDateRangePicker");
349
+ const r = g("FmSearch"), d = g("FmSelect"), _ = g("FmDateRangePicker");
350
350
  return y(), v(U, {
351
351
  title: "Offline Transactions",
352
352
  loading: !1
353
353
  }, {
354
354
  default: N(() => [
355
- h("div", le, [
356
- h("div", ce, [
357
- p(o, {
358
- "model-value": i(u),
355
+ w("div", le, [
356
+ w("div", ie, [
357
+ p(r, {
358
+ "model-value": c(u),
359
359
  "onUpdate:modelValue": t[0] || (t[0] = (n) => x(u) ? u.value = n : null),
360
360
  class: "mr-8",
361
361
  label: "Search",
362
362
  placeholder: "Search Transactions ..."
363
363
  }, null, 8, ["model-value"]),
364
364
  p(d, {
365
- modelValue: i(s),
365
+ modelValue: c(s),
366
366
  "onUpdate:modelValue": t[1] || (t[1] = (n) => x(s) ? s.value = n : null),
367
367
  class: "mr-6 w-[300px]",
368
368
  label: "Status",
@@ -371,38 +371,40 @@ const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I
371
371
  items: O
372
372
  }, null, 8, ["modelValue"]),
373
373
  p(_, {
374
- modelValue: i(l),
374
+ modelValue: c(l),
375
375
  "onUpdate:modelValue": t[2] || (t[2] = (n) => x(l) ? l.value = n : null),
376
376
  compare: "",
377
377
  "show-predefined-range": ""
378
378
  }, null, 8, ["modelValue"])
379
379
  ]),
380
- h("div", ie, [
380
+ w("div", ce, [
381
381
  p(H, {
382
382
  button: {
383
383
  appendIcon: "file_download",
384
384
  variant: "primary",
385
385
  label: "Export"
386
386
  },
387
- handler: () => {
387
+ handler: async () => {
388
388
  var n;
389
- return i(b).downloadTransactions(((n = r.value) == null ? void 0 : n.data()) ?? []);
389
+ return c(b).downloadTransactions(await ((n = o.value) == null ? void 0 : n.allData()) ?? []);
390
390
  }
391
391
  }, null, 8, ["handler"])
392
392
  ])
393
393
  ]),
394
394
  p(G, {
395
395
  ref_key: "controller",
396
- ref: r,
396
+ ref: o,
397
397
  "column-defs": M,
398
398
  "rows-defs": D,
399
- paginate: (n, q) => i(b).readTransactions({
400
- status: i(s),
401
- searchKey: i(u),
399
+ onRowClick: t[3] || (t[3] = () => {
400
+ }),
401
+ paginate: (n, q) => c(b).readTransactions({
402
+ status: c(s),
403
+ searchKey: c(u),
402
404
  limit: n,
403
405
  cursor: q,
404
- start: i(l).startDate,
405
- end: i(l).endDate
406
+ start: c(l).startDate,
407
+ end: c(l).endDate
406
408
  })
407
409
  }, null, 8, ["paginate"])
408
410
  ]),
@@ -1,17 +1,16 @@
1
- import { defineComponent as N, openBlock as _, createElementBlock as w, Fragment as F, unref as t, createCommentVNode as k, createElementVNode as d, resolveComponent as p, createBlock as R, normalizeClass as D, withCtx as C, toDisplayString as V, ref as K, watch as T, createVNode as i, isRef as g, h } from "vue";
1
+ import { defineComponent as N, openBlock as _, createElementBlock as x, Fragment as F, unref as t, createCommentVNode as k, createElementVNode as d, resolveComponent as p, createBlock as R, normalizeClass as D, withCtx as C, toDisplayString as V, ref as K, watch as T, createVNode as i, isRef as g, h } from "vue";
2
2
  import { e as l } from "./index-Cnxt2xmc.js";
3
3
  import { h as I } from "./moment-h96o7c8I.js";
4
4
  import { u as M } from "./index-BgnU5ezY.js";
5
- import { _ as $ } from "./index.vue_vue_type_script_setup_true_lang-B8eGz19R.js";
5
+ import { _ as $ } from "./index.vue_vue_type_script_setup_true_lang-D2Eefuww.js";
6
6
  import "@feedmepos/ui-library";
7
7
  import { g as L } from "./assets-sX1_K-nt.js";
8
- import { E as B, t as x } from "./index-Dlszue3Y.js";
8
+ import { E as B, t as w } from "./index-Dlszue3Y.js";
9
9
  import { d as G } from "./dinero-CIVmXLL-.js";
10
10
  import { _ as P } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
11
11
  import { useCoreStore as U } from "@feedmepos/mf-common";
12
12
  import { _ as Y } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
13
  import { _ as W } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
14
- import "vue-router";
15
14
  import { _ as j } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
16
15
  const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
17
16
  __name: "Gateway",
@@ -20,8 +19,8 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
20
19
  data: {}
21
20
  },
22
21
  setup(f) {
23
- return (n, s) => (_(), w(F, null, [
24
- n.row.original.ecrGateway ? (_(), w("img", {
22
+ return (n, s) => (_(), x(F, null, [
23
+ n.row.original.ecrGateway ? (_(), x("img", {
25
24
  key: 0,
26
25
  class: "bg-fm-color-overlay-background rounded-md m-auto border-transparent w-[32px] h-[32px]",
27
26
  src: t(B)
@@ -56,7 +55,7 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
56
55
  }, 8, ["class"]);
57
56
  };
58
57
  }
59
- }), J = { class: "flex justify-between mb-6 items-start" }, X = { class: "flex space-x-8 items-start" }, Z = { class: "flex space-x-4" }, fe = /* @__PURE__ */ N({
58
+ }), J = { class: "flex justify-between mb-6 items-start" }, X = { class: "flex space-x-8 items-start" }, Z = { class: "flex space-x-4" }, _e = /* @__PURE__ */ N({
60
59
  __name: "TerminalTransaction",
61
60
  setup(f) {
62
61
  const { currentRestaurant: n } = U(), s = K(), { dateRange: o, status: m, searchKey: c } = M({
@@ -213,7 +212,7 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
213
212
  },
214
213
  handler: () => {
215
214
  var r;
216
- return t(x).downloadTransactions(((r = s.value) == null ? void 0 : r.data()) ?? []);
215
+ return t(w).downloadTransactions(((r = s.value) == null ? void 0 : r.data()) ?? []);
217
216
  }
218
217
  }, null, 8, ["handler"])
219
218
  ])
@@ -223,16 +222,14 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
223
222
  ref: s,
224
223
  "column-defs": O,
225
224
  "rows-defs": E,
226
- paginate: (r, b) => t(x).readRestaurantTransactions({
225
+ paginate: (r, b) => t(w).readRestaurantTransactions({
227
226
  status: t(m),
228
227
  searchKey: t(c),
229
228
  limit: r,
230
229
  cursor: b,
231
230
  start: t(o).startDate,
232
231
  end: t(o).endDate
233
- }),
234
- onRowClick: () => {
235
- }
232
+ })
236
233
  }, null, 8, ["paginate"])
237
234
  ]),
238
235
  _: 1
@@ -241,5 +238,5 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
241
238
  }
242
239
  });
243
240
  export {
244
- fe as default
241
+ _e as default
245
242
  };
package/dist/app.js CHANGED
@@ -1,15 +1,15 @@
1
- import { createRouter as R, createWebHistory as D, useRouter as I } from "vue-router";
2
- import { computed as f, watch as c, defineComponent as y, ref as P, resolveComponent as h, openBlock as b, createBlock as _, onMounted as S, onBeforeMount as w } from "vue";
3
- import { useCoreStore as u } from "@feedmepos/mf-common";
4
- import { defineStore as T } from "pinia";
5
- const l = [
1
+ import { createRouter as I, createWebHistory as P, useRouter as S } from "vue-router";
2
+ import { computed as h, watch as c, defineComponent as b, ref as w, resolveComponent as v, openBlock as _, createBlock as R, onMounted as T, onBeforeMount as g } from "vue";
3
+ import { useCoreStore as d } from "@feedmepos/mf-common";
4
+ import { defineStore as A } from "pinia";
5
+ const f = [
6
6
  {
7
7
  path: "/admin/payout-accounts",
8
8
  name: "mf-payment-admin.payout-account",
9
9
  meta: {
10
10
  sidebarDisplay: "Payout Accounts"
11
11
  },
12
- component: () => import("./PayoutAccount-BcgYhX4b.js")
12
+ component: () => import("./PayoutAccount-Dz-C7b28.js")
13
13
  },
14
14
  {
15
15
  path: "/admin/payout-accounts/:accountId",
@@ -23,7 +23,7 @@ const l = [
23
23
  meta: {
24
24
  sidebarDisplay: "Terminals"
25
25
  },
26
- component: () => import("./Terminal-CP380u7w.js")
26
+ component: () => import("./Terminal-DnLKgEq_.js")
27
27
  },
28
28
  {
29
29
  path: "/admin/terminal/:terminalId",
@@ -37,7 +37,7 @@ const l = [
37
37
  meta: {
38
38
  sidebarDisplay: "Offline Transactions"
39
39
  },
40
- component: () => import("./TerminalTransaction-BC-QZh_F.js")
40
+ component: () => import("./TerminalTransaction-BChyQQlb.js")
41
41
  },
42
42
  {
43
43
  path: "/admin/transaction",
@@ -61,7 +61,7 @@ const l = [
61
61
  props: !0,
62
62
  component: () => import("./SettlementTransactions-yJhT6FR4.js")
63
63
  }
64
- ], d = [
64
+ ], y = [
65
65
  {
66
66
  path: "",
67
67
  redirect: { name: "mf-payment-payout-account" }
@@ -69,7 +69,7 @@ const l = [
69
69
  {
70
70
  path: "/payout-account",
71
71
  name: "mf-payment-payout-account",
72
- component: () => import("./PayoutAccount-B0viIh7c.js"),
72
+ component: () => import("./PayoutAccount-B4i4fRfF.js"),
73
73
  meta: {
74
74
  sidebarDisplay: "Payout Accounts"
75
75
  }
@@ -80,7 +80,7 @@ const l = [
80
80
  meta: {
81
81
  sidebarDisplay: "Offline Transactions"
82
82
  },
83
- component: () => import("./TerminalTransaction-DCqbXI2q.js")
83
+ component: () => import("./TerminalTransaction-DL5a5BbI.js")
84
84
  },
85
85
  {
86
86
  path: "/transaction",
@@ -104,56 +104,57 @@ const l = [
104
104
  props: !0,
105
105
  component: () => import("./SettlementTransactions-Co4ziq3a.js")
106
106
  }
107
- ], g = T("iframe", () => {
108
- const o = {
107
+ ], C = A("iframe", () => {
108
+ const m = {
109
109
  isIframe: !1
110
- }, a = f(() => o);
110
+ }, a = h(() => m);
111
111
  function n(r) {
112
- o.isIframe = r;
112
+ m.isIframe = r;
113
113
  }
114
114
  return {
115
115
  state: a,
116
116
  init: n
117
117
  };
118
- }), A = R({
119
- history: D(),
120
- routes: [...d, ...l]
118
+ }), B = I({
119
+ history: P(),
120
+ routes: [...y, ...f]
121
121
  });
122
- A.beforeEach(async (o) => {
122
+ let u, l;
123
+ B.beforeEach(async (m) => {
123
124
  const {
124
125
  sessionUser: a,
125
126
  currentRestaurant: n,
126
127
  currentBusiness: r,
127
128
  readRestaurants: p,
128
129
  changeRestaurant: i
129
- } = u();
130
- return o.name.startsWith("mf-payment-admin") ? a.value ? !0 : new Promise((m) => {
130
+ } = d();
131
+ return m.name.startsWith("mf-payment-admin") ? a.value ? !0 : (u || (u = new Promise((o) => {
131
132
  const e = c(a, (t) => {
132
133
  var s;
133
- t && (e(), m((s = a.value) == null ? void 0 : s.isInternal));
134
+ t && (e(), o(((s = a.value) == null ? void 0 : s.isInternal) ?? !1));
134
135
  });
135
- }) : !r.value || !n.value ? Promise.all([
136
- new Promise(async (m) => {
136
+ })), u) : !r.value || !n.value ? (l || (l = Promise.all([
137
+ new Promise(async (o) => {
137
138
  const e = c(r, (t) => {
138
- t && (e(), m(!0));
139
+ t && (e(), o(!0));
139
140
  });
140
141
  }),
141
- new Promise(async (m) => {
142
+ new Promise(async (o) => {
142
143
  const e = c(n, (s) => {
143
- s && (e(), m(!0));
144
+ s && (e(), o(!0));
144
145
  }), t = await p();
145
146
  await i(t == null ? void 0 : t.at(0));
146
147
  })
147
- ]).then((m) => !0) : !0;
148
+ ]).then((o) => !0)), l) : !0;
148
149
  });
149
- const C = /* @__PURE__ */ y({
150
+ const V = /* @__PURE__ */ b({
150
151
  __name: "AppSidebar",
151
- setup(o) {
152
- const a = u(), n = I(), r = P(n.currentRoute.value.name);
152
+ setup(m) {
153
+ const a = d(), n = S(), r = w(n.currentRoute.value.name);
153
154
  c(n.currentRoute, () => {
154
155
  r.value = n.currentRoute.value.name;
155
156
  });
156
- const p = d.map((e) => {
157
+ const p = y.map((e) => {
157
158
  var t;
158
159
  if ((t = e.meta) != null && t.sidebarDisplay)
159
160
  return {
@@ -164,7 +165,7 @@ const C = /* @__PURE__ */ y({
164
165
  return n.push({ name: e.name });
165
166
  }
166
167
  };
167
- }).filter((e) => !!e), i = l.map((e) => {
168
+ }).filter((e) => !!e), i = f.map((e) => {
168
169
  var t;
169
170
  if ((t = e.meta) != null && t.sidebarDisplay)
170
171
  return {
@@ -175,7 +176,7 @@ const C = /* @__PURE__ */ y({
175
176
  return n.push({ name: e.name });
176
177
  }
177
178
  };
178
- }).filter((e) => !!e), m = f(() => {
179
+ }).filter((e) => !!e), o = h(() => {
179
180
  var t;
180
181
  const e = [...p];
181
182
  return (t = a.sessionUser.value) != null && t.isInternal && (e.push({
@@ -190,33 +191,33 @@ const C = /* @__PURE__ */ y({
190
191
  }), e.push(...i)), e;
191
192
  });
192
193
  return (e, t) => {
193
- const s = h("FmCollapsibleTabs");
194
- return b(), _(s, {
194
+ const s = v("FmCollapsibleTabs");
195
+ return _(), R(s, {
195
196
  modelValue: r.value,
196
- "onUpdate:modelValue": t[0] || (t[0] = (v) => r.value = v),
197
- items: m.value,
197
+ "onUpdate:modelValue": t[0] || (t[0] = (D) => r.value = D),
198
+ items: o.value,
198
199
  class: "py-16 px-8"
199
200
  }, null, 8, ["modelValue", "items"]);
200
201
  };
201
202
  }
202
- }), O = /* @__PURE__ */ y({
203
+ }), F = /* @__PURE__ */ b({
203
204
  __name: "App",
204
- setup(o) {
205
- const { state: a } = g(), n = u();
206
- return S(() => {
205
+ setup(m) {
206
+ const { state: a } = C(), n = d();
207
+ return T(() => {
207
208
  a.isIframe && parent.postMessage({ event: "ready" }, "*");
208
- }), w(() => {
209
- n.registerSidebarComponent(C);
209
+ }), g(() => {
210
+ n.registerSidebarComponent(V);
210
211
  }), (r, p) => {
211
- const i = h("RouterView");
212
- return b(), _(i);
212
+ const i = v("RouterView");
213
+ return _(), R(i);
213
214
  };
214
215
  }
215
- }), F = [
216
- ...l,
217
- ...d
216
+ }), M = [
217
+ ...f,
218
+ ...y
218
219
  ];
219
220
  export {
220
- O as FmApp,
221
- F as routers
221
+ F as FmApp,
222
+ M as routers
222
223
  };
@@ -5,6 +5,10 @@ export type CursorTableController<T> = {
5
5
  * Reset pagination and all loaded data, and perform load for first page data
6
6
  */
7
7
  reset: () => {};
8
+ /**
9
+ * All data from the server, will be keep on looping cursor until there's no cursor.
10
+ */
11
+ allData: () => Promise<T[]>;
8
12
  /**
9
13
  * All loaded data, before transform
10
14
  */