@feedmepos/mf-payment 1.5.26-dev → 1.5.29-dev

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 (91) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-Cy1BbWNh.js → Actions.vue_vue_type_script_setup_true_lang-DGrZmVUQ.js} +2 -2
  2. package/dist/{Chargeback-Dl4rSQ5U.js → Chargeback-CocH4bON.js} +5 -5
  3. package/dist/DocumentViewer.vue_vue_type_script_setup_true_lang-tGPnCbHL.js +94 -0
  4. package/dist/{OnboardForm-Z433FFST.js → OnboardForm-BLk46c4b.js} +5 -5
  5. package/dist/{OnboardForm-CXCnqEIi.js → OnboardForm-CqohYc7w.js} +5 -5
  6. package/dist/{OnboardSubmission-V8jeo8Za.js → OnboardSubmission-CIZuFLWF.js} +2 -2
  7. package/dist/{OnboardSubmission-BB6qLr3p.js → OnboardSubmission-CNJ-CYki.js} +5 -5
  8. package/dist/{PayoutAccount-DB72Minq.js → PayoutAccount-2vZvDUNZ.js} +5 -5
  9. package/dist/{PayoutAccount-Bf8TpJtM.js → PayoutAccount-Qzl0EU8D.js} +4 -4
  10. package/dist/{PayoutAccountSetting-DtFbOHVm.js → PayoutAccountSetting-DfrRhtcP.js} +244 -241
  11. package/dist/{Restaurant-DlQV3dot.js → Restaurant-Ckh7iZ9v.js} +4 -4
  12. package/dist/{RestaurantSetting-Yb9S8Wfg.js → RestaurantSetting-CeHORT_l.js} +3 -3
  13. package/dist/Settlement-DWj3kJpX.js +490 -0
  14. package/dist/{Settlement-jznt2FLc.js → Settlement-Dkf0_6WU.js} +3 -3
  15. package/dist/{SettlementTransactions-DLVFBcdV.js → SettlementTransactions-B_-EF9FQ.js} +4 -4
  16. package/dist/{SettlementTransactions-Bm7D3JZu.js → SettlementTransactions-BfDzz9CE.js} +4 -4
  17. package/dist/{Status.vue_vue_type_script_setup_true_lang-DnWFKNCZ.js → Status.vue_vue_type_script_setup_true_lang-BRylU6yC.js} +1 -1
  18. package/dist/{Terminal-B6wzbr0C.js → Terminal-CO1Qqx4X.js} +5 -5
  19. package/dist/{TerminalSetting-BV1Uh1OM.js → TerminalSetting-14CDkcsr.js} +3 -3
  20. package/dist/Transaction-CkZKTFNI.js +473 -0
  21. package/dist/{Transaction-DL0_I7Ez.js → Transaction-LS_h6ecG.js} +6 -6
  22. package/dist/{TransactionOld-CDKLMs5_.js → TransactionOld-Bivy85L4.js} +6 -6
  23. package/dist/api/document/index.d.ts +1 -0
  24. package/dist/{app-BkfY9b4E.js → app-DUlTcsCJ.js} +56 -33
  25. package/dist/app.js +1 -1
  26. package/dist/{assets-DvPzXLhl.js → assets-zMyaBFbU.js} +29 -28
  27. package/dist/components/DocumentViewer.vue.d.ts +1 -0
  28. package/dist/components/SourceSelector.vue.d.ts +4 -1
  29. package/dist/{grafana-DwrmpEec.js → grafana-D_fIUdUm.js} +1 -1
  30. package/dist/{index-2-UOiJfz.js → index-BganQIV3.js} +1 -1
  31. package/dist/{index-zMl6AuFw.js → index-C87vsLzf.js} +1 -1
  32. package/dist/{index-DRKoa7dT.js → index-CcCcgcKj.js} +106 -101
  33. package/dist/{index-OA39241x.js → index-CsxAKwXK.js} +1 -1
  34. package/dist/index-D7IY2VY_.js +36 -0
  35. package/dist/{index-DcB4capd.js → index-DEC3wCyK.js} +1 -1
  36. package/dist/{index-zvJkckUa.js → index-DGCnviAy.js} +1 -1
  37. package/dist/{index-Ci4uxsSz.js → index-WuRUC8sI.js} +2 -2
  38. package/dist/{index-BPKJne1Q.js → index-cOl7pH9_.js} +1 -1
  39. package/dist/{index.vue_vue_type_script_setup_true_lang-BYTNfOkc.js → index.vue_vue_type_script_setup_true_lang-H0-KLC0F.js} +1 -1
  40. package/dist/package.json +3 -3
  41. package/dist/{payout-account-V9peDwuP.js → payout-account-DyUwLBkF.js} +3 -3
  42. package/dist/stores/payoutAccount.d.ts +34 -34
  43. package/dist/tsconfig.app.tsbuildinfo +1 -1
  44. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +34 -34
  45. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +56 -56
  46. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +56 -56
  47. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +34 -34
  48. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +34 -34
  49. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +56 -56
  50. package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
  51. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  52. package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
  53. package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
  54. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
  55. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
  56. package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -4
  57. package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +4 -4
  58. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +6 -6
  59. package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
  60. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
  61. package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +4 -4
  62. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -0
  63. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +14 -14
  64. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +14 -14
  65. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +14 -14
  66. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +14 -14
  67. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +14 -14
  68. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +14 -14
  69. package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +14 -14
  70. package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +14 -14
  71. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +14 -14
  72. package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +14 -14
  73. package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +14 -14
  74. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +14 -14
  75. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +14 -14
  76. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +14 -14
  77. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +14 -14
  78. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +14 -14
  79. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +14 -14
  80. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +14 -14
  81. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +14 -14
  82. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +68 -68
  83. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +44 -44
  84. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +22 -22
  85. package/dist/views/settlement/SettlementTable.vue.d.ts +5 -1
  86. package/dist/views/settlement/cell/InvoiceStatus.vue.d.ts +5 -0
  87. package/package.json +2 -2
  88. package/dist/DocumentViewer.vue_vue_type_script_setup_true_lang-KCfloaC1.js +0 -89
  89. package/dist/Settlement-CpmdJ84I.js +0 -444
  90. package/dist/Transaction-BAKFOtrH.js +0 -456
  91. package/dist/index-ey7xefKL.js +0 -27
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as F, ref as y, resolveComponent as _, openBlock as x, createBlock as A, withCtx as $, createElementVNode as p, normalizeStyle as T, createElementBlock as R, Fragment as z, renderList as q, createVNode as v, 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-zMl6AuFw.js";
2
+ import { u as O } from "./index-C87vsLzf.js";
3
3
  import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
4
4
  import "@feedmepos/ui-library";
5
- import { u as G } from "./index-DRKoa7dT.js";
5
+ import { u as G } from "./index-CcCcgcKj.js";
6
6
  import { _ as Q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
7
- import { r as H } from "./index-BPKJne1Q.js";
7
+ import { r as H } from "./index-cOl7pH9_.js";
8
8
  import { useRouter as J } from "vue-router";
9
- import { g as X } from "./grafana-DwrmpEec.js";
9
+ import { g as X } from "./grafana-D_fIUdUm.js";
10
10
  const Y = ["id"], L = /* @__PURE__ */ F({
11
11
  __name: "FmTableSelection",
12
12
  props: {
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as D, ref as w, resolveComponent as r, openBlock as g, createBlock as b, withCtx as I, createVNode as o, unref as n, createElementVNode as T, createCommentVNode as S, computed as G, onMounted as N, createElementBlock as R, Fragment as L, isRef as B, resolveDynamicComponent as $, mergeProps as Y, normalizeProps as H } from "vue";
2
- import { g as q, b as M, u as O, e as U } from "./index-DRKoa7dT.js";
2
+ import { g as q, b as M, u as O, e as U } from "./index-CcCcgcKj.js";
3
3
  import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
4
4
  import { useRouter as Q } from "vue-router";
5
- import { u as P } from "./index-zMl6AuFw.js";
5
+ import { u as P } from "./index-C87vsLzf.js";
6
6
  import { z as p, a as f } from "./validator-DzjyJnvv.js";
7
7
  import { useCoreStore as E } from "@feedmepos/mf-common";
8
8
  import { u as Z } from "./error-K1CakhA9.js";
9
9
  import { useSnackbar as J } from "@feedmepos/ui-library";
10
- import { r as W } from "./index-BPKJne1Q.js";
10
+ import { r as W } from "./index-cOl7pH9_.js";
11
11
  const A = {
12
12
  async get(a) {
13
13
  return q(
@@ -0,0 +1,490 @@
1
+ import { defineComponent as C, resolveComponent as w, openBlock as V, createBlock as $, ref as x, computed as T, createElementBlock as I, Fragment as B, unref as e, withDirectives as q, vShow as z, createCommentVNode as M, createVNode as i, h as N, watch as P, createElementVNode as m, withCtx as k, toDisplayString as c, createTextVNode as h, onMounted as E, isRef as R } from "vue";
2
+ import { u as H } from "./index-CcCcgcKj.js";
3
+ import { h as S } from "./moment-h96o7c8I.js";
4
+ import { useCoreStore as O, useI18n as K } from "@feedmepos/mf-common";
5
+ import { _ as L } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
6
+ import { s as A } from "./index-DGCnviAy.js";
7
+ import { useDialog as J } from "@feedmepos/ui-library";
8
+ import { d as f } from "./dinero-CIVmXLL-.js";
9
+ import { _ as j } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
10
+ import { useRouter as Q } from "vue-router";
11
+ import { u as W } from "./index-C87vsLzf.js";
12
+ import { _ as G } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
+ import { _ as X } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DG3iyjkK.js";
14
+ import { _ as Z } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
15
+ const ee = /* @__PURE__ */ C({
16
+ __name: "InvoiceStatus",
17
+ props: {
18
+ data: {}
19
+ },
20
+ setup(p) {
21
+ const t = p;
22
+ function u() {
23
+ return t.data && t.data !== "" ? "#66BB6A" : "#EF5350";
24
+ }
25
+ function l() {
26
+ return t.data && t.data !== "" ? "check" : "close";
27
+ }
28
+ return (s, g) => {
29
+ const _ = w("FmIcon");
30
+ return V(), $(_, {
31
+ name: l(),
32
+ color: u(),
33
+ size: "lg"
34
+ }, null, 8, ["name", "color"]);
35
+ };
36
+ }
37
+ }), te = /* @__PURE__ */ C({
38
+ __name: "SettlementTable",
39
+ props: {
40
+ data: {
41
+ type: Array,
42
+ required: !0
43
+ },
44
+ loading: {
45
+ type: Boolean,
46
+ required: !0
47
+ }
48
+ },
49
+ emits: ["row-click"],
50
+ setup(p, { emit: t }) {
51
+ const { currentCountry: u, namespace: l } = O(), { t: s } = K(), g = x(!0), _ = p, F = t, r = x(""), a = [
52
+ {
53
+ header: () => s("payment.settlements.table.id"),
54
+ accessorKey: "id",
55
+ cell: ({ cell: o }) => N(j, { data: o.getValue() })
56
+ },
57
+ {
58
+ header: () => s("payment.settlements.table.bank"),
59
+ accessorKey: "bank"
60
+ },
61
+ {
62
+ header: () => s("payment.settlements.table.account"),
63
+ accessorKey: "accountNo"
64
+ },
65
+ {
66
+ header: () => s("payment.settlements.table.created_at"),
67
+ accessorKey: "transactionAt",
68
+ meta: {
69
+ width: "180px"
70
+ }
71
+ },
72
+ {
73
+ header: () => s("payment.settlements.table.sales_amount"),
74
+ accessorKey: "amount"
75
+ },
76
+ {
77
+ header: () => s("payment.settlements.table.fee"),
78
+ accessorKey: "fee"
79
+ },
80
+ {
81
+ header: () => s("payment.settlements.table.settlement_amount"),
82
+ accessorKey: "payout"
83
+ },
84
+ {
85
+ header: () => s("payment.settlements.table.invoice_status"),
86
+ accessorKey: "invoiceId",
87
+ cell: ({ cell: o }) => N(ee, { data: o.getValue() })
88
+ }
89
+ ], n = T(() => _.data.map((o) => ({
90
+ id: o._id,
91
+ bank: o.beneficiaryBank.name,
92
+ accountNo: o.beneficiaryBank.accountNumber,
93
+ transactionAt: S(o.createdAt).format("YYYY-MM-DD"),
94
+ amount: f(o.totalAmount).toFormat("$0.00"),
95
+ fee: f(o.totalFee).toFormat("$0.00"),
96
+ payout: f(o.totalPayout).toFormat("$0.00"),
97
+ invoiceId: o.invoiceId
98
+ }))), y = () => {
99
+ let o = "https://license.feedme.cc/invoices";
100
+ l.value === "dev" && (o = "https://license.feedmedev.cc/invoices"), open(o, "_blank");
101
+ };
102
+ return (o, b) => {
103
+ const D = w("FmSnackbar"), v = w("FmTable");
104
+ return V(), I(B, null, [
105
+ e(u) === "MY" ? q((V(), $(D, {
106
+ key: 0,
107
+ class: "mb-10",
108
+ title: e(s)("payment.settlements.invoice.title"),
109
+ description: e(s)("payment.settlements.invoice.description"),
110
+ action: e(s)("payment.settlements.invoice.action"),
111
+ variant: "info",
112
+ dismissable: "",
113
+ onOnDismiss: b[0] || (b[0] = (d) => g.value = !1),
114
+ onOnAction: y
115
+ }, null, 8, ["title", "description", "action"])), [
116
+ [z, g.value]
117
+ ]) : M("", !0),
118
+ i(v, {
119
+ modelValue: r.value,
120
+ "onUpdate:modelValue": b[1] || (b[1] = (d) => r.value = d),
121
+ "row-data": n.value,
122
+ "shrink-at": !1,
123
+ "column-defs": a,
124
+ loading: _.loading,
125
+ onRowClick: b[2] || (b[2] = (d) => F("row-click", _.data.at(d.index)))
126
+ }, null, 8, ["modelValue", "row-data", "loading"])
127
+ ], 64);
128
+ };
129
+ }
130
+ }), ae = /* @__PURE__ */ C({
131
+ __name: "FiuuSettlementTable",
132
+ props: {
133
+ data: {
134
+ type: Array,
135
+ required: !0
136
+ },
137
+ loading: {
138
+ type: Boolean,
139
+ required: !0
140
+ }
141
+ },
142
+ emits: ["row-click"],
143
+ setup(p, { emit: t }) {
144
+ const { t: u } = K(), l = p, s = t, g = x(""), _ = [
145
+ {
146
+ header: () => u("payment.settlements.table.id"),
147
+ accessorKey: "id",
148
+ cell: ({ cell: r }) => N(j, { data: r.getValue() })
149
+ },
150
+ {
151
+ header: () => u("payment.settlements.table.bank"),
152
+ accessorKey: "bank"
153
+ },
154
+ {
155
+ header: () => u("payment.settlements.table.account"),
156
+ accessorKey: "accountNo"
157
+ },
158
+ {
159
+ header: () => u("payment.settlements.table.created_at"),
160
+ accessorKey: "transactionAt",
161
+ meta: {
162
+ width: "180px"
163
+ }
164
+ },
165
+ {
166
+ header: () => u("payment.settlements.table.sales_amount"),
167
+ accessorKey: "amount"
168
+ },
169
+ {
170
+ header: () => u("payment.settlements.table.fee"),
171
+ accessorKey: "fee"
172
+ },
173
+ {
174
+ header: () => u("payment.settlements.table.settlement_amount"),
175
+ accessorKey: "payout"
176
+ }
177
+ ], F = T(() => l.data.map((r) => ({
178
+ id: r.summary.referenceNo,
179
+ bank: r.summary.bank.name,
180
+ accountNo: r.summary.bank.accountNo,
181
+ transactionAt: S(r.summary.completedAt).format("YYYY-MM-DD"),
182
+ amount: f(r.summary.amount).toFormat("$0.00"),
183
+ fee: f(r.summary.commission).toFormat("$0.00"),
184
+ payout: f(r.summary.payout).toFormat("$0.00")
185
+ })));
186
+ return (r, a) => {
187
+ const n = w("FmTable");
188
+ return V(), $(n, {
189
+ modelValue: g.value,
190
+ "onUpdate:modelValue": a[0] || (a[0] = (y) => g.value = y),
191
+ "row-data": F.value,
192
+ "shrink-at": !1,
193
+ "column-defs": _,
194
+ loading: l.loading,
195
+ onRowClick: a[1] || (a[1] = (y) => s("row-click", l.data.at(y.index)))
196
+ }, null, 8, ["modelValue", "row-data", "loading"]);
197
+ };
198
+ }
199
+ }), ne = {
200
+ id: "fiuu-settlement-dialog",
201
+ class: "flex mb-6"
202
+ }, oe = { class: "my-6 w-[240px]" }, le = /* @__PURE__ */ C({
203
+ __name: "FiuuSettlementTransactions",
204
+ props: {
205
+ settlement: {
206
+ type: Object,
207
+ required: !0
208
+ }
209
+ },
210
+ setup(p) {
211
+ const { t } = K(), l = x(
212
+ p.settlement.record.map((a) => (Object.assign(a, {
213
+ __localAmount: f(a.amount).toFormat("0.00"),
214
+ __localComission: f(a.commission).toFormat("0.00"),
215
+ __localNetAMount: f(a.netAmount).toFormat("0.00")
216
+ }), a))
217
+ ), s = x(l.value), g = x(""), _ = [
218
+ {
219
+ header: () => t("payment.settlements.dialog.fiuu.id"),
220
+ accessorKey: "referenceNo"
221
+ },
222
+ {
223
+ header: () => t("payment.settlements.dialog.fiuu.type"),
224
+ accessorKey: "group"
225
+ },
226
+ {
227
+ header: () => t("payment.settlements.dialog.fiuu.transaction_at"),
228
+ accessorKey: "completedAt",
229
+ meta: {
230
+ width: "180px"
231
+ },
232
+ cell: ({ cell: a }) => S(a.getValue()).format("YYYY-MM-DD HH:mm:ss")
233
+ },
234
+ {
235
+ header: () => t("payment.settlements.dialog.fiuu.sales_amount"),
236
+ accessorKey: "amount",
237
+ cell: ({ cell: a }) => f(a.getValue()).toFormat("$0.00")
238
+ },
239
+ {
240
+ header: () => t("payment.settlements.dialog.fiuu.fee"),
241
+ accessorKey: "commission",
242
+ cell: ({ cell: a }) => f(a.getValue()).toFormat("$0.00")
243
+ },
244
+ {
245
+ header: () => t("payment.settlements.dialog.fiuu.settlement_amount"),
246
+ accessorKey: "netAmount",
247
+ cell: ({ cell: a }) => f(a.getValue()).toFormat("$0.00")
248
+ }
249
+ ], F = x("");
250
+ let r;
251
+ return P(F, async () => {
252
+ r && clearTimeout(r), r = setTimeout(() => {
253
+ var a = new RegExp(F.value, "i");
254
+ s.value = l.value.filter((n) => {
255
+ const y = JSON.stringify(n);
256
+ return a.test(y);
257
+ });
258
+ }, 700);
259
+ }), (a, n) => {
260
+ const y = w("FmCardHeader"), o = w("FmCardSection"), b = w("FmCard"), D = w("FmSearch"), v = w("FmTable");
261
+ return V(), I(B, null, [
262
+ m("div", ne, [
263
+ i(b, {
264
+ horizontal: "",
265
+ class: "flex-1 p-6",
266
+ variant: "elevated"
267
+ }, {
268
+ default: k(() => [
269
+ i(o, { class: "flex flex-col gap-16 justify-between" }, {
270
+ default: k(() => [
271
+ i(y, {
272
+ class: "p-0",
273
+ title: e(t)("payment.settlements.dialog.info.transaction.title"),
274
+ subtitle: ""
275
+ }, null, 8, ["title"]),
276
+ i(o, { class: "p-0" }, {
277
+ default: k(() => [
278
+ m("b", null, c(e(t)("payment.settlements.dialog.info.transaction.for")), 1),
279
+ h(": " + c(p.settlement.summary.group) + " ", 1),
280
+ n[2] || (n[2] = m("br", null, null, -1)),
281
+ m("b", null, c(e(t)("payment.settlements.dialog.info.transaction.reference")), 1),
282
+ h(": " + c(p.settlement.summary.referenceNo), 1),
283
+ n[3] || (n[3] = m("br", null, null, -1)),
284
+ m("b", null, c(e(t)("payment.settlements.dialog.info.transaction.count")), 1),
285
+ h(": " + c(l.value.length), 1)
286
+ ]),
287
+ _: 1
288
+ })
289
+ ]),
290
+ _: 1
291
+ })
292
+ ]),
293
+ _: 1
294
+ }),
295
+ i(b, {
296
+ horizontal: "",
297
+ class: "flex-1 p-6 mx-6",
298
+ variant: "elevated"
299
+ }, {
300
+ default: k(() => [
301
+ i(o, { class: "flex flex-col gap-16 justify-between" }, {
302
+ default: k(() => [
303
+ i(y, {
304
+ class: "p-0",
305
+ title: e(t)("payment.settlements.dialog.info.bank.title"),
306
+ subtitle: ""
307
+ }, null, 8, ["title"]),
308
+ i(o, { class: "p-0" }, {
309
+ default: k(() => [
310
+ m("b", null, c(e(t)("payment.settlements.dialog.info.bank.for")), 1),
311
+ h(": " + c(p.settlement.summary.bank.name), 1),
312
+ n[4] || (n[4] = m("br", null, null, -1)),
313
+ m("b", null, c(e(t)("payment.settlements.dialog.info.bank.name")), 1),
314
+ h(": " + c(p.settlement.summary.bank.holderName), 1),
315
+ n[5] || (n[5] = m("br", null, null, -1)),
316
+ m("b", null, c(e(t)("payment.settlements.dialog.info.bank.number")), 1),
317
+ h(": " + c(p.settlement.summary.bank.accountNo), 1)
318
+ ]),
319
+ _: 1
320
+ })
321
+ ]),
322
+ _: 1
323
+ })
324
+ ]),
325
+ _: 1
326
+ }),
327
+ i(b, {
328
+ horizontal: "",
329
+ class: "flex-1 p-6",
330
+ variant: "elevated"
331
+ }, {
332
+ default: k(() => [
333
+ i(o, { class: "flex flex-col gap-16 justify-between" }, {
334
+ default: k(() => [
335
+ i(y, {
336
+ class: "p-0",
337
+ title: e(t)("payment.settlements.dialog.info.payout.title"),
338
+ subtitle: ""
339
+ }, null, 8, ["title"]),
340
+ i(o, { class: "p-0" }, {
341
+ default: k(() => [
342
+ m("b", null, c(e(t)("payment.settlements.dialog.info.payout.amount")), 1),
343
+ h(": " + c(e(f)(p.settlement.summary.amount).toFormat("$0.00")), 1),
344
+ n[6] || (n[6] = m("br", null, null, -1)),
345
+ m("b", null, c(e(t)("payment.settlements.dialog.info.payout.fee")), 1),
346
+ h(": " + c(e(f)(p.settlement.summary.commission).toFormat("$0.00")), 1),
347
+ n[7] || (n[7] = m("br", null, null, -1)),
348
+ m("b", null, c(e(t)("payment.settlements.dialog.info.payout.payout")), 1),
349
+ h(": " + c(e(f)(p.settlement.summary.payout).toFormat("$0.00")), 1)
350
+ ]),
351
+ _: 1
352
+ })
353
+ ]),
354
+ _: 1
355
+ })
356
+ ]),
357
+ _: 1
358
+ })
359
+ ]),
360
+ m("div", oe, [
361
+ i(D, {
362
+ modelValue: F.value,
363
+ "onUpdate:modelValue": n[0] || (n[0] = (d) => F.value = d),
364
+ placeholder: e(t)("payment.settlements.dialog.search")
365
+ }, null, 8, ["modelValue", "placeholder"])
366
+ ]),
367
+ i(v, {
368
+ modelValue: g.value,
369
+ "onUpdate:modelValue": n[1] || (n[1] = (d) => g.value = d),
370
+ "shrink-at": !1,
371
+ "row-data": s.value,
372
+ "column-defs": _
373
+ }, null, 8, ["modelValue", "row-data"])
374
+ ], 64);
375
+ };
376
+ }
377
+ }), se = { class: "flex justify-between items-center mb-6" }, me = { class: "flex space-x-8 items-center" }, re = { class: "flex space-x-4 self-center" }, ie = { class: "mb-6" }, xe = /* @__PURE__ */ C({
378
+ __name: "Settlement",
379
+ setup(p) {
380
+ const t = Q(), { tab: u, dateRange: l } = W({
381
+ tab: "feedme",
382
+ dateRange: {
383
+ startDate: S().startOf("day").format("YYYY-MM-DD"),
384
+ endDate: S().endOf("day").format("YYYY-MM-DD")
385
+ }
386
+ }), { t: s } = K(), { isLoading: g, startAsyncCall: _ } = H(!0), { currentRestaurant: F } = O(), r = J(), a = x([]), n = x([]);
387
+ async function y() {
388
+ const v = await A.readRestaurantSettlements({
389
+ start: l.value.startDate,
390
+ end: l.value.endDate
391
+ });
392
+ a.value = v;
393
+ }
394
+ async function o() {
395
+ const v = await A.readRestaurantRMSSettlements({
396
+ start: l.value.startDate,
397
+ end: l.value.endDate
398
+ });
399
+ n.value = v;
400
+ }
401
+ async function b() {
402
+ await _(async () => Promise.all([y(), o()]));
403
+ }
404
+ async function D(v) {
405
+ const d = S(v.summary.completedAt).format("YYYY/MM/DD");
406
+ r.open({
407
+ title: `${s("payment.settlements.dialog.title")} (${v.summary.referenceNo})`,
408
+ subTitle: `${s("payment.settlements.dialog.date")}: ${d}`,
409
+ minWidth: "90%",
410
+ primaryActions: { text: "Close", close: !0 },
411
+ contentComponent: le,
412
+ contentComponentProps: { settlement: v }
413
+ });
414
+ }
415
+ return E(b), P([F, l], b), (v, d) => {
416
+ const U = w("FmTabs");
417
+ return V(), $(L, {
418
+ title: e(s)("payment.settlements.title"),
419
+ description: e(s)("payment.settlements.description"),
420
+ loading: !1
421
+ }, {
422
+ default: k(() => [
423
+ m("div", se, [
424
+ m("div", me, [
425
+ i(X),
426
+ i(Z, {
427
+ modelValue: e(l),
428
+ "onUpdate:modelValue": d[0] || (d[0] = (Y) => R(l) ? l.value = Y : null)
429
+ }, null, 8, ["modelValue"])
430
+ ]),
431
+ m("div", re, [
432
+ i(G, {
433
+ button: {
434
+ appendIcon: "file_download",
435
+ variant: "primary",
436
+ label: "Export"
437
+ },
438
+ handler: async () => {
439
+ await e(A).downloadRestaurantSettlementReport({
440
+ start: e(l).startDate,
441
+ end: e(l).endDate
442
+ });
443
+ }
444
+ }, null, 8, ["handler"])
445
+ ])
446
+ ]),
447
+ m("div", ie, [
448
+ i(U, {
449
+ modelValue: e(u),
450
+ "onUpdate:modelValue": d[1] || (d[1] = (Y) => R(u) ? u.value = Y : null),
451
+ items: [
452
+ {
453
+ label: "FeedMe",
454
+ value: "feedme",
455
+ icon: "summarize"
456
+ },
457
+ {
458
+ label: "Fiuu (RMS)",
459
+ value: "fiuu",
460
+ icon: "overview"
461
+ }
462
+ ]
463
+ }, null, 8, ["modelValue"])
464
+ ]),
465
+ e(u) === "fiuu" ? (V(), $(ae, {
466
+ key: 0,
467
+ loading: e(g),
468
+ data: n.value,
469
+ onRowClick: D
470
+ }, null, 8, ["loading", "data"])) : M("", !0),
471
+ e(u) === "feedme" ? (V(), $(te, {
472
+ key: 1,
473
+ loading: e(g),
474
+ data: a.value,
475
+ onRowClick: d[2] || (d[2] = (Y) => e(t).push({
476
+ name: "mf-payment-settlement-transaction",
477
+ params: {
478
+ settlementId: Y._id
479
+ }
480
+ }))
481
+ }, null, 8, ["loading", "data"])) : M("", !0)
482
+ ]),
483
+ _: 1
484
+ }, 8, ["title", "description"]);
485
+ };
486
+ }
487
+ });
488
+ export {
489
+ xe as default
490
+ };
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as M, ref as h, computed as T, resolveComponent as d, openBlock as F, createBlock as Y, h as E, watch as C, onMounted as L, unref as r, withCtx as g, createElementVNode as k, createVNode as i, isRef as R, createElementBlock as N, Fragment as O, renderList as P } from "vue";
2
- import { u as A } from "./index-DRKoa7dT.js";
2
+ import { u as A } from "./index-CcCcgcKj.js";
3
3
  import { h as S } from "./moment-h96o7c8I.js";
4
- import { s as _ } from "./index-zvJkckUa.js";
4
+ import { s as _ } from "./index-DGCnviAy.js";
5
5
  import { useSnackbar as U } from "@feedmepos/ui-library";
6
6
  import { d as w } from "./dinero-CIVmXLL-.js";
7
7
  import { _ as q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
8
8
  import { useRouter as J } from "vue-router";
9
9
  import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
10
- import { u as z } from "./index-zMl6AuFw.js";
10
+ import { u as z } from "./index-C87vsLzf.js";
11
11
  import { u as G } from "./error-K1CakhA9.js";
12
12
  import { _ as Q } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
13
13
  const H = /* @__PURE__ */ M({
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as F, resolveComponent as c, openBlock as A, createBlock as S, normalizeClass as G, withCtx as o, createElementVNode as t, toDisplayString as u, unref as d, ref as x, onMounted as j, watch as H, createVNode as n, createTextVNode as m, h as N } from "vue";
2
- import { e as k, u as q } from "./index-DRKoa7dT.js";
2
+ import { e as k, u as q } from "./index-CcCcgcKj.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, t as Z } from "./assets-DvPzXLhl.js";
6
- import { t as P } from "./index-2-UOiJfz.js";
5
+ import { g as W, a as X, t as Z } from "./assets-zMyaBFbU.js";
6
+ import { t as P } from "./index-BganQIV3.js";
7
7
  import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
8
8
  import { useRouter as te } from "vue-router";
9
- import { s as ae } from "./index-zvJkckUa.js";
9
+ import { s as ae } from "./index-DGCnviAy.js";
10
10
  import { u as ne } from "./error-K1CakhA9.js";
11
11
  import { w as oe } from "./Modal-DB8M9o1T.js";
12
12
  import { h as re } from "./moment-h96o7c8I.js";
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as w, resolveComponent as f, openBlock as F, createBlock as T, normalizeClass as z, withCtx as r, createElementVNode as n, toDisplayString as l, unref as a, ref as b, onMounted as j, watch as M, createVNode as o, createTextVNode as d, h as C } from "vue";
2
- import { e as E, u as G } from "./index-DRKoa7dT.js";
2
+ import { e as E, u as G } from "./index-CcCcgcKj.js";
3
3
  import "@feedmepos/ui-library";
4
4
  import { d as k } from "./dinero-CIVmXLL-.js";
5
- import { g as H, a as q, t as J } from "./assets-DvPzXLhl.js";
6
- import { t as Q } from "./index-2-UOiJfz.js";
5
+ import { g as H, a as q, t as J } from "./assets-zMyaBFbU.js";
6
+ import { t as Q } from "./index-BganQIV3.js";
7
7
  import { _ as W } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
8
8
  import { useRouter as X } from "vue-router";
9
- import { s as Z } from "./index-zvJkckUa.js";
9
+ import { s as Z } from "./index-DGCnviAy.js";
10
10
  import { useI18n as ee, useCoreStore as te } from "@feedmepos/mf-common";
11
11
  import { h as ae } from "./moment-h96o7c8I.js";
12
12
  const ne = /* @__PURE__ */ w({
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as r, resolveComponent as p, openBlock as d, createBlock as s, normalizeClass as u, withCtx as i, createElementVNode as m, toDisplayString as c } from "vue";
2
- import { p as e } from "./index-DRKoa7dT.js";
2
+ import { p as e } from "./index-CcCcgcKj.js";
3
3
  const f = /* @__PURE__ */ r({
4
4
  __name: "Status",
5
5
  props: {
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as L, h as E, ref as x, onMounted as pe, watchEffect as Ce, Fragment as ie, computed as D, openBlock as I, createElementBlock as X, createElementVNode as b, createTextVNode as te, toDisplayString as se, createVNode as _, resolveComponent as N, normalizeClass as ye, withCtx as Z, createBlock as U, createCommentVNode as $, unref as T, watch as re, isRef as we } from "vue";
2
- import { e as Ee } from "./index-DRKoa7dT.js";
2
+ import { e as Ee } from "./index-CcCcgcKj.js";
3
3
  import { h as Re } from "./moment-h96o7c8I.js";
4
- import { u as Me } from "./index-zMl6AuFw.js";
5
- import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-BYTNfOkc.js";
4
+ import { u as Me } from "./index-C87vsLzf.js";
5
+ import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-H0-KLC0F.js";
6
6
  import { _ as Se } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
7
7
  import { useSnackbar as J, useDialogChild as Pe, useDialog as Ae } from "@feedmepos/ui-library";
8
- import { t as K } from "./index-DcB4capd.js";
8
+ import { t as K } from "./index-DEC3wCyK.js";
9
9
  import { c as le } from "./clipboard-4jh1WteU.js";
10
10
  import { useCoreStore as ue } from "@feedmepos/mf-common";
11
- import { g as Te } from "./grafana-DwrmpEec.js";
11
+ import { g as Te } from "./grafana-D_fIUdUm.js";
12
12
  import { u as W } from "./error-K1CakhA9.js";
13
13
  import { z as ne, a as ae } from "./validator-DzjyJnvv.js";
14
14
  import { w as oe } from "./Modal-DB8M9o1T.js";
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as k, openBlock as y, createElementBlock as V, Fragment as h, createElementVNode as I, createTextVNode as $, toDisplayString as D, ref as b, resolveComponent as f, createVNode as v, createCommentVNode as N, unref as S, computed as O, isRef as B, createBlock as T, resolveDynamicComponent as Y, normalizeProps as L, mergeProps as K, toRef as q, watch as P, onMounted as M, withCtx as G, renderList as R } from "vue";
2
- import { u as H, e as C } from "./index-DRKoa7dT.js";
2
+ import { u as H, e as C } from "./index-CcCcgcKj.js";
3
3
  import { useRouter as W } from "vue-router";
4
- import { t as A } from "./index-DcB4capd.js";
4
+ import { t as A } from "./index-DEC3wCyK.js";
5
5
  import { _ as X } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
6
- import { u as E } from "./index-zMl6AuFw.js";
6
+ import { u as E } from "./index-C87vsLzf.js";
7
7
  import { useSnackbar as Q } from "@feedmepos/ui-library";
8
8
  import { u as Z } from "./error-K1CakhA9.js";
9
9
  import { useCoreStore as j } from "@feedmepos/mf-common";