@feedmepos/mf-payment 1.0.0-beta.5 → 1.0.0-beta.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/README.md +1 -1
  2. package/dist/DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js +31 -0
  3. package/dist/PDFViewer-xrBtzrlR.js +22426 -0
  4. package/dist/{PayoutAccount-V74CPAJr.js → PayoutAccount-CagbOYmv.js} +5 -5
  5. package/dist/{PayoutAccount-DZg-xSKt.js → PayoutAccount-CkDd9qfH.js} +4 -4
  6. package/dist/{PayoutAccountSetting-kUQLeAcb.js → PayoutAccountSetting-CmgVLhdp.js} +4 -4
  7. package/dist/{Settlement-CHwtH6hm.js → Settlement-B1-WmCwC.js} +41 -42
  8. package/dist/Settlement-BSOQRlp1.js +145 -0
  9. package/dist/{SettlementTransactions-C281649y.js → SettlementTransactions-Cqd2raea.js} +4 -4
  10. package/dist/{SettlementTransactions-CBohm3KC.js → SettlementTransactions-JTwD_Vuq.js} +4 -4
  11. package/dist/{Terminal-gxGnjFGc.js → Terminal-DvlTwA6V.js} +4 -4
  12. package/dist/{TerminalSetting--ZAJJ_Hf.js → TerminalSetting-7VBm1RRK.js} +3 -3
  13. package/dist/{TerminalTransaction-DdESjZJo.js → TerminalTransaction-C1egvX6I.js} +112 -110
  14. package/dist/{TerminalTransaction-CfCURihE.js → TerminalTransaction-CZCsCpEp.js} +77 -75
  15. package/dist/{Transaction-BbGbcDvk.js → Transaction-B3ZWKg6Q.js} +114 -115
  16. package/dist/Transaction-B_0nUmpf.js +238 -0
  17. package/dist/{app-9P8d2JCE.js → app-CLnEntGO.js} +179 -179
  18. package/dist/app.js +1 -1
  19. package/dist/{assets-NrCec-W0.js → assets-BCAivOTo.js} +1 -1
  20. package/dist/components/AdminLayout.vue.d.ts +8 -13
  21. package/dist/components/AutoCopyCell.vue.d.ts +3 -4
  22. package/dist/components/DateRangePicker.vue.d.ts +13 -0
  23. package/dist/components/Layout.vue.d.ts +8 -13
  24. package/dist/components/PDFViewer.vue.d.ts +1 -1
  25. package/dist/components/RouteCell.vue.d.ts +5 -6
  26. package/dist/components/SelectAll.vue.d.ts +2 -2
  27. package/dist/{index-CWaKb7bG.js → index-4meiCsRz.js} +1566 -1556
  28. package/dist/{index-BwcJZFsi.js → index-BFYq3eq8.js} +1 -1
  29. package/dist/{index-7KNaibcq.js → index-BwFHcZlm.js} +1 -1
  30. package/dist/{index-BWUtjGg7.js → index-CBa6eapm.js} +1 -1
  31. package/dist/{index-CojhNtuG.js → index-CETCXB6X.js} +1 -1
  32. package/dist/{index-DbJpbpSs.js → index-CbsnpMWl.js} +1 -1
  33. package/dist/{index.vue_vue_type_script_setup_true_lang-JdAFa8vy.js → index.vue_vue_type_script_setup_true_lang-CKOlikHb.js} +1 -1
  34. package/dist/package.json +1 -1
  35. package/dist/{payout-account-DI0q_Sig.js → payout-account-4O7cL-1_.js} +2 -2
  36. package/dist/{transaction-BTf6KnZV.js → transaction-COjHU7aN.js} +3 -3
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/views/admin/payout-account/cell/Bank.vue.d.ts +3 -5
  39. package/dist/views/admin/payout-account/cell/IsActive.vue.d.ts +3 -5
  40. package/dist/views/admin/payout-account/cell/PersonInCharge.vue.d.ts +3 -5
  41. package/dist/views/admin/payout-account/cell/RateInput.vue.d.ts +3 -5
  42. package/dist/views/admin/payout-account/cell/Status.vue.d.ts +3 -5
  43. package/dist/views/admin/payout-account/cell/TPlusInput.vue.d.ts +3 -5
  44. package/dist/views/admin/settlement/cell/Actions.vue.d.ts +4 -6
  45. package/dist/views/admin/settlement/cell/Gateway.vue.d.ts +3 -5
  46. package/dist/views/admin/settlement/cell/Method.vue.d.ts +3 -5
  47. package/dist/views/admin/settlement/cell/Status.vue.d.ts +3 -5
  48. package/dist/views/admin/terminal/TerminalBindCodeDialog.vue.d.ts +1 -1
  49. package/dist/views/admin/terminal/cell/Actions.vue.d.ts +7 -79
  50. package/dist/views/admin/terminal/cell/ID.vue.d.ts +3 -5
  51. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +3 -4
  52. package/dist/views/admin/terminal-transaction/cell/Gateway.vue.d.ts +3 -5
  53. package/dist/views/admin/terminal-transaction/cell/Status.vue.d.ts +3 -5
  54. package/dist/views/admin/terminal-transaction/cell/Timestamp.vue.d.ts +3 -6
  55. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +3 -4
  56. package/dist/views/admin/transaction/cell/Gateway.vue.d.ts +3 -5
  57. package/dist/views/admin/transaction/cell/Method.vue.d.ts +3 -5
  58. package/dist/views/admin/transaction/cell/Status.vue.d.ts +3 -5
  59. package/dist/views/payout-account/cell/Bank.vue.d.ts +3 -5
  60. package/dist/views/payout-account/cell/IsActive.vue.d.ts +3 -5
  61. package/dist/views/payout-account/cell/PersonInCharge.vue.d.ts +3 -5
  62. package/dist/views/payout-account/cell/Status.vue.d.ts +3 -5
  63. package/dist/views/settlement/cell/Actions.vue.d.ts +4 -6
  64. package/dist/views/settlement/cell/Gateway.vue.d.ts +3 -5
  65. package/dist/views/settlement/cell/Method.vue.d.ts +3 -5
  66. package/dist/views/settlement/cell/Status.vue.d.ts +3 -5
  67. package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +3 -5
  68. package/dist/views/terminal-transaction/cell/Status.vue.d.ts +3 -5
  69. package/dist/views/transaction/cell/Gateway.vue.d.ts +3 -5
  70. package/dist/views/transaction/cell/Method.vue.d.ts +3 -5
  71. package/dist/views/transaction/cell/Status.vue.d.ts +3 -5
  72. package/package.json +1 -1
  73. package/dist/PDFViewer-CjH_C1uT.js +0 -21792
  74. package/dist/Settlement-C49oMOGR.js +0 -149
  75. package/dist/Transaction-BEls8K8W.js +0 -239
@@ -0,0 +1,238 @@
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, b as M } from "./transaction-COjHU7aN.js";
3
+ import { e as x, u as Y } from "./index-4meiCsRz.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-BCAivOTo.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-BwFHcZlm.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 q } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
14
+ const J = /* @__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 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(J, { 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(q, {
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
+ };