@feedmepos/mf-payment 1.0.0-beta.2 → 1.0.0-beta.4
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.
- package/dist/{PayoutAccount-ip4hKBE0.js → PayoutAccount-5-rCbHbF.js} +1 -1
- package/dist/{PayoutAccount-Ce_7sGf-.js → PayoutAccount-BJJ26W9b.js} +1 -1
- package/dist/{Settlement-Crdfq22j.js → Settlement-C49oMOGR.js} +29 -29
- package/dist/{Settlement-JHOJNkhd.js → Settlement-CHwtH6hm.js} +27 -27
- package/dist/{SettlementTransactions-BxuLXUR-.js → SettlementTransactions-B17SVmmg.js} +1 -1
- package/dist/{SettlementTransactions-daWMAmtz.js → SettlementTransactions-C_4u7wU1.js} +1 -1
- package/dist/{TerminalTransaction-CCfrLWpi.js → TerminalTransaction-CfCURihE.js} +35 -35
- package/dist/TerminalTransaction-DdESjZJo.js +483 -0
- package/dist/{Transaction-DRQ_uZ30.js → Transaction-CP0EdPdb.js} +48 -50
- package/dist/{Transaction-8LlOLPeZ.js → Transaction-Cl5vz12a.js} +23 -23
- package/dist/{app-DQNKrzQz.js → app-z59f3ZZg.js} +149 -149
- package/dist/app.js +1 -1
- package/dist/helpers/idToDate.d.ts +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-DVoSXsW7.js → payout-account-C4SX3RTt.js} +1 -1
- package/dist/{transaction-CQiT7Y_s.js → transaction-B8q7vuqN.js} +19 -12
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/terminal-transaction/cell/Timestamp.vue.d.ts +10 -0
- package/package.json +1 -1
- package/dist/TerminalTransaction-B2RjE2Y0.js +0 -435
@@ -1,16 +1,16 @@
|
|
1
|
-
import { defineComponent as _, resolveComponent as T, openBlock as f, createBlock as N, normalizeClass as
|
2
|
-
import { t as
|
3
|
-
import { e as
|
4
|
-
import
|
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-B8q7vuqN.js";
|
3
|
+
import { e as A, u as M } from "./index-CWaKb7bG.js";
|
4
|
+
import "@feedmepos/ui-library";
|
5
5
|
import "./dinero-CIVmXLL-.js";
|
6
|
-
import { h as
|
7
|
-
import { g as
|
8
|
-
import { useCoreStore as
|
9
|
-
import { _ as
|
10
|
-
import { u as
|
11
|
-
import { _ as
|
12
|
-
import { _ as
|
13
|
-
const
|
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
14
|
__name: "Status",
|
15
15
|
props: {
|
16
16
|
row: {},
|
@@ -19,46 +19,46 @@ const J = /* @__PURE__ */ _({
|
|
19
19
|
setup(s) {
|
20
20
|
const n = s;
|
21
21
|
function a() {
|
22
|
-
return n.data ===
|
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
23
|
}
|
24
24
|
return (l, c) => {
|
25
25
|
const d = T("FmBadge");
|
26
26
|
return f(), N(d, {
|
27
27
|
inline: "",
|
28
|
-
class:
|
28
|
+
class: O(a())
|
29
29
|
}, {
|
30
|
-
default:
|
31
|
-
y("div", null,
|
30
|
+
default: b(() => [
|
31
|
+
y("div", null, V(l.data), 1)
|
32
32
|
]),
|
33
33
|
_: 1
|
34
34
|
}, 8, ["class"]);
|
35
35
|
};
|
36
36
|
}
|
37
|
-
}),
|
37
|
+
}), J = ["src"], j = /* @__PURE__ */ _({
|
38
38
|
__name: "Gateway",
|
39
39
|
props: {
|
40
40
|
row: {},
|
41
41
|
data: {}
|
42
42
|
},
|
43
43
|
setup(s) {
|
44
|
-
return (n, a) => (f(),
|
44
|
+
return (n, a) => (f(), I("img", {
|
45
45
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
46
|
-
src: o(
|
47
|
-
}, null, 8,
|
46
|
+
src: o(Y)(n.row.original.gateway)
|
47
|
+
}, null, 8, J));
|
48
48
|
}
|
49
|
-
}),
|
49
|
+
}), z = ["src"], Q = /* @__PURE__ */ _({
|
50
50
|
__name: "Method",
|
51
51
|
props: {
|
52
52
|
row: {},
|
53
53
|
data: {}
|
54
54
|
},
|
55
55
|
setup(s) {
|
56
|
-
return (n, a) => (f(),
|
56
|
+
return (n, a) => (f(), I("img", {
|
57
57
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
58
|
-
src: o(
|
59
|
-
}, null, 8,
|
58
|
+
src: o(P)(n.row.original.method.issuer)
|
59
|
+
}, null, 8, z));
|
60
60
|
}
|
61
|
-
}),
|
61
|
+
}), H = /* @__PURE__ */ _({
|
62
62
|
__name: "TransactionTable",
|
63
63
|
props: {
|
64
64
|
data: {
|
@@ -72,7 +72,7 @@ const J = /* @__PURE__ */ _({
|
|
72
72
|
},
|
73
73
|
emits: ["row-click"],
|
74
74
|
setup(s, { emit: n }) {
|
75
|
-
const a = s, l = n, c =
|
75
|
+
const a = s, l = n, c = S(""), d = [
|
76
76
|
{
|
77
77
|
header: () => "Transaction ID",
|
78
78
|
accessorKey: "id"
|
@@ -87,7 +87,7 @@ const J = /* @__PURE__ */ _({
|
|
87
87
|
meta: {
|
88
88
|
textAlign: "center"
|
89
89
|
},
|
90
|
-
cell: ({ cell: t, row: e }) => e.original.method ? x(
|
90
|
+
cell: ({ cell: t, row: e }) => e.original.method ? x(j, { row: e, data: t.getValue() }) : ""
|
91
91
|
},
|
92
92
|
{
|
93
93
|
header: () => "Method",
|
@@ -95,7 +95,7 @@ const J = /* @__PURE__ */ _({
|
|
95
95
|
meta: {
|
96
96
|
textAlign: "center"
|
97
97
|
},
|
98
|
-
cell: ({ cell: t, row: e }) => e.original.method ? x(
|
98
|
+
cell: ({ cell: t, row: e }) => e.original.method ? x(Q, { row: e, data: t.getValue() }) : ""
|
99
99
|
},
|
100
100
|
{
|
101
101
|
header: () => "Type",
|
@@ -113,7 +113,7 @@ const J = /* @__PURE__ */ _({
|
|
113
113
|
{
|
114
114
|
header: () => "Status",
|
115
115
|
accessorKey: "status",
|
116
|
-
cell: ({ cell: t, row: e }) => x(
|
116
|
+
cell: ({ cell: t, row: e }) => x(q, { row: e, data: t.getValue() })
|
117
117
|
},
|
118
118
|
{
|
119
119
|
header: () => "Transaction At",
|
@@ -147,29 +147,27 @@ const J = /* @__PURE__ */ _({
|
|
147
147
|
}, null, 8, ["modelValue", "row-data", "loading"]);
|
148
148
|
};
|
149
149
|
}
|
150
|
-
}),
|
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
151
|
__name: "Transaction",
|
152
152
|
setup(s) {
|
153
|
-
const { dateRange: n, searchKey: a } =
|
153
|
+
const { dateRange: n, searchKey: a } = B({
|
154
154
|
searchKey: "",
|
155
155
|
dateRange: {
|
156
|
-
startDate:
|
157
|
-
endDate:
|
156
|
+
startDate: R().startOf("day").format("YYYY-MM-DD"),
|
157
|
+
endDate: R().endOf("day").format("YYYY-MM-DD")
|
158
158
|
}
|
159
|
-
}), { isLoading: l, startAsyncCall: c } =
|
160
|
-
$();
|
161
|
-
const { currentRestaurant: d } = M(), t = A([]), e = A([]);
|
159
|
+
}), { isLoading: l, startAsyncCall: c } = M(!0), { currentRestaurant: d } = $(), t = S([]), e = S([]);
|
162
160
|
async function g() {
|
163
161
|
await c(async () => {
|
164
|
-
const { startDate: h, endDate: r } = n.value, u = await
|
162
|
+
const { startDate: h, endDate: r } = n.value, u = await D.readRestaurantTransactions({
|
165
163
|
start: h,
|
166
164
|
end: r
|
167
165
|
});
|
168
166
|
if (t.value = C(u), e.value = t.value, a.value > "") {
|
169
167
|
var v = new RegExp(a.value, "i");
|
170
168
|
e.value = t.value.filter((m) => {
|
171
|
-
const
|
172
|
-
return v.test(
|
169
|
+
const K = JSON.stringify(m);
|
170
|
+
return v.test(K);
|
173
171
|
});
|
174
172
|
}
|
175
173
|
});
|
@@ -177,7 +175,7 @@ const J = /* @__PURE__ */ _({
|
|
177
175
|
function i() {
|
178
176
|
g();
|
179
177
|
}
|
180
|
-
|
178
|
+
k(i), E(d, i);
|
181
179
|
let w;
|
182
180
|
return E(a, async () => {
|
183
181
|
w && clearTimeout(w), w = setTimeout(() => {
|
@@ -189,15 +187,15 @@ const J = /* @__PURE__ */ _({
|
|
189
187
|
}, 700);
|
190
188
|
}), (h, r) => {
|
191
189
|
const u = T("FmSearch"), v = T("FmSimpleDateRangePicker");
|
192
|
-
return f(), N(
|
190
|
+
return f(), N(L, {
|
193
191
|
title: "Online Transactions",
|
194
192
|
description: "Transactions are purchases or payments made over the internet using electronic methods like cards or digital wallets.",
|
195
193
|
loading: o(l)
|
196
194
|
}, {
|
197
|
-
default:
|
198
|
-
y("div",
|
199
|
-
y("div",
|
200
|
-
p(
|
195
|
+
default: b(() => [
|
196
|
+
y("div", W, [
|
197
|
+
y("div", X, [
|
198
|
+
p(G),
|
201
199
|
p(u, {
|
202
200
|
"model-value": o(a),
|
203
201
|
"onUpdate:modelValue": r[0] || (r[0] = (m) => F(a) ? a.value = m : null),
|
@@ -213,20 +211,20 @@ const J = /* @__PURE__ */ _({
|
|
213
211
|
"show-predefined-range": ""
|
214
212
|
}, null, 8, ["modelValue"])
|
215
213
|
]),
|
216
|
-
y("div",
|
217
|
-
p(
|
214
|
+
y("div", Z, [
|
215
|
+
p(U, {
|
218
216
|
button: {
|
219
217
|
appendIcon: "file_download",
|
220
218
|
variant: "primary",
|
221
219
|
label: "Export"
|
222
220
|
},
|
223
221
|
handler: async () => {
|
224
|
-
await o(
|
222
|
+
await o(D).downloadRestaurantTransactionReport(t.value);
|
225
223
|
}
|
226
224
|
}, null, 8, ["handler"])
|
227
225
|
])
|
228
226
|
]),
|
229
|
-
p(
|
227
|
+
p(H, {
|
230
228
|
loading: o(l),
|
231
229
|
data: e.value
|
232
230
|
}, null, 8, ["loading", "data"])
|
@@ -237,5 +235,5 @@ const J = /* @__PURE__ */ _({
|
|
237
235
|
}
|
238
236
|
});
|
239
237
|
export {
|
240
|
-
|
238
|
+
me as default
|
241
239
|
};
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { defineComponent as h, resolveComponent as _, openBlock as g, createBlock as E, normalizeClass as
|
2
|
-
import { t as w, a as
|
3
|
-
import { e as S, u as
|
4
|
-
import { useSnackbar as
|
1
|
+
import { defineComponent as h, resolveComponent as _, openBlock as g, createBlock as E, normalizeClass as Y, withCtx as x, createElementVNode as b, toDisplayString as $, createElementBlock as F, unref as m, createVNode as y, Fragment as L, renderList as B, ref as N, h as T, onMounted as U, watch as D, isRef as k } from "vue";
|
2
|
+
import { t as w, a as G, b as M } from "./transaction-B8q7vuqN.js";
|
3
|
+
import { e as S, u as J } from "./index-CWaKb7bG.js";
|
4
|
+
import { useSnackbar as Q, useDialog as j } from "@feedmepos/ui-library";
|
5
5
|
import "./dinero-CIVmXLL-.js";
|
6
|
-
import { h as
|
6
|
+
import { h as R } from "./moment-h96o7c8I.js";
|
7
7
|
import { g as z, a as H } from "./assets-NrCec-W0.js";
|
8
8
|
import { _ as W } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
|
9
9
|
import { u as X } from "./index-7KNaibcq.js";
|
@@ -26,10 +26,10 @@ const te = /* @__PURE__ */ h({
|
|
26
26
|
const s = _("FmBadge");
|
27
27
|
return g(), E(s, {
|
28
28
|
inline: "",
|
29
|
-
class:
|
29
|
+
class: Y(o())
|
30
30
|
}, {
|
31
31
|
default: x(() => [
|
32
|
-
b("div", null,
|
32
|
+
b("div", null, $(l.data), 1)
|
33
33
|
]),
|
34
34
|
_: 1
|
35
35
|
}, 8, ["class"]);
|
@@ -97,7 +97,7 @@ const te = /* @__PURE__ */ h({
|
|
97
97
|
y(f, { name: "settings" })
|
98
98
|
]),
|
99
99
|
default: x(() => [
|
100
|
-
(g(), F(
|
100
|
+
(g(), F(L, null, B(n, (e) => y(s, {
|
101
101
|
selectable: !0,
|
102
102
|
key: e.label,
|
103
103
|
sublabel: e.sublabel,
|
@@ -213,17 +213,17 @@ const te = /* @__PURE__ */ h({
|
|
213
213
|
const { dateRange: n, searchKey: o } = X({
|
214
214
|
searchKey: "",
|
215
215
|
dateRange: {
|
216
|
-
startDate:
|
217
|
-
endDate:
|
216
|
+
startDate: R().startOf("day").format("YYYY-MM-DD"),
|
217
|
+
endDate: R().endOf("day").format("YYYY-MM-DD")
|
218
218
|
}
|
219
|
-
}), { isLoading: l, startAsyncCall: f } =
|
219
|
+
}), { isLoading: l, startAsyncCall: f } = J(!0), s = Q(), r = j(), e = N([]), c = N([]);
|
220
220
|
async function v() {
|
221
221
|
await f(async () => {
|
222
222
|
const { startDate: i, endDate: t } = n.value, a = await w.readTransactions({
|
223
223
|
start: i,
|
224
224
|
end: t
|
225
225
|
});
|
226
|
-
if (e.value =
|
226
|
+
if (e.value = G(a), c.value = e.value, o.value > "") {
|
227
227
|
var u = new RegExp(o.value, "i");
|
228
228
|
c.value = e.value.filter((d) => {
|
229
229
|
const C = JSON.stringify(d);
|
@@ -235,9 +235,9 @@ const te = /* @__PURE__ */ h({
|
|
235
235
|
function q() {
|
236
236
|
v();
|
237
237
|
}
|
238
|
-
|
238
|
+
U(q);
|
239
239
|
let A;
|
240
|
-
|
240
|
+
D(o, async () => {
|
241
241
|
A && clearTimeout(A), A = setTimeout(() => {
|
242
242
|
var i = new RegExp(o.value, "i");
|
243
243
|
c.value = e.value.filter((t) => {
|
@@ -245,7 +245,7 @@ const te = /* @__PURE__ */ h({
|
|
245
245
|
return i.test(a);
|
246
246
|
});
|
247
247
|
}, 700);
|
248
|
-
}),
|
248
|
+
}), D(e, async () => {
|
249
249
|
let i = e.value;
|
250
250
|
if (o.value) {
|
251
251
|
var t = new RegExp(o.value, "i");
|
@@ -268,7 +268,7 @@ const te = /* @__PURE__ */ h({
|
|
268
268
|
}
|
269
269
|
try {
|
270
270
|
const a = await w.refetchTransaction({ transactionId: t.id }), u = e.value.findIndex((d) => d.id === a._id);
|
271
|
-
e.value[u] =
|
271
|
+
e.value[u] = M(a), s.open({
|
272
272
|
type: "success",
|
273
273
|
title: "Transaction queried and updated successfully."
|
274
274
|
});
|
@@ -280,7 +280,7 @@ const te = /* @__PURE__ */ h({
|
|
280
280
|
});
|
281
281
|
}
|
282
282
|
}
|
283
|
-
async function
|
283
|
+
async function O(i) {
|
284
284
|
const t = c.value.at(i);
|
285
285
|
if (!t) {
|
286
286
|
s.open({
|
@@ -301,7 +301,7 @@ const te = /* @__PURE__ */ h({
|
|
301
301
|
reason: "portal transaction refund",
|
302
302
|
amount: t.fdoAmount
|
303
303
|
}), u = e.value.findIndex((d) => d.id === a._id);
|
304
|
-
e.value[u] =
|
304
|
+
e.value[u] = M(a), s.open({
|
305
305
|
type: "success",
|
306
306
|
title: "Transaction refund request initiated."
|
307
307
|
});
|
@@ -315,7 +315,7 @@ const te = /* @__PURE__ */ h({
|
|
315
315
|
}
|
316
316
|
);
|
317
317
|
}
|
318
|
-
async function
|
318
|
+
async function V(i) {
|
319
319
|
const t = c.value.at(i);
|
320
320
|
if (!t) {
|
321
321
|
s.open({
|
@@ -356,7 +356,7 @@ const te = /* @__PURE__ */ h({
|
|
356
356
|
b("div", le, [
|
357
357
|
y(a, {
|
358
358
|
"model-value": m(o),
|
359
|
-
"onUpdate:modelValue": t[0] || (t[0] = (d) =>
|
359
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => k(o) ? o.value = d : null),
|
360
360
|
class: "mr-8",
|
361
361
|
label: "Search",
|
362
362
|
placeholder: "Search Transactions ..."
|
@@ -364,7 +364,7 @@ const te = /* @__PURE__ */ h({
|
|
364
364
|
y(u, {
|
365
365
|
modelValue: m(n),
|
366
366
|
"onUpdate:modelValue": [
|
367
|
-
t[1] || (t[1] = (d) =>
|
367
|
+
t[1] || (t[1] = (d) => k(n) ? n.value = d : null),
|
368
368
|
v
|
369
369
|
],
|
370
370
|
"show-predefined-range": ""
|
@@ -390,8 +390,8 @@ const te = /* @__PURE__ */ h({
|
|
390
390
|
loading: m(l),
|
391
391
|
data: c.value,
|
392
392
|
onQuery: K,
|
393
|
-
onRefund:
|
394
|
-
onNotify:
|
393
|
+
onRefund: O,
|
394
|
+
onNotify: V
|
395
395
|
}, null, 8, ["loading", "data"])
|
396
396
|
]),
|
397
397
|
_: 1
|