@feedmepos/mf-payment 1.11.22-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-DlTlaRr0.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CZeyS_-_.js} +3 -3
  3. package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-CqFT58M_.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BGU64S5Z.js} +3 -3
  4. package/dist/{Chargeback-D71IAGTk.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-Dj3fMKVr.js → DocumentViewer.vue_vue_type_script_setup_true_lang-saQlwl6a.js} +857 -857
  7. package/dist/{ExternalTerminal-Cc9qwfN3.js → ExternalTerminal-DWnv8BaM.js} +31 -31
  8. package/dist/{OnboardForm-oAWTQnVu.js → OnboardForm--to1SX2z.js} +631 -694
  9. package/dist/{OnboardForm-DQ44zTWg.js → OnboardForm-BWIWimOG.js} +8 -8
  10. package/dist/OnboardSubmission-BtiI1ewF.js +449 -0
  11. package/dist/{OnboardSubmission-CSDvUix8.js → OnboardSubmission-DFhK_eus.js} +7 -7
  12. package/dist/{PaymentCheckout-oHQmbYkX.js → PaymentCheckout-CsDfQl6k.js} +4 -4
  13. package/dist/{mascot-side-BE_abER6.js → PayoutAccount-DtUHIt8d.js} +598 -206
  14. package/dist/{PayoutAccount-Dx8OtJxp.js → PayoutAccount-DxC8i69H.js} +9 -9
  15. package/dist/{PayoutAccountSetting-DoCZVhn3.js → PayoutAccountSetting-z-TySDXR.js} +10 -10
  16. package/dist/{Restaurant-Ct9aQWSp.js → Restaurant-3NdsiWwv.js} +5 -5
  17. package/dist/{RestaurantSetting-D7Yuuw47.js → RestaurantSetting-Cyn1i8dn.js} +9 -23
  18. package/dist/Settlement--SIL-7He.js +625 -0
  19. package/dist/{Settlement-gUV3TF4A.js → Settlement-CiKtgAZ4.js} +5 -5
  20. package/dist/{SettlementTransactions-BY3T-dG3.js → SettlementTransactions-C52wiVAb.js} +6 -6
  21. package/dist/{SettlementTransactions-DIkkrW6-.js → SettlementTransactions-CI2SHJB3.js} +97 -106
  22. package/dist/{Status.vue_vue_type_script_setup_true_lang-CQlT9Qj_.js → Status.vue_vue_type_script_setup_true_lang-DgqA7PhV.js} +1 -1
  23. package/dist/{Terminal-CPoxr6Ga.js → Terminal-Cx-X-ik5.js} +19 -19
  24. package/dist/{TerminalSetting-hmswppko.js → TerminalSetting-DY0EYdD-.js} +650 -776
  25. package/dist/{TerminalTemplate-B3zOtzmP.js → TerminalTemplate-BORrJdEH.js} +7 -7
  26. package/dist/{TerminalTemplateSetting-2R_LV6YP.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-CE5Y7oSP.js → Transaction-Bj9ckoKD.js} +19 -20
  29. package/dist/{Transaction-BV-_41-w.js → Transaction-D1W9J-YG.js} +54 -56
  30. package/dist/{TransactionOld-B2i6FWoP.js → TransactionOld-C-3Y9idi.js} +11 -12
  31. package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-D07Iu5dG.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-Db-hwBve.js → app-C8rDUQ-r.js} +14579 -14132
  36. package/dist/app.js +1 -1
  37. package/dist/{assets-CB7rE-mh.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-5eWxG5r8.js → grafana-CHfYDJ1b.js} +4 -4
  41. package/dist/{index-rGzBv5-u.js → index-4KwdYYMe.js} +2 -2
  42. package/dist/{index-X_UgwLJS.js → index-7ofYlGzn.js} +1 -1
  43. package/dist/index-BgS9t01N.js +62 -0
  44. package/dist/{index-bczomY2M.js → index-Bgh4RGim.js} +2 -2
  45. package/dist/{index-DWU5m3QZ.js → index-CX2hs-UQ.js} +1 -1
  46. package/dist/{index-BNEwsJyD.js → index-CX9xj_f6.js} +1 -6
  47. package/dist/index-CdIL37va.js +33692 -0
  48. package/dist/{index-DWVs6h52.js → index-DVsHI6PR.js} +29 -52
  49. package/dist/{index-BCnQ-hAJ.js → index-Yt_qv8lG.js} +5 -39
  50. package/dist/index-mU9AofgQ.js +137 -0
  51. package/dist/{index-BmV1RaRw.js → index-x-AN2d5y.js} +2 -2
  52. package/dist/{index-DxQ3wF-X.js → index-yTZ7Gd-r.js} +1 -1
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-CSeS9lVS.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-BTnbIwsJ.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-BJX-S-uW.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-58TARaq6.js +0 -187
  139. package/dist/FoodCourtSettlement-BGgvu91A.js +0 -68
  140. package/dist/FoodCourtTransaction-B1rZHqE_.js +0 -212
  141. package/dist/Method.vue_vue_type_script_setup_true_lang-B8Vq5gSl.js +0 -58
  142. package/dist/OnboardSubmission-ncq-dkfF.js +0 -733
  143. package/dist/PayoutAccount-4ZI4Ik2p.js +0 -405
  144. package/dist/Settlement-BPaaEj_X.js +0 -510
  145. package/dist/SettlementTable.vue_vue_type_script_setup_true_lang-BsGmww2X.js +0 -132
  146. package/dist/api/food-court/index.d.ts +0 -31
  147. package/dist/index-B-xGomR7.js +0 -131
  148. package/dist/index-B6SmnK1g.js +0 -32927
  149. package/dist/index-CazeCsOR.js +0 -13
  150. package/dist/index-DXIvYLMm.js +0 -75
  151. package/dist/index-j-zqgMuS.js +0 -52
  152. package/dist/payout-account-BRzRptNv.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
@@ -1,510 +0,0 @@
1
- import { defineComponent as P, ref as w, computed as z, resolveComponent as h, openBlock as T, createBlock as x, h as H, watch as D, createElementBlock as I, Fragment as L, createElementVNode as s, createVNode as u, withCtx as C, unref as e, toDisplayString as i, createTextVNode as A, onMounted as G, renderList as q, isRef as O, createCommentVNode as B } from "vue";
2
- import { u as j } from "./index-B6SmnK1g.js";
3
- import { h as M } from "./moment-h96o7c8I.js";
4
- import { useI18n as E, useCoreStore as J } from "@feedmepos/mf-common";
5
- import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
6
- import { s as U } from "./index-rGzBv5-u.js";
7
- import { _ as W } from "./SettlementTable.vue_vue_type_script_setup_true_lang-BsGmww2X.js";
8
- import { useRouter as X } from "vue-router";
9
- import { u as Z } from "./index-B-xGomR7.js";
10
- import { _ as ee } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
11
- import { _ as te } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js";
12
- import { useDialog as ae } from "@feedmepos/ui-library";
13
- import { d as g } from "./dinero-CIVmXLL-.js";
14
- import { _ as ne } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
15
- import { p as le } from "./index-DWU5m3QZ.js";
16
- const oe = /* @__PURE__ */ P({
17
- __name: "FiuuSettlementTable",
18
- props: {
19
- data: {
20
- type: Array,
21
- required: !0
22
- },
23
- loading: {
24
- type: Boolean,
25
- required: !0
26
- }
27
- },
28
- emits: ["row-click"],
29
- setup(y, { emit: o }) {
30
- const { t: d } = E(), m = y, c = o, b = w(""), k = [
31
- {
32
- header: () => d("payment.settlements.table.id"),
33
- accessorKey: "id",
34
- cell: ({ cell: p }) => H(ne, { data: p.getValue() })
35
- },
36
- {
37
- header: () => d("payment.settlements.table.bank"),
38
- accessorKey: "bank"
39
- },
40
- {
41
- header: () => d("payment.settlements.table.account"),
42
- accessorKey: "accountNo"
43
- },
44
- {
45
- header: () => d("payment.settlements.table.created_at"),
46
- accessorKey: "transactionAt",
47
- meta: {
48
- width: "180px"
49
- }
50
- },
51
- {
52
- header: () => d("payment.settlements.table.sales_amount"),
53
- accessorKey: "amount"
54
- },
55
- {
56
- header: () => d("payment.settlements.table.fee"),
57
- accessorKey: "fee"
58
- },
59
- {
60
- header: () => d("payment.settlements.table.refund"),
61
- accessorKey: "refund"
62
- },
63
- {
64
- header: () => d("payment.settlements.table.settlement_amount"),
65
- accessorKey: "payout"
66
- }
67
- ], v = z(() => m.data.map((p) => ({
68
- id: p.summary.referenceNo,
69
- bank: p.summary.bank.name,
70
- accountNo: p.summary.bank.accountNo,
71
- transactionAt: M(p.summary.completedAt).format(
72
- "YYYY-MM-DD"
73
- ),
74
- amount: g(p.summary.amount).toFormat("$0.00"),
75
- refund: g(p.summary.refund).toFormat("$0.00"),
76
- fee: g(p.summary.commission).toFormat("$0.00"),
77
- payout: g(p.summary.payout).toFormat("$0.00")
78
- })));
79
- return (p, l) => {
80
- const t = h("FmTable");
81
- return T(), x(t, {
82
- modelValue: b.value,
83
- "onUpdate:modelValue": l[0] || (l[0] = (f) => b.value = f),
84
- "row-data": v.value,
85
- "shrink-at": !1,
86
- "column-defs": k,
87
- loading: m.loading,
88
- onRowClick: l[1] || (l[1] = (f) => c("row-click", m.data.at(f.index)))
89
- }, null, 8, ["modelValue", "row-data", "loading"]);
90
- };
91
- }
92
- }), se = {
93
- id: "fiuu-settlement-dialog",
94
- class: "flex mb-6"
95
- }, re = { class: "my-6 w-[240px]" }, me = /* @__PURE__ */ P({
96
- __name: "FiuuSettlementTransactions",
97
- props: {
98
- settlement: {
99
- type: Object,
100
- required: !0
101
- }
102
- },
103
- setup(y) {
104
- const { t: o } = E(), m = w(
105
- y.settlement.record.map((l) => (Object.assign(l, {
106
- __localAmount: g(l.amount).toFormat("0.00"),
107
- __localComission: g(l.commission).toFormat("0.00"),
108
- __localNetAMount: g(l.netAmount).toFormat("0.00")
109
- }), l))
110
- ), c = w(m.value), b = w(""), k = [
111
- {
112
- header: () => o("payment.settlements.dialog.fiuu.id"),
113
- accessorKey: "referenceNo"
114
- },
115
- {
116
- header: () => o("payment.settlements.dialog.fiuu.type"),
117
- accessorKey: "group"
118
- },
119
- {
120
- header: () => o("payment.settlements.dialog.fiuu.transaction_at"),
121
- accessorKey: "completedAt",
122
- meta: {
123
- width: "180px"
124
- },
125
- cell: ({ cell: l }) => M(l.getValue()).format("YYYY-MM-DD HH:mm:ss")
126
- },
127
- {
128
- header: () => o("payment.settlements.dialog.fiuu.sales_amount"),
129
- accessorKey: "amount",
130
- cell: ({ cell: l }) => g(l.getValue()).toFormat("$0.00")
131
- },
132
- {
133
- header: () => o("payment.settlements.dialog.fiuu.fee"),
134
- accessorKey: "commission",
135
- cell: ({ cell: l }) => g(l.getValue()).toFormat("$0.00")
136
- },
137
- {
138
- header: () => o("payment.settlements.dialog.fiuu.settlement_amount"),
139
- accessorKey: "netAmount",
140
- cell: ({ cell: l }) => g(l.getValue()).toFormat("$0.00")
141
- }
142
- ], v = w("");
143
- let p;
144
- return D(v, async () => {
145
- p && clearTimeout(p), p = setTimeout(() => {
146
- var l = new RegExp(v.value, "i");
147
- c.value = m.value.filter((t) => {
148
- const f = JSON.stringify(t);
149
- return l.test(f);
150
- });
151
- }, 700);
152
- }), (l, t) => {
153
- const f = h("FmCardHeader"), _ = h("FmCardSection"), R = h("FmCard"), N = h("FmSearch"), S = h("FmTable");
154
- return T(), I(L, null, [
155
- s("div", se, [
156
- u(R, {
157
- horizontal: "",
158
- class: "flex-1 p-6",
159
- variant: "elevated"
160
- }, {
161
- default: C(() => [
162
- u(_, { class: "flex flex-col gap-16 justify-between" }, {
163
- default: C(() => [
164
- u(f, {
165
- class: "p-0",
166
- title: e(o)("payment.settlements.dialog.info.transaction.title"),
167
- subtitle: ""
168
- }, null, 8, ["title"]),
169
- u(_, { class: "p-0" }, {
170
- default: C(() => [
171
- s("b", null, i(e(o)("payment.settlements.dialog.info.transaction.for")), 1),
172
- A(": " + i(y.settlement.summary.group) + " ", 1),
173
- t[2] || (t[2] = s("br", null, null, -1)),
174
- s("b", null, i(e(o)("payment.settlements.dialog.info.transaction.reference")), 1),
175
- A(": " + i(y.settlement.summary.referenceNo), 1),
176
- t[3] || (t[3] = s("br", null, null, -1)),
177
- s("b", null, i(e(o)("payment.settlements.dialog.info.transaction.count")), 1),
178
- A(": " + i(m.value.length), 1)
179
- ]),
180
- _: 1
181
- })
182
- ]),
183
- _: 1
184
- })
185
- ]),
186
- _: 1
187
- }),
188
- u(R, {
189
- horizontal: "",
190
- class: "flex-1 p-6 mx-6",
191
- variant: "elevated"
192
- }, {
193
- default: C(() => [
194
- u(_, { class: "flex flex-col gap-16 justify-between" }, {
195
- default: C(() => [
196
- u(f, {
197
- class: "p-0",
198
- title: e(o)("payment.settlements.dialog.info.bank.title"),
199
- subtitle: ""
200
- }, null, 8, ["title"]),
201
- u(_, { class: "p-0" }, {
202
- default: C(() => [
203
- s("b", null, i(e(o)("payment.settlements.dialog.info.bank.for")), 1),
204
- A(": " + i(y.settlement.summary.bank.name), 1),
205
- t[4] || (t[4] = s("br", null, null, -1)),
206
- s("b", null, i(e(o)("payment.settlements.dialog.info.bank.name")), 1),
207
- A(": " + i(y.settlement.summary.bank.holderName), 1),
208
- t[5] || (t[5] = s("br", null, null, -1)),
209
- s("b", null, i(e(o)("payment.settlements.dialog.info.bank.number")), 1),
210
- A(": " + i(y.settlement.summary.bank.accountNo), 1)
211
- ]),
212
- _: 1
213
- })
214
- ]),
215
- _: 1
216
- })
217
- ]),
218
- _: 1
219
- }),
220
- u(R, {
221
- horizontal: "",
222
- class: "flex-1 p-6",
223
- variant: "elevated"
224
- }, {
225
- default: C(() => [
226
- u(_, { class: "flex flex-col gap-16 justify-between" }, {
227
- default: C(() => [
228
- u(f, {
229
- class: "p-0",
230
- title: e(o)("payment.settlements.dialog.info.payout.title"),
231
- subtitle: ""
232
- }, null, 8, ["title"]),
233
- u(_, { class: "p-0" }, {
234
- default: C(() => [
235
- s("b", null, i(e(o)("payment.settlements.dialog.info.payout.amount")), 1),
236
- A(": " + i(e(g)(y.settlement.summary.amount).toFormat("$0.00")), 1),
237
- t[6] || (t[6] = s("br", null, null, -1)),
238
- s("b", null, i(e(o)("payment.settlements.dialog.info.payout.fee")), 1),
239
- A(": " + i(e(g)(y.settlement.summary.commission).toFormat("$0.00")), 1),
240
- t[7] || (t[7] = s("br", null, null, -1)),
241
- s("b", null, i(e(o)("payment.settlements.dialog.info.payout.refund")), 1),
242
- A(": " + i(e(g)(y.settlement.summary.refund).toFormat("$0.00")) + " ", 1),
243
- t[8] || (t[8] = s("br", null, null, -1)),
244
- s("b", null, i(e(o)("payment.settlements.dialog.info.payout.payout")), 1),
245
- A(": " + i(e(g)(y.settlement.summary.payout).toFormat("$0.00")), 1)
246
- ]),
247
- _: 1
248
- })
249
- ]),
250
- _: 1
251
- })
252
- ]),
253
- _: 1
254
- })
255
- ]),
256
- s("div", re, [
257
- u(N, {
258
- modelValue: v.value,
259
- "onUpdate:modelValue": t[0] || (t[0] = (n) => v.value = n),
260
- placeholder: e(o)("payment.settlements.dialog.search")
261
- }, null, 8, ["modelValue", "placeholder"])
262
- ]),
263
- u(S, {
264
- modelValue: b.value,
265
- "onUpdate:modelValue": t[1] || (t[1] = (n) => b.value = n),
266
- "shrink-at": !1,
267
- "row-data": c.value,
268
- "column-defs": k
269
- }, null, 8, ["modelValue", "row-data"])
270
- ], 64);
271
- };
272
- }
273
- }), ue = {
274
- key: 1,
275
- class: "inline-flex"
276
- }, ie = { class: "relative" }, de = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, ce = /* @__PURE__ */ P({
277
- __name: "SettlementSelector",
278
- props: {
279
- id: {},
280
- by: {}
281
- },
282
- emits: ["update:id", "update:by"],
283
- setup(y, { emit: o }) {
284
- const d = y, m = o, { t: c } = E(), { currentBusiness: b, readRestaurants: k } = J(), { isLoading: v, startAsyncCall: p } = j(!0), l = w([]), t = w(), f = w(""), _ = w([]);
285
- let R;
286
- D(f, async () => {
287
- R && clearTimeout(R), R = setTimeout(() => {
288
- var n = new RegExp(f.value, "i");
289
- _.value = l.value.filter((r) => {
290
- const $ = JSON.stringify(r);
291
- return n.test($);
292
- });
293
- }, 700);
294
- }), D(t, () => {
295
- var n, r;
296
- m("update:id", (n = t.value) == null ? void 0 : n.value), m("update:by", (r = t.value) == null ? void 0 : r.by);
297
- });
298
- async function N() {
299
- return p(async () => {
300
- try {
301
- let n = await le.readBusinessPayoutAccounts();
302
- return n.length === 0 ? void 0 : n;
303
- } catch {
304
- return [];
305
- }
306
- });
307
- }
308
- async function S() {
309
- v.value = !0;
310
- const n = [];
311
- let r = await N();
312
- n.push(
313
- ...(r || []).filter((a) => a.store.event !== "ORDERING").map((a) => {
314
- var V, Y, K, F;
315
- return {
316
- by: "PAYOUT_ACCOUNT",
317
- value: a.store.id,
318
- prefix: c("payment.components.payout_account"),
319
- type: "Payout Account - " + a.store.event,
320
- label: ((Y = (V = a.ref) == null ? void 0 : V.profile) == null ? void 0 : Y.name) ?? a.ref.name,
321
- chipLabel: "Marketing: " + (((F = (K = a.ref) == null ? void 0 : K.profile) == null ? void 0 : F.name) ?? a.ref.name)
322
- };
323
- })
324
- );
325
- const $ = await k();
326
- n.push(
327
- ...($ || []).filter((a) => a.managable).map((a) => ({
328
- by: "RESTAURANT",
329
- value: a._id,
330
- prefix: c("payment.components.restaurant"),
331
- type: "Restaurant",
332
- label: a.profile.name + " (" + (a.profile.code ?? "--") + ")",
333
- chipLabel: "Restaurant: " + a.profile.name + " (" + (a.profile.code ?? "--") + ")"
334
- }))
335
- ), l.value = n, _.value = l.value, t.value = n.find((a) => a.value === d.id && a.by === d.by) ?? n[0], v.value = !1;
336
- }
337
- return G(S), D(b, S), (n, r) => {
338
- const $ = h("FmCircularProgress"), a = h("FmChip"), V = h("FmSearch"), Y = h("FmMenuItem"), K = h("FmMenu");
339
- return e(v) ? (T(), x($, {
340
- key: 0,
341
- size: "md"
342
- })) : (T(), I("div", ue, [
343
- u(K, { "close-on-click": !0 }, {
344
- "menu-button": C(() => {
345
- var F;
346
- return [
347
- u(a, {
348
- icon: "account_box",
349
- label: ((F = t.value) == null ? void 0 : F.chipLabel) ?? e(c)("payment.components.select"),
350
- removable: !!t.value,
351
- onChipClosed: r[0] || (r[0] = (ve) => t.value = void 0)
352
- }, null, 8, ["label", "removable"])
353
- ];
354
- }),
355
- default: C(() => [
356
- s("div", ie, [
357
- s("div", de, [
358
- u(V, {
359
- "model-value": f.value,
360
- "onUpdate:modelValue": r[1] || (r[1] = (F) => f.value = F),
361
- placeholder: e(c)("payment.components.select")
362
- }, null, 8, ["model-value", "placeholder"])
363
- ]),
364
- s("div", null, [
365
- (T(!0), I(L, null, q(_.value, (F) => (T(), x(Y, {
366
- key: F.value,
367
- label: F.label,
368
- sublabel: F.type,
369
- onClick: () => t.value = F
370
- }, null, 8, ["label", "sublabel", "onClick"]))), 128))
371
- ])
372
- ])
373
- ]),
374
- _: 1
375
- })
376
- ]));
377
- };
378
- }
379
- }), pe = { class: "flex justify-between items-center mb-6" }, fe = { class: "flex space-x-8 items-center" }, ye = { class: "flex space-x-4 self-center" }, be = { class: "mb-6" }, Me = /* @__PURE__ */ P({
380
- __name: "Settlement",
381
- setup(y) {
382
- const o = X(), { tab: d, dateRange: m, id: c, by: b } = Z({
383
- id: "",
384
- by: "",
385
- tab: "feedme",
386
- dateRange: {
387
- startDate: M().startOf("day").format("YYYY-MM-DD"),
388
- endDate: M().endOf("day").format("YYYY-MM-DD")
389
- }
390
- }), { t: k } = E(), { isLoading: v, startAsyncCall: p } = j(!0), l = ae(), t = w([]), f = w([]);
391
- async function _() {
392
- const n = await U.readBusinessSettlements({
393
- start: m.value.startDate,
394
- end: m.value.endDate,
395
- event: b.value === "PAYOUT_ACCOUNT" ? "MARKETING" : "ORDERING",
396
- id: c.value
397
- });
398
- t.value = n;
399
- }
400
- async function R() {
401
- const n = await U.readBusinessRMSSettlements({
402
- start: m.value.startDate,
403
- end: m.value.endDate,
404
- event: b.value === "PAYOUT_ACCOUNT" ? "MARKETING" : "ORDERING",
405
- id: c.value
406
- });
407
- f.value = n;
408
- }
409
- async function N() {
410
- if (!c.value || c.value === "") {
411
- v.value = !1, t.value = [], f.value = [];
412
- return;
413
- }
414
- await p(async () => Promise.all([_(), R()]));
415
- }
416
- async function S(n) {
417
- const r = M(n.summary.completedAt).format("YYYY/MM/DD");
418
- l.open({
419
- title: `${k("payment.settlements.dialog.title")} (${n.summary.referenceNo})`,
420
- subTitle: `${k("payment.settlements.dialog.date")}: ${r}`,
421
- minWidth: "90%",
422
- primaryActions: { text: "Close", close: !0 },
423
- contentComponent: me,
424
- contentComponentProps: { settlement: n }
425
- });
426
- }
427
- return G(N), D([c, m], N), (n, r) => {
428
- const $ = h("FmTabs");
429
- return T(), x(Q, {
430
- title: e(k)("payment.settlements.title"),
431
- description: e(k)("payment.settlements.description"),
432
- loading: !1
433
- }, {
434
- default: C(() => [
435
- s("div", pe, [
436
- s("div", fe, [
437
- u(ce, {
438
- id: e(c),
439
- "onUpdate:id": r[0] || (r[0] = (a) => O(c) ? c.value = a : null),
440
- by: e(b),
441
- "onUpdate:by": r[1] || (r[1] = (a) => O(b) ? b.value = a : null)
442
- }, null, 8, ["id", "by"]),
443
- u(te, {
444
- modelValue: e(m),
445
- "onUpdate:modelValue": r[2] || (r[2] = (a) => O(m) ? m.value = a : null)
446
- }, null, 8, ["modelValue"])
447
- ]),
448
- s("div", ye, [
449
- u(ee, {
450
- button: {
451
- appendIcon: "file_download",
452
- variant: "primary",
453
- label: "Export"
454
- },
455
- handler: async () => {
456
- const a = {
457
- start: e(m).startDate,
458
- end: e(m).endDate,
459
- event: e(b) === "PAYOUT_ACCOUNT" ? "MARKETING" : "ORDERING",
460
- id: e(c)
461
- };
462
- e(d) === "fiuu" ? await e(U).downloadBusinessRMSSettlementReport(a) : await e(U).downloadBusinessSettlementReport(a);
463
- }
464
- }, null, 8, ["handler"])
465
- ])
466
- ]),
467
- s("div", be, [
468
- u($, {
469
- modelValue: e(d),
470
- "onUpdate:modelValue": r[3] || (r[3] = (a) => O(d) ? d.value = a : null),
471
- items: [
472
- {
473
- label: "FeedMe",
474
- value: "feedme",
475
- icon: "summarize"
476
- },
477
- {
478
- label: "Fiuu (RMS)",
479
- value: "fiuu",
480
- icon: "overview"
481
- }
482
- ]
483
- }, null, 8, ["modelValue"])
484
- ]),
485
- e(d) === "fiuu" ? (T(), x(oe, {
486
- key: 0,
487
- loading: e(v),
488
- data: f.value,
489
- onRowClick: S
490
- }, null, 8, ["loading", "data"])) : B("", !0),
491
- e(d) === "feedme" ? (T(), x(W, {
492
- key: 1,
493
- loading: e(v),
494
- data: t.value,
495
- onRowClick: r[4] || (r[4] = (a) => e(o).push({
496
- name: "mf-payment-settlement-transaction",
497
- params: {
498
- settlementId: a._id
499
- }
500
- }))
501
- }, null, 8, ["loading", "data"])) : B("", !0)
502
- ]),
503
- _: 1
504
- }, 8, ["title", "description"]);
505
- };
506
- }
507
- });
508
- export {
509
- Me as default
510
- };
@@ -1,132 +0,0 @@
1
- import { defineComponent as k, openBlock as d, createElementBlock as h, normalizeStyle as A, toDisplayString as I, ref as v, computed as K, resolveComponent as b, Fragment as N, unref as i, withDirectives as $, createBlock as C, vShow as V, createCommentVNode as Y, createVNode as x, h as _ } from "vue";
2
- import "./index-B6SmnK1g.js";
3
- import "@feedmepos/ui-library";
4
- import { d as u } from "./dinero-CIVmXLL-.js";
5
- import { h as D } from "./moment-h96o7c8I.js";
6
- import { _ as M } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
7
- import { useCoreStore as R, useI18n as P } from "@feedmepos/mf-common";
8
- const T = /* @__PURE__ */ k({
9
- __name: "InvoiceStatus",
10
- props: {
11
- data: {}
12
- },
13
- setup(l) {
14
- const o = l;
15
- function n() {
16
- return o.data && o.data !== "" ? "#66BB6A" : "#EF5350";
17
- }
18
- function m() {
19
- return o.data && o.data !== "" ? "Ready" : "Not Ready";
20
- }
21
- return (p, t) => (d(), h("span", {
22
- style: A({ color: n() })
23
- }, I(m()), 5));
24
- }
25
- }), G = /* @__PURE__ */ k({
26
- __name: "SettlementTable",
27
- props: {
28
- data: {
29
- type: Array,
30
- required: !0
31
- },
32
- loading: {
33
- type: Boolean,
34
- required: !0
35
- },
36
- // The invoices it points to are a business's, which a food court has none of.
37
- showInvoiceNotice: {
38
- type: Boolean,
39
- default: !0
40
- }
41
- },
42
- emits: ["row-click"],
43
- setup(l, { emit: o }) {
44
- const { currentCountry: n, currentBusiness: m, namespace: p } = R(), { t } = P(), y = v(!0), r = l, w = o, f = v(""), g = [
45
- {
46
- header: () => t("payment.settlements.table.id"),
47
- accessorKey: "id",
48
- cell: ({ cell: e }) => _(M, { data: e.getValue() })
49
- },
50
- {
51
- header: () => t("payment.settlements.table.bank"),
52
- accessorKey: "bank"
53
- },
54
- {
55
- header: () => t("payment.settlements.table.account"),
56
- accessorKey: "accountNo"
57
- },
58
- {
59
- header: () => t("payment.settlements.table.created_at"),
60
- accessorKey: "transactionAt",
61
- meta: {
62
- width: "180px"
63
- }
64
- },
65
- {
66
- header: () => t("payment.settlements.table.sales_amount"),
67
- accessorKey: "amount"
68
- },
69
- {
70
- header: () => t("payment.settlements.table.fee"),
71
- accessorKey: "fee"
72
- },
73
- {
74
- header: () => t("payment.settlements.table.settlement_amount"),
75
- accessorKey: "payout"
76
- },
77
- {
78
- header: () => t("payment.settlements.table.invoice_status"),
79
- accessorKey: "invoiceId",
80
- cell: ({ cell: e }) => _(T, { data: e.getValue() })
81
- }
82
- ], S = K(() => r.data.map((e) => ({
83
- id: e._id,
84
- bank: e.beneficiaryBank.name,
85
- accountNo: e.beneficiaryBank.accountNumber,
86
- transactionAt: D(e.createdAt).format("YYYY-MM-DD"),
87
- amount: u(e.totalAmount).toFormat("$0.00"),
88
- fee: u(e.totalFee).toFormat("$0.00"),
89
- payout: u(e.totalPayout).toFormat("$0.00"),
90
- invoiceId: e.invoiceId
91
- }))), B = () => {
92
- var s;
93
- let e = "https://license.feedme.cc/invoices";
94
- p.value === "dev" && (e = "https://license.feedmedev.cc/invoices");
95
- const a = new URLSearchParams({
96
- businessId: ((s = m.value) == null ? void 0 : s._id) ?? "",
97
- country: n.value ?? "MY"
98
- });
99
- open(`${e}?${a.toString()}`, "_blank");
100
- };
101
- return (e, a) => {
102
- const s = b("FmSnackbar"), F = b("FmTable");
103
- return d(), h(N, null, [
104
- r.showInvoiceNotice && i(n) === "MY" ? $((d(), C(s, {
105
- key: 0,
106
- class: "mb-10",
107
- title: i(t)("payment.settlements.invoice.title"),
108
- description: i(t)("payment.settlements.invoice.description"),
109
- action: i(t)("payment.settlements.invoice.action"),
110
- variant: "info",
111
- dismissable: "",
112
- onOnDismiss: a[0] || (a[0] = (c) => y.value = !1),
113
- onOnAction: B
114
- }, null, 8, ["title", "description", "action"])), [
115
- [V, y.value]
116
- ]) : Y("", !0),
117
- x(F, {
118
- modelValue: f.value,
119
- "onUpdate:modelValue": a[1] || (a[1] = (c) => f.value = c),
120
- "row-data": S.value,
121
- "shrink-at": !1,
122
- "column-defs": g,
123
- loading: r.loading,
124
- onRowClick: a[2] || (a[2] = (c) => w("row-click", r.data.at(c.index)))
125
- }, null, 8, ["modelValue", "row-data", "loading"])
126
- ], 64);
127
- };
128
- }
129
- });
130
- export {
131
- G as _
132
- };
@@ -1,31 +0,0 @@
1
- import { type FdoPaymentTransactionV2Output, type F_PAYMENT_TRANSACTION_STATUS, type PaginatedResult, type PayoutAccountWithRefDto, type SettlementDtoOutput } from "@feedmepos/payment-entity";
2
- import type { AxiosInstance } from "axios";
3
- export interface FoodCourtPayoutAccountRequest {
4
- enable?: boolean | null;
5
- methods?: PayoutAccountWithRefDto["methods"] | null;
6
- store: Omit<PayoutAccountWithRefDto["store"], "id" | "event">;
7
- }
8
- export declare const foodCourtClientInstance: () => AxiosInstance;
9
- export declare const foodCourtApi: {
10
- readPayoutAccount(): Promise<PayoutAccountWithRefDto | undefined>;
11
- createPayoutAccount(payload: FoodCourtPayoutAccountRequest): Promise<PayoutAccountWithRefDto>;
12
- updatePayoutAccount(payload: FoodCourtPayoutAccountRequest): Promise<PayoutAccountWithRefDto>;
13
- readTransactions(params: {
14
- status: F_PAYMENT_TRANSACTION_STATUS[];
15
- start: string;
16
- end: string;
17
- limit: number;
18
- cursor: string;
19
- search: string;
20
- }): Promise<PaginatedResult<FdoPaymentTransactionV2Output>>;
21
- readSettlements(dateRange: {
22
- start: string;
23
- end: string;
24
- }): Promise<SettlementDtoOutput[]>;
25
- readSettlementById(settlementId: string): Promise<SettlementDtoOutput>;
26
- readTransactionsBySettlementId(settlementId: string): Promise<FdoPaymentTransactionV2Output[]>;
27
- downloadSettlementReport(dateRange: {
28
- start: string;
29
- end: string;
30
- }): Promise<void>;
31
- };