@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
@@ -1,149 +0,0 @@
1
- import { defineComponent as w, ref as D, computed as R, resolveComponent as h, openBlock as v, createBlock as S, h as Y, onMounted as A, watch as k, unref as n, withCtx as F, createElementVNode as p, createVNode as i, isRef as V } from "vue";
2
- import { u as C } from "./index-CWaKb7bG.js";
3
- import { h as _ } from "./moment-h96o7c8I.js";
4
- import { useCoreStore as $ } from "@feedmepos/mf-common";
5
- import { _ as b } 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 M } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
10
- import { useRouter as K } from "vue-router";
11
- import { u as P } from "./index-7KNaibcq.js";
12
- import { _ as B } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
- import { _ as I } 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 = D(""), c = [
29
- {
30
- header: () => "Settlement ID",
31
- accessorKey: "id",
32
- cell: ({ cell: t }) => Y(M, { 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 = R(() => 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(), S(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
- }), T = { class: "flex justify-between items-center mb-6" }, q = { class: "flex space-x-8 items-center" }, E = { class: "flex space-x-4 items-center" }, te = /* @__PURE__ */ w({
73
- __name: "Settlement",
74
- setup(y) {
75
- const d = K(), { dateRange: e } = P({
76
- dateRange: {
77
- startDate: _().startOf("day").format("YYYY-MM-DD"),
78
- endDate: _().endOf("day").format("YYYY-MM-DD")
79
- }
80
- }), { isLoading: r, startAsyncCall: s } = C(!0), { currentRestaurant: c } = $(), l = D([]);
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 A(o), k(c, o), (m, a) => {
96
- const x = h("FmSimpleDateRangePicker");
97
- return v(), S(b, {
98
- title: "Settlements",
99
- description: "Settlements are the finalization of financial transactions, transferring funds to complete payments.",
100
- loading: n(r)
101
- }, {
102
- default: F(() => [
103
- p("div", T, [
104
- p("div", q, [
105
- i(I),
106
- i(x, {
107
- modelValue: n(e),
108
- "onUpdate:modelValue": [
109
- a[0] || (a[0] = (u) => V(e) ? e.value = u : null),
110
- t
111
- ],
112
- "show-predefined-range": ""
113
- }, null, 8, ["modelValue"])
114
- ]),
115
- p("div", E, [
116
- i(B, {
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
- };
@@ -1,239 +0,0 @@
1
- import { defineComponent as _, resolveComponent as T, openBlock as f, createBlock as N, normalizeClass as O, withCtx as b, createElementVNode as y, toDisplayString as V, createElementBlock as I, unref as o, ref as S, h as x, onMounted as k, watch as E, createVNode as p, isRef as F } from "vue";
2
- import { t as D, a as C } from "./transaction-BTf6KnZV.js";
3
- import { e as A, u as M } from "./index-CWaKb7bG.js";
4
- import "@feedmepos/ui-library";
5
- import "./dinero-CIVmXLL-.js";
6
- import { h as R } from "./moment-h96o7c8I.js";
7
- import { g as Y, a as P } from "./assets-NrCec-W0.js";
8
- import { useCoreStore as $ } from "@feedmepos/mf-common";
9
- import { _ as L } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
10
- import { u as B } from "./index-7KNaibcq.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
- const q = /* @__PURE__ */ _({
14
- __name: "Status",
15
- props: {
16
- row: {},
17
- data: {}
18
- },
19
- setup(s) {
20
- const n = s;
21
- function a() {
22
- return n.data === A.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : n.data === A.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : n.data === A.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
23
- }
24
- return (l, c) => {
25
- const d = T("FmBadge");
26
- return f(), N(d, {
27
- inline: "",
28
- class: O(a())
29
- }, {
30
- default: b(() => [
31
- y("div", null, V(l.data), 1)
32
- ]),
33
- _: 1
34
- }, 8, ["class"]);
35
- };
36
- }
37
- }), J = ["src"], j = /* @__PURE__ */ _({
38
- __name: "Gateway",
39
- props: {
40
- row: {},
41
- data: {}
42
- },
43
- setup(s) {
44
- return (n, a) => (f(), I("img", {
45
- class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
46
- src: o(Y)(n.row.original.gateway)
47
- }, null, 8, J));
48
- }
49
- }), z = ["src"], Q = /* @__PURE__ */ _({
50
- __name: "Method",
51
- props: {
52
- row: {},
53
- data: {}
54
- },
55
- setup(s) {
56
- return (n, a) => (f(), I("img", {
57
- class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
58
- src: o(P)(n.row.original.method.issuer)
59
- }, null, 8, z));
60
- }
61
- }), H = /* @__PURE__ */ _({
62
- __name: "TransactionTable",
63
- props: {
64
- data: {
65
- type: Array,
66
- required: !0
67
- },
68
- loading: {
69
- type: Boolean,
70
- required: !0
71
- }
72
- },
73
- emits: ["row-click"],
74
- setup(s, { emit: n }) {
75
- const a = s, l = n, c = S(""), d = [
76
- {
77
- header: () => "Transaction ID",
78
- accessorKey: "id"
79
- },
80
- {
81
- header: () => "Pay ID",
82
- accessorKey: "payId"
83
- },
84
- {
85
- header: () => "Gateway",
86
- accessorKey: "gateway",
87
- meta: {
88
- textAlign: "center"
89
- },
90
- cell: ({ cell: t, row: e }) => e.original.method ? x(j, { row: e, data: t.getValue() }) : ""
91
- },
92
- {
93
- header: () => "Method",
94
- accessorKey: "method",
95
- meta: {
96
- textAlign: "center"
97
- },
98
- cell: ({ cell: t, row: e }) => e.original.method ? x(Q, { row: e, data: t.getValue() }) : ""
99
- },
100
- {
101
- header: () => "Type",
102
- accessorKey: "type",
103
- meta: {
104
- textAlign: "center"
105
- },
106
- cell: ({ row: t }) => {
107
- if (!t.original.method)
108
- return "";
109
- const e = t.original.method.variant;
110
- return e.includes("_ONLINE") ? "ONLINE" : e.includes("_OFFLINE") ? "OFFLINE" : e;
111
- }
112
- },
113
- {
114
- header: () => "Status",
115
- accessorKey: "status",
116
- cell: ({ cell: t, row: e }) => x(q, { row: e, data: t.getValue() })
117
- },
118
- {
119
- header: () => "Transaction At",
120
- accessorKey: "transactionAt",
121
- meta: {
122
- width: "180px"
123
- }
124
- },
125
- {
126
- header: () => "Sales Amount",
127
- accessorKey: "amount"
128
- },
129
- {
130
- header: () => "Fee",
131
- accessorKey: "fee"
132
- },
133
- {
134
- header: () => "Settlement Amount",
135
- accessorKey: "payout"
136
- }
137
- ];
138
- return (t, e) => {
139
- const g = T("FmTable");
140
- return f(), N(g, {
141
- modelValue: c.value,
142
- "onUpdate:modelValue": e[0] || (e[0] = (i) => c.value = i),
143
- "column-defs": d,
144
- "row-data": a.data,
145
- loading: a.loading,
146
- onRowClick: e[1] || (e[1] = (i) => l("row-click", a.data.at(i.index)))
147
- }, null, 8, ["modelValue", "row-data", "loading"]);
148
- };
149
- }
150
- }), W = { class: "flex justify-between mb-6 items-center" }, X = { class: "flex space-x-8" }, Z = { class: "flex space-x-4" }, me = /* @__PURE__ */ _({
151
- __name: "Transaction",
152
- setup(s) {
153
- const { dateRange: n, searchKey: a } = B({
154
- searchKey: "",
155
- dateRange: {
156
- startDate: R().startOf("day").format("YYYY-MM-DD"),
157
- endDate: R().endOf("day").format("YYYY-MM-DD")
158
- }
159
- }), { isLoading: l, startAsyncCall: c } = M(!0), { currentRestaurant: d } = $(), t = S([]), e = S([]);
160
- async function g() {
161
- await c(async () => {
162
- const { startDate: h, endDate: r } = n.value, u = await D.readRestaurantTransactions({
163
- start: h,
164
- end: r
165
- });
166
- if (t.value = C(u), e.value = t.value, a.value > "") {
167
- var v = new RegExp(a.value, "i");
168
- e.value = t.value.filter((m) => {
169
- const K = JSON.stringify(m);
170
- return v.test(K);
171
- });
172
- }
173
- });
174
- }
175
- function i() {
176
- g();
177
- }
178
- k(i), E(d, i);
179
- let w;
180
- return E(a, async () => {
181
- w && clearTimeout(w), w = setTimeout(() => {
182
- var h = new RegExp(a.value, "i");
183
- e.value = t.value.filter((r) => {
184
- const u = JSON.stringify(r);
185
- return h.test(u);
186
- });
187
- }, 700);
188
- }), (h, r) => {
189
- const u = T("FmSearch"), v = T("FmSimpleDateRangePicker");
190
- return f(), N(L, {
191
- title: "Online Transactions",
192
- description: "Transactions are purchases or payments made over the internet using electronic methods like cards or digital wallets.",
193
- loading: o(l)
194
- }, {
195
- default: b(() => [
196
- y("div", W, [
197
- y("div", X, [
198
- p(G),
199
- p(u, {
200
- "model-value": o(a),
201
- "onUpdate:modelValue": r[0] || (r[0] = (m) => F(a) ? a.value = m : null),
202
- label: "Search",
203
- placeholder: "Search Transactions ..."
204
- }, null, 8, ["model-value"]),
205
- p(v, {
206
- modelValue: o(n),
207
- "onUpdate:modelValue": [
208
- r[1] || (r[1] = (m) => F(n) ? n.value = m : null),
209
- g
210
- ],
211
- "show-predefined-range": ""
212
- }, null, 8, ["modelValue"])
213
- ]),
214
- y("div", Z, [
215
- p(U, {
216
- button: {
217
- appendIcon: "file_download",
218
- variant: "primary",
219
- label: "Export"
220
- },
221
- handler: async () => {
222
- await o(D).downloadRestaurantTransactionReport(t.value);
223
- }
224
- }, null, 8, ["handler"])
225
- ])
226
- ]),
227
- p(H, {
228
- loading: o(l),
229
- data: e.value
230
- }, null, 8, ["loading", "data"])
231
- ]),
232
- _: 1
233
- }, 8, ["loading"]);
234
- };
235
- }
236
- });
237
- export {
238
- me as default
239
- };