@feedmepos/mf-payment 1.0.5 → 1.0.6

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 (71) hide show
  1. package/dist/{PayoutAccount-BwBgS41r.js → PayoutAccount-Bx7j4usm.js} +5 -5
  2. package/dist/{PayoutAccount-B6kGeSLY.js → PayoutAccount-D1VVUe7P.js} +3 -3
  3. package/dist/PayoutAccountSelector.vue_vue_type_script_setup_true_lang-CTO1rfpW.js +110 -0
  4. package/dist/{PayoutAccountSetting-C1yeSNv8.js → PayoutAccountSetting-CAzm0xMA.js} +4 -4
  5. package/dist/Restaurant-C1mCXDDi.js +305 -0
  6. package/dist/{RestaurantSetting-CWZAKz1A.js → RestaurantSetting-Bl4PmDhX.js} +4 -4
  7. package/dist/{Settlement-ByPXBNx1.js → Settlement-BohWN-9p.js} +3 -3
  8. package/dist/{Settlement-BKwie9R8.js → Settlement-CD6UXJon.js} +3 -3
  9. package/dist/{SettlementTransactions-BPEh0mSi.js → SettlementTransactions-BsTAhWyT.js} +4 -4
  10. package/dist/{SettlementTransactions-BGGqKJgP.js → SettlementTransactions-C96K2hX7.js} +4 -4
  11. package/dist/Terminal-BqLyl7JL.js +404 -0
  12. package/dist/{TerminalSetting-qklmRz3H.js → TerminalSetting-DA8V_6xm.js} +3 -3
  13. package/dist/TerminalTransaction-CHKkiGh-.js +819 -0
  14. package/dist/{TerminalTransaction-YXcGJ2ne.js → TerminalTransaction-CyzfSUrM.js} +184 -154
  15. package/dist/Transaction-BbPlz0Ko.js +145 -0
  16. package/dist/{Transaction-IDcY01Oi.js → Transaction-Dbo4CGwe.js} +81 -48
  17. package/dist/TransactionOld-DHoxbpV6.js +99 -0
  18. package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-DBLSJKQ4.js +151 -0
  19. package/dist/api/terminal-transaction/index.d.ts +2 -1
  20. package/dist/api/transaction/index.d.ts +8 -1
  21. package/dist/{app-CjbTCCDJ.js → app-BXz8Wn43.js} +537 -524
  22. package/dist/app.js +1 -1
  23. package/dist/{assets-DjRoCcqv.js → assets-D7z1NUL3.js} +1 -1
  24. package/dist/components/PayoutAccountSelector.vue.d.ts +23 -0
  25. package/dist/grafana-CI6OiGSa.js +46 -0
  26. package/dist/helpers/grafana.d.ts +7 -0
  27. package/dist/{index-BEFlDEyV.js → index-B1eB6TU2.js} +1 -1
  28. package/dist/{index-CWGSYCJG.js → index-BV2jqYvf.js} +1 -1
  29. package/dist/{index-DFePh4ct.js → index-BuusVr9a.js} +1 -1
  30. package/dist/{index-Dj_LwPBy.js → index-BvRX5SR2.js} +8489 -8321
  31. package/dist/{index-CKyh0nlu.js → index-Cd5mrhS-.js} +13 -9
  32. package/dist/{index-BerQZMQW.js → index-Cq1QcpFe.js} +1 -1
  33. package/dist/{index-Bp_58SiC.js → index-CsgiQM_A.js} +1 -1
  34. package/dist/{index-BWFqxSU3.js → index-DYzlBSuM.js} +1 -1
  35. package/dist/{index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js → index.vue_vue_type_script_setup_true_lang-90r_Uqco.js} +1 -1
  36. package/dist/model/transaction.d.ts +2 -0
  37. package/dist/package.json +3 -3
  38. package/dist/{payout-account-ByuqS-Ea.js → payout-account-BIyLMj5M.js} +2 -2
  39. package/dist/router/index.d.ts +1 -0
  40. package/dist/stores/payoutAccount.d.ts +4 -4
  41. package/dist/transaction-CZyySNYA.js +118 -0
  42. package/dist/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
  44. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +4 -4
  45. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
  46. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
  47. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
  48. package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +8 -8
  49. package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
  50. package/dist/views/admin/restaurant/cell/LogButton.vue.d.ts +5 -0
  51. package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +2 -2
  52. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
  53. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +8 -8
  54. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
  55. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  56. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
  57. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +8 -8
  58. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
  59. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
  60. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
  61. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +3 -1
  62. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
  63. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
  64. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  65. package/dist/views/transaction/TransactionOld.vue.d.ts +2 -0
  66. package/package.json +3 -3
  67. package/dist/Restaurant-B02jty0J.js +0 -262
  68. package/dist/Terminal-DX8v8WpM.js +0 -386
  69. package/dist/TerminalTransaction-64Bn6vh0.js +0 -261
  70. package/dist/Transaction-DMw2p-Wq.js +0 -238
  71. package/dist/transaction-Cyw84Cks.js +0 -101
@@ -1,238 +0,0 @@
1
- import { defineComponent as f, resolveComponent as N, openBlock as g, createBlock as S, normalizeClass as O, withCtx as D, createElementVNode as _, toDisplayString as V, createElementBlock as I, unref as o, ref as A, h as v, onMounted as C, watch as w, createVNode as p, isRef as E } from "vue";
2
- import { t as b, a as M } from "./transaction-Cyw84Cks.js";
3
- import { e as x, u as Y } from "./index-Dj_LwPBy.js";
4
- import "@feedmepos/ui-library";
5
- import "./dinero-CIVmXLL-.js";
6
- import { h as F } from "./moment-h96o7c8I.js";
7
- import { g as $, a as k } from "./assets-DjRoCcqv.js";
8
- import { useCoreStore as L } from "@feedmepos/mf-common";
9
- import { _ as P } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
10
- import { u as B } from "./index-BerQZMQW.js";
11
- import { _ as U } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
12
- import { _ as G } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
13
- import { _ as j } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
14
- const q = /* @__PURE__ */ f({
15
- __name: "Status",
16
- props: {
17
- row: {},
18
- data: {}
19
- },
20
- setup(s) {
21
- const a = s;
22
- function t() {
23
- return a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
24
- }
25
- return (l, c) => {
26
- const d = N("FmBadge");
27
- return g(), S(d, {
28
- inline: "",
29
- class: O(t())
30
- }, {
31
- default: D(() => [
32
- _("div", null, V(l.data), 1)
33
- ]),
34
- _: 1
35
- }, 8, ["class"]);
36
- };
37
- }
38
- }), J = ["src"], z = /* @__PURE__ */ f({
39
- __name: "Gateway",
40
- props: {
41
- row: {},
42
- data: {}
43
- },
44
- setup(s) {
45
- return (a, t) => (g(), I("img", {
46
- class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
47
- src: o($)(a.row.original.gateway)
48
- }, null, 8, J));
49
- }
50
- }), Q = ["src"], H = /* @__PURE__ */ f({
51
- __name: "Method",
52
- props: {
53
- row: {},
54
- data: {}
55
- },
56
- setup(s) {
57
- return (a, t) => (g(), I("img", {
58
- class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
59
- src: o(k)(a.row.original.method.issuer)
60
- }, null, 8, Q));
61
- }
62
- }), W = /* @__PURE__ */ f({
63
- __name: "TransactionTable",
64
- props: {
65
- data: {
66
- type: Array,
67
- required: !0
68
- },
69
- loading: {
70
- type: Boolean,
71
- required: !0
72
- }
73
- },
74
- emits: ["row-click"],
75
- setup(s, { emit: a }) {
76
- const t = s, l = a, c = A(""), d = [
77
- {
78
- header: () => "Transaction ID",
79
- accessorKey: "id"
80
- },
81
- {
82
- header: () => "Pay ID",
83
- accessorKey: "payId"
84
- },
85
- {
86
- header: () => "Gateway",
87
- accessorKey: "gateway",
88
- meta: {
89
- textAlign: "center"
90
- },
91
- cell: ({ cell: n, row: e }) => e.original.method ? v(z, { row: e, data: n.getValue() }) : ""
92
- },
93
- {
94
- header: () => "Method",
95
- accessorKey: "method",
96
- meta: {
97
- textAlign: "center"
98
- },
99
- cell: ({ cell: n, row: e }) => e.original.method ? v(H, { row: e, data: n.getValue() }) : ""
100
- },
101
- {
102
- header: () => "Type",
103
- accessorKey: "type",
104
- meta: {
105
- textAlign: "center"
106
- },
107
- cell: ({ row: n }) => {
108
- if (!n.original.method)
109
- return "";
110
- const e = n.original.method.variant;
111
- return e.includes("_ONLINE") ? "ONLINE" : e.includes("_OFFLINE") ? "OFFLINE" : e;
112
- }
113
- },
114
- {
115
- header: () => "Status",
116
- accessorKey: "status",
117
- cell: ({ cell: n, row: e }) => v(q, { row: e, data: n.getValue() })
118
- },
119
- {
120
- header: () => "Transaction At",
121
- accessorKey: "transactionAt",
122
- meta: {
123
- width: "180px"
124
- }
125
- },
126
- {
127
- header: () => "Sales Amount",
128
- accessorKey: "amount"
129
- },
130
- {
131
- header: () => "Fee",
132
- accessorKey: "fee"
133
- },
134
- {
135
- header: () => "Settlement Amount",
136
- accessorKey: "payout"
137
- }
138
- ];
139
- return (n, e) => {
140
- const h = N("FmTable");
141
- return g(), S(h, {
142
- modelValue: c.value,
143
- "onUpdate:modelValue": e[0] || (e[0] = (i) => c.value = i),
144
- "column-defs": d,
145
- "row-data": t.data,
146
- loading: t.loading,
147
- onRowClick: e[1] || (e[1] = (i) => l("row-click", t.data.at(i.index)))
148
- }, null, 8, ["modelValue", "row-data", "loading"]);
149
- };
150
- }
151
- }), X = { class: "flex justify-between mb-6 items-center" }, Z = { class: "flex space-x-8" }, ee = { class: "flex space-x-4 self-center" }, ae = { class: "mb-6" }, fe = /* @__PURE__ */ f({
152
- __name: "Transaction",
153
- setup(s) {
154
- const { dateRange: a, searchKey: t } = B({
155
- searchKey: "",
156
- dateRange: {
157
- startDate: F().startOf("day").format("YYYY-MM-DD"),
158
- endDate: F().endOf("day").format("YYYY-MM-DD")
159
- }
160
- }), { isLoading: l, startAsyncCall: c } = Y(!0), { currentRestaurant: d } = L(), n = A([]), e = A([]);
161
- async function h() {
162
- await c(async () => {
163
- const { startDate: y, endDate: r } = a.value, u = await b.readRestaurantTransactions({
164
- start: y,
165
- end: r
166
- });
167
- if (n.value = M(u), e.value = n.value, t.value > "") {
168
- var m = new RegExp(t.value, "i");
169
- e.value = n.value.filter((R) => {
170
- const K = JSON.stringify(R);
171
- return m.test(K);
172
- });
173
- }
174
- });
175
- }
176
- function i() {
177
- h();
178
- }
179
- C(i), w(d, i), w(a, h);
180
- let T;
181
- return w(t, async () => {
182
- T && clearTimeout(T), T = setTimeout(() => {
183
- var y = new RegExp(t.value, "i");
184
- e.value = n.value.filter((r) => {
185
- const u = JSON.stringify(r);
186
- return y.test(u);
187
- });
188
- }, 700);
189
- }), (y, r) => {
190
- const u = N("FmSearch");
191
- return g(), S(P, {
192
- title: "Online Transactions",
193
- description: "Transactions are purchases or payments made over the internet using electronic methods like cards or digital wallets.",
194
- loading: o(l)
195
- }, {
196
- default: D(() => [
197
- _("div", X, [
198
- _("div", Z, [
199
- p(G),
200
- p(u, {
201
- "model-value": o(t),
202
- "onUpdate:modelValue": r[0] || (r[0] = (m) => E(t) ? t.value = m : null),
203
- label: "Search",
204
- placeholder: "Search Transactions ..."
205
- }, null, 8, ["model-value"])
206
- ]),
207
- _("div", ee, [
208
- p(U, {
209
- button: {
210
- appendIcon: "file_download",
211
- variant: "primary",
212
- label: "Export"
213
- },
214
- handler: async () => {
215
- await o(b).downloadRestaurantTransactionReport(n.value);
216
- }
217
- }, null, 8, ["handler"])
218
- ])
219
- ]),
220
- _("div", ae, [
221
- p(j, {
222
- modelValue: o(a),
223
- "onUpdate:modelValue": r[1] || (r[1] = (m) => E(a) ? a.value = m : null)
224
- }, null, 8, ["modelValue"])
225
- ]),
226
- p(W, {
227
- loading: o(l),
228
- data: e.value
229
- }, null, 8, ["loading", "data"])
230
- ]),
231
- _: 1
232
- }, 8, ["loading"]);
233
- };
234
- }
235
- });
236
- export {
237
- fe as default
238
- };
@@ -1,101 +0,0 @@
1
- import { g as a, b as n, r as o, l as i, i as c } from "./index-Dj_LwPBy.js";
2
- import { h as e } from "./moment-h96o7c8I.js";
3
- import { d as s } from "./dinero-CIVmXLL-.js";
4
- const f = {
5
- async readBySettlementId(t) {
6
- return a(
7
- await n().get(
8
- `/transactions/settlements/${t}`
9
- )
10
- );
11
- },
12
- async readTransactions(t) {
13
- return a(
14
- await n().get("/transactions", {
15
- params: {
16
- search: t.search,
17
- skip: t.skip,
18
- limit: t.limit,
19
- start: e(t.start).startOf("day").toISOString(),
20
- end: e(t.end).endOf("day").toISOString()
21
- }
22
- })
23
- );
24
- },
25
- async removeTransactionFromSettlement(t) {
26
- return a(
27
- await n().delete(`/settlements/${t}`)
28
- );
29
- },
30
- async refetchTransaction({
31
- transactionId: t
32
- }) {
33
- return a(
34
- await n().get(`/transactions/refetch/${t}`)
35
- );
36
- },
37
- async refundTransaction(t) {
38
- return a(await n().post("/payments/refund", t));
39
- },
40
- async renotifyTransaction(t) {
41
- return a(
42
- await n().post("/payments/re-notify", { transactionId: t })
43
- );
44
- },
45
- async readRestaurantTransactions(t) {
46
- return a(
47
- await o().get("/transactions", {
48
- params: {
49
- v2: !0,
50
- start: e(t.start).startOf("day").toISOString(),
51
- end: e(t.end).endOf("day").toISOString()
52
- }
53
- })
54
- );
55
- },
56
- async readRestaurantTransactionsBySettlementId(t) {
57
- return a(
58
- await o().get(
59
- `/transactions/settlements/${t}`
60
- )
61
- );
62
- },
63
- async downloadRestaurantTransactionReport(t) {
64
- return i(t, {
65
- filename: "transaction-report.xlsx",
66
- transformers: {
67
- method: (r) => (r == null ? void 0 : r.issuer) ?? ""
68
- }
69
- });
70
- },
71
- async downloadTransactionReport(t) {
72
- return c(
73
- await n().get("/transactions/report", {
74
- params: t
75
- }),
76
- `transaction-report-${t.start}-${t.end}.xlsx`
77
- );
78
- }
79
- };
80
- function d(t) {
81
- return {
82
- id: t._id,
83
- payId: t.payId,
84
- method: t.method,
85
- gateway: t.gateway,
86
- status: t.status,
87
- transactionAt: e(t.createdAt).format("YYYY-MM-DD hh:mm:ss"),
88
- fdoAmount: t.amount,
89
- amount: s(t.amount).toFormat("$0.00"),
90
- fee: s(t.fee).toFormat("$0.00"),
91
- payout: s(t.payout).toFormat("$0.00")
92
- };
93
- }
94
- function p(t) {
95
- return t.map(d);
96
- }
97
- export {
98
- p as a,
99
- d as b,
100
- f as t
101
- };