@feedmepos/mf-payment 1.1.7 → 1.1.8

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 (40) hide show
  1. package/dist/{PayoutAccount-C362ShA8.js → PayoutAccount-BAXvKwol.js} +5 -5
  2. package/dist/{PayoutAccount-CAdClj2Y.js → PayoutAccount-C9TC-nLW.js} +3 -3
  3. package/dist/{PayoutAccountSetting-Cbl5b1Jr.js → PayoutAccountSetting-CsY4Dr_E.js} +3 -3
  4. package/dist/{Restaurant-ClDu-bSv.js → Restaurant-C9GmwxpU.js} +4 -4
  5. package/dist/{RestaurantSetting-D5h5RoHf.js → RestaurantSetting-DaSalR0b.js} +3 -3
  6. package/dist/Settlement-BvUs3MyQ.js +454 -0
  7. package/dist/Settlement-C7oFzVbb.js +219 -0
  8. package/dist/{SettlementTransactions-Cpaq8K6x.js → SettlementTransactions-BRo_oigl.js} +75 -69
  9. package/dist/{SettlementTransactions-DIvLOEw6.js → SettlementTransactions-qSgW0VCV.js} +80 -78
  10. package/dist/{Terminal-Cmed6xrj.js → Terminal-DXGKrm3G.js} +5 -5
  11. package/dist/TerminalSetting-bLxGkMlN.js +497 -0
  12. package/dist/{Transaction-BQn5rvxe.js → Transaction-B7ICajHR.js} +6 -6
  13. package/dist/{Transaction-8m9pEyyX.js → Transaction-BI2ZRsxe.js} +52 -47
  14. package/dist/{TransactionOld-CX-Odthg.js → TransactionOld-GLsvtHyF.js} +5 -5
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BX7YIl4i.js → TransactionTable.vue_vue_type_script_setup_true_lang-UjV7RID1.js} +12 -8
  16. package/dist/api/settlement/index.d.ts +1 -1
  17. package/dist/api/terminal/index.d.ts +4 -0
  18. package/dist/api/transaction/index.d.ts +1 -1
  19. package/dist/{app-QYQdqlqy.js → app-DVnyclnX.js} +327 -321
  20. package/dist/app.d.ts +6 -0
  21. package/dist/app.js +1 -1
  22. package/dist/{assets-Da-9jPqG.js → assets-BZmrImt4.js} +49 -52
  23. package/dist/{grafana-BDr-LF8O.js → grafana-DRnPxAqM.js} +1 -1
  24. package/dist/{index-0Dl-qVTd.js → index-BMF26WT4.js} +29 -29
  25. package/dist/{index-DFq7xhNQ.js → index-C1Hgyi3j.js} +1 -1
  26. package/dist/{index-Dg0Vf3qd.js → index-CD59SyVI.js} +1 -1
  27. package/dist/{index-DTH2dIPG.js → index-DZMn5Qjp.js} +796 -796
  28. package/dist/{index-Dq07OgOJ.js → index-a-Vqap7Z.js} +9 -1
  29. package/dist/{index-DbBsTEVS.js → index-gSE1T266.js} +1 -1
  30. package/dist/{index.vue_vue_type_script_setup_true_lang-JHB8s5dZ.js → index.vue_vue_type_script_setup_true_lang-FgXpWvbs.js} +1 -1
  31. package/dist/model/transaction.d.ts +3 -0
  32. package/dist/package.json +1 -1
  33. package/dist/{payout-account--IA1DbB5.js → payout-account-B76ODsn2.js} +2 -2
  34. package/dist/tsconfig.app.tsbuildinfo +1 -1
  35. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +87 -0
  36. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +87 -0
  37. package/package.json +1 -1
  38. package/dist/Settlement-B06tIr4_.js +0 -445
  39. package/dist/Settlement-C2BVxmir.js +0 -219
  40. package/dist/TerminalSetting-BrTRbBF7.js +0 -389
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as y, resolveComponent as u, openBlock as h, createBlock as k, normalizeClass as N, withCtx as c, createElementVNode as P, toDisplayString as I, createVNode as i, computed as x, ref as S, watch as F, unref as r, isRef as f, h as v } from "vue";
2
- import { u as O } from "./index-DFq7xhNQ.js";
3
- import { _ as K } from "./index-DTH2dIPG.js";
2
+ import { u as O } from "./index-C1Hgyi3j.js";
3
+ import { _ as K } from "./index-DZMn5Qjp.js";
4
4
  import { _ as A } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
5
- import { P as V } from "./payout-account--IA1DbB5.js";
6
- import { p as D } from "./index-DbBsTEVS.js";
5
+ import { P as V } from "./payout-account-B76ODsn2.js";
6
+ import { p as D } from "./index-gSE1T266.js";
7
7
  import "@feedmepos/ui-library";
8
- import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-JHB8s5dZ.js";
8
+ import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-FgXpWvbs.js";
9
9
  import { useRouter as U } from "vue-router";
10
10
  import { _ as $ } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
11
11
  const G = /* @__PURE__ */ y({
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as P, ref as W, reactive as eA, computed as I, watch as _, resolveComponent as C, openBlock as r, createElementBlock as f, Fragment as $, unref as s, createVNode as Y, createBlock as i, createCommentVNode as j, withCtx as q, createElementVNode as B, toDisplayString as N, normalizeClass as k, h as U, onMounted as sA } from "vue";
2
- import { p as J } from "./index-DbBsTEVS.js";
3
- import { _ as h, u as aA, e as oA } from "./index-DTH2dIPG.js";
2
+ import { p as J } from "./index-gSE1T266.js";
3
+ import { _ as h, u as aA, e as oA } from "./index-DZMn5Qjp.js";
4
4
  import { defineStore as gA } from "pinia";
5
5
  import { useI18n as R, useCoreStore as AA } from "@feedmepos/mf-common";
6
- import { c as lA, P as z } from "./payout-account--IA1DbB5.js";
6
+ import { c as lA, P as z } from "./payout-account-B76ODsn2.js";
7
7
  import { useDialogChild as rA, useDialog as cA } from "@feedmepos/ui-library";
8
8
  import { z as F, a as H } from "./validator-D5jtpt9A.js";
9
9
  import { P as S } from "./PDFViewer-BQfgFexr.js";
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as k, resolveComponent as y, openBlock as b, createElementBlock as A, Fragment as $, createElementVNode as l, createVNode as s, withCtx as F, createTextVNode as _, toDisplayString as h, createCommentVNode as S, createBlock as C, ref as V, watch as L, computed as G, unref as v, isRef as M, h as B, onMounted as H, resolveDynamicComponent as Y, normalizeProps as Q, mergeProps as W } from "vue";
2
- import { p as P } from "./index-DbBsTEVS.js";
3
- import { u as K, e as N } from "./index-DTH2dIPG.js";
2
+ import { p as P } from "./index-gSE1T266.js";
3
+ import { u as K, e as N } from "./index-DZMn5Qjp.js";
4
4
  import { _ as J } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
5
5
  import { useRouter as X } from "vue-router";
6
- import { u as D } from "./index-DFq7xhNQ.js";
6
+ import { u as D } from "./index-C1Hgyi3j.js";
7
7
  import { P as z, _ as ee } from "./PDFViewer-BQfgFexr.js";
8
8
  import { useSnackbar as j, components as te } from "@feedmepos/ui-library";
9
9
  import { u as I } from "./error-K1CakhA9.js";
@@ -1,12 +1,12 @@
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 z, renderList as q, computed as C, watch as I, onMounted as N, unref as h, toDisplayString as B, normalizeClass as W, isRef as E, h as P } from "vue";
2
- import { u as O } from "./index-DFq7xhNQ.js";
2
+ import { u as O } from "./index-C1Hgyi3j.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-DTH2dIPG.js";
5
+ import { u as G } from "./index-DZMn5Qjp.js";
6
6
  import { _ as Q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
7
- import { r as H } from "./index-Dg0Vf3qd.js";
7
+ import { r as H } from "./index-CD59SyVI.js";
8
8
  import { useRouter as J } from "vue-router";
9
- import { g as X } from "./grafana-BDr-LF8O.js";
9
+ import { g as X } from "./grafana-DRnPxAqM.js";
10
10
  const Y = ["id"], L = /* @__PURE__ */ F({
11
11
  __name: "FmTableSelection",
12
12
  props: {
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as C, ref as I, resolveComponent as d, openBlock as f, createBlock as F, withCtx as k, createVNode as u, unref as a, createElementVNode as D, createCommentVNode as S, onMounted as P, computed as q, createElementBlock as K, Fragment as M, resolveDynamicComponent as O, normalizeProps as $, mergeProps as B, isRef as N } from "vue";
2
- import { g as T, b as R, u as E, e as U } from "./index-DTH2dIPG.js";
2
+ import { g as T, b as R, u as E, e as U } from "./index-DZMn5Qjp.js";
3
3
  import { _ as Y } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
4
4
  import { useRouter as A } from "vue-router";
5
- import { u as L } from "./index-DFq7xhNQ.js";
5
+ import { u as L } from "./index-C1Hgyi3j.js";
6
6
  import { z as p, a as v } from "./validator-D5jtpt9A.js";
7
7
  import { useCoreStore as j } from "@feedmepos/mf-common";
8
- import { r as z } from "./index-Dg0Vf3qd.js";
8
+ import { r as z } from "./index-CD59SyVI.js";
9
9
  const _ = {
10
10
  async get(n) {
11
11
  return T(
@@ -0,0 +1,454 @@
1
+ import { defineComponent as C, ref as k, computed as R, resolveComponent as w, openBlock as V, createBlock as D, h as T, watch as P, createElementBlock as U, Fragment as q, createElementVNode as r, createVNode as u, withCtx as _, unref as t, toDisplayString as m, createTextVNode as v, onMounted as O, isRef as M, createCommentVNode as N } from "vue";
2
+ import { u as z } from "./index-DZMn5Qjp.js";
3
+ import { h as $ } from "./moment-h96o7c8I.js";
4
+ import { useI18n as K, useCoreStore as E } from "@feedmepos/mf-common";
5
+ import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
6
+ import { s as A } from "./index-BMF26WT4.js";
7
+ import { useDialog as I } from "@feedmepos/ui-library";
8
+ import { d } from "./dinero-CIVmXLL-.js";
9
+ import { _ as B } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
10
+ import { useRouter as L } from "vue-router";
11
+ import { u as J } from "./index-C1Hgyi3j.js";
12
+ import { _ as Q } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
+ import { _ as W } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-hJAJYKmE.js";
14
+ import { _ as G } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
15
+ const X = /* @__PURE__ */ C({
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(c, { emit: o }) {
29
+ const { t: l } = K(), s = c, p = o, y = k(""), h = [
30
+ {
31
+ header: () => l("settlements.table.id"),
32
+ accessorKey: "id",
33
+ cell: ({ cell: a }) => T(B, { data: a.getValue() })
34
+ },
35
+ {
36
+ header: () => l("settlements.table.bank"),
37
+ accessorKey: "bank"
38
+ },
39
+ {
40
+ header: () => l("settlements.table.account"),
41
+ accessorKey: "accountNo"
42
+ },
43
+ {
44
+ header: () => l("settlements.table.created_at"),
45
+ accessorKey: "transactionAt",
46
+ meta: {
47
+ width: "180px"
48
+ }
49
+ },
50
+ {
51
+ header: () => l("settlements.table.sales_amount"),
52
+ accessorKey: "amount"
53
+ },
54
+ {
55
+ header: () => l("settlements.table.fee"),
56
+ accessorKey: "fee"
57
+ },
58
+ {
59
+ header: () => l("settlements.table.settlement_amount"),
60
+ accessorKey: "payout"
61
+ }
62
+ ], b = R(() => s.data.map((a) => ({
63
+ id: a._id,
64
+ bank: a.beneficiaryBank.name,
65
+ accountNo: a.beneficiaryBank.accountNumber,
66
+ transactionAt: $(a.createdAt).format("YYYY-MM-DD"),
67
+ amount: d(a.totalAmount).toFormat("$0.00"),
68
+ fee: d(a.totalFee).toFormat("$0.00"),
69
+ payout: d(a.totalPayout).toFormat("$0.00")
70
+ })));
71
+ return (a, e) => {
72
+ const n = w("FmTable");
73
+ return V(), D(n, {
74
+ modelValue: y.value,
75
+ "onUpdate:modelValue": e[0] || (e[0] = (i) => y.value = i),
76
+ "row-data": b.value,
77
+ "shrink-at": !1,
78
+ "column-defs": h,
79
+ loading: s.loading,
80
+ onRowClick: e[1] || (e[1] = (i) => p("row-click", s.data.at(i.index)))
81
+ }, null, 8, ["modelValue", "row-data", "loading"]);
82
+ };
83
+ }
84
+ }), Z = /* @__PURE__ */ C({
85
+ __name: "FiuuSettlementTable",
86
+ props: {
87
+ data: {
88
+ type: Array,
89
+ required: !0
90
+ },
91
+ loading: {
92
+ type: Boolean,
93
+ required: !0
94
+ }
95
+ },
96
+ emits: ["row-click"],
97
+ setup(c, { emit: o }) {
98
+ const { t: l } = K(), s = c, p = o, y = k(""), h = [
99
+ {
100
+ header: () => l("settlements.table.id"),
101
+ accessorKey: "id",
102
+ cell: ({ cell: a }) => T(B, { data: a.getValue() })
103
+ },
104
+ {
105
+ header: () => l("settlements.table.bank"),
106
+ accessorKey: "bank"
107
+ },
108
+ {
109
+ header: () => l("settlements.table.account"),
110
+ accessorKey: "accountNo"
111
+ },
112
+ {
113
+ header: () => l("settlements.table.created_at"),
114
+ accessorKey: "transactionAt",
115
+ meta: {
116
+ width: "180px"
117
+ }
118
+ },
119
+ {
120
+ header: () => l("settlements.table.sales_amount"),
121
+ accessorKey: "amount"
122
+ },
123
+ {
124
+ header: () => l("settlements.table.fee"),
125
+ accessorKey: "fee"
126
+ },
127
+ {
128
+ header: () => l("settlements.table.settlement_amount"),
129
+ accessorKey: "payout"
130
+ }
131
+ ], b = R(() => s.data.map((a) => ({
132
+ id: a.summary.referenceNo,
133
+ bank: a.summary.bank.name,
134
+ accountNo: a.summary.bank.accountNo,
135
+ transactionAt: $(a.summary.completedAt).format("YYYY-MM-DD"),
136
+ amount: d(a.summary.amount).toFormat("$0.00"),
137
+ fee: d(a.summary.commission).toFormat("$0.00"),
138
+ payout: d(a.summary.payout).toFormat("$0.00")
139
+ })));
140
+ return (a, e) => {
141
+ const n = w("FmTable");
142
+ return V(), D(n, {
143
+ modelValue: y.value,
144
+ "onUpdate:modelValue": e[0] || (e[0] = (i) => y.value = i),
145
+ "row-data": b.value,
146
+ "shrink-at": !1,
147
+ "column-defs": h,
148
+ loading: s.loading,
149
+ onRowClick: e[1] || (e[1] = (i) => p("row-click", s.data.at(i.index)))
150
+ }, null, 8, ["modelValue", "row-data", "loading"]);
151
+ };
152
+ }
153
+ }), ee = {
154
+ id: "fiuu-settlement-dialog",
155
+ class: "flex mb-6"
156
+ }, te = { class: "my-6 w-[240px]" }, ae = /* @__PURE__ */ C({
157
+ __name: "FiuuSettlementTransactions",
158
+ props: {
159
+ settlement: {
160
+ type: Object,
161
+ required: !0
162
+ }
163
+ },
164
+ setup(c) {
165
+ const { t: o } = K(), s = k(
166
+ c.settlement.record.map((e) => (Object.assign(e, {
167
+ __localAmount: d(e.amount).toFormat("0.00"),
168
+ __localComission: d(e.commission).toFormat("0.00"),
169
+ __localNetAMount: d(e.netAmount).toFormat("0.00")
170
+ }), e))
171
+ ), p = k(s.value), y = k(""), h = [
172
+ {
173
+ header: () => o("settlements.dialog.fiuu.id"),
174
+ accessorKey: "referenceNo"
175
+ },
176
+ {
177
+ header: () => o("settlements.dialog.fiuu.type"),
178
+ accessorKey: "group"
179
+ },
180
+ {
181
+ header: () => o("settlements.dialog.fiuu.transaction_at"),
182
+ accessorKey: "completedAt",
183
+ meta: {
184
+ width: "180px"
185
+ },
186
+ cell: ({ cell: e }) => $(e.getValue()).format("YYYY-MM-DD HH:mm:ss")
187
+ },
188
+ {
189
+ header: () => o("settlements.dialog.fiuu.sales_amount"),
190
+ accessorKey: "amount",
191
+ cell: ({ cell: e }) => d(e.getValue()).toFormat("$0.00")
192
+ },
193
+ {
194
+ header: () => o("settlements.dialog.fiuu.fee"),
195
+ accessorKey: "commission",
196
+ cell: ({ cell: e }) => d(e.getValue()).toFormat("$0.00")
197
+ },
198
+ {
199
+ header: () => o("settlements.dialog.fiuu.settlement_amount"),
200
+ accessorKey: "netAmount",
201
+ cell: ({ cell: e }) => d(e.getValue()).toFormat("$0.00")
202
+ }
203
+ ], b = k("");
204
+ let a;
205
+ return P(b, async () => {
206
+ a && clearTimeout(a), a = setTimeout(() => {
207
+ var e = new RegExp(b.value, "i");
208
+ p.value = s.value.filter((n) => {
209
+ const i = JSON.stringify(n);
210
+ return e.test(i);
211
+ });
212
+ }, 700);
213
+ }), (e, n) => {
214
+ const i = w("FmCardHeader"), F = w("FmCardSection"), x = w("FmCard"), S = w("FmSearch"), g = w("FmTable");
215
+ return V(), U(q, null, [
216
+ r("div", ee, [
217
+ u(x, {
218
+ horizontal: "",
219
+ class: "flex-1 p-6",
220
+ variant: "elevated"
221
+ }, {
222
+ default: _(() => [
223
+ u(F, { class: "flex flex-col gap-16 justify-between" }, {
224
+ default: _(() => [
225
+ u(i, {
226
+ class: "p-0",
227
+ title: t(o)("settlements.dialog.info.transaction.title"),
228
+ subtitle: ""
229
+ }, null, 8, ["title"]),
230
+ u(F, { class: "p-0" }, {
231
+ default: _(() => [
232
+ r("b", null, m(t(o)("settlements.dialog.info.transaction.for")), 1),
233
+ v(": " + m(c.settlement.summary.group) + " ", 1),
234
+ n[2] || (n[2] = r("br", null, null, -1)),
235
+ r("b", null, m(t(o)("settlements.dialog.info.transaction.reference")), 1),
236
+ v(": " + m(c.settlement.summary.referenceNo), 1),
237
+ n[3] || (n[3] = r("br", null, null, -1)),
238
+ r("b", null, m(t(o)("settlements.dialog.info.transaction.count")), 1),
239
+ v(": " + m(s.value.length), 1)
240
+ ]),
241
+ _: 1
242
+ })
243
+ ]),
244
+ _: 1
245
+ })
246
+ ]),
247
+ _: 1
248
+ }),
249
+ u(x, {
250
+ horizontal: "",
251
+ class: "flex-1 p-6 mx-6",
252
+ variant: "elevated"
253
+ }, {
254
+ default: _(() => [
255
+ u(F, { class: "flex flex-col gap-16 justify-between" }, {
256
+ default: _(() => [
257
+ u(i, {
258
+ class: "p-0",
259
+ title: t(o)("settlements.dialog.info.bank.title"),
260
+ subtitle: ""
261
+ }, null, 8, ["title"]),
262
+ u(F, { class: "p-0" }, {
263
+ default: _(() => [
264
+ r("b", null, m(t(o)("settlements.dialog.info.bank.for")), 1),
265
+ v(": " + m(c.settlement.summary.bank.name), 1),
266
+ n[4] || (n[4] = r("br", null, null, -1)),
267
+ r("b", null, m(t(o)("settlements.dialog.info.bank.name")), 1),
268
+ v(": " + m(c.settlement.summary.bank.holderName), 1),
269
+ n[5] || (n[5] = r("br", null, null, -1)),
270
+ r("b", null, m(t(o)("settlements.dialog.info.bank.number")), 1),
271
+ v(": " + m(c.settlement.summary.bank.accountNo), 1)
272
+ ]),
273
+ _: 1
274
+ })
275
+ ]),
276
+ _: 1
277
+ })
278
+ ]),
279
+ _: 1
280
+ }),
281
+ u(x, {
282
+ horizontal: "",
283
+ class: "flex-1 p-6",
284
+ variant: "elevated"
285
+ }, {
286
+ default: _(() => [
287
+ u(F, { class: "flex flex-col gap-16 justify-between" }, {
288
+ default: _(() => [
289
+ u(i, {
290
+ class: "p-0",
291
+ title: t(o)("settlements.dialog.info.payout.title"),
292
+ subtitle: ""
293
+ }, null, 8, ["title"]),
294
+ u(F, { class: "p-0" }, {
295
+ default: _(() => [
296
+ r("b", null, m(t(o)("settlements.dialog.info.payout.amount")), 1),
297
+ v(": " + m(t(d)(c.settlement.summary.amount).toFormat("$0.00")), 1),
298
+ n[6] || (n[6] = r("br", null, null, -1)),
299
+ r("b", null, m(t(o)("settlements.dialog.info.payout.fee")), 1),
300
+ v(": " + m(t(d)(c.settlement.summary.commission).toFormat("$0.00")), 1),
301
+ n[7] || (n[7] = r("br", null, null, -1)),
302
+ r("b", null, m(t(o)("settlements.dialog.info.payout.payout")), 1),
303
+ v(": " + m(t(d)(c.settlement.summary.payout).toFormat("$0.00")), 1)
304
+ ]),
305
+ _: 1
306
+ })
307
+ ]),
308
+ _: 1
309
+ })
310
+ ]),
311
+ _: 1
312
+ })
313
+ ]),
314
+ r("div", te, [
315
+ u(S, {
316
+ modelValue: b.value,
317
+ "onUpdate:modelValue": n[0] || (n[0] = (f) => b.value = f),
318
+ placeholder: t(o)("settlements.dialog.search")
319
+ }, null, 8, ["modelValue", "placeholder"])
320
+ ]),
321
+ u(g, {
322
+ modelValue: y.value,
323
+ "onUpdate:modelValue": n[1] || (n[1] = (f) => y.value = f),
324
+ "shrink-at": !1,
325
+ "search-value": b.value,
326
+ "row-data": p.value,
327
+ "column-defs": h
328
+ }, null, 8, ["modelValue", "search-value", "row-data"])
329
+ ], 64);
330
+ };
331
+ }
332
+ }), oe = { class: "flex justify-between items-center mb-6" }, ne = { class: "flex space-x-8 items-center" }, le = { class: "flex space-x-4 self-center" }, se = { class: "mb-6" }, re = { class: "mb-6" }, ke = /* @__PURE__ */ C({
333
+ __name: "Settlement",
334
+ setup(c) {
335
+ const o = L(), { tab: l, dateRange: s } = J({
336
+ tab: "feedme",
337
+ dateRange: {
338
+ startDate: $().startOf("day").format("YYYY-MM-DD"),
339
+ endDate: $().endOf("day").format("YYYY-MM-DD")
340
+ }
341
+ }), { t: p } = K(), { isLoading: y, startAsyncCall: h } = z(!0), { currentRestaurant: b } = E(), a = I(), e = k([]), n = k([]);
342
+ async function i() {
343
+ const g = await A.readRestaurantSettlements(
344
+ {
345
+ start: s.value.startDate,
346
+ end: s.value.endDate
347
+ }
348
+ );
349
+ e.value = g;
350
+ }
351
+ async function F() {
352
+ const g = await A.readRestaurantRMSSettlements(
353
+ {
354
+ start: s.value.startDate,
355
+ end: s.value.endDate
356
+ }
357
+ );
358
+ n.value = g;
359
+ }
360
+ async function x() {
361
+ await h(async () => Promise.all([
362
+ i(),
363
+ F()
364
+ ]));
365
+ }
366
+ async function S(g) {
367
+ const f = $(g.summary.completedAt).format("YYYY/MM/DD");
368
+ a.open({
369
+ title: `${p("settlements.dialog.title")} (${g.summary.referenceNo})`,
370
+ subTitle: `${p("settlements.dialog.date")}: ${f}`,
371
+ minWidth: "90%",
372
+ primaryActions: { text: "Close", close: !0 },
373
+ contentComponent: ae,
374
+ contentComponentProps: { settlement: g }
375
+ });
376
+ }
377
+ return O(x), P([b, s], x), (g, f) => {
378
+ const j = w("FmTabs");
379
+ return V(), D(H, {
380
+ title: t(p)("settlements.title"),
381
+ description: t(p)("settlements.description"),
382
+ loading: !1
383
+ }, {
384
+ default: _(() => [
385
+ r("div", oe, [
386
+ r("div", ne, [
387
+ u(W)
388
+ ]),
389
+ r("div", le, [
390
+ u(Q, {
391
+ button: {
392
+ appendIcon: "file_download",
393
+ variant: "primary",
394
+ label: "Export"
395
+ },
396
+ handler: async () => {
397
+ await t(A).downloadRestaurantSettlementReport({
398
+ start: t(s).startDate,
399
+ end: t(s).endDate
400
+ });
401
+ }
402
+ }, null, 8, ["handler"])
403
+ ])
404
+ ]),
405
+ r("div", se, [
406
+ u(G, {
407
+ modelValue: t(s),
408
+ "onUpdate:modelValue": f[0] || (f[0] = (Y) => M(s) ? s.value = Y : null)
409
+ }, null, 8, ["modelValue"])
410
+ ]),
411
+ r("div", re, [
412
+ u(j, {
413
+ modelValue: t(l),
414
+ "onUpdate:modelValue": f[1] || (f[1] = (Y) => M(l) ? l.value = Y : null),
415
+ items: [
416
+ {
417
+ label: "FeedMe",
418
+ value: "feedme",
419
+ icon: "summarize"
420
+ },
421
+ {
422
+ label: "Fiuu (RMS)",
423
+ value: "fiuu",
424
+ icon: "overview"
425
+ }
426
+ ]
427
+ }, null, 8, ["modelValue"])
428
+ ]),
429
+ t(l) === "fiuu" ? (V(), D(Z, {
430
+ key: 0,
431
+ loading: t(y),
432
+ data: n.value,
433
+ onRowClick: S
434
+ }, null, 8, ["loading", "data"])) : N("", !0),
435
+ t(l) === "feedme" ? (V(), D(X, {
436
+ key: 1,
437
+ loading: t(y),
438
+ data: e.value,
439
+ onRowClick: f[2] || (f[2] = (Y) => t(o).push({
440
+ name: "mf-payment-settlement-transaction",
441
+ params: {
442
+ settlementId: Y._id
443
+ }
444
+ }))
445
+ }, null, 8, ["loading", "data"])) : N("", !0)
446
+ ]),
447
+ _: 1
448
+ }, 8, ["title", "description"]);
449
+ };
450
+ }
451
+ });
452
+ export {
453
+ ke as default
454
+ };