@feedmepos/mf-payment 1.3.22 → 1.4.1

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 (26) hide show
  1. package/dist/Actions.vue_vue_type_script_setup_true_lang-B9x3HkUm.js +144 -0
  2. package/dist/{OnboardForm-BfGzCNlT.js → OnboardForm-CxRRT1rW.js} +2 -2
  3. package/dist/{OnboardForm-BMWpQjDs.js → OnboardForm-DMSxvjjH.js} +2 -2
  4. package/dist/{OnboardSubmission-DoPx4EKf.js → OnboardSubmission-B0tK0WB5.js} +1 -1
  5. package/dist/{OnboardSubmission-DwiFc9f5.js → OnboardSubmission-D7G55TdE.js} +1 -1
  6. package/dist/{PayoutAccount-CHbzkDBA.js → PayoutAccount-Dq_vnhiW.js} +1 -1
  7. package/dist/{PayoutAccount-Dy5K6CkB.js → PayoutAccount-Z2dgsREV.js} +3 -3
  8. package/dist/{Settlement-L8ukHWPs.js → Settlement-DW_ElmEK.js} +1 -2
  9. package/dist/{SettlementTransactions-C8o5Atmc.js → SettlementTransactions-CQ0hG5oX.js} +1 -1
  10. package/dist/{SettlementTransactions-DG9nJuLQ.js → SettlementTransactions-DAKnMkcC.js} +1 -1
  11. package/dist/Transaction-BAI8L2Xw.js +409 -0
  12. package/dist/{Transaction-CfC0yN9P.js → Transaction-BamKY4nZ.js} +1 -1
  13. package/dist/TransactionOld-7D5xC-0Y.js +309 -0
  14. package/dist/api/transaction/index.d.ts +4 -2
  15. package/dist/{app-PoLMBr_V.js → app-Tr3kI1Wp.js} +12 -12
  16. package/dist/app.js +1 -1
  17. package/dist/{assets-D4ayW3GC.js → assets-D5-bgB4H.js} +61 -59
  18. package/dist/{index-DD6Cz4Kr.js → index-DtJpO9_s.js} +1 -1
  19. package/dist/package.json +1 -1
  20. package/dist/{payout-account-CadaCGj0.js → payout-account-DLPHO8by.js} +2 -2
  21. package/dist/{plugins-YHHXs8VO.js → plugins-BdnYXXEh.js} +1 -1
  22. package/dist/tsconfig.app.tsbuildinfo +1 -1
  23. package/package.json +1 -1
  24. package/dist/Transaction-fhDUanwr.js +0 -250
  25. package/dist/TransactionOld-CObh3uJa.js +0 -99
  26. package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-DPRIp0wx.js +0 -351
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "1.3.22",
3
+ "version": "1.4.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,250 +0,0 @@
1
- import { defineComponent as B, ref as E, watch as g, computed as I, onMounted as J, resolveComponent as b, openBlock as v, createElementBlock as P, Fragment as Y, unref as t, createBlock as N, createCommentVNode as O, withCtx as T, createVNode as i, renderList as k, createElementVNode as V, isRef as _ } from "vue";
2
- import { t as L, b as G } from "./assets-D4ayW3GC.js";
3
- import { u as K, p as C } from "./index-C4FfKmPS.js";
4
- import { _ as Q } from "./TransactionTable.vue_vue_type_script_setup_true_lang-DPRIp0wx.js";
5
- import { h as $ } from "./moment-h96o7c8I.js";
6
- import { useI18n as j, useCoreStore as q } from "@feedmepos/mf-common";
7
- import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
8
- import { u as W } from "./index-ILoz50zh.js";
9
- import { _ as X } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
10
- import { _ as Z } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
11
- import { _ as ee } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
12
- import { p as te } from "./index-BWjmOoX3.js";
13
- import { t as ae } from "./index-C8G7ruiF.js";
14
- const ne = /* @__PURE__ */ B({
15
- __name: "SourceSelector",
16
- props: {
17
- id: {},
18
- by: {}
19
- },
20
- emits: ["update:id", "update:by"],
21
- setup(z, { emit: x }) {
22
- const F = x, { t: f } = j(), { restaurants: s, currentBusiness: m, readRestaurants: r } = q(), { isLoading: l, startAsyncCall: c } = K(!0), p = E([]), u = E([]), a = E();
23
- g(a, () => {
24
- a.value && (F("update:id", a.value.value), F("update:by", a.value.by));
25
- });
26
- const h = I(() => [
27
- s.value.length > 0 && "payment.components.restaurant",
28
- u.value.length > 0 && "payment.components.device",
29
- p.value.length > 0 && "payment.components.payout_account"
30
- ].filter((e) => !!e)), w = I(() => ({
31
- "payment.components.restaurant": s.value.filter((e) => e.managable).map((e) => ({
32
- by: "RESTAURANT",
33
- prefix: f("payment.components.restaurant"),
34
- label: e.profile.name,
35
- value: e._id
36
- })),
37
- "payment.components.device": u.value.filter((e) => e.deviceType).map((e) => ({
38
- by: "DEVICE",
39
- prefix: f("payment.components.device"),
40
- label: e.deviceType + " | " + (e.deviceType === "TERMINAL" ? e.name : e.restaurant.profile.name),
41
- value: e._id
42
- })),
43
- "payment.components.payout_account": p.value.filter((e) => e.store.event).map((e) => {
44
- var o, d;
45
- return {
46
- by: "PAYOUT_ACCOUNT",
47
- prefix: f("payment.components.payout_account"),
48
- label: e.store.event + " | " + (((d = (o = e.ref) == null ? void 0 : o.profile) == null ? void 0 : d.name) ?? e.ref.name),
49
- value: e._id
50
- };
51
- })
52
- }));
53
- async function A() {
54
- return c(async () => {
55
- let e = await te.readBusinessPayoutAccounts();
56
- e.length !== 0 && (p.value = e);
57
- });
58
- }
59
- async function R() {
60
- return c(async () => {
61
- let e = await ae.getBusinessTerminals();
62
- e.length !== 0 && (u.value = e);
63
- });
64
- }
65
- async function y() {
66
- l.value = !0, await A(), await r(), await R(), l.value = !1;
67
- }
68
- return J(y), g(m, y), (e, o) => {
69
- const d = b("FmCircularProgress"), n = b("FmChip"), U = b("FmMenuItem"), D = b("FmMenu");
70
- return v(), P(Y, null, [
71
- t(l) ? (v(), N(d, {
72
- key: 0,
73
- size: "md"
74
- })) : O("", !0),
75
- t(l) ? O("", !0) : (v(), N(D, { key: 1 }, {
76
- "menu-button": T(() => {
77
- var S;
78
- return [
79
- i(n, {
80
- icon: "account_box",
81
- label: a.value ? a.value.prefix + " > " + ((S = a.value) == null ? void 0 : S.label) : t(f)("payment.components.select"),
82
- removable: !!a.value,
83
- onChipClosed: o[0] || (o[0] = (M) => a.value = void 0)
84
- }, null, 8, ["label", "removable"])
85
- ];
86
- }),
87
- default: T(() => [
88
- (v(!0), P(Y, null, k(h.value, (S) => (v(), N(D, {
89
- placement: "right-start",
90
- width: 200
91
- }, {
92
- "menu-button": T(() => [
93
- i(U, {
94
- label: t(f)(S),
95
- expandable: ""
96
- }, null, 8, ["label"])
97
- ]),
98
- default: T(() => [
99
- (v(!0), P(Y, null, k(w.value[S], (M) => (v(), N(U, {
100
- onClick: (ue) => a.value = M,
101
- key: M.value,
102
- label: M.label,
103
- selectable: ""
104
- }, null, 8, ["onClick", "label"]))), 128))
105
- ]),
106
- _: 2
107
- }, 1024))), 256))
108
- ]),
109
- _: 1
110
- }))
111
- ], 64);
112
- };
113
- }
114
- }), le = { class: "flex justify-between mb-6 items-center" }, oe = { class: "flex space-x-8 items-start" }, se = { class: "flex space-x-4 self-center" }, re = { class: "flex space-x-12 mb-6" }, Ce = /* @__PURE__ */ B({
115
- __name: "Transaction",
116
- setup(z) {
117
- const { isLoading: x, startAsyncCall: F } = K(!0), { currentBusiness: f } = q(), { t: s } = j(), { dateRange: m, searchKey: r, status: l, id: c, by: p } = W({
118
- by: "",
119
- id: "",
120
- searchKey: "",
121
- status: [C.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
122
- dateRange: {
123
- startDate: $().startOf("day").format("YYYY-MM-DD"),
124
- endDate: $().endOf("day").format("YYYY-MM-DD")
125
- }
126
- }), u = E([]), a = E([]);
127
- async function h() {
128
- await F(async () => {
129
- const { startDate: y, endDate: e } = m.value, o = await L.readTransactionsV2({
130
- status: l.value,
131
- id: c.value,
132
- by: p.value,
133
- start: y,
134
- end: e
135
- });
136
- if (u.value = G(o), a.value = u.value, r.value > "") {
137
- var d = new RegExp(r.value, "i");
138
- a.value = u.value.filter((n) => {
139
- const U = JSON.stringify(n);
140
- return d.test(U);
141
- });
142
- }
143
- });
144
- }
145
- function w() {
146
- h();
147
- }
148
- J(w), g(f, w), g([c, m, l], h);
149
- let A;
150
- g(r, async () => {
151
- A && clearTimeout(A), A = setTimeout(() => {
152
- var y = new RegExp(r.value, "i");
153
- a.value = u.value.filter((e) => {
154
- const o = JSON.stringify(e);
155
- return y.test(o);
156
- });
157
- }, 700);
158
- });
159
- const R = [
160
- {
161
- label: "Success",
162
- value: C.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
163
- },
164
- {
165
- label: "Refunded",
166
- value: C.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
167
- },
168
- {
169
- label: "Process",
170
- value: C.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
171
- },
172
- {
173
- label: "Failed",
174
- value: C.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
175
- }
176
- ];
177
- return (y, e) => {
178
- const o = b("FmSearch"), d = b("FmSelect");
179
- return v(), N(H, {
180
- title: t(s)("payment.transactions.title"),
181
- description: t(s)("payment.transactions.description"),
182
- loading: !1
183
- }, {
184
- default: T(() => [
185
- V("div", le, [
186
- V("div", oe, [
187
- i(o, {
188
- "model-value": t(r),
189
- "onUpdate:modelValue": e[0] || (e[0] = (n) => _(r) ? r.value = n : null),
190
- class: "mr-8",
191
- label: t(s)("payment.transactions.search.title"),
192
- placeholder: t(s)("payment.transactions.search.placeholder")
193
- }, null, 8, ["model-value", "label", "placeholder"]),
194
- i(d, {
195
- modelValue: t(l),
196
- "onUpdate:modelValue": e[2] || (e[2] = (n) => _(l) ? l.value = n : null),
197
- class: "mr-6 w-[300px]",
198
- label: t(s)("payment.transactions.status"),
199
- "label-mark": "required",
200
- multiselect: "",
201
- items: R
202
- }, {
203
- "prepend-menu": T(() => [
204
- i(Z, {
205
- modelValue: t(l),
206
- "onUpdate:modelValue": e[1] || (e[1] = (n) => _(l) ? l.value = n : null),
207
- items: R
208
- }, null, 8, ["modelValue"])
209
- ]),
210
- _: 1
211
- }, 8, ["modelValue", "label"])
212
- ]),
213
- V("div", se, [
214
- i(X, {
215
- button: {
216
- appendIcon: "file_download",
217
- variant: "primary",
218
- label: t(s)("payment.transactions.button.export")
219
- },
220
- handler: async () => {
221
- await t(L).downloadPortalTransactionReport(t(m), u.value);
222
- }
223
- }, null, 8, ["button", "handler"])
224
- ])
225
- ]),
226
- V("div", re, [
227
- i(ne, {
228
- id: t(c),
229
- "onUpdate:id": e[3] || (e[3] = (n) => _(c) ? c.value = n : null),
230
- by: t(p),
231
- "onUpdate:by": e[4] || (e[4] = (n) => _(p) ? p.value = n : null)
232
- }, null, 8, ["id", "by"]),
233
- i(ee, {
234
- modelValue: t(m),
235
- "onUpdate:modelValue": e[5] || (e[5] = (n) => _(m) ? m.value = n : null)
236
- }, null, 8, ["modelValue"])
237
- ]),
238
- i(Q, {
239
- loading: t(x),
240
- data: a.value
241
- }, null, 8, ["loading", "data"])
242
- ]),
243
- _: 1
244
- }, 8, ["title", "description"]);
245
- };
246
- }
247
- });
248
- export {
249
- Ce as default
250
- };
@@ -1,99 +0,0 @@
1
- import { defineComponent as T, ref as y, onMounted as Y, watch as f, resolveComponent as V, openBlock as C, createBlock as M, unref as t, withCtx as O, createElementVNode as u, createVNode as i, isRef as h } from "vue";
2
- import { t as g, b as S } from "./assets-D4ayW3GC.js";
3
- import { u as $ } from "./index-C4FfKmPS.js";
4
- import { _ as N } from "./TransactionTable.vue_vue_type_script_setup_true_lang-DPRIp0wx.js";
5
- import { h as x } from "./moment-h96o7c8I.js";
6
- import { useCoreStore as k, useI18n as E } from "@feedmepos/mf-common";
7
- import { _ as L } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
8
- import { u as P } from "./index-ILoz50zh.js";
9
- import { _ as A } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
10
- import { _ as B } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DyLnqQYe.js";
11
- import { _ as F } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
12
- const I = { class: "flex justify-between mb-6 items-center" }, J = { class: "flex space-x-8" }, K = { class: "flex space-x-4 self-center" }, U = { class: "mb-6" }, nt = /* @__PURE__ */ T({
13
- __name: "TransactionOld",
14
- setup(j) {
15
- const { dateRange: n, searchKey: a } = P({
16
- searchKey: "",
17
- dateRange: {
18
- startDate: x().startOf("day").format("YYYY-MM-DD"),
19
- endDate: x().endOf("day").format("YYYY-MM-DD")
20
- }
21
- }), { isLoading: p, startAsyncCall: b } = $(!0), { currentRestaurant: w } = k(), { t: o } = E(), s = y([]), c = y([]);
22
- async function _() {
23
- await b(async () => {
24
- const { startDate: d, endDate: e } = n.value, r = await g.readRestaurantTransactions({
25
- start: d,
26
- end: e
27
- });
28
- if (s.value = S(r), c.value = s.value, a.value > "") {
29
- var l = new RegExp(a.value, "i");
30
- c.value = s.value.filter((D) => {
31
- const R = JSON.stringify(D);
32
- return l.test(R);
33
- });
34
- }
35
- });
36
- }
37
- function v() {
38
- _();
39
- }
40
- Y(v), f(w, v), f(n, _);
41
- let m;
42
- return f(a, async () => {
43
- m && clearTimeout(m), m = setTimeout(() => {
44
- var d = new RegExp(a.value, "i");
45
- c.value = s.value.filter((e) => {
46
- const r = JSON.stringify(e);
47
- return d.test(r);
48
- });
49
- }, 700);
50
- }), (d, e) => {
51
- const r = V("FmSearch");
52
- return C(), M(L, {
53
- title: t(o)("payment.transactions.title"),
54
- description: t(o)("payment.transactions.description"),
55
- loading: t(p)
56
- }, {
57
- default: O(() => [
58
- u("div", I, [
59
- u("div", J, [
60
- i(B),
61
- i(r, {
62
- "model-value": t(a),
63
- "onUpdate:modelValue": e[0] || (e[0] = (l) => h(a) ? a.value = l : null),
64
- label: t(o)("payment.transactions.search.title"),
65
- placeholder: t(o)("payment.transactions.search.placeholder")
66
- }, null, 8, ["model-value", "label", "placeholder"])
67
- ]),
68
- u("div", K, [
69
- i(A, {
70
- button: {
71
- appendIcon: "file_download",
72
- variant: "primary",
73
- label: t(o)("payment.transactions.button.export")
74
- },
75
- handler: async () => {
76
- await t(g).downloadPortalTransactionReport(t(n), s.value, !0);
77
- }
78
- }, null, 8, ["button", "handler"])
79
- ])
80
- ]),
81
- u("div", U, [
82
- i(F, {
83
- modelValue: t(n),
84
- "onUpdate:modelValue": e[1] || (e[1] = (l) => h(n) ? n.value = l : null)
85
- }, null, 8, ["modelValue"])
86
- ]),
87
- i(N, {
88
- loading: t(p),
89
- data: c.value
90
- }, null, 8, ["loading", "data"])
91
- ]),
92
- _: 1
93
- }, 8, ["title", "description", "loading"]);
94
- };
95
- }
96
- });
97
- export {
98
- nt as default
99
- };