@feedmepos/mf-payment 0.0.0-beta.9 → 1.0.0-beta.10

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 (132) hide show
  1. package/README.md +11 -1
  2. package/dist/AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js +39 -0
  3. package/dist/AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js +42 -0
  4. package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js +40 -0
  5. package/dist/DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js +31 -0
  6. package/dist/Modal-DB8M9o1T.js +13 -0
  7. package/dist/PDFViewer-xrBtzrlR.js +22426 -0
  8. package/dist/{PayoutAccount-DLhMMlw_.js → PayoutAccount-B1sLInPk.js} +96 -83
  9. package/dist/PayoutAccount-Dut_OQHJ.js +613 -0
  10. package/dist/PayoutAccountSetting-CmgVLhdp.js +780 -0
  11. package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js +33 -0
  12. package/dist/SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js +42 -0
  13. package/dist/Settlement-B1-WmCwC.js +193 -0
  14. package/dist/Settlement-BSOQRlp1.js +145 -0
  15. package/dist/{SettlementTransactions-Dl1H4jvh.js → SettlementTransactions-Cqd2raea.js} +117 -130
  16. package/dist/{SettlementTransactions-CoEzdtYT.js → SettlementTransactions-JTwD_Vuq.js} +99 -105
  17. package/dist/Terminal-De69bTKY.js +373 -0
  18. package/dist/TerminalSetting-DlRHaEZh.js +387 -0
  19. package/dist/TerminalTransaction-4rE-cikT.js +261 -0
  20. package/dist/TerminalTransaction-BGzVHOHQ.js +485 -0
  21. package/dist/Transaction-B3ZWKg6Q.js +403 -0
  22. package/dist/Transaction-B_0nUmpf.js +238 -0
  23. package/dist/api/index.d.ts +14 -0
  24. package/dist/api/pagination.d.ts +20 -0
  25. package/dist/api/payment-gateway/index.d.ts +9 -0
  26. package/dist/api/settlement/index.d.ts +12 -13
  27. package/dist/api/terminal/index.d.ts +13 -1
  28. package/dist/api/terminal-transaction/index.d.ts +12 -1
  29. package/dist/api/transaction/index.d.ts +7 -2
  30. package/dist/app-ssoGt5u4.js +6356 -0
  31. package/dist/app.js +3 -198
  32. package/dist/assets-BCAivOTo.js +45 -0
  33. package/dist/clipboard-4jh1WteU.js +10 -0
  34. package/dist/components/AdminLayout.vue.d.ts +8 -13
  35. package/dist/components/AsyncButton.vue.d.ts +21 -0
  36. package/dist/components/AutoCopyCell.vue.d.ts +5 -0
  37. package/dist/components/CursorTable/index.vue.d.ts +24 -5
  38. package/dist/components/DateRangePicker.vue.d.ts +13 -0
  39. package/dist/components/Layout.vue.d.ts +8 -13
  40. package/dist/components/PDFViewer.vue.d.ts +1 -1
  41. package/dist/components/RestaurantSelector.vue.d.ts +2 -0
  42. package/dist/components/RouteCell.vue.d.ts +7 -0
  43. package/dist/components/SelectAll.vue.d.ts +57 -0
  44. package/dist/helpers/assets.d.ts +2 -0
  45. package/dist/helpers/idToDate.d.ts +1 -1
  46. package/dist/index-4meiCsRz.js +56117 -0
  47. package/dist/{index-CF56zGyu.js → index-BFYq3eq8.js} +1 -1
  48. package/dist/{index-Bmka-1lQ.js → index-BwFHcZlm.js} +1 -1
  49. package/dist/index-CBa6eapm.js +47 -0
  50. package/dist/index-CETCXB6X.js +127 -0
  51. package/dist/index-CbsnpMWl.js +52 -0
  52. package/dist/index.vue_vue_type_script_setup_true_lang-CKOlikHb.js +167 -0
  53. package/dist/model/transaction.d.ts +2 -1
  54. package/dist/package.json +5 -5
  55. package/dist/payout-account-02bK8c23.js +1805 -0
  56. package/dist/router/index.d.ts +1 -0
  57. package/dist/stores/iframe.d.ts +1 -1
  58. package/dist/stores/payoutAccount.d.ts +5 -5
  59. package/dist/transaction-COjHU7aN.js +97 -0
  60. package/dist/tsconfig.app.tsbuildinfo +1 -1
  61. package/dist/validator-D5jtpt9A.js +2877 -0
  62. package/dist/views/admin/payout-account/cell/Bank.vue.d.ts +3 -5
  63. package/dist/views/admin/payout-account/cell/IsActive.vue.d.ts +3 -5
  64. package/dist/views/admin/payout-account/cell/PersonInCharge.vue.d.ts +3 -5
  65. package/dist/views/admin/payout-account/cell/RateInput.vue.d.ts +3 -5
  66. package/dist/views/admin/payout-account/cell/Status.vue.d.ts +3 -5
  67. package/dist/views/admin/payout-account/cell/TPlusInput.vue.d.ts +3 -5
  68. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
  69. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +81 -0
  70. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
  71. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
  72. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +56 -0
  73. package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +50 -0
  74. package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +52 -0
  75. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  76. package/dist/views/admin/settlement/cell/Actions.vue.d.ts +4 -6
  77. package/dist/views/admin/settlement/cell/Gateway.vue.d.ts +3 -5
  78. package/dist/views/admin/settlement/cell/Method.vue.d.ts +3 -5
  79. package/dist/views/admin/settlement/cell/Status.vue.d.ts +3 -5
  80. package/dist/views/admin/terminal/TerminalBindCodeDialog.vue.d.ts +1 -1
  81. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +83 -0
  82. package/dist/views/admin/terminal/TerminalSetting.vue.d.ts +12 -0
  83. package/dist/views/admin/terminal/cell/Actions.vue.d.ts +13 -14
  84. package/dist/views/admin/terminal/cell/ID.vue.d.ts +3 -5
  85. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +94 -0
  86. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +94 -0
  87. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +85 -0
  88. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +94 -0
  89. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +6 -0
  90. package/dist/views/admin/terminal-transaction/cell/Gateway.vue.d.ts +3 -5
  91. package/dist/views/admin/terminal-transaction/cell/Status.vue.d.ts +3 -5
  92. package/dist/views/admin/terminal-transaction/cell/Timestamp.vue.d.ts +7 -0
  93. package/dist/views/admin/transaction/TransactionTable.vue.d.ts +6 -2
  94. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +6 -0
  95. package/dist/views/admin/transaction/cell/Gateway.vue.d.ts +3 -5
  96. package/dist/views/admin/transaction/cell/Method.vue.d.ts +3 -5
  97. package/dist/views/admin/transaction/cell/Status.vue.d.ts +3 -5
  98. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
  99. package/dist/views/payout-account/cell/Bank.vue.d.ts +3 -5
  100. package/dist/views/payout-account/cell/IsActive.vue.d.ts +3 -5
  101. package/dist/views/payout-account/cell/PersonInCharge.vue.d.ts +3 -5
  102. package/dist/views/payout-account/cell/Status.vue.d.ts +3 -5
  103. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  104. package/dist/views/settlement/cell/Actions.vue.d.ts +4 -6
  105. package/dist/views/settlement/cell/Gateway.vue.d.ts +3 -5
  106. package/dist/views/settlement/cell/Method.vue.d.ts +3 -5
  107. package/dist/views/settlement/cell/Status.vue.d.ts +3 -5
  108. package/dist/views/terminal-transaction/TerminalTransaction.vue.d.ts +2 -0
  109. package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +7 -0
  110. package/dist/views/terminal-transaction/cell/Status.vue.d.ts +7 -0
  111. package/dist/views/transaction/cell/Gateway.vue.d.ts +3 -5
  112. package/dist/views/transaction/cell/Method.vue.d.ts +3 -5
  113. package/dist/views/transaction/cell/Status.vue.d.ts +3 -5
  114. package/package.json +5 -5
  115. package/dist/AdminLayout.vue_vue_type_script_setup_true_lang-oPYFBeEo.js +0 -42
  116. package/dist/PDFViewer-CjH_C1uT.js +0 -21792
  117. package/dist/PayoutAccount-xxSxqBTL.js +0 -3485
  118. package/dist/PayoutAccountSetting-CIeos0md.js +0 -425
  119. package/dist/Settlement-BVGACeme.js +0 -136
  120. package/dist/Settlement-Ce48KHrc.js +0 -132
  121. package/dist/Terminal-ByKV2Rof.js +0 -204
  122. package/dist/TerminalTransaction-RuSxBAxf.js +0 -240
  123. package/dist/Transaction-CYo-uLQi.js +0 -241
  124. package/dist/Transaction-Cjw9WwX8.js +0 -242
  125. package/dist/api/auth/index.d.ts +0 -7
  126. package/dist/assets-BuLGUMIx.js +0 -472
  127. package/dist/index-Coz5aeIO.js +0 -61
  128. package/dist/index-DCPNrUDq.js +0 -40075
  129. package/dist/index.vue_vue_type_script_setup_true_lang-CAR-bNaR.js +0 -150
  130. package/dist/mascot-side-3VXskf9y.js +0 -4
  131. package/dist/payout-account-iAM7HPtG.js +0 -3317
  132. package/dist/transaction-vRrBf3FN.js +0 -64
@@ -0,0 +1,33 @@
1
+ import { defineComponent as c, computed as a, resolveComponent as i, openBlock as d, createBlock as _, unref as l } from "vue";
2
+ import { useCoreStore as v } from "@feedmepos/mf-common";
3
+ const C = /* @__PURE__ */ c({
4
+ __name: "RestaurantSelector",
5
+ setup(f) {
6
+ const t = v(), r = a(() => {
7
+ var e;
8
+ return (e = t.currentRestaurant.value) == null ? void 0 : e._id;
9
+ }), u = a(() => t.restaurants.value.map((e) => ({
10
+ label: e.profile.name,
11
+ value: e._id
12
+ })));
13
+ return (e, n) => {
14
+ const s = i("FmSelect");
15
+ return d(), _(s, {
16
+ label: "Restaurant",
17
+ modelValue: r.value,
18
+ "onUpdate:modelValue": [
19
+ n[0] || (n[0] = (o) => r.value = o),
20
+ n[1] || (n[1] = (o) => {
21
+ const m = l(t).restaurants.value.find((p) => p._id == o);
22
+ l(t).changeRestaurant(m);
23
+ })
24
+ ],
25
+ class: "w-[220px]",
26
+ items: u.value
27
+ }, null, 8, ["modelValue", "items"]);
28
+ };
29
+ }
30
+ });
31
+ export {
32
+ C as _
33
+ };
@@ -0,0 +1,42 @@
1
+ import { defineComponent as c, mergeModels as r, useModel as s, computed as i, resolveComponent as d, openBlock as p, createBlock as v } from "vue";
2
+ import "@feedmepos/ui-library";
3
+ const h = /* @__PURE__ */ c({
4
+ __name: "SelectAll",
5
+ props: /* @__PURE__ */ r({
6
+ label: {
7
+ type: String
8
+ },
9
+ items: {
10
+ type: Array,
11
+ required: !0
12
+ }
13
+ }, {
14
+ modelValue: {
15
+ required: !0,
16
+ type: Array
17
+ },
18
+ modelModifiers: {}
19
+ }),
20
+ emits: ["update:modelValue"],
21
+ setup(e) {
22
+ const l = s(e, "modelValue"), t = e, o = i(() => {
23
+ const a = l.value;
24
+ return t.items.filter((n) => a.includes(n.value)).length === t.items.length;
25
+ });
26
+ return (a, n) => {
27
+ const u = d("FmMenuItem");
28
+ return p(), v(u, {
29
+ "model-value": o.value,
30
+ "has-checkbox": "",
31
+ key: "select-all",
32
+ label: e.label ?? "All",
33
+ onclick: () => {
34
+ o.value ? l.value = [] : l.value = e.items.map((m) => m.value);
35
+ }
36
+ }, null, 8, ["model-value", "label", "onclick"]);
37
+ };
38
+ }
39
+ });
40
+ export {
41
+ h as _
42
+ };
@@ -0,0 +1,193 @@
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-4meiCsRz.js";
3
+ import { h as g } from "./moment-h96o7c8I.js";
4
+ import { s as c } from "./index-CETCXB6X.js";
5
+ import { useSnackbar as T } from "@feedmepos/ui-library";
6
+ import { d as v } from "./dinero-CIVmXLL-.js";
7
+ import { _ as P } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
8
+ import { useRouter as q } from "vue-router";
9
+ import { _ as N } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
10
+ import { u as O } from "./index-BwFHcZlm.js";
11
+ import { u as U } from "./error-K1CakhA9.js";
12
+ import { _ as j } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
13
+ const z = /* @__PURE__ */ C({
14
+ __name: "SettlementTable",
15
+ props: {
16
+ data: {
17
+ type: Array,
18
+ required: !0
19
+ },
20
+ loading: {
21
+ type: Boolean,
22
+ required: !0
23
+ }
24
+ },
25
+ emits: ["row-click"],
26
+ setup(w, { emit: u }) {
27
+ const r = w, i = u, o = h(""), p = [
28
+ {
29
+ header: () => "Settlement ID",
30
+ accessorKey: "id",
31
+ cell: ({ cell: e }) => B(P, { data: e.getValue() })
32
+ },
33
+ {
34
+ header: () => "Created At",
35
+ accessorKey: "transactionAt",
36
+ meta: {
37
+ width: "180px"
38
+ }
39
+ },
40
+ {
41
+ header: () => "Sales Amount",
42
+ accessorKey: "amount"
43
+ },
44
+ {
45
+ header: () => "Fee",
46
+ accessorKey: "fee"
47
+ },
48
+ {
49
+ header: () => "Settlement Amount",
50
+ accessorKey: "payout"
51
+ }
52
+ ], f = x(() => r.data.map((e) => ({
53
+ id: e._id,
54
+ transactionAt: g(e.createdAt).format("YYYY-MM-DD"),
55
+ amount: v(e.totalAmount).toFormat("$0.00"),
56
+ fee: v(e.totalFee).toFormat("$0.00"),
57
+ payout: v(e.totalPayout).toFormat("$0.00")
58
+ })));
59
+ return (e, n) => {
60
+ const _ = d("FmTable");
61
+ return k(), A(_, {
62
+ modelValue: o.value,
63
+ "onUpdate:modelValue": n[0] || (n[0] = (l) => o.value = l),
64
+ "row-data": f.value,
65
+ "column-defs": p,
66
+ loading: r.loading,
67
+ onRowClick: n[1] || (n[1] = (l) => i("row-click", r.data.at(l.index)))
68
+ }, null, 8, ["modelValue", "row-data", "loading"]);
69
+ };
70
+ }
71
+ }), G = { class: "flex justify-between items-center mb-6" }, Q = { class: "flex space-x-4 items-center" }, H = { class: "flex space-x-4" }, ie = /* @__PURE__ */ C({
72
+ __name: "Settlement",
73
+ setup(w) {
74
+ const { isLoading: u, startAsyncCall: r } = D(!0), i = D(!1), o = h([]), p = q(), f = T(), { dateRange: e } = O({
75
+ dateRange: {
76
+ startDate: g().startOf("day").format("YYYY-MM-DD"),
77
+ endDate: g().endOf("day").format("YYYY-MM-DD")
78
+ }
79
+ });
80
+ V(e, n);
81
+ async function n() {
82
+ await r(async () => {
83
+ const F = await c.readByDate(
84
+ {
85
+ start: e.value.startDate,
86
+ end: e.value.endDate
87
+ }
88
+ );
89
+ o.value = F;
90
+ });
91
+ }
92
+ function _() {
93
+ n();
94
+ }
95
+ I(_);
96
+ const l = [
97
+ {
98
+ label: "Audit Report",
99
+ sublabel: "Full transactions details report from each payment providers.",
100
+ icon: "file_download",
101
+ value: "auditReport",
102
+ onClick: () => c.downloadSettlementReport({
103
+ start: e.value.startDate,
104
+ end: e.value.endDate
105
+ })
106
+ },
107
+ {
108
+ label: "Summary Report",
109
+ sublabel: "Summarized settlement information for each payout accounts.",
110
+ icon: "account_balance",
111
+ value: "summaryReport",
112
+ onClick: () => c.downloadSummaryReport(o.value, {
113
+ start: e.value.startDate,
114
+ end: e.value.endDate
115
+ })
116
+ },
117
+ {
118
+ label: "Bank Instruction File",
119
+ sublabel: "Generate bank instruction file based on bank formats.",
120
+ icon: "description",
121
+ value: "bankInstructionFile",
122
+ onClick: () => c.downloadBankInstructionFile(o.value)
123
+ }
124
+ ];
125
+ return (F, m) => {
126
+ const M = d("FmButton"), R = d("FmMenuItem"), S = d("FmMenu");
127
+ return k(), A(N, {
128
+ title: "Settlements",
129
+ loading: a(u)
130
+ }, {
131
+ default: b(() => [
132
+ y("div", G, [
133
+ y("div", Q, [
134
+ s(j, {
135
+ modelValue: a(e),
136
+ "onUpdate:modelValue": m[0] || (m[0] = (t) => $(e) ? e.value = t : null)
137
+ }, null, 8, ["modelValue"])
138
+ ]),
139
+ y("div", H, [
140
+ s(S, { trigger: "click" }, {
141
+ "menu-button": b(() => [
142
+ s(M, {
143
+ variant: "primary",
144
+ "append-icon": "arrow_drop_down",
145
+ label: "Actions",
146
+ loading: a(i).isLoading.value
147
+ }, null, 8, ["loading"])
148
+ ]),
149
+ default: b(() => [
150
+ (k(), L(K, null, E(l, (t) => s(R, {
151
+ key: t.value,
152
+ label: t.label,
153
+ icon: t.icon,
154
+ sublabel: t.sublabel,
155
+ selectable: !0,
156
+ onClick: (J) => {
157
+ a(i).startAsyncCall(async () => {
158
+ try {
159
+ await t.onClick();
160
+ } catch (Y) {
161
+ a(f).open({
162
+ type: "error",
163
+ title: "Error",
164
+ message: a(U)(Y)
165
+ });
166
+ }
167
+ });
168
+ }
169
+ }, null, 8, ["label", "icon", "sublabel", "onClick"])), 64))
170
+ ]),
171
+ _: 1
172
+ })
173
+ ])
174
+ ]),
175
+ s(z, {
176
+ loading: a(u),
177
+ data: o.value,
178
+ onRowClick: m[1] || (m[1] = (t) => a(p).push({
179
+ name: "mf-payment-admin.settlement-transaction",
180
+ params: {
181
+ settlementId: t._id
182
+ }
183
+ }))
184
+ }, null, 8, ["loading", "data"])
185
+ ]),
186
+ _: 1
187
+ }, 8, ["loading"]);
188
+ };
189
+ }
190
+ });
191
+ export {
192
+ ie as default
193
+ };
@@ -0,0 +1,145 @@
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-4meiCsRz.js";
3
+ import { h as _ } from "./moment-h96o7c8I.js";
4
+ import { useCoreStore as C } from "@feedmepos/mf-common";
5
+ import { _ as k } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
6
+ import { s as w } from "./index-CETCXB6X.js";
7
+ import "@feedmepos/ui-library";
8
+ import { d as f } from "./dinero-CIVmXLL-.js";
9
+ import { _ as F } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
10
+ import { useRouter as M } from "vue-router";
11
+ import { u as K } from "./index-BwFHcZlm.js";
12
+ import { _ as B } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
+ import { _ as I } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
14
+ import { _ as L } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
15
+ const P = /* @__PURE__ */ g({
16
+ __name: "SettlementTable",
17
+ props: {
18
+ data: {
19
+ type: Array,
20
+ required: !0
21
+ },
22
+ loading: {
23
+ type: Boolean,
24
+ required: !0
25
+ }
26
+ },
27
+ emits: ["row-click"],
28
+ setup(y, { emit: c }) {
29
+ const t = y, r = c, s = h(""), u = [
30
+ {
31
+ header: () => "Settlement ID",
32
+ accessorKey: "id",
33
+ cell: ({ cell: e }) => S(F, { data: e.getValue() })
34
+ },
35
+ {
36
+ header: () => "Created At",
37
+ accessorKey: "transactionAt",
38
+ meta: {
39
+ width: "180px"
40
+ }
41
+ },
42
+ {
43
+ header: () => "Sales Amount",
44
+ accessorKey: "amount"
45
+ },
46
+ {
47
+ header: () => "Fee",
48
+ accessorKey: "fee"
49
+ },
50
+ {
51
+ header: () => "Settlement Amount",
52
+ accessorKey: "payout"
53
+ }
54
+ ], l = x(() => t.data.map((e) => ({
55
+ id: e._id,
56
+ transactionAt: _(e.createdAt).format("YYYY-MM-DD"),
57
+ amount: f(e.totalAmount).toFormat("$0.00"),
58
+ fee: f(e.totalFee).toFormat("$0.00"),
59
+ payout: f(e.totalPayout).toFormat("$0.00")
60
+ })));
61
+ return (e, o) => {
62
+ const m = Y("FmTable");
63
+ return v(), D(m, {
64
+ modelValue: s.value,
65
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => s.value = a),
66
+ "row-data": l.value,
67
+ "column-defs": u,
68
+ loading: t.loading,
69
+ onRowClick: o[1] || (o[1] = (a) => r("row-click", t.data.at(a.index)))
70
+ }, null, 8, ["modelValue", "row-data", "loading"]);
71
+ };
72
+ }
73
+ }), T = { class: "flex justify-between items-center mb-6" }, q = { class: "flex space-x-8 items-center" }, E = { class: "flex space-x-4 self-center" }, N = { class: "mb-6" }, ot = /* @__PURE__ */ g({
74
+ __name: "Settlement",
75
+ setup(y) {
76
+ const c = M(), { dateRange: t } = K({
77
+ dateRange: {
78
+ startDate: _().startOf("day").format("YYYY-MM-DD"),
79
+ endDate: _().endOf("day").format("YYYY-MM-DD")
80
+ }
81
+ }), { isLoading: r, startAsyncCall: s } = b(!0), { currentRestaurant: u } = C(), l = h([]);
82
+ async function e() {
83
+ await s(async () => {
84
+ const m = await w.readRestaurantSettlements(
85
+ {
86
+ start: t.value.startDate,
87
+ end: t.value.endDate
88
+ }
89
+ );
90
+ l.value = m;
91
+ });
92
+ }
93
+ function o() {
94
+ e();
95
+ }
96
+ return A(o), R(u, o), (m, a) => (v(), D(k, {
97
+ title: "Settlements",
98
+ description: "Settlements are the finalization of financial transactions, transferring funds to complete payments.",
99
+ loading: n(r)
100
+ }, {
101
+ default: V(() => [
102
+ i("div", T, [
103
+ i("div", q, [
104
+ d(I)
105
+ ]),
106
+ i("div", E, [
107
+ d(B, {
108
+ button: {
109
+ appendIcon: "file_download",
110
+ variant: "primary",
111
+ label: "Export"
112
+ },
113
+ handler: async () => {
114
+ await n(w).downloadRestaurantSettlementReport({
115
+ start: n(t).startDate,
116
+ end: n(t).endDate
117
+ });
118
+ }
119
+ }, null, 8, ["handler"])
120
+ ])
121
+ ]),
122
+ i("div", N, [
123
+ d(L, {
124
+ modelValue: n(t),
125
+ "onUpdate:modelValue": a[0] || (a[0] = (p) => $(t) ? t.value = p : null)
126
+ }, null, 8, ["modelValue"])
127
+ ]),
128
+ d(P, {
129
+ loading: n(r),
130
+ data: l.value,
131
+ onRowClick: a[1] || (a[1] = (p) => n(c).push({
132
+ name: "mf-payment-settlement-transaction",
133
+ params: {
134
+ settlementId: p._id
135
+ }
136
+ }))
137
+ }, null, 8, ["loading", "data"])
138
+ ]),
139
+ _: 1
140
+ }, 8, ["loading"]));
141
+ }
142
+ });
143
+ export {
144
+ ot as default
145
+ };