@feedmepos/mf-payment 1.0.4-beta.2 → 1.0.5-beta.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 (41) hide show
  1. package/dist/{PayoutAccount-CUcmLnpF.js → PayoutAccount-DoPGyjcC.js} +5 -5
  2. package/dist/{PayoutAccount-K-clfaW8.js → PayoutAccount-xeea4ogM.js} +3 -3
  3. package/dist/PayoutAccountSelector.vue_vue_type_script_setup_true_lang-CP-SP877.js +110 -0
  4. package/dist/{PayoutAccountSetting-B1uLo7gi.js → PayoutAccountSetting-CUCmcJak.js} +4 -4
  5. package/dist/{Restaurant-D5L8pG25.js → Restaurant-BnWy9O5t.js} +3 -3
  6. package/dist/{RestaurantSetting-Dx0fPDEn.js → RestaurantSetting-CVGwsyzO.js} +4 -4
  7. package/dist/{Settlement-BGueDfpI.js → Settlement-6voGKEDr.js} +3 -3
  8. package/dist/{Settlement-D0nuXQMV.js → Settlement-DPmYq05c.js} +3 -3
  9. package/dist/{SettlementTransactions-DW8-tVPe.js → SettlementTransactions-Duig1e4U.js} +4 -4
  10. package/dist/{SettlementTransactions-Dsnpidi1.js → SettlementTransactions-JYas_1C-.js} +4 -4
  11. package/dist/{Terminal-BkhqmKjN.js → Terminal-BH0OOd3v.js} +4 -4
  12. package/dist/{TerminalSetting-CrpB7DIV.js → TerminalSetting-ChCIqCIe.js} +3 -3
  13. package/dist/{TerminalTransaction-BGy4ABmm.js → TerminalTransaction-Bjs3Es1x.js} +5 -5
  14. package/dist/{TerminalTransaction-2E_8keFp.js → TerminalTransaction-DyTN8zj5.js} +83 -78
  15. package/dist/Transaction-Ce33Gg4W.js +145 -0
  16. package/dist/{Transaction-izWqPmdQ.js → Transaction-D8WYnO8-.js} +5 -5
  17. package/dist/TransactionOld-CEvlp4U4.js +99 -0
  18. package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-_MmkKHxE.js +151 -0
  19. package/dist/api/terminal-transaction/index.d.ts +2 -1
  20. package/dist/api/transaction/index.d.ts +8 -1
  21. package/dist/{app-DPCnmmmg.js → app-Bcuom8z3.js} +471 -458
  22. package/dist/app.js +1 -1
  23. package/dist/{assets-NM2zCyV8.js → assets-Cppbnt4C.js} +1 -1
  24. package/dist/components/PayoutAccountSelector.vue.d.ts +23 -0
  25. package/dist/{index-BWpuTiNy.js → index-BIH2Edx9.js} +1 -1
  26. package/dist/{index-CZv4Ucw7.js → index-BKXt3n4_.js} +1 -1
  27. package/dist/{index-Bl77l-UI.js → index-BqZakjyK.js} +1 -1
  28. package/dist/{index-BpclEVci.js → index-BwVE-Z1U.js} +10 -10
  29. package/dist/{index-DffVv67M.js → index-CmhokViT.js} +1 -1
  30. package/dist/{index-DfC2cb6i.js → index-FEQKf928.js} +1 -1
  31. package/dist/{index-B5pmhl4r.js → index-GoHzCxeA.js} +1 -1
  32. package/dist/{index-BbPdddp2.js → index-Rhk_nXeB.js} +1 -1
  33. package/dist/{index.vue_vue_type_script_setup_true_lang-Bm7Wybo3.js → index.vue_vue_type_script_setup_true_lang-BE90OAD9.js} +1 -1
  34. package/dist/package.json +2 -2
  35. package/dist/{payout-account-DpAKpX1a.js → payout-account-DFHGVtXO.js} +2 -2
  36. package/dist/router/index.d.ts +1 -0
  37. package/dist/{transaction-13xSmWg9.js → transaction-BPkT1OxL.js} +39 -26
  38. package/dist/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/views/transaction/TransactionOld.vue.d.ts +2 -0
  40. package/package.json +2 -2
  41. package/dist/Transaction-DFqANzFa.js +0 -242
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as g, resolveComponent as i, openBlock as h, createBlock as y, normalizeClass as N, withCtx as _, createElementVNode as P, toDisplayString as C, createVNode as p, computed as x, ref as E, watch as F, unref as s, isRef as b, h as v } from "vue";
2
- import { u as S } from "./index-BWpuTiNy.js";
3
- import { _ as O } from "./index-Bl77l-UI.js";
2
+ import { u as S } from "./index-BIH2Edx9.js";
3
+ import { _ as O } from "./index-BqZakjyK.js";
4
4
  import { _ as K } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
5
- import { P as V } from "./payout-account-DpAKpX1a.js";
6
- import { p as $ } from "./index-BbPdddp2.js";
5
+ import { P as V } from "./payout-account-DFHGVtXO.js";
6
+ import { p as $ } from "./index-Rhk_nXeB.js";
7
7
  import "@feedmepos/ui-library";
8
- import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-Bm7Wybo3.js";
8
+ import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-BE90OAD9.js";
9
9
  import { useRouter as T } from "vue-router";
10
10
  import { _ as U } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
11
11
  const G = /* @__PURE__ */ g({
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as f, ref as W, reactive as J, computed as j, watch as p, resolveComponent as Y, openBlock as c, createBlock as D, withCtx as E, createElementVNode as r, createVNode as i, unref as u, createCommentVNode as I, createElementBlock as N, normalizeClass as U, toDisplayString as k, h as O, onMounted as R, Fragment as T } from "vue";
2
- import { p as z } from "./index-BbPdddp2.js";
3
- import { _ as y, u as L, e as S } from "./index-Bl77l-UI.js";
2
+ import { p as z } from "./index-Rhk_nXeB.js";
3
+ import { _ as y, u as L, e as S } from "./index-BqZakjyK.js";
4
4
  import { defineStore as _ } from "pinia";
5
5
  import { useCoreStore as $ } from "@feedmepos/mf-common";
6
- import { c as AA, P as v } from "./payout-account-DpAKpX1a.js";
6
+ import { c as AA, P as v } from "./payout-account-DFHGVtXO.js";
7
7
  import { useDialogChild as sA, useDialog as eA } from "@feedmepos/ui-library";
8
8
  import { z as X, a as x } from "./validator-D5jtpt9A.js";
9
9
  import { P as K } from "./PDFViewer-xrBtzrlR.js";
@@ -0,0 +1,110 @@
1
+ import { defineComponent as N, mergeModels as $, ref as M, computed as w, useModel as z, watch as B, onMounted as I, resolveComponent as d, openBlock as l, createElementBlock as m, Fragment as i, unref as P, createBlock as c, createCommentVNode as y, withCtx as p, createVNode as V, renderList as _ } from "vue";
2
+ import { p as q } from "./index-Rhk_nXeB.js";
3
+ import { u as E } from "./index-BqZakjyK.js";
4
+ import { useCoreStore as j } from "@feedmepos/mf-common";
5
+ const O = /* @__PURE__ */ N({
6
+ __name: "PayoutAccountSelector",
7
+ props: /* @__PURE__ */ $({
8
+ event: {
9
+ type: Array
10
+ }
11
+ }, {
12
+ modelValue: { required: !0 },
13
+ modelModifiers: {}
14
+ }),
15
+ emits: ["update:modelValue"],
16
+ setup(C) {
17
+ const k = C, { currentBusiness: L } = j(), { isLoading: g, startAsyncCall: S } = E(!0), f = M([]), b = w(() => f.value.map((e) => {
18
+ var t, o;
19
+ return {
20
+ event: e.store.event,
21
+ label: ((o = (t = e.ref) == null ? void 0 : t.profile) == null ? void 0 : o.name) ?? e.ref.name,
22
+ value: e._id
23
+ };
24
+ })), F = w(() => new Set(f.value.map((e) => e.store.event))), h = z(C, "modelValue"), n = M();
25
+ B(n, () => {
26
+ var e;
27
+ h.value = (e = n.value) == null ? void 0 : e.value;
28
+ });
29
+ async function x() {
30
+ await S(async () => {
31
+ var o, v;
32
+ let e = await q.readBusinessPayoutAccounts();
33
+ if (e.length === 0)
34
+ return;
35
+ k.event && (e = e.filter((a) => {
36
+ var s;
37
+ return (s = k.event) == null ? void 0 : s.includes(a.store.event);
38
+ }));
39
+ let t = e.find((a) => a._id === h.value);
40
+ t || (t = e[0]), n.value = {
41
+ event: t.store.event,
42
+ label: ((v = (o = t.ref) == null ? void 0 : o.profile) == null ? void 0 : v.name) ?? t.ref.name,
43
+ value: t._id
44
+ }, f.value = e;
45
+ });
46
+ }
47
+ function A() {
48
+ x();
49
+ }
50
+ return I(A), B(L, A), (e, t) => {
51
+ const o = d("FmCircularProgress"), v = d("FmChip"), a = d("FmMenuItem"), s = d("FmMenu");
52
+ return l(), m(i, null, [
53
+ P(g) ? (l(), c(o, {
54
+ key: 0,
55
+ size: "md"
56
+ })) : y("", !0),
57
+ P(g) ? y("", !0) : (l(), c(s, { key: 1 }, {
58
+ "menu-button": p(() => {
59
+ var u;
60
+ return [
61
+ V(v, {
62
+ icon: "account_box",
63
+ label: n.value ? n.value.event + " | " + ((u = n.value) == null ? void 0 : u.label) : "Select Payout Account",
64
+ removable: n.value,
65
+ onChipClosed: t[0] || (t[0] = (r) => n.value = null)
66
+ }, null, 8, ["label", "removable"])
67
+ ];
68
+ }),
69
+ default: p(() => [
70
+ F.value.size > 1 ? (l(!0), m(i, { key: 0 }, _(F.value, (u) => (l(), c(s, {
71
+ placement: "right-start",
72
+ width: 200
73
+ }, {
74
+ "menu-button": p(() => [
75
+ V(a, {
76
+ label: u,
77
+ expandable: ""
78
+ }, null, 8, ["label"])
79
+ ]),
80
+ default: p(() => [
81
+ (l(!0), m(i, null, _(b.value.filter((r) => r.event === u), (r) => (l(), c(a, {
82
+ onClick: (D) => n.value = r,
83
+ key: r.value,
84
+ label: r.label,
85
+ selectable: ""
86
+ }, null, 8, ["onClick", "label"]))), 128))
87
+ ]),
88
+ _: 2
89
+ }, 1024))), 256)) : (l(), m(i, { key: 1 }, [
90
+ b.value.length === 0 ? (l(), c(a, {
91
+ key: "empty",
92
+ label: "No payout accounts"
93
+ })) : y("", !0),
94
+ (l(!0), m(i, null, _(b.value, (u) => (l(), c(a, {
95
+ onClick: (r) => n.value = u,
96
+ key: u.value,
97
+ label: u.label,
98
+ selectable: ""
99
+ }, null, 8, ["onClick", "label"]))), 128))
100
+ ], 64))
101
+ ]),
102
+ _: 1
103
+ }))
104
+ ], 64);
105
+ };
106
+ }
107
+ });
108
+ export {
109
+ O as _
110
+ };
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as I, resolveComponent as i, openBlock as F, createElementBlock as R, Fragment as N, createElementVNode as s, createVNode as u, withCtx as x, createTextVNode as C, toDisplayString as P, createCommentVNode as U, createBlock as V, ref as k, watch as q, computed as B, unref as r, isRef as M, h as E, onMounted as O, resolveDynamicComponent as j, normalizeProps as Y, mergeProps as z } from "vue";
2
- import { p as $ } from "./index-BbPdddp2.js";
3
- import { u as H, e as D } from "./index-Bl77l-UI.js";
2
+ import { p as $ } from "./index-Rhk_nXeB.js";
3
+ import { u as H, e as D } from "./index-BqZakjyK.js";
4
4
  import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
5
5
  import { useRouter as W } from "vue-router";
6
- import { u as L } from "./index-BWpuTiNy.js";
6
+ import { u as L } from "./index-BIH2Edx9.js";
7
7
  import { P as K } from "./PDFViewer-xrBtzrlR.js";
8
8
  import { useSnackbar as Z } from "@feedmepos/ui-library";
9
9
  import { u as J } from "./error-K1CakhA9.js";
10
- import { p as _ } from "./index-DffVv67M.js";
10
+ import { p as _ } from "./index-CmhokViT.js";
11
11
  import { z as A, a as S } from "./validator-D5jtpt9A.js";
12
12
  import { useCoreStore as X } from "@feedmepos/mf-common";
13
13
  const h = { class: "flex gap-16 mb-6" }, ee = ["src"], te = /* @__PURE__ */ I({
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as F, ref as y, resolveComponent as g, openBlock as x, createBlock as A, withCtx as $, createVNode as f, createElementVNode as d, normalizeStyle as T, createElementBlock as R, Fragment as D, renderList as q, computed as C, watch as I, onMounted as N, unref as b, toDisplayString as B, normalizeClass as W, isRef as E, h as P } from "vue";
2
- import { u as O } from "./index-BWpuTiNy.js";
2
+ import { u as O } from "./index-BIH2Edx9.js";
3
3
  import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
4
4
  import "@feedmepos/ui-library";
5
- import { u as G } from "./index-Bl77l-UI.js";
5
+ import { u as G } from "./index-BqZakjyK.js";
6
6
  import { _ as Q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
7
- import { r as H } from "./index-CZv4Ucw7.js";
7
+ import { r as H } from "./index-BKXt3n4_.js";
8
8
  import { useRouter as J } from "vue-router";
9
9
  import { g as X } from "./grafana-CqkYm_ru.js";
10
10
  const Y = ["id"], L = /* @__PURE__ */ F({
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as S, ref as U, resolveComponent as i, openBlock as v, createBlock as V, withCtx as k, createVNode as u, unref as a, createElementVNode as T, createCommentVNode as C, onMounted as D, computed as K, createElementBlock as R, Fragment as E, resolveDynamicComponent as P, normalizeProps as q, mergeProps as O, isRef as M } from "vue";
2
- import { u as B, e as I } from "./index-Bl77l-UI.js";
2
+ import { u as B, e as I } from "./index-BqZakjyK.js";
3
3
  import { _ as N } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
4
4
  import { useRouter as Y } from "vue-router";
5
- import { u as $ } from "./index-BWpuTiNy.js";
6
- import { p as x } from "./index-DffVv67M.js";
5
+ import { u as $ } from "./index-BIH2Edx9.js";
6
+ import { p as x } from "./index-CmhokViT.js";
7
7
  import { z as p, a as y } from "./validator-D5jtpt9A.js";
8
8
  import { useCoreStore as A } from "@feedmepos/mf-common";
9
- import { r as L } from "./index-CZv4Ucw7.js";
9
+ import { r as L } from "./index-BKXt3n4_.js";
10
10
  const j = { class: "flex mt-6 space-x-6" }, z = /* @__PURE__ */ S({
11
11
  __name: "FiuuGateway",
12
12
  props: {
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as g, ref as h, computed as x, resolveComponent as Y, openBlock as v, createBlock as D, h as S, onMounted as A, watch as R, unref as n, withCtx as V, createElementVNode as i, createVNode as d, isRef as $ } from "vue";
2
- import { u as b } from "./index-Bl77l-UI.js";
2
+ import { u as b } from "./index-BqZakjyK.js";
3
3
  import { h as _ } from "./moment-h96o7c8I.js";
4
4
  import { useCoreStore as C } from "@feedmepos/mf-common";
5
5
  import { _ as k } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
6
- import { s as w } from "./index-DfC2cb6i.js";
6
+ import { s as w } from "./index-FEQKf928.js";
7
7
  import "@feedmepos/ui-library";
8
8
  import { d as f } from "./dinero-CIVmXLL-.js";
9
9
  import { _ as F } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
10
10
  import { useRouter as M } from "vue-router";
11
- import { u as K } from "./index-BWpuTiNy.js";
11
+ import { u as K } from "./index-BIH2Edx9.js";
12
12
  import { _ as B } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
13
  import { _ as I } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
14
14
  import { _ as L } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as C, ref as h, computed as x, resolveComponent as d, openBlock as k, createBlock as A, h as B, watch as V, onMounted as I, unref as a, withCtx as b, createElementVNode as y, createVNode as s, isRef as $, createElementBlock as L, Fragment as K, renderList as E } from "vue";
2
- import { u as D } from "./index-Bl77l-UI.js";
2
+ import { u as D } from "./index-BqZakjyK.js";
3
3
  import { h as g } from "./moment-h96o7c8I.js";
4
- import { s as c } from "./index-DfC2cb6i.js";
4
+ import { s as c } from "./index-FEQKf928.js";
5
5
  import { useSnackbar as T } from "@feedmepos/ui-library";
6
6
  import { d as v } from "./dinero-CIVmXLL-.js";
7
7
  import { _ as P } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
8
8
  import { useRouter as q } from "vue-router";
9
9
  import { _ as N } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
10
- import { u as O } from "./index-BWpuTiNy.js";
10
+ import { u as O } from "./index-BIH2Edx9.js";
11
11
  import { u as U } from "./error-K1CakhA9.js";
12
12
  import { _ as j } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
13
13
  const z = /* @__PURE__ */ C({
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as T, resolveComponent as g, openBlock as F, createBlock as P, normalizeClass as j, withCtx as r, createElementVNode as t, toDisplayString as u, createElementBlock as L, unref as c, ref as _, onMounted as z, watch as $, createVNode as a, createTextVNode as i, h as C } from "vue";
2
- import { e as E, u as G } from "./index-Bl77l-UI.js";
2
+ import { e as E, u as G } from "./index-BqZakjyK.js";
3
3
  import "@feedmepos/ui-library";
4
4
  import { d as h } from "./dinero-CIVmXLL-.js";
5
- import { g as Y, a as H } from "./assets-NM2zCyV8.js";
6
- import { t as q, a as J } from "./transaction-13xSmWg9.js";
5
+ import { g as Y, a as H } from "./assets-Cppbnt4C.js";
6
+ import { t as q, a as J } from "./transaction-BPkT1OxL.js";
7
7
  import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
8
8
  import { useRouter as W } from "vue-router";
9
- import { s as X } from "./index-DfC2cb6i.js";
9
+ import { s as X } from "./index-FEQKf928.js";
10
10
  import { useCoreStore as Z } from "@feedmepos/mf-common";
11
11
  const ee = /* @__PURE__ */ T({
12
12
  __name: "Status",
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as w, resolveComponent as g, openBlock as F, createBlock as k, normalizeClass as G, withCtx as l, createElementVNode as t, toDisplayString as u, createElementBlock as L, unref as p, ref as T, onMounted as Y, watch as H, createVNode as n, createTextVNode as i, h as N } from "vue";
2
- import { e as E, u as q } from "./index-Bl77l-UI.js";
2
+ import { e as E, u as q } from "./index-BqZakjyK.js";
3
3
  import { useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
4
4
  import { d as B } from "./dinero-CIVmXLL-.js";
5
- import { g as W, a as X } from "./assets-NM2zCyV8.js";
6
- import { t as P, a as Z } from "./transaction-13xSmWg9.js";
5
+ import { g as W, a as X } from "./assets-Cppbnt4C.js";
6
+ import { t as P, a as Z } from "./transaction-BPkT1OxL.js";
7
7
  import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
8
8
  import { useRouter as te } from "vue-router";
9
- import { s as ae } from "./index-DfC2cb6i.js";
9
+ import { s as ae } from "./index-FEQKf928.js";
10
10
  import { u as ne } from "./error-K1CakhA9.js";
11
11
  import { w as oe } from "./Modal-DB8M9o1T.js";
12
12
  const re = /* @__PURE__ */ w({
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as h, openBlock as g, createElementBlock as V, createTextVNode as M, createElementVNode as x, toDisplayString as L, resolveComponent as f, createVNode as v, normalizeClass as z, withCtx as B, createBlock as b, createCommentVNode as F, ref as C, computed as Y, unref as m, watch as K, isRef as P, h as E } from "vue";
2
- import "./index-Bl77l-UI.js";
2
+ import "./index-BqZakjyK.js";
3
3
  import { h as q } from "./moment-h96o7c8I.js";
4
- import { u as j } from "./index-BWpuTiNy.js";
5
- import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-Bm7Wybo3.js";
4
+ import { u as j } from "./index-BIH2Edx9.js";
5
+ import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-BE90OAD9.js";
6
6
  import { _ as Q } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
7
7
  import { useSnackbar as D, useDialogChild as H, useDialog as J } from "@feedmepos/ui-library";
8
- import { t as A } from "./index-B5pmhl4r.js";
8
+ import { t as A } from "./index-GoHzCxeA.js";
9
9
  import { c as O } from "./clipboard-4jh1WteU.js";
10
10
  import { g as W } from "./grafana-CqkYm_ru.js";
11
11
  import { u as N } from "./error-K1CakhA9.js";
@@ -1,9 +1,9 @@
1
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 k, createVNode as I, createBlock as _, withCtx as q, createCommentVNode as B, isRef as h, resolveDynamicComponent as L, normalizeProps as j, mergeProps as E } from "vue";
2
- import { u as R, e as U } from "./index-Bl77l-UI.js";
2
+ import { u as R, e as U } from "./index-BqZakjyK.js";
3
3
  import { useRouter as A } from "vue-router";
4
- import { t as C } from "./index-B5pmhl4r.js";
4
+ import { t as C } from "./index-GoHzCxeA.js";
5
5
  import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
6
- import { u as H } from "./index-BWpuTiNy.js";
6
+ import { u as H } from "./index-BIH2Edx9.js";
7
7
  import { useSnackbar as Q } from "@feedmepos/ui-library";
8
8
  import { u as J } from "./error-K1CakhA9.js";
9
9
  import { useCoreStore as $ } from "@feedmepos/mf-common";
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as w, openBlock as A, createElementBlock as x, unref as c, createCommentVNode as V, createElementVNode as b, resolveComponent as g, createBlock as v, normalizeClass as q, withCtx as h, toDisplayString as E, createVNode as u, Fragment as L, renderList as $, ref as K, watch as D, isRef as F, h as T } from "vue";
2
- import { c as y } from "./index-Bl77l-UI.js";
2
+ import { c as y } from "./index-BqZakjyK.js";
3
3
  import { h as N } from "./moment-h96o7c8I.js";
4
- import { u as P } from "./index-BWpuTiNy.js";
5
- import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-Bm7Wybo3.js";
4
+ import { u as P } from "./index-BIH2Edx9.js";
5
+ import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-BE90OAD9.js";
6
6
  import { _ as B } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
7
7
  import { useSnackbar as U, useDialog as W } from "@feedmepos/ui-library";
8
- import { g as j } from "./assets-NM2zCyV8.js";
9
- import { E as Q, t as R } from "./index-BpclEVci.js";
8
+ import { g as j } from "./assets-Cppbnt4C.js";
9
+ import { E as Q, t as R } from "./index-BwVE-Z1U.js";
10
10
  import { d as z } from "./dinero-CIVmXLL-.js";
11
11
  import { _ as H } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
12
12
  import { _ as J } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
@@ -1,39 +1,38 @@
1
- import { defineComponent as y, openBlock as p, createElementBlock as C, Fragment as O, unref as r, createCommentVNode as F, createElementVNode as d, resolveComponent as h, createBlock as R, normalizeClass as D, withCtx as N, toDisplayString as V, ref as M, watch as T, createVNode as i, isRef as _, h as I } from "vue";
2
- import { c as m } from "./index-Bl77l-UI.js";
1
+ import { defineComponent as y, openBlock as _, createElementBlock as b, Fragment as O, unref as r, createCommentVNode as V, createElementVNode as i, resolveComponent as N, createBlock as C, normalizeClass as D, withCtx as h, toDisplayString as F, ref as M, watch as T, createVNode as c, isRef as u, h as I } from "vue";
2
+ import { c as l } from "./index-BqZakjyK.js";
3
3
  import { h as g } from "./moment-h96o7c8I.js";
4
- import { u as k } from "./index-BWpuTiNy.js";
5
- import { _ as K } from "./index.vue_vue_type_script_setup_true_lang-Bm7Wybo3.js";
4
+ import { u as k } from "./index-BIH2Edx9.js";
5
+ import { _ as K } from "./index.vue_vue_type_script_setup_true_lang-BE90OAD9.js";
6
6
  import "@feedmepos/ui-library";
7
- import { g as Y } from "./assets-NM2zCyV8.js";
8
- import { E as $, t as b } from "./index-BpclEVci.js";
7
+ import { g as Y } from "./assets-Cppbnt4C.js";
8
+ import { E as $, t as v } from "./index-BwVE-Z1U.js";
9
9
  import { d as L } from "./dinero-CIVmXLL-.js";
10
- import { _ as B } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
11
- import { useCoreStore as G } from "@feedmepos/mf-common";
12
- import { _ as q } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
- import { _ as U } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
14
- import { _ as P } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
15
- import { _ as j } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
16
- import { _ as W } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
17
- const z = ["src"], Q = ["src"], H = /* @__PURE__ */ y({
10
+ import { _ as B } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
11
+ import { _ as G } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
12
+ import { _ as U } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
13
+ import { _ as q } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
14
+ import { _ as P } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
15
+ import { _ as j } from "./PayoutAccountSelector.vue_vue_type_script_setup_true_lang-CP-SP877.js";
16
+ const W = ["src"], z = ["src"], Q = /* @__PURE__ */ y({
18
17
  __name: "Gateway",
19
18
  props: {
20
19
  row: {},
21
20
  data: {}
22
21
  },
23
22
  setup(f) {
24
- return (o, n) => (p(), C(O, null, [
25
- o.row.original.ecrGateway ? (p(), C("img", {
23
+ return (o, n) => (_(), b(O, null, [
24
+ o.row.original.ecrGateway ? (_(), b("img", {
26
25
  key: 0,
27
26
  class: "bg-fm-color-overlay-background rounded-md m-auto border-transparent w-[32px] h-[32px]",
28
27
  src: r($)
29
- }, null, 8, z)) : F("", !0),
30
- d("img", {
28
+ }, null, 8, W)) : V("", !0),
29
+ i("img", {
31
30
  class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
32
31
  src: r(Y)(o.row.original.gateway)
33
- }, null, 8, Q)
32
+ }, null, 8, z)
34
33
  ], 64));
35
34
  }
36
- }), J = /* @__PURE__ */ y({
35
+ }), H = /* @__PURE__ */ y({
37
36
  __name: "Status",
38
37
  props: {
39
38
  row: {},
@@ -42,45 +41,46 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ y({
42
41
  setup(f) {
43
42
  const o = f;
44
43
  function n() {
45
- return o.data === m.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === m.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : o.data === m.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
44
+ return o.data === l.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === l.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : o.data === l.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
46
45
  }
47
- return (l, s) => {
48
- const c = h("FmBadge");
49
- return p(), R(c, {
46
+ return (s, d) => {
47
+ const m = N("FmBadge");
48
+ return _(), C(m, {
50
49
  inline: "",
51
50
  class: D(n())
52
51
  }, {
53
- default: N(() => [
54
- d("div", null, V(l.data.toUpperCase()), 1)
52
+ default: h(() => [
53
+ i("div", null, F(s.data.toUpperCase()), 1)
55
54
  ]),
56
55
  _: 1
57
56
  }, 8, ["class"]);
58
57
  };
59
58
  }
60
- }), X = { class: "flex justify-between mb-6 items-start" }, Z = { class: "flex space-x-8 items-start" }, ee = { class: "flex space-x-4 self-center" }, ae = { class: "mb-6" }, Ie = /* @__PURE__ */ y({
59
+ }), J = { class: "flex justify-between mb-6 items-start" }, X = { class: "flex space-x-8 items-start" }, Z = { class: "flex space-x-4 self-center" }, ee = { class: "flex space-x-12 mb-6" }, Ae = /* @__PURE__ */ y({
61
60
  __name: "TerminalTransaction",
62
61
  setup(f) {
63
- const { currentRestaurant: o } = G(), n = M(), { dateRange: l, status: s, searchKey: c } = k({
62
+ const o = M(), { dateRange: n, status: s, searchKey: d, accountId: m } = k({
63
+ accountId: "",
64
64
  searchKey: "",
65
- status: [m.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
65
+ status: [l.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
66
66
  dateRange: {
67
67
  startDate: g().startOf("day").format("YYYY-MM-DD"),
68
68
  endDate: g().endOf("day").format("YYYY-MM-DD")
69
69
  }
70
70
  });
71
- T([l, s], () => {
71
+ T([n, s], () => {
72
72
  var e;
73
- return (e = n.value) == null ? void 0 : e.reset();
74
- }), T(o, () => {
73
+ return (e = o.value) == null ? void 0 : e.reset();
74
+ }), T(m, () => {
75
75
  var e;
76
- return (e = n.value) == null ? void 0 : e.reset();
76
+ return (e = o.value) == null ? void 0 : e.reset();
77
77
  });
78
78
  let A;
79
- T(c, async () => {
79
+ T(d, async () => {
80
80
  A && clearTimeout(A), A = setTimeout(
81
81
  () => {
82
82
  var e;
83
- return (e = n.value) == null ? void 0 : e.reset();
83
+ return (e = o.value) == null ? void 0 : e.reset();
84
84
  },
85
85
  700
86
86
  );
@@ -88,24 +88,24 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ y({
88
88
  const x = [
89
89
  {
90
90
  label: "Success",
91
- value: m.F_TERMINAL_TRANSACTION_ACTION.Enum.success
91
+ value: l.F_TERMINAL_TRANSACTION_ACTION.Enum.success
92
92
  },
93
93
  {
94
94
  label: "Refunded",
95
- value: m.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded
95
+ value: l.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded
96
96
  },
97
97
  {
98
98
  label: "Process",
99
- value: m.F_TERMINAL_TRANSACTION_ACTION.Enum.process
99
+ value: l.F_TERMINAL_TRANSACTION_ACTION.Enum.process
100
100
  },
101
101
  {
102
102
  label: "Failed",
103
- value: m.F_TERMINAL_TRANSACTION_ACTION.Enum.failed
103
+ value: l.F_TERMINAL_TRANSACTION_ACTION.Enum.failed
104
104
  }
105
- ], v = function(e) {
105
+ ], R = function(e) {
106
106
  const a = e;
107
- let u = "-";
108
- return a.details && a.details.amount && (u = L(a.details.amount).toFormat("$0.00")), {
107
+ let p = "-";
108
+ return a.details && a.details.amount && (p = L(a.details.amount).toFormat("$0.00")), {
109
109
  id: e._id,
110
110
  transactionId: e.transactionId,
111
111
  orderId: e.orderId,
@@ -115,17 +115,17 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ y({
115
115
  action: e.action,
116
116
  gateway: e.gateway,
117
117
  ecrGateway: e.ecrGateway,
118
- amount: u,
118
+ amount: p,
119
119
  seqNumber: e.seqNumber
120
120
  };
121
- }, S = [
121
+ }, E = [
122
122
  {
123
123
  accessorKey: "transactionId",
124
124
  header: () => "Transaction ID",
125
125
  meta: {
126
126
  textAlign: "left"
127
127
  },
128
- cell: ({ cell: e }) => I(U, { data: e.getValue() })
128
+ cell: ({ cell: e }) => I(G, { data: e.getValue() })
129
129
  },
130
130
  {
131
131
  accessorKey: "orderId",
@@ -152,7 +152,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ y({
152
152
  textAlign: "center",
153
153
  maxWidth: "128px"
154
154
  },
155
- cell: ({ cell: e, row: a }) => I(H, { row: a, data: e.getValue() })
155
+ cell: ({ cell: e, row: a }) => I(Q, { row: a, data: e.getValue() })
156
156
  },
157
157
  {
158
158
  accessorKey: "action",
@@ -161,7 +161,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ y({
161
161
  textAlign: "right",
162
162
  maxWidth: "132px"
163
163
  },
164
- cell: ({ cell: e, row: a }) => I(J, { row: a, data: e.getValue() })
164
+ cell: ({ cell: e, row: a }) => I(H, { row: a, data: e.getValue() })
165
165
  },
166
166
  {
167
167
  accessorKey: "amount",
@@ -186,44 +186,43 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ y({
186
186
  }
187
187
  ];
188
188
  return (e, a) => {
189
- const u = h("FmSearch"), w = h("FmSelect");
190
- return p(), R(P, {
189
+ const p = N("FmSearch"), w = N("FmSelect");
190
+ return _(), C(U, {
191
191
  title: "Terminal Transactions",
192
192
  description: "Transactions are purchases or payments made in retail using electronic devices such as POS systems, kiosks, terminals, or ECRs.",
193
193
  loading: !1
194
194
  }, {
195
- default: N(() => [
196
- d("div", X, [
197
- d("div", Z, [
198
- i(B),
199
- i(u, {
200
- "model-value": r(c),
201
- "onUpdate:modelValue": a[0] || (a[0] = (t) => _(c) ? c.value = t : null),
195
+ default: h(() => [
196
+ i("div", J, [
197
+ i("div", X, [
198
+ c(p, {
199
+ "model-value": r(d),
200
+ "onUpdate:modelValue": a[0] || (a[0] = (t) => u(d) ? d.value = t : null),
202
201
  class: "mr-8",
203
202
  label: "Search",
204
203
  placeholder: "Search Transactions ..."
205
204
  }, null, 8, ["model-value"]),
206
- i(w, {
205
+ c(w, {
207
206
  modelValue: r(s),
208
- "onUpdate:modelValue": a[2] || (a[2] = (t) => _(s) ? s.value = t : null),
207
+ "onUpdate:modelValue": a[2] || (a[2] = (t) => u(s) ? s.value = t : null),
209
208
  class: "mr-6 w-[300px]",
210
209
  label: "Status",
211
210
  "label-mark": "required",
212
211
  multiselect: "",
213
212
  items: x
214
213
  }, {
215
- "prepend-menu": N(() => [
216
- i(j, {
214
+ "prepend-menu": h(() => [
215
+ c(q, {
217
216
  modelValue: r(s),
218
- "onUpdate:modelValue": a[1] || (a[1] = (t) => _(s) ? s.value = t : null),
217
+ "onUpdate:modelValue": a[1] || (a[1] = (t) => u(s) ? s.value = t : null),
219
218
  items: x
220
219
  }, null, 8, ["modelValue"])
221
220
  ]),
222
221
  _: 1
223
222
  }, 8, ["modelValue"])
224
223
  ]),
225
- d("div", ee, [
226
- i(q, {
224
+ i("div", Z, [
225
+ c(B, {
227
226
  button: {
228
227
  appendIcon: "file_download",
229
228
  variant: "primary",
@@ -231,29 +230,35 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ y({
231
230
  },
232
231
  handler: () => {
233
232
  var t;
234
- return r(b).downloadTransactions(((t = n.value) == null ? void 0 : t.data()) ?? []);
233
+ return r(v).downloadTransactions(((t = o.value) == null ? void 0 : t.data()) ?? []);
235
234
  }
236
235
  }, null, 8, ["handler"])
237
236
  ])
238
237
  ]),
239
- d("div", ae, [
240
- i(W, {
241
- modelValue: r(l),
242
- "onUpdate:modelValue": a[3] || (a[3] = (t) => _(l) ? l.value = t : null)
238
+ i("div", ee, [
239
+ c(j, {
240
+ modelValue: r(m),
241
+ "onUpdate:modelValue": a[3] || (a[3] = (t) => u(m) ? m.value = t : null),
242
+ event: ["ORDERING"]
243
+ }, null, 8, ["modelValue"]),
244
+ c(P, {
245
+ modelValue: r(n),
246
+ "onUpdate:modelValue": a[4] || (a[4] = (t) => u(n) ? n.value = t : null)
243
247
  }, null, 8, ["modelValue"])
244
248
  ]),
245
- i(K, {
249
+ c(K, {
246
250
  ref_key: "controller",
247
- ref: n,
248
- "column-defs": S,
249
- "rows-defs": v,
250
- paginate: (t, E) => r(b).readRestaurantTransactions({
251
+ ref: o,
252
+ "column-defs": E,
253
+ "rows-defs": R,
254
+ paginate: (t, S) => r(v).readAccountTransactions({
255
+ accountId: r(m),
251
256
  status: r(s),
252
- searchKey: r(c),
257
+ searchKey: r(d),
253
258
  limit: t,
254
- cursor: E,
255
- start: r(l).startDate,
256
- end: r(l).endDate
259
+ cursor: S,
260
+ start: r(n).startDate,
261
+ end: r(n).endDate
257
262
  })
258
263
  }, null, 8, ["paginate"])
259
264
  ]),
@@ -263,5 +268,5 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ y({
263
268
  }
264
269
  });
265
270
  export {
266
- Ie as default
271
+ Ae as default
267
272
  };