@feedmepos/mf-payment 0.0.0-beta.9 → 1.0.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) 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-BHRhEZ9h.js +613 -0
  6. package/dist/{PayoutAccount-DLhMMlw_.js → PayoutAccount-Bj5zvmoj.js} +38 -35
  7. package/dist/PayoutAccountSetting-kUQLeAcb.js +780 -0
  8. package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js +33 -0
  9. package/dist/Settlement-Crdfq22j.js +149 -0
  10. package/dist/Settlement-JHOJNkhd.js +194 -0
  11. package/dist/{SettlementTransactions-CoEzdtYT.js → SettlementTransactions-BxuLXUR-.js} +99 -105
  12. package/dist/{SettlementTransactions-Dl1H4jvh.js → SettlementTransactions-daWMAmtz.js} +117 -130
  13. package/dist/Terminal-gxGnjFGc.js +372 -0
  14. package/dist/TerminalSetting--ZAJJ_Hf.js +379 -0
  15. package/dist/TerminalTransaction---9nk_4q.js +249 -0
  16. package/dist/TerminalTransaction-B77YK3hF.js +425 -0
  17. package/dist/Transaction-8LlOLPeZ.js +404 -0
  18. package/dist/Transaction-DRQ_uZ30.js +241 -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-DjzULXn3.js +6356 -0
  27. package/dist/app.js +3 -198
  28. package/dist/assets-NrCec-W0.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-Bmka-1lQ.js → index-7KNaibcq.js} +1 -1
  37. package/dist/index-BWUtjGg7.js +47 -0
  38. package/dist/{index-CF56zGyu.js → index-BwcJZFsi.js} +1 -1
  39. package/dist/index-CWaKb7bG.js +56107 -0
  40. package/dist/index-CojhNtuG.js +127 -0
  41. package/dist/index-DbJpbpSs.js +52 -0
  42. package/dist/index.vue_vue_type_script_setup_true_lang-JdAFa8vy.js +167 -0
  43. package/dist/model/transaction.d.ts +2 -1
  44. package/dist/package.json +5 -5
  45. package/dist/payout-account-CBT1rfSS.js +1805 -0
  46. package/dist/router/index.d.ts +1 -0
  47. package/dist/stores/payoutAccount.d.ts +4 -4
  48. package/dist/transaction-CQiT7Y_s.js +87 -0
  49. package/dist/tsconfig.app.tsbuildinfo +1 -1
  50. package/dist/validator-D5jtpt9A.js +2877 -0
  51. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
  52. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +81 -0
  53. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
  54. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
  55. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +56 -0
  56. package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +50 -0
  57. package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +52 -0
  58. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  59. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +83 -0
  60. package/dist/views/admin/terminal/TerminalSetting.vue.d.ts +12 -0
  61. package/dist/views/admin/terminal/cell/Actions.vue.d.ts +80 -9
  62. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +94 -0
  63. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +94 -0
  64. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +85 -0
  65. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +94 -0
  66. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +7 -0
  67. package/dist/views/admin/transaction/TransactionTable.vue.d.ts +6 -2
  68. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +7 -0
  69. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
  70. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  71. package/dist/views/terminal-transaction/TerminalTransaction.vue.d.ts +2 -0
  72. package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +9 -0
  73. package/dist/views/terminal-transaction/cell/Status.vue.d.ts +9 -0
  74. package/package.json +5 -5
  75. package/dist/AdminLayout.vue_vue_type_script_setup_true_lang-oPYFBeEo.js +0 -42
  76. package/dist/PayoutAccount-xxSxqBTL.js +0 -3485
  77. package/dist/PayoutAccountSetting-CIeos0md.js +0 -425
  78. package/dist/Settlement-BVGACeme.js +0 -136
  79. package/dist/Settlement-Ce48KHrc.js +0 -132
  80. package/dist/Terminal-ByKV2Rof.js +0 -204
  81. package/dist/TerminalTransaction-RuSxBAxf.js +0 -240
  82. package/dist/Transaction-CYo-uLQi.js +0 -241
  83. package/dist/Transaction-Cjw9WwX8.js +0 -242
  84. package/dist/api/auth/index.d.ts +0 -7
  85. package/dist/assets-BuLGUMIx.js +0 -472
  86. package/dist/index-Coz5aeIO.js +0 -61
  87. package/dist/index-DCPNrUDq.js +0 -40075
  88. package/dist/index.vue_vue_type_script_setup_true_lang-CAR-bNaR.js +0 -150
  89. package/dist/mascot-side-3VXskf9y.js +0 -4
  90. package/dist/payout-account-iAM7HPtG.js +0 -3317
  91. 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,149 @@
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-CWaKb7bG.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-CojhNtuG.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-7KNaibcq.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("FmSimpleDateRangePicker");
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
+ "show-predefined-range": ""
113
+ }, null, 8, ["modelValue"])
114
+ ]),
115
+ p("div", q, [
116
+ i(Y, {
117
+ button: {
118
+ appendIcon: "file_download",
119
+ variant: "primary",
120
+ label: "Export"
121
+ },
122
+ handler: async () => {
123
+ await n(g).downloadRestaurantSettlementReport({
124
+ start: n(e).startDate,
125
+ end: n(e).endDate
126
+ });
127
+ }
128
+ }, null, 8, ["handler"])
129
+ ])
130
+ ]),
131
+ i(L, {
132
+ loading: n(r),
133
+ data: l.value,
134
+ onRowClick: a[1] || (a[1] = (u) => n(d).push({
135
+ name: "mf-payment-settlement-transaction",
136
+ params: {
137
+ settlementId: u._id
138
+ }
139
+ }))
140
+ }, null, 8, ["loading", "data"])
141
+ ]),
142
+ _: 1
143
+ }, 8, ["loading"]);
144
+ };
145
+ }
146
+ });
147
+ export {
148
+ te as default
149
+ };
@@ -0,0 +1,194 @@
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-CWaKb7bG.js";
3
+ import { h as v } from "./moment-h96o7c8I.js";
4
+ import { s as d } from "./index-CojhNtuG.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-7KNaibcq.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, m = 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) => m("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), m = 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, c) => {
125
+ const R = i("FmSimpleDateRangePicker"), 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": c[0] || (c[0] = (t) => K(e) ? e.value = t : null),
136
+ "show-predefined-range": ""
137
+ }, null, 8, ["modelValue"])
138
+ ]),
139
+ y("div", H, [
140
+ s(I, { trigger: "click" }, {
141
+ "menu-button": b(() => [
142
+ s(A, {
143
+ class: "w-full mt-6",
144
+ variant: "primary",
145
+ "append-icon": "arrow_drop_down",
146
+ label: "Actions",
147
+ loading: a(m).isLoading.value
148
+ }, null, 8, ["loading"])
149
+ ]),
150
+ default: b(() => [
151
+ (k(), P(E, null, O(l, (t) => s(x, {
152
+ key: t.value,
153
+ label: t.label,
154
+ icon: t.icon,
155
+ sublabel: t.sublabel,
156
+ selectable: !0,
157
+ onClick: (J) => {
158
+ a(m).startAsyncCall(async () => {
159
+ try {
160
+ await t.onClick();
161
+ } catch (B) {
162
+ a(f).open({
163
+ type: "error",
164
+ title: "Error",
165
+ message: a(j)(B)
166
+ });
167
+ }
168
+ });
169
+ }
170
+ }, null, 8, ["label", "icon", "sublabel", "onClick"])), 64))
171
+ ]),
172
+ _: 1
173
+ })
174
+ ])
175
+ ]),
176
+ s(z, {
177
+ loading: a(u),
178
+ data: o.value,
179
+ onRowClick: c[1] || (c[1] = (t) => a(p).push({
180
+ name: "mf-payment-admin.settlement-transaction",
181
+ params: {
182
+ settlementId: t._id
183
+ }
184
+ }))
185
+ }, null, 8, ["loading", "data"])
186
+ ]),
187
+ _: 1
188
+ }, 8, ["loading"]);
189
+ };
190
+ }
191
+ });
192
+ export {
193
+ ie as default
194
+ };