@feedmepos/mf-payment 1.11.21-dev → 1.12.0

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 (162) hide show
  1. package/dist/Actions.vue_vue_type_script_setup_true_lang-DEkSpYbw.js +118 -0
  2. package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-tIIhKqfC.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CZeyS_-_.js} +3 -3
  3. package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-CokgK9dU.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BGU64S5Z.js} +3 -3
  4. package/dist/{Chargeback-BSNm5Whb.js → Chargeback-DwXllRT4.js} +9 -9
  5. package/dist/{DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js → DateRangePicker.vue_vue_type_script_setup_true_lang-5ZaLjKl_.js} +2 -2
  6. package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-Begw8inp.js → DocumentViewer.vue_vue_type_script_setup_true_lang-saQlwl6a.js} +857 -857
  7. package/dist/{ExternalTerminal-BtiirHH7.js → ExternalTerminal-DWnv8BaM.js} +31 -31
  8. package/dist/{OnboardForm-Cgcuf0r6.js → OnboardForm--to1SX2z.js} +631 -694
  9. package/dist/{OnboardForm-DOb23ll1.js → OnboardForm-BWIWimOG.js} +8 -8
  10. package/dist/OnboardSubmission-BtiI1ewF.js +449 -0
  11. package/dist/{OnboardSubmission-CC0ZX55H.js → OnboardSubmission-DFhK_eus.js} +7 -7
  12. package/dist/{PaymentCheckout-CVaNIydV.js → PaymentCheckout-CsDfQl6k.js} +4 -4
  13. package/dist/{mascot-side-DfHFKGca.js → PayoutAccount-DtUHIt8d.js} +598 -206
  14. package/dist/{PayoutAccount-BIjtYzcj.js → PayoutAccount-DxC8i69H.js} +9 -9
  15. package/dist/{PayoutAccountSetting-B9lSTTDX.js → PayoutAccountSetting-z-TySDXR.js} +10 -10
  16. package/dist/{Restaurant-CcINdDm6.js → Restaurant-3NdsiWwv.js} +5 -5
  17. package/dist/{RestaurantSetting-BUO3jAIx.js → RestaurantSetting-Cyn1i8dn.js} +9 -23
  18. package/dist/Settlement--SIL-7He.js +625 -0
  19. package/dist/{Settlement-Dl8kbvs7.js → Settlement-CiKtgAZ4.js} +5 -5
  20. package/dist/{SettlementTransactions-gAwDZgI5.js → SettlementTransactions-C52wiVAb.js} +6 -6
  21. package/dist/{SettlementTransactions-Bw8vsUSE.js → SettlementTransactions-CI2SHJB3.js} +97 -106
  22. package/dist/{Status.vue_vue_type_script_setup_true_lang-Cz1jdrK-.js → Status.vue_vue_type_script_setup_true_lang-DgqA7PhV.js} +1 -1
  23. package/dist/{Terminal-s3fZ4Ger.js → Terminal-Cx-X-ik5.js} +19 -19
  24. package/dist/{TerminalSetting-CKYdb1AZ.js → TerminalSetting-DY0EYdD-.js} +650 -776
  25. package/dist/{TerminalTemplate-W2SBnJbf.js → TerminalTemplate-BORrJdEH.js} +7 -7
  26. package/dist/{TerminalTemplateSetting-MhWFtpIH.js → TerminalTemplateSetting-CYaaQ5jC.js} +6 -6
  27. package/dist/{TextInputDialog.vue_vue_type_script_setup_true_lang-C3AeZqwO.js → TextInputDialog.vue_vue_type_script_setup_true_lang-CJ29Mqtm.js} +1 -1
  28. package/dist/{Transaction-DG9T1XRw.js → Transaction-Bj9ckoKD.js} +19 -20
  29. package/dist/{Transaction-Cm5l0iG4.js → Transaction-D1W9J-YG.js} +54 -56
  30. package/dist/{TransactionOld-CIvl12-V.js → TransactionOld-C-3Y9idi.js} +11 -12
  31. package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-CjzPJbri.js → TransactionStatus.vue_vue_type_script_setup_true_lang-C6ybTX_E.js} +2 -2
  32. package/dist/api/document/index.d.ts +0 -2
  33. package/dist/api/onboard-submission/index.d.ts +1 -6
  34. package/dist/api/terminal/index.d.ts +1 -2
  35. package/dist/{app-CviOqqR4.js → app-C8rDUQ-r.js} +12352 -14195
  36. package/dist/app.js +1 -1
  37. package/dist/{assets-C5f-_lr4.js → assets-QZbz5BYj.js} +46 -47
  38. package/dist/components/CursorTable/index.vue.d.ts +21 -3
  39. package/dist/components/PagingTable/index.vue.d.ts +9 -3
  40. package/dist/{grafana-BuGjOOOM.js → grafana-CHfYDJ1b.js} +4 -4
  41. package/dist/{index-BJUwhq11.js → index-4KwdYYMe.js} +2 -2
  42. package/dist/{index-CU4n4Gc1.js → index-7ofYlGzn.js} +1 -1
  43. package/dist/index-BgS9t01N.js +62 -0
  44. package/dist/{index-DRo7-Kdv.js → index-Bgh4RGim.js} +2 -2
  45. package/dist/{index-BQiPmPK1.js → index-CX2hs-UQ.js} +1 -1
  46. package/dist/{index-zSjouiil.js → index-CX9xj_f6.js} +1 -6
  47. package/dist/index-CdIL37va.js +33692 -0
  48. package/dist/{index-CquFJ1TU.js → index-DVsHI6PR.js} +29 -52
  49. package/dist/{index-BanBtFr8.js → index-Yt_qv8lG.js} +5 -39
  50. package/dist/index-mU9AofgQ.js +137 -0
  51. package/dist/{index-B2bh5bmh.js → index-x-AN2d5y.js} +2 -2
  52. package/dist/{index-C3VarNn8.js → index-yTZ7Gd-r.js} +1 -1
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-DiKuvTLi.js → index.vue_vue_type_script_setup_true_lang-CtE5UAGa.js} +1 -1
  54. package/dist/mf-payment.css +1 -0
  55. package/dist/model/onboard-submission.d.ts +5 -5
  56. package/dist/model/payout-account.d.ts +2 -3
  57. package/dist/{moment-h96o7c8I.js → moment-FRs5-R1e.js} +1194 -1067
  58. package/dist/{onboard-submission-BCiBZhlj.js → onboard-submission-BdIQCrc0.js} +7 -8
  59. package/dist/package.json +76 -18
  60. package/dist/payout-account-CKYWpyP9.js +466 -0
  61. package/dist/router/index.d.ts +1 -3
  62. package/dist/stores/payoutAccount.d.ts +38 -40
  63. package/dist/tsconfig.app.tsbuildinfo +1 -1
  64. package/dist/{teya-UA6TM323.js → tyro-BovmsorS.js} +2 -3
  65. package/dist/{useQuery-BqVESg1n.js → useQuery-CkPLx8V5.js} +1 -1
  66. package/dist/{validator-CTlVogBQ.js → validator-Bz2eU53Y.js} +6 -6
  67. package/dist/views/admin/external-terminal/ExternalTerminalPairDialog.vue.d.ts +8 -8
  68. package/dist/views/admin/external-terminal/ExternalTerminalSideSheet.vue.d.ts +14 -14
  69. package/dist/views/admin/external-terminal/pair/BRITerminal.vue.d.ts +8 -8
  70. package/dist/views/admin/external-terminal/pair/BeamTerminal.vue.d.ts +8 -8
  71. package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +24 -24
  72. package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +24 -24
  73. package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +24 -24
  74. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +38 -40
  75. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +60 -62
  76. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +60 -62
  77. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +38 -40
  78. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +38 -40
  79. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +60 -62
  80. package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
  81. package/dist/views/admin/payout-account/tabs/gateway/BeamGateway.vue.d.ts +2 -2
  82. package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -2
  83. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
  84. package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +2 -2
  85. package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +2 -2
  86. package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.vue.d.ts +2 -2
  87. package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
  88. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  89. package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +8 -32
  90. package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -6
  91. package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +4 -6
  92. package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -6
  93. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +4 -6
  94. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +4 -6
  95. package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -6
  96. package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +4 -6
  97. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +4 -6
  98. package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +4 -10
  99. package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +4 -6
  100. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -6
  101. package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +4 -6
  102. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -4
  103. package/dist/views/admin/terminal/TerminalSideSheet.vue.d.ts +22 -38
  104. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +22 -38
  105. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +22 -38
  106. package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +22 -38
  107. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +22 -38
  108. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +22 -38
  109. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +22 -38
  110. package/dist/views/admin/terminal/tabs/ecr/BeamGateway.vue.d.ts +22 -38
  111. package/dist/views/admin/terminal/tabs/ecr/BriGateway.vue.d.ts +22 -38
  112. package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +22 -38
  113. package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +22 -38
  114. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +22 -38
  115. package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +22 -38
  116. package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +22 -38
  117. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +22 -38
  118. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +22 -38
  119. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +22 -38
  120. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +22 -38
  121. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +22 -38
  122. package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +22 -38
  123. package/dist/views/admin/terminal/tabs/ecr/PbbGateway.vue.d.ts +22 -38
  124. package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +22 -38
  125. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +22 -38
  126. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +22 -38
  127. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +22 -38
  128. package/dist/views/admin/terminal-template/TerminalTemplateSideSheet.vue.d.ts +30 -30
  129. package/dist/views/admin/terminal-template/tabs/EcrGateways.vue.d.ts +18 -18
  130. package/dist/views/admin/terminal-template/tabs/Information.vue.d.ts +18 -18
  131. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +76 -80
  132. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +28 -28
  133. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +14 -14
  134. package/dist/views/settlement/SettlementTable.vue.d.ts +5 -15
  135. package/dist/views/settlement/SettlementTransactions.vue.d.ts +1 -11
  136. package/package.json +16 -17
  137. package/dist/Actions.vue_vue_type_script_setup_true_lang-COGP4bH0.js +0 -64
  138. package/dist/FoodCourtPayoutAccount-CX2rxeS-.js +0 -187
  139. package/dist/FoodCourtSettlement-x-g0xDhh.js +0 -68
  140. package/dist/FoodCourtTransaction-BUXShUiR.js +0 -212
  141. package/dist/Method.vue_vue_type_script_setup_true_lang-DQkiA5Z_.js +0 -58
  142. package/dist/OnboardSubmission-DJODM-eE.js +0 -733
  143. package/dist/PayoutAccount-Y0p_Sz-0.js +0 -405
  144. package/dist/Settlement-C6nz9feY.js +0 -510
  145. package/dist/SettlementTable.vue_vue_type_script_setup_true_lang-BeXqDk44.js +0 -132
  146. package/dist/api/food-court/index.d.ts +0 -31
  147. package/dist/index-B7Q8ctGL.js +0 -131
  148. package/dist/index-BZyPNY4u.js +0 -75
  149. package/dist/index-CHnkD2RB.js +0 -32927
  150. package/dist/index-CazeCsOR.js +0 -13
  151. package/dist/index-j-zqgMuS.js +0 -52
  152. package/dist/payout-account-t2cftVHc.js +0 -474
  153. package/dist/router/context-guard.d.ts +0 -3
  154. package/dist/router/food-court.d.ts +0 -3
  155. package/dist/style.css +0 -1
  156. package/dist/utils/food-court.d.ts +0 -2
  157. package/dist/views/admin/onboard-submission/forms/TeyaSubmission.vue.d.ts +0 -117
  158. package/dist/views/admin/terminal/tabs/ecr/TeyaGateway.vue.d.ts +0 -212
  159. package/dist/views/food-court/FoodCourtPayoutAccount.vue.d.ts +0 -2
  160. package/dist/views/food-court/FoodCourtSettlement.vue.d.ts +0 -2
  161. package/dist/views/food-court/FoodCourtTransaction.vue.d.ts +0 -2
  162. package/dist/views/onboard-submission/useTeyaConnect.d.ts +0 -71
@@ -0,0 +1,625 @@
1
+ import { defineComponent as x, openBlock as R, createElementBlock as M, normalizeStyle as Q, toDisplayString as f, ref as A, computed as j, resolveComponent as k, Fragment as G, unref as e, withDirectives as W, createBlock as V, vShow as X, createCommentVNode as E, createVNode as p, h as L, watch as D, createElementVNode as m, withCtx as S, createTextVNode as T, onMounted as z, renderList as Z, isRef as P } from "vue";
2
+ import { u as q } from "./index-CdIL37va.js";
3
+ import { h as Y } from "./moment-FRs5-R1e.js";
4
+ import { useCoreStore as H, useI18n as K } from "@feedmepos/mf-common";
5
+ import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
6
+ import { s as B } from "./index-4KwdYYMe.js";
7
+ import { useDialog as te } from "@feedmepos/ui-library";
8
+ import { d as g } from "./dinero-CIVmXLL-.js";
9
+ import { _ as J } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
10
+ import { useRouter as ae } from "vue-router";
11
+ import { u as ne } from "./index-mU9AofgQ.js";
12
+ import { _ as oe } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
+ import { _ as le } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-5ZaLjKl_.js";
14
+ import { p as se } from "./index-CX2hs-UQ.js";
15
+ const re = /* @__PURE__ */ x({
16
+ __name: "InvoiceStatus",
17
+ props: {
18
+ data: {}
19
+ },
20
+ setup(v) {
21
+ const n = v;
22
+ function c() {
23
+ return n.data && n.data !== "" ? "#66BB6A" : "#EF5350";
24
+ }
25
+ function i() {
26
+ return n.data && n.data !== "" ? "Ready" : "Not Ready";
27
+ }
28
+ return (d, r) => (R(), M("span", {
29
+ style: Q({ color: c() })
30
+ }, f(i()), 5));
31
+ }
32
+ }), ue = /* @__PURE__ */ x({
33
+ __name: "SettlementTable",
34
+ props: {
35
+ data: {
36
+ type: Array,
37
+ required: !0
38
+ },
39
+ loading: {
40
+ type: Boolean,
41
+ required: !0
42
+ }
43
+ },
44
+ emits: ["row-click"],
45
+ setup(v, { emit: n }) {
46
+ const { currentCountry: c, currentBusiness: i, namespace: d } = H(), { t: r } = K(), w = A(!0), _ = v, y = n, o = A(""), t = [
47
+ {
48
+ header: () => r("payment.settlements.table.id"),
49
+ accessorKey: "id",
50
+ cell: ({ cell: u }) => L(J, { data: u.getValue() })
51
+ },
52
+ {
53
+ header: () => r("payment.settlements.table.bank"),
54
+ accessorKey: "bank"
55
+ },
56
+ {
57
+ header: () => r("payment.settlements.table.account"),
58
+ accessorKey: "accountNo"
59
+ },
60
+ {
61
+ header: () => r("payment.settlements.table.created_at"),
62
+ accessorKey: "transactionAt",
63
+ meta: {
64
+ width: "180px"
65
+ }
66
+ },
67
+ {
68
+ header: () => r("payment.settlements.table.sales_amount"),
69
+ accessorKey: "amount"
70
+ },
71
+ {
72
+ header: () => r("payment.settlements.table.fee"),
73
+ accessorKey: "fee"
74
+ },
75
+ {
76
+ header: () => r("payment.settlements.table.settlement_amount"),
77
+ accessorKey: "payout"
78
+ },
79
+ {
80
+ header: () => r("payment.settlements.table.invoice_status"),
81
+ accessorKey: "invoiceId",
82
+ cell: ({ cell: u }) => L(re, { data: u.getValue() })
83
+ }
84
+ ], b = j(() => _.data.map((u) => ({
85
+ id: u._id,
86
+ bank: u.beneficiaryBank.name,
87
+ accountNo: u.beneficiaryBank.accountNumber,
88
+ transactionAt: Y(u.createdAt).format("YYYY-MM-DD"),
89
+ amount: g(u.totalAmount).toFormat("$0.00"),
90
+ fee: g(u.totalFee).toFormat("$0.00"),
91
+ payout: g(u.totalPayout).toFormat("$0.00"),
92
+ invoiceId: u.invoiceId
93
+ }))), h = () => {
94
+ var $;
95
+ let u = "https://license.feedme.cc/invoices";
96
+ d.value === "dev" && (u = "https://license.feedmedev.cc/invoices");
97
+ const F = new URLSearchParams({
98
+ businessId: (($ = i.value) == null ? void 0 : $._id) ?? "",
99
+ country: c.value ?? "MY"
100
+ });
101
+ open(`${u}?${F.toString()}`, "_blank");
102
+ };
103
+ return (u, F) => {
104
+ const $ = k("FmSnackbar"), l = k("FmTable");
105
+ return R(), M(G, null, [
106
+ e(c) === "MY" ? W((R(), V($, {
107
+ key: 0,
108
+ class: "mb-10",
109
+ title: e(r)("payment.settlements.invoice.title"),
110
+ description: e(r)("payment.settlements.invoice.description"),
111
+ action: e(r)("payment.settlements.invoice.action"),
112
+ variant: "info",
113
+ dismissable: "",
114
+ onOnDismiss: F[0] || (F[0] = (s) => w.value = !1),
115
+ onOnAction: h
116
+ }, null, 8, ["title", "description", "action"])), [
117
+ [X, w.value]
118
+ ]) : E("", !0),
119
+ p(l, {
120
+ modelValue: o.value,
121
+ "onUpdate:modelValue": F[1] || (F[1] = (s) => o.value = s),
122
+ "row-data": b.value,
123
+ "shrink-at": !1,
124
+ "column-defs": t,
125
+ loading: _.loading,
126
+ onRowClick: F[2] || (F[2] = (s) => y("row-click", _.data.at(s.index)))
127
+ }, null, 8, ["modelValue", "row-data", "loading"])
128
+ ], 64);
129
+ };
130
+ }
131
+ }), me = /* @__PURE__ */ x({
132
+ __name: "FiuuSettlementTable",
133
+ props: {
134
+ data: {
135
+ type: Array,
136
+ required: !0
137
+ },
138
+ loading: {
139
+ type: Boolean,
140
+ required: !0
141
+ }
142
+ },
143
+ emits: ["row-click"],
144
+ setup(v, { emit: n }) {
145
+ const { t: c } = K(), i = v, d = n, r = A(""), w = [
146
+ {
147
+ header: () => c("payment.settlements.table.id"),
148
+ accessorKey: "id",
149
+ cell: ({ cell: y }) => L(J, { data: y.getValue() })
150
+ },
151
+ {
152
+ header: () => c("payment.settlements.table.bank"),
153
+ accessorKey: "bank"
154
+ },
155
+ {
156
+ header: () => c("payment.settlements.table.account"),
157
+ accessorKey: "accountNo"
158
+ },
159
+ {
160
+ header: () => c("payment.settlements.table.created_at"),
161
+ accessorKey: "transactionAt",
162
+ meta: {
163
+ width: "180px"
164
+ }
165
+ },
166
+ {
167
+ header: () => c("payment.settlements.table.sales_amount"),
168
+ accessorKey: "amount"
169
+ },
170
+ {
171
+ header: () => c("payment.settlements.table.fee"),
172
+ accessorKey: "fee"
173
+ },
174
+ {
175
+ header: () => c("payment.settlements.table.refund"),
176
+ accessorKey: "refund"
177
+ },
178
+ {
179
+ header: () => c("payment.settlements.table.settlement_amount"),
180
+ accessorKey: "payout"
181
+ }
182
+ ], _ = j(() => i.data.map((y) => ({
183
+ id: y.summary.referenceNo,
184
+ bank: y.summary.bank.name,
185
+ accountNo: y.summary.bank.accountNo,
186
+ transactionAt: Y(y.summary.completedAt).format(
187
+ "YYYY-MM-DD"
188
+ ),
189
+ amount: g(y.summary.amount).toFormat("$0.00"),
190
+ refund: g(y.summary.refund).toFormat("$0.00"),
191
+ fee: g(y.summary.commission).toFormat("$0.00"),
192
+ payout: g(y.summary.payout).toFormat("$0.00")
193
+ })));
194
+ return (y, o) => {
195
+ const t = k("FmTable");
196
+ return R(), V(t, {
197
+ modelValue: r.value,
198
+ "onUpdate:modelValue": o[0] || (o[0] = (b) => r.value = b),
199
+ "row-data": _.value,
200
+ "shrink-at": !1,
201
+ "column-defs": w,
202
+ loading: i.loading,
203
+ onRowClick: o[1] || (o[1] = (b) => d("row-click", i.data.at(b.index)))
204
+ }, null, 8, ["modelValue", "row-data", "loading"]);
205
+ };
206
+ }
207
+ }), ie = {
208
+ id: "fiuu-settlement-dialog",
209
+ class: "flex mb-6"
210
+ }, ce = { class: "my-6 w-[240px]" }, de = /* @__PURE__ */ x({
211
+ __name: "FiuuSettlementTransactions",
212
+ props: {
213
+ settlement: {
214
+ type: Object,
215
+ required: !0
216
+ }
217
+ },
218
+ setup(v) {
219
+ const { t: n } = K(), i = A(
220
+ v.settlement.record.map((o) => (Object.assign(o, {
221
+ __localAmount: g(o.amount).toFormat("0.00"),
222
+ __localComission: g(o.commission).toFormat("0.00"),
223
+ __localNetAMount: g(o.netAmount).toFormat("0.00")
224
+ }), o))
225
+ ), d = A(i.value), r = A(""), w = [
226
+ {
227
+ header: () => n("payment.settlements.dialog.fiuu.id"),
228
+ accessorKey: "referenceNo"
229
+ },
230
+ {
231
+ header: () => n("payment.settlements.dialog.fiuu.type"),
232
+ accessorKey: "group"
233
+ },
234
+ {
235
+ header: () => n("payment.settlements.dialog.fiuu.transaction_at"),
236
+ accessorKey: "completedAt",
237
+ meta: {
238
+ width: "180px"
239
+ },
240
+ cell: ({ cell: o }) => Y(o.getValue()).format("YYYY-MM-DD HH:mm:ss")
241
+ },
242
+ {
243
+ header: () => n("payment.settlements.dialog.fiuu.sales_amount"),
244
+ accessorKey: "amount",
245
+ cell: ({ cell: o }) => g(o.getValue()).toFormat("$0.00")
246
+ },
247
+ {
248
+ header: () => n("payment.settlements.dialog.fiuu.fee"),
249
+ accessorKey: "commission",
250
+ cell: ({ cell: o }) => g(o.getValue()).toFormat("$0.00")
251
+ },
252
+ {
253
+ header: () => n("payment.settlements.dialog.fiuu.settlement_amount"),
254
+ accessorKey: "netAmount",
255
+ cell: ({ cell: o }) => g(o.getValue()).toFormat("$0.00")
256
+ }
257
+ ], _ = A("");
258
+ let y;
259
+ return D(_, async () => {
260
+ y && clearTimeout(y), y = setTimeout(() => {
261
+ var o = new RegExp(_.value, "i");
262
+ d.value = i.value.filter((t) => {
263
+ const b = JSON.stringify(t);
264
+ return o.test(b);
265
+ });
266
+ }, 700);
267
+ }), (o, t) => {
268
+ const b = k("FmCardHeader"), h = k("FmCardSection"), u = k("FmCard"), F = k("FmSearch"), $ = k("FmTable");
269
+ return R(), M(G, null, [
270
+ m("div", ie, [
271
+ p(u, {
272
+ horizontal: "",
273
+ class: "flex-1 p-6",
274
+ variant: "elevated"
275
+ }, {
276
+ default: S(() => [
277
+ p(h, { class: "flex flex-col gap-16 justify-between" }, {
278
+ default: S(() => [
279
+ p(b, {
280
+ class: "p-0",
281
+ title: e(n)("payment.settlements.dialog.info.transaction.title"),
282
+ subtitle: ""
283
+ }, null, 8, ["title"]),
284
+ p(h, { class: "p-0" }, {
285
+ default: S(() => [
286
+ m("b", null, f(e(n)("payment.settlements.dialog.info.transaction.for")), 1),
287
+ T(": " + f(v.settlement.summary.group) + " ", 1),
288
+ t[2] || (t[2] = m("br", null, null, -1)),
289
+ m("b", null, f(e(n)("payment.settlements.dialog.info.transaction.reference")), 1),
290
+ T(": " + f(v.settlement.summary.referenceNo), 1),
291
+ t[3] || (t[3] = m("br", null, null, -1)),
292
+ m("b", null, f(e(n)("payment.settlements.dialog.info.transaction.count")), 1),
293
+ T(": " + f(i.value.length), 1)
294
+ ]),
295
+ _: 1
296
+ })
297
+ ]),
298
+ _: 1
299
+ })
300
+ ]),
301
+ _: 1
302
+ }),
303
+ p(u, {
304
+ horizontal: "",
305
+ class: "flex-1 p-6 mx-6",
306
+ variant: "elevated"
307
+ }, {
308
+ default: S(() => [
309
+ p(h, { class: "flex flex-col gap-16 justify-between" }, {
310
+ default: S(() => [
311
+ p(b, {
312
+ class: "p-0",
313
+ title: e(n)("payment.settlements.dialog.info.bank.title"),
314
+ subtitle: ""
315
+ }, null, 8, ["title"]),
316
+ p(h, { class: "p-0" }, {
317
+ default: S(() => [
318
+ m("b", null, f(e(n)("payment.settlements.dialog.info.bank.for")), 1),
319
+ T(": " + f(v.settlement.summary.bank.name), 1),
320
+ t[4] || (t[4] = m("br", null, null, -1)),
321
+ m("b", null, f(e(n)("payment.settlements.dialog.info.bank.name")), 1),
322
+ T(": " + f(v.settlement.summary.bank.holderName), 1),
323
+ t[5] || (t[5] = m("br", null, null, -1)),
324
+ m("b", null, f(e(n)("payment.settlements.dialog.info.bank.number")), 1),
325
+ T(": " + f(v.settlement.summary.bank.accountNo), 1)
326
+ ]),
327
+ _: 1
328
+ })
329
+ ]),
330
+ _: 1
331
+ })
332
+ ]),
333
+ _: 1
334
+ }),
335
+ p(u, {
336
+ horizontal: "",
337
+ class: "flex-1 p-6",
338
+ variant: "elevated"
339
+ }, {
340
+ default: S(() => [
341
+ p(h, { class: "flex flex-col gap-16 justify-between" }, {
342
+ default: S(() => [
343
+ p(b, {
344
+ class: "p-0",
345
+ title: e(n)("payment.settlements.dialog.info.payout.title"),
346
+ subtitle: ""
347
+ }, null, 8, ["title"]),
348
+ p(h, { class: "p-0" }, {
349
+ default: S(() => [
350
+ m("b", null, f(e(n)("payment.settlements.dialog.info.payout.amount")), 1),
351
+ T(": " + f(e(g)(v.settlement.summary.amount).toFormat("$0.00")), 1),
352
+ t[6] || (t[6] = m("br", null, null, -1)),
353
+ m("b", null, f(e(n)("payment.settlements.dialog.info.payout.fee")), 1),
354
+ T(": " + f(e(g)(v.settlement.summary.commission).toFormat("$0.00")), 1),
355
+ t[7] || (t[7] = m("br", null, null, -1)),
356
+ m("b", null, f(e(n)("payment.settlements.dialog.info.payout.refund")), 1),
357
+ T(": " + f(e(g)(v.settlement.summary.refund).toFormat("$0.00")) + " ", 1),
358
+ t[8] || (t[8] = m("br", null, null, -1)),
359
+ m("b", null, f(e(n)("payment.settlements.dialog.info.payout.payout")), 1),
360
+ T(": " + f(e(g)(v.settlement.summary.payout).toFormat("$0.00")), 1)
361
+ ]),
362
+ _: 1
363
+ })
364
+ ]),
365
+ _: 1
366
+ })
367
+ ]),
368
+ _: 1
369
+ })
370
+ ]),
371
+ m("div", ce, [
372
+ p(F, {
373
+ modelValue: _.value,
374
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => _.value = l),
375
+ placeholder: e(n)("payment.settlements.dialog.search")
376
+ }, null, 8, ["modelValue", "placeholder"])
377
+ ]),
378
+ p($, {
379
+ modelValue: r.value,
380
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => r.value = l),
381
+ "shrink-at": !1,
382
+ "row-data": d.value,
383
+ "column-defs": w
384
+ }, null, 8, ["modelValue", "row-data"])
385
+ ], 64);
386
+ };
387
+ }
388
+ }), pe = {
389
+ key: 1,
390
+ class: "inline-flex"
391
+ }, ye = { class: "relative" }, fe = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, be = /* @__PURE__ */ x({
392
+ __name: "SettlementSelector",
393
+ props: {
394
+ id: {},
395
+ by: {}
396
+ },
397
+ emits: ["update:id", "update:by"],
398
+ setup(v, { emit: n }) {
399
+ const c = v, i = n, { t: d } = K(), { currentBusiness: r, readRestaurants: w } = H(), { isLoading: _, startAsyncCall: y } = q(!0), o = A([]), t = A(), b = A(""), h = A([]);
400
+ let u;
401
+ D(b, async () => {
402
+ u && clearTimeout(u), u = setTimeout(() => {
403
+ var l = new RegExp(b.value, "i");
404
+ h.value = o.value.filter((s) => {
405
+ const N = JSON.stringify(s);
406
+ return l.test(N);
407
+ });
408
+ }, 700);
409
+ }), D(t, () => {
410
+ var l, s;
411
+ i("update:id", (l = t.value) == null ? void 0 : l.value), i("update:by", (s = t.value) == null ? void 0 : s.by);
412
+ });
413
+ async function F() {
414
+ return y(async () => {
415
+ try {
416
+ let l = await se.readBusinessPayoutAccounts();
417
+ return l.length === 0 ? void 0 : l;
418
+ } catch {
419
+ return [];
420
+ }
421
+ });
422
+ }
423
+ async function $() {
424
+ _.value = !0;
425
+ const l = [];
426
+ let s = await F();
427
+ l.push(
428
+ ...(s || []).filter((a) => a.store.event !== "ORDERING").map((a) => {
429
+ var O, U, I, C;
430
+ return {
431
+ by: "PAYOUT_ACCOUNT",
432
+ value: a.store.id,
433
+ prefix: d("payment.components.payout_account"),
434
+ type: "Payout Account - " + a.store.event,
435
+ label: ((U = (O = a.ref) == null ? void 0 : O.profile) == null ? void 0 : U.name) ?? a.ref.name,
436
+ chipLabel: "Marketing: " + (((C = (I = a.ref) == null ? void 0 : I.profile) == null ? void 0 : C.name) ?? a.ref.name)
437
+ };
438
+ })
439
+ );
440
+ const N = await w();
441
+ l.push(
442
+ ...(N || []).filter((a) => a.managable).map((a) => ({
443
+ by: "RESTAURANT",
444
+ value: a._id,
445
+ prefix: d("payment.components.restaurant"),
446
+ type: "Restaurant",
447
+ label: a.profile.name + " (" + (a.profile.code ?? "--") + ")",
448
+ chipLabel: "Restaurant: " + a.profile.name + " (" + (a.profile.code ?? "--") + ")"
449
+ }))
450
+ ), o.value = l, h.value = o.value, t.value = l.find((a) => a.value === c.id && a.by === c.by) ?? l[0], _.value = !1;
451
+ }
452
+ return z($), D(r, $), (l, s) => {
453
+ const N = k("FmCircularProgress"), a = k("FmChip"), O = k("FmSearch"), U = k("FmMenuItem"), I = k("FmMenu");
454
+ return e(_) ? (R(), V(N, {
455
+ key: 0,
456
+ size: "md"
457
+ })) : (R(), M("div", pe, [
458
+ p(I, { "close-on-click": !0 }, {
459
+ "menu-button": S(() => {
460
+ var C;
461
+ return [
462
+ p(a, {
463
+ icon: "account_box",
464
+ label: ((C = t.value) == null ? void 0 : C.chipLabel) ?? e(d)("payment.components.select"),
465
+ removable: !!t.value,
466
+ onChipClosed: s[0] || (s[0] = (he) => t.value = void 0)
467
+ }, null, 8, ["label", "removable"])
468
+ ];
469
+ }),
470
+ default: S(() => [
471
+ m("div", ye, [
472
+ m("div", fe, [
473
+ p(O, {
474
+ "model-value": b.value,
475
+ "onUpdate:modelValue": s[1] || (s[1] = (C) => b.value = C),
476
+ placeholder: e(d)("payment.components.select")
477
+ }, null, 8, ["model-value", "placeholder"])
478
+ ]),
479
+ m("div", null, [
480
+ (R(!0), M(G, null, Z(h.value, (C) => (R(), V(U, {
481
+ key: C.value,
482
+ label: C.label,
483
+ sublabel: C.type,
484
+ onClick: () => t.value = C
485
+ }, null, 8, ["label", "sublabel", "onClick"]))), 128))
486
+ ])
487
+ ])
488
+ ]),
489
+ _: 1
490
+ })
491
+ ]));
492
+ };
493
+ }
494
+ }), ve = { class: "flex justify-between items-center mb-6" }, _e = { class: "flex space-x-8 items-center" }, ge = { class: "flex space-x-4 self-center" }, Fe = { class: "mb-6" }, Ke = /* @__PURE__ */ x({
495
+ __name: "Settlement",
496
+ setup(v) {
497
+ const n = ae(), { tab: c, dateRange: i, id: d, by: r } = ne({
498
+ id: "",
499
+ by: "",
500
+ tab: "feedme",
501
+ dateRange: {
502
+ startDate: Y().startOf("day").format("YYYY-MM-DD"),
503
+ endDate: Y().endOf("day").format("YYYY-MM-DD")
504
+ }
505
+ }), { t: w } = K(), { isLoading: _, startAsyncCall: y } = q(!0), o = te(), t = A([]), b = A([]);
506
+ async function h() {
507
+ const l = await B.readBusinessSettlements({
508
+ start: i.value.startDate,
509
+ end: i.value.endDate,
510
+ event: r.value === "PAYOUT_ACCOUNT" ? "MARKETING" : "ORDERING",
511
+ id: d.value
512
+ });
513
+ t.value = l;
514
+ }
515
+ async function u() {
516
+ const l = await B.readBusinessRMSSettlements({
517
+ start: i.value.startDate,
518
+ end: i.value.endDate,
519
+ event: r.value === "PAYOUT_ACCOUNT" ? "MARKETING" : "ORDERING",
520
+ id: d.value
521
+ });
522
+ b.value = l;
523
+ }
524
+ async function F() {
525
+ if (!d.value || d.value === "") {
526
+ _.value = !1, t.value = [], b.value = [];
527
+ return;
528
+ }
529
+ await y(async () => Promise.all([h(), u()]));
530
+ }
531
+ async function $(l) {
532
+ const s = Y(l.summary.completedAt).format("YYYY/MM/DD");
533
+ o.open({
534
+ title: `${w("payment.settlements.dialog.title")} (${l.summary.referenceNo})`,
535
+ subTitle: `${w("payment.settlements.dialog.date")}: ${s}`,
536
+ minWidth: "90%",
537
+ primaryActions: { text: "Close", close: !0 },
538
+ contentComponent: de,
539
+ contentComponentProps: { settlement: l }
540
+ });
541
+ }
542
+ return z(F), D([d, i], F), (l, s) => {
543
+ const N = k("FmTabs");
544
+ return R(), V(ee, {
545
+ title: e(w)("payment.settlements.title"),
546
+ description: e(w)("payment.settlements.description"),
547
+ loading: !1
548
+ }, {
549
+ default: S(() => [
550
+ m("div", ve, [
551
+ m("div", _e, [
552
+ p(be, {
553
+ id: e(d),
554
+ "onUpdate:id": s[0] || (s[0] = (a) => P(d) ? d.value = a : null),
555
+ by: e(r),
556
+ "onUpdate:by": s[1] || (s[1] = (a) => P(r) ? r.value = a : null)
557
+ }, null, 8, ["id", "by"]),
558
+ p(le, {
559
+ modelValue: e(i),
560
+ "onUpdate:modelValue": s[2] || (s[2] = (a) => P(i) ? i.value = a : null)
561
+ }, null, 8, ["modelValue"])
562
+ ]),
563
+ m("div", ge, [
564
+ p(oe, {
565
+ button: {
566
+ appendIcon: "file_download",
567
+ variant: "primary",
568
+ label: "Export"
569
+ },
570
+ handler: async () => {
571
+ const a = {
572
+ start: e(i).startDate,
573
+ end: e(i).endDate,
574
+ event: e(r) === "PAYOUT_ACCOUNT" ? "MARKETING" : "ORDERING",
575
+ id: e(d)
576
+ };
577
+ e(c) === "fiuu" ? await e(B).downloadBusinessRMSSettlementReport(a) : await e(B).downloadBusinessSettlementReport(a);
578
+ }
579
+ }, null, 8, ["handler"])
580
+ ])
581
+ ]),
582
+ m("div", Fe, [
583
+ p(N, {
584
+ modelValue: e(c),
585
+ "onUpdate:modelValue": s[3] || (s[3] = (a) => P(c) ? c.value = a : null),
586
+ items: [
587
+ {
588
+ label: "FeedMe",
589
+ value: "feedme",
590
+ icon: "summarize"
591
+ },
592
+ {
593
+ label: "Fiuu (RMS)",
594
+ value: "fiuu",
595
+ icon: "overview"
596
+ }
597
+ ]
598
+ }, null, 8, ["modelValue"])
599
+ ]),
600
+ e(c) === "fiuu" ? (R(), V(me, {
601
+ key: 0,
602
+ loading: e(_),
603
+ data: b.value,
604
+ onRowClick: $
605
+ }, null, 8, ["loading", "data"])) : E("", !0),
606
+ e(c) === "feedme" ? (R(), V(ue, {
607
+ key: 1,
608
+ loading: e(_),
609
+ data: t.value,
610
+ onRowClick: s[4] || (s[4] = (a) => e(n).push({
611
+ name: "mf-payment-settlement-transaction",
612
+ params: {
613
+ settlementId: a._id
614
+ }
615
+ }))
616
+ }, null, 8, ["loading", "data"])) : E("", !0)
617
+ ]),
618
+ _: 1
619
+ }, 8, ["title", "description"]);
620
+ };
621
+ }
622
+ });
623
+ export {
624
+ Ke as default
625
+ };
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as M, ref as h, computed as T, resolveComponent as d, openBlock as F, createBlock as V, 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-CHnkD2RB.js";
3
- import { h as S } from "./moment-h96o7c8I.js";
4
- import { s as _ } from "./index-BJUwhq11.js";
2
+ import { u as A } from "./index-CdIL37va.js";
3
+ import { h as S } from "./moment-FRs5-R1e.js";
4
+ import { s as _ } from "./index-4KwdYYMe.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-B7Q8ctGL.js";
10
+ import { u as z } from "./index-mU9AofgQ.js";
11
11
  import { u as G } from "./error-K1CakhA9.js";
12
- import { _ as Q } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js";
12
+ import { _ as Q } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-5ZaLjKl_.js";
13
13
  const H = /* @__PURE__ */ M({
14
14
  __name: "SettlementTable",
15
15
  props: {
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as h, resolveComponent as p, openBlock as A, createBlock as I, withCtx as r, createElementVNode as t, unref as m, ref as x, onMounted as z, watch as G, createVNode as n, createTextVNode as i, toDisplayString as u, h as T } from "vue";
2
- import { u as H } from "./index-CHnkD2RB.js";
2
+ import { u as H } from "./index-CdIL37va.js";
3
3
  import { useDialog as U, useSnackbar as q } from "@feedmepos/ui-library";
4
4
  import { d as B } from "./dinero-CIVmXLL-.js";
5
- import { _ as J, t as Q } from "./TransactionStatus.vue_vue_type_script_setup_true_lang-CjzPJbri.js";
6
- import { g as W, a as X } from "./assets-C5f-_lr4.js";
7
- import { t as L } from "./index-B2bh5bmh.js";
5
+ import { _ as J, t as Q } from "./TransactionStatus.vue_vue_type_script_setup_true_lang-C6ybTX_E.js";
6
+ import { g as W, a as X } from "./assets-QZbz5BYj.js";
7
+ import { t as L } from "./index-x-AN2d5y.js";
8
8
  import { _ as Z } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
9
9
  import { useRouter as ee } from "vue-router";
10
- import { s as te } from "./index-BJUwhq11.js";
10
+ import { s as te } from "./index-4KwdYYMe.js";
11
11
  import { u as ae } from "./error-K1CakhA9.js";
12
12
  import { w as ne } from "./Modal-DB8M9o1T.js";
13
- import { h as oe } from "./moment-h96o7c8I.js";
13
+ import { h as oe } from "./moment-FRs5-R1e.js";
14
14
  const re = ["src"], le = /* @__PURE__ */ h({
15
15
  __name: "Gateway",
16
16
  props: {