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