@feedmepos/mf-payment 0.0.0-beta.33 → 0.0.0-beta.35
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{PayoutAccount-DSXNLvNP.js → PayoutAccount-C-FZD8lM.js} +2 -2
- package/dist/{PayoutAccount-CRf5uapK.js → PayoutAccount-mpVH-GBq.js} +1 -1
- package/dist/{SettlementTransactions-w0jXLftr.js → SettlementTransactions-Co4ziq3a.js} +1 -1
- package/dist/{SettlementTransactions-CdZswF1S.js → SettlementTransactions-yJhT6FR4.js} +1 -1
- package/dist/{Terminal-BbIs7aYi.js → Terminal-BDDP5VT8.js} +1 -1
- package/dist/TerminalTransaction-CEQ3hedf.js +413 -0
- package/dist/{TerminalTransaction-CoPJlBCt.js → TerminalTransaction-DCqbXI2q.js} +30 -30
- package/dist/{Transaction-Atm-A5eN.js → Transaction-D6mKrbLJ.js} +1 -1
- package/dist/Transaction-DvgeNetP.js +405 -0
- package/dist/api/terminal-transaction/index.d.ts +3 -1
- package/dist/api/transaction/index.d.ts +1 -0
- package/dist/app.js +9 -9
- package/dist/components/CursorTable/index.vue.d.ts +4 -0
- package/dist/{index-RhSxYSBk.js → index-Dlszue3Y.js} +20 -10
- package/dist/{index.vue_vue_type_script_setup_true_lang-B7ePQpGr.js → index.vue_vue_type_script_setup_true_lang-B8eGz19R.js} +62 -58
- package/dist/model/transaction.d.ts +2 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-BKVSgJb4.js → payout-account-C5rDbsPa.js} +227 -227
- package/dist/{transaction-BH1Pm92q.js → transaction-DdbmOKZ7.js} +18 -11
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +7 -0
- package/dist/views/admin/transaction/TransactionTable.vue.d.ts +6 -2
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +7 -0
- package/package.json +1 -1
- package/dist/TerminalTransaction-CwEwNN25.js +0 -274
- package/dist/Transaction-DpmCjczz.js +0 -243
@@ -2,10 +2,10 @@ import { defineComponent as b, resolveComponent as m, openBlock as g, createBloc
|
|
2
2
|
import { u as S } from "./index-BgnU5ezY.js";
|
3
3
|
import { _ as O } from "./index-Cnxt2xmc.js";
|
4
4
|
import { _ as K } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
5
|
-
import { P as V } from "./payout-account-
|
5
|
+
import { P as V } from "./payout-account-C5rDbsPa.js";
|
6
6
|
import { p as D } from "./index-ApzEWD1P.js";
|
7
7
|
import "@feedmepos/ui-library";
|
8
|
-
import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-
|
8
|
+
import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-B8eGz19R.js";
|
9
9
|
import { useRouter as $ } from "vue-router";
|
10
10
|
const G = /* @__PURE__ */ b({
|
11
11
|
__name: "Status",
|
@@ -3,7 +3,7 @@ import { p as z } from "./index-ApzEWD1P.js";
|
|
3
3
|
import { _ as I, u as S, c as h } from "./index-Cnxt2xmc.js";
|
4
4
|
import { defineStore as _ } from "pinia";
|
5
5
|
import { useCoreStore as $ } from "@feedmepos/mf-common";
|
6
|
-
import { c as AA, P as j } from "./payout-account-
|
6
|
+
import { c as AA, P as j } from "./payout-account-C5rDbsPa.js";
|
7
7
|
import { useDialogChild as sA, useDialog as eA } from "@feedmepos/ui-library";
|
8
8
|
import { z as f, a as q } from "./validator-D5jtpt9A.js";
|
9
9
|
import { P as K } from "./PDFViewer-CjH_C1uT.js";
|
@@ -3,7 +3,7 @@ import { c as E, u as j } from "./index-Cnxt2xmc.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
4
4
|
import { d as h } from "./dinero-CIVmXLL-.js";
|
5
5
|
import { g as Y, a as H } from "./assets-sX1_K-nt.js";
|
6
|
-
import { t as q, a as J } from "./transaction-
|
6
|
+
import { t as q, a as J } from "./transaction-DdbmOKZ7.js";
|
7
7
|
import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
8
8
|
import { useRouter as W } from "vue-router";
|
9
9
|
import { s as X } from "./index-BSpzaL20.js";
|
@@ -3,7 +3,7 @@ import { c as E, u as q } from "./index-Cnxt2xmc.js";
|
|
3
3
|
import { useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
|
4
4
|
import { d as B } from "./dinero-CIVmXLL-.js";
|
5
5
|
import { g as W, a as X } from "./assets-sX1_K-nt.js";
|
6
|
-
import { t as P, a as Z } from "./transaction-
|
6
|
+
import { t as P, a as Z } from "./transaction-DdbmOKZ7.js";
|
7
7
|
import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
8
8
|
import { useRouter as te } from "vue-router";
|
9
9
|
import { s as ae } from "./index-BSpzaL20.js";
|
@@ -2,7 +2,7 @@ import { defineComponent as h, openBlock as d, createElementBlock as I, createTe
|
|
2
2
|
import "./index-Cnxt2xmc.js";
|
3
3
|
import { h as Y } from "./moment-h96o7c8I.js";
|
4
4
|
import { u as j } from "./index-BgnU5ezY.js";
|
5
|
-
import { _ as q } from "./index.vue_vue_type_script_setup_true_lang-
|
5
|
+
import { _ as q } from "./index.vue_vue_type_script_setup_true_lang-B8eGz19R.js";
|
6
6
|
import { _ as O } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
7
7
|
import { useSnackbar as P, useDialogChild as Q, useDialog as G } from "@feedmepos/ui-library";
|
8
8
|
import { t as F } from "./index-CBFVJirn.js";
|
@@ -0,0 +1,413 @@
|
|
1
|
+
import { defineComponent as I, openBlock as y, createElementBlock as w, unref as i, createCommentVNode as V, createElementVNode as h, resolveComponent as g, createBlock as S, normalizeClass as K, withCtx as N, toDisplayString as C, createVNode as p, Fragment as $, renderList as L, ref as P, watch as R, isRef as x, h as A } from "vue";
|
2
|
+
import { e as f } from "./index-Cnxt2xmc.js";
|
3
|
+
import { h as F } from "./moment-h96o7c8I.js";
|
4
|
+
import { u as B } from "./index-BgnU5ezY.js";
|
5
|
+
import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-B8eGz19R.js";
|
6
|
+
import { _ as U } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
7
|
+
import { useSnackbar as Y, useDialog as Q } from "@feedmepos/ui-library";
|
8
|
+
import { g as W } from "./assets-sX1_K-nt.js";
|
9
|
+
import { E as j, t as b } from "./index-Dlszue3Y.js";
|
10
|
+
import { d as z } from "./dinero-CIVmXLL-.js";
|
11
|
+
import { _ as H } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
12
|
+
import { _ as J } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
|
13
|
+
import { useRouter as X } from "vue-router";
|
14
|
+
import { w as Z } from "./Modal-DB8M9o1T.js";
|
15
|
+
import { u as v } from "./error-K1CakhA9.js";
|
16
|
+
const ee = { class: "flex" }, te = ["src"], ae = ["src"], ne = /* @__PURE__ */ I({
|
17
|
+
__name: "Gateway",
|
18
|
+
props: {
|
19
|
+
row: {},
|
20
|
+
data: {}
|
21
|
+
},
|
22
|
+
setup(T) {
|
23
|
+
return (a, m) => (y(), w("div", ee, [
|
24
|
+
a.row.original.ecrGateway ? (y(), w("img", {
|
25
|
+
key: 0,
|
26
|
+
class: "bg-fm-color-overlay-background rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
27
|
+
src: i(j)
|
28
|
+
}, null, 8, te)) : V("", !0),
|
29
|
+
h("img", {
|
30
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
31
|
+
src: i(W)(a.row.original.gateway)
|
32
|
+
}, null, 8, ae)
|
33
|
+
]));
|
34
|
+
}
|
35
|
+
}), re = /* @__PURE__ */ I({
|
36
|
+
__name: "Status",
|
37
|
+
props: {
|
38
|
+
row: {},
|
39
|
+
data: {}
|
40
|
+
},
|
41
|
+
setup(T) {
|
42
|
+
const a = T;
|
43
|
+
function m() {
|
44
|
+
return a.data === f.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === f.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : a.data === f.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
45
|
+
}
|
46
|
+
return (r, l) => {
|
47
|
+
const s = g("FmBadge");
|
48
|
+
return y(), S(s, {
|
49
|
+
inline: "",
|
50
|
+
class: K(m())
|
51
|
+
}, {
|
52
|
+
default: N(() => [
|
53
|
+
h("div", null, C(r.data.toUpperCase()), 1)
|
54
|
+
]),
|
55
|
+
_: 1
|
56
|
+
}, 8, ["class"]);
|
57
|
+
};
|
58
|
+
}
|
59
|
+
}), oe = /* @__PURE__ */ I({
|
60
|
+
__name: "RouteCell",
|
61
|
+
props: {
|
62
|
+
data: {},
|
63
|
+
route: {}
|
64
|
+
},
|
65
|
+
setup(T) {
|
66
|
+
const a = T, m = X();
|
67
|
+
function r() {
|
68
|
+
m.push(a.route);
|
69
|
+
}
|
70
|
+
return (l, s) => (y(), w("div", {
|
71
|
+
class: "fm-typo-en-link-md-600",
|
72
|
+
onClick: s[0] || (s[0] = (u) => {
|
73
|
+
u.stopPropagation(), r();
|
74
|
+
})
|
75
|
+
}, C(l.data), 1));
|
76
|
+
}
|
77
|
+
}), se = /* @__PURE__ */ I({
|
78
|
+
__name: "Actions",
|
79
|
+
props: {
|
80
|
+
onAction: { type: Function }
|
81
|
+
},
|
82
|
+
setup(T) {
|
83
|
+
const a = [
|
84
|
+
{
|
85
|
+
label: "Query",
|
86
|
+
sublabel: "Perform transaction status inquriy",
|
87
|
+
icon: "question_answer",
|
88
|
+
action: "query"
|
89
|
+
},
|
90
|
+
{
|
91
|
+
label: "Refund",
|
92
|
+
sublabel: "Perform transaction refund request",
|
93
|
+
icon: "request_page",
|
94
|
+
action: "refund"
|
95
|
+
}
|
96
|
+
];
|
97
|
+
return (m, r) => {
|
98
|
+
const l = g("FmIcon"), s = g("FmMenuItem"), u = g("FmMenu");
|
99
|
+
return y(), w("div", {
|
100
|
+
onClick: r[0] || (r[0] = (c) => {
|
101
|
+
c.stopPropagation();
|
102
|
+
})
|
103
|
+
}, [
|
104
|
+
p(u, null, {
|
105
|
+
"menu-button": N(() => [
|
106
|
+
p(l, { name: "settings" })
|
107
|
+
]),
|
108
|
+
default: N(() => [
|
109
|
+
(y(), w($, null, L(a, (c) => p(s, {
|
110
|
+
selectable: !0,
|
111
|
+
key: c.label,
|
112
|
+
sublabel: c.sublabel,
|
113
|
+
label: c.label,
|
114
|
+
icon: c.icon,
|
115
|
+
onclick: () => m.onAction(c.action)
|
116
|
+
}, null, 8, ["sublabel", "label", "icon", "onclick"])), 64))
|
117
|
+
]),
|
118
|
+
_: 1
|
119
|
+
})
|
120
|
+
]);
|
121
|
+
};
|
122
|
+
}
|
123
|
+
}), le = { class: "flex justify-between mb-6 items-start" }, ce = { class: "flex space-x-4 items-start" }, ie = { class: "flex space-x-4" }, xe = /* @__PURE__ */ I({
|
124
|
+
__name: "TerminalTransaction",
|
125
|
+
setup(T) {
|
126
|
+
const a = Y(), m = Q(), r = P(), { dateRange: l, status: s, searchKey: u } = B({
|
127
|
+
searchKey: "",
|
128
|
+
status: [f.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
|
129
|
+
dateRange: {
|
130
|
+
startDate: F().startOf("day").toISOString(),
|
131
|
+
endDate: F().endOf("day").toISOString()
|
132
|
+
}
|
133
|
+
});
|
134
|
+
R([l, s], () => {
|
135
|
+
var e;
|
136
|
+
return (e = r.value) == null ? void 0 : e.reset();
|
137
|
+
});
|
138
|
+
let c;
|
139
|
+
R(u, async () => {
|
140
|
+
c && clearTimeout(c), c = setTimeout(
|
141
|
+
() => {
|
142
|
+
var e;
|
143
|
+
return (e = r.value) == null ? void 0 : e.reset();
|
144
|
+
},
|
145
|
+
700
|
146
|
+
);
|
147
|
+
});
|
148
|
+
async function E(e) {
|
149
|
+
var o, d, _;
|
150
|
+
const t = (d = (o = r.value) == null ? void 0 : o.pageData()) == null ? void 0 : d.at(e);
|
151
|
+
if (!t) {
|
152
|
+
a.open({
|
153
|
+
type: "error",
|
154
|
+
title: "Something went wrong",
|
155
|
+
message: "Fail to find transactions from the displayed transactions."
|
156
|
+
});
|
157
|
+
return;
|
158
|
+
}
|
159
|
+
if (!t.refId) {
|
160
|
+
a.open({
|
161
|
+
type: "error",
|
162
|
+
title: "Something went wrong",
|
163
|
+
message: "Transaction isn't a valid transaction to perform query"
|
164
|
+
});
|
165
|
+
return;
|
166
|
+
}
|
167
|
+
try {
|
168
|
+
const n = await b.queryTransaction(t._id);
|
169
|
+
(_ = r.value) == null || _.replaceData(e, n), a.open({
|
170
|
+
type: "success",
|
171
|
+
title: "Transaction queried and updated successfully."
|
172
|
+
});
|
173
|
+
} catch (n) {
|
174
|
+
a.open({
|
175
|
+
type: "error",
|
176
|
+
title: "Fail to query transaction.",
|
177
|
+
message: v(n)
|
178
|
+
});
|
179
|
+
}
|
180
|
+
}
|
181
|
+
async function k(e) {
|
182
|
+
var o, d;
|
183
|
+
const t = (d = (o = r.value) == null ? void 0 : o.pageData()) == null ? void 0 : d.at(e);
|
184
|
+
if (!t) {
|
185
|
+
a.open({
|
186
|
+
type: "error",
|
187
|
+
title: "Something went wrong",
|
188
|
+
message: "Fail to find transactions from the displayed transactions."
|
189
|
+
});
|
190
|
+
return;
|
191
|
+
}
|
192
|
+
if (!t.refId) {
|
193
|
+
a.open({
|
194
|
+
type: "error",
|
195
|
+
title: "Something went wrong",
|
196
|
+
message: "Transaction isn't a valid transaction to perform refund"
|
197
|
+
});
|
198
|
+
return;
|
199
|
+
}
|
200
|
+
Z(
|
201
|
+
m,
|
202
|
+
"Refund Transaction",
|
203
|
+
"Are you sure to refund transaction? This action cannot be revert!",
|
204
|
+
async () => {
|
205
|
+
var _;
|
206
|
+
try {
|
207
|
+
const n = await b.refundTransaction({
|
208
|
+
transactionId: t._id,
|
209
|
+
reason: "portal transaction refund",
|
210
|
+
amount: t.details.amount
|
211
|
+
});
|
212
|
+
(_ = r.value) == null || _.replaceData(e, n), a.open({
|
213
|
+
type: "success",
|
214
|
+
title: "Transaction queried and updated successfully."
|
215
|
+
});
|
216
|
+
} catch (n) {
|
217
|
+
a.open({
|
218
|
+
type: "error",
|
219
|
+
title: "Fail to query transaction.",
|
220
|
+
message: v(n)
|
221
|
+
});
|
222
|
+
}
|
223
|
+
}
|
224
|
+
);
|
225
|
+
}
|
226
|
+
const O = [
|
227
|
+
{
|
228
|
+
label: "Success",
|
229
|
+
value: f.F_TERMINAL_TRANSACTION_ACTION.Enum.success
|
230
|
+
},
|
231
|
+
{
|
232
|
+
label: "Refunded",
|
233
|
+
value: f.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded
|
234
|
+
},
|
235
|
+
{
|
236
|
+
label: "Process",
|
237
|
+
value: f.F_TERMINAL_TRANSACTION_ACTION.Enum.process
|
238
|
+
},
|
239
|
+
{
|
240
|
+
label: "Failed",
|
241
|
+
value: f.F_TERMINAL_TRANSACTION_ACTION.Enum.failed
|
242
|
+
}
|
243
|
+
], D = function(e) {
|
244
|
+
const t = e;
|
245
|
+
let o = "-";
|
246
|
+
return t.details && t.details.amount && (o = z(t.details.amount).toFormat("$0.00")), {
|
247
|
+
id: e._id,
|
248
|
+
refId: e.refId,
|
249
|
+
owner: e.owner,
|
250
|
+
terminalId: e.terminalId,
|
251
|
+
transactionAt: F(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
|
252
|
+
action: e.action,
|
253
|
+
gateway: e.gateway,
|
254
|
+
ecrGateway: e.ecrGateway,
|
255
|
+
amount: o
|
256
|
+
};
|
257
|
+
}, M = [
|
258
|
+
{
|
259
|
+
accessorKey: "id",
|
260
|
+
header: () => "Transaction ID",
|
261
|
+
meta: {
|
262
|
+
textAlign: "left"
|
263
|
+
},
|
264
|
+
cell: ({ cell: e }) => A(J, { data: e.getValue() })
|
265
|
+
},
|
266
|
+
{
|
267
|
+
accessorKey: "terminalId",
|
268
|
+
header: () => "Terminal ID",
|
269
|
+
meta: {
|
270
|
+
textAlign: "left"
|
271
|
+
},
|
272
|
+
cell: ({ cell: e }) => {
|
273
|
+
const t = e.getValue();
|
274
|
+
return A(oe, {
|
275
|
+
data: t,
|
276
|
+
route: {
|
277
|
+
name: "mf-payment-admin.terminal-setting",
|
278
|
+
params: { terminalId: t }
|
279
|
+
}
|
280
|
+
});
|
281
|
+
}
|
282
|
+
},
|
283
|
+
{
|
284
|
+
accessorKey: "refId",
|
285
|
+
header: () => "Reference ID",
|
286
|
+
meta: {
|
287
|
+
textAlign: "left"
|
288
|
+
}
|
289
|
+
},
|
290
|
+
{
|
291
|
+
accessorKey: "gateway",
|
292
|
+
header: () => "Gateway",
|
293
|
+
meta: {
|
294
|
+
textAlign: "center",
|
295
|
+
maxWidth: "128px"
|
296
|
+
},
|
297
|
+
cell: ({ cell: e, row: t }) => A(ne, { row: t, data: e.getValue() })
|
298
|
+
},
|
299
|
+
{
|
300
|
+
accessorKey: "action",
|
301
|
+
header: () => "Status",
|
302
|
+
meta: {
|
303
|
+
textAlign: "right",
|
304
|
+
maxWidth: "132px"
|
305
|
+
},
|
306
|
+
cell: ({ cell: e, row: t }) => A(re, { row: t, data: e.getValue() })
|
307
|
+
},
|
308
|
+
{
|
309
|
+
accessorKey: "amount",
|
310
|
+
header: () => "Sales Amount",
|
311
|
+
meta: {
|
312
|
+
textAlign: "center"
|
313
|
+
}
|
314
|
+
},
|
315
|
+
{
|
316
|
+
accessorKey: "owner",
|
317
|
+
header: () => "Reference",
|
318
|
+
meta: {
|
319
|
+
textAlign: "left"
|
320
|
+
}
|
321
|
+
},
|
322
|
+
{
|
323
|
+
accessorKey: "transactionAt",
|
324
|
+
header: () => "Transaction At",
|
325
|
+
meta: {
|
326
|
+
textAlign: "left"
|
327
|
+
}
|
328
|
+
},
|
329
|
+
{
|
330
|
+
header: () => "Actions",
|
331
|
+
accessorKey: "actions",
|
332
|
+
cell: ({ row: e }) => A(se, {
|
333
|
+
onAction: (t) => {
|
334
|
+
const o = e.index;
|
335
|
+
switch (t) {
|
336
|
+
case "query":
|
337
|
+
return E(o);
|
338
|
+
case "refund":
|
339
|
+
return k(o);
|
340
|
+
}
|
341
|
+
}
|
342
|
+
})
|
343
|
+
}
|
344
|
+
];
|
345
|
+
return (e, t) => {
|
346
|
+
const o = g("FmSearch"), d = g("FmSelect"), _ = g("FmDateRangePicker");
|
347
|
+
return y(), S(U, {
|
348
|
+
title: "Offline Transactions",
|
349
|
+
loading: !1
|
350
|
+
}, {
|
351
|
+
default: N(() => [
|
352
|
+
h("div", le, [
|
353
|
+
h("div", ce, [
|
354
|
+
p(o, {
|
355
|
+
"model-value": i(u),
|
356
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => x(u) ? u.value = n : null),
|
357
|
+
class: "mr-8",
|
358
|
+
label: "Search",
|
359
|
+
placeholder: "Search Transactions ..."
|
360
|
+
}, null, 8, ["model-value"]),
|
361
|
+
p(d, {
|
362
|
+
modelValue: i(s),
|
363
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => x(s) ? s.value = n : null),
|
364
|
+
class: "mr-6 w-[300px]",
|
365
|
+
label: "Status",
|
366
|
+
"label-mark": "required",
|
367
|
+
multiselect: "",
|
368
|
+
items: O
|
369
|
+
}, null, 8, ["modelValue"]),
|
370
|
+
p(_, {
|
371
|
+
modelValue: i(l),
|
372
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => x(l) ? l.value = n : null),
|
373
|
+
compare: "",
|
374
|
+
"show-predefined-range": ""
|
375
|
+
}, null, 8, ["modelValue"])
|
376
|
+
]),
|
377
|
+
h("div", ie, [
|
378
|
+
p(H, {
|
379
|
+
button: {
|
380
|
+
appendIcon: "file_download",
|
381
|
+
variant: "primary",
|
382
|
+
label: "Export"
|
383
|
+
},
|
384
|
+
handler: () => {
|
385
|
+
var n;
|
386
|
+
return i(b).downloadTransactions(((n = r.value) == null ? void 0 : n.data()) ?? []);
|
387
|
+
}
|
388
|
+
}, null, 8, ["handler"])
|
389
|
+
])
|
390
|
+
]),
|
391
|
+
p(G, {
|
392
|
+
ref_key: "controller",
|
393
|
+
ref: r,
|
394
|
+
"column-defs": M,
|
395
|
+
"rows-defs": D,
|
396
|
+
paginate: (n, q) => i(b).readTransactions({
|
397
|
+
status: i(s),
|
398
|
+
searchKey: i(u),
|
399
|
+
limit: n,
|
400
|
+
cursor: q,
|
401
|
+
start: i(l).startDate,
|
402
|
+
end: i(l).endDate
|
403
|
+
})
|
404
|
+
}, null, 8, ["paginate"])
|
405
|
+
]),
|
406
|
+
_: 1
|
407
|
+
});
|
408
|
+
};
|
409
|
+
}
|
410
|
+
});
|
411
|
+
export {
|
412
|
+
xe as default
|
413
|
+
};
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { defineComponent as N, openBlock as _, createElementBlock as w, Fragment as F, unref as t, createCommentVNode as k, createElementVNode as
|
1
|
+
import { defineComponent as N, openBlock as _, createElementBlock as w, Fragment as F, unref as t, createCommentVNode as k, createElementVNode as d, resolveComponent as p, createBlock as R, normalizeClass as D, withCtx as C, toDisplayString as V, ref as K, watch as T, createVNode as i, isRef as g, h } from "vue";
|
2
2
|
import { e as l } from "./index-Cnxt2xmc.js";
|
3
3
|
import { h as I } from "./moment-h96o7c8I.js";
|
4
4
|
import { u as M } from "./index-BgnU5ezY.js";
|
5
|
-
import { _ as $ } from "./index.vue_vue_type_script_setup_true_lang-
|
5
|
+
import { _ as $ } from "./index.vue_vue_type_script_setup_true_lang-B8eGz19R.js";
|
6
6
|
import "@feedmepos/ui-library";
|
7
7
|
import { g as L } from "./assets-sX1_K-nt.js";
|
8
|
-
import { E as B, t as x } from "./index-
|
8
|
+
import { E as B, t as x } from "./index-Dlszue3Y.js";
|
9
9
|
import { d as G } from "./dinero-CIVmXLL-.js";
|
10
10
|
import { _ as P } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
|
11
11
|
import { useCoreStore as U } from "@feedmepos/mf-common";
|
@@ -20,13 +20,13 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
20
20
|
data: {}
|
21
21
|
},
|
22
22
|
setup(f) {
|
23
|
-
return (n,
|
23
|
+
return (n, s) => (_(), w(F, null, [
|
24
24
|
n.row.original.ecrGateway ? (_(), w("img", {
|
25
25
|
key: 0,
|
26
26
|
class: "bg-fm-color-overlay-background rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
27
27
|
src: t(B)
|
28
28
|
}, null, 8, q)) : k("", !0),
|
29
|
-
|
29
|
+
d("img", {
|
30
30
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
31
31
|
src: t(L)(n.row.original.gateway)
|
32
32
|
}, null, 8, z)
|
@@ -40,17 +40,17 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
40
40
|
},
|
41
41
|
setup(f) {
|
42
42
|
const n = f;
|
43
|
-
function
|
43
|
+
function s() {
|
44
44
|
return n.data === l.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : n.data === l.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : n.data === l.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
45
45
|
}
|
46
|
-
return (
|
46
|
+
return (o, m) => {
|
47
47
|
const c = p("FmBadge");
|
48
48
|
return _(), R(c, {
|
49
49
|
inline: "",
|
50
|
-
class: D(
|
50
|
+
class: D(s())
|
51
51
|
}, {
|
52
52
|
default: C(() => [
|
53
|
-
|
53
|
+
d("div", null, V(o.data.toUpperCase()), 1)
|
54
54
|
]),
|
55
55
|
_: 1
|
56
56
|
}, 8, ["class"]);
|
@@ -59,7 +59,7 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
59
59
|
}), J = { class: "flex justify-between mb-6 items-start" }, X = { class: "flex space-x-8 items-start" }, Z = { class: "flex space-x-4" }, fe = /* @__PURE__ */ N({
|
60
60
|
__name: "TerminalTransaction",
|
61
61
|
setup(f) {
|
62
|
-
const { currentRestaurant: n } = U(),
|
62
|
+
const { currentRestaurant: n } = U(), s = K(), { dateRange: o, status: m, searchKey: c } = M({
|
63
63
|
searchKey: "",
|
64
64
|
status: [l.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
|
65
65
|
dateRange: {
|
@@ -67,19 +67,19 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
67
67
|
endDate: I().endOf("day").toISOString()
|
68
68
|
}
|
69
69
|
});
|
70
|
-
T([
|
70
|
+
T([o, m], () => {
|
71
71
|
var e;
|
72
|
-
return (e =
|
72
|
+
return (e = s.value) == null ? void 0 : e.reset();
|
73
73
|
}), T(n, () => {
|
74
74
|
var e;
|
75
|
-
return (e =
|
75
|
+
return (e = s.value) == null ? void 0 : e.reset();
|
76
76
|
});
|
77
77
|
let A;
|
78
78
|
T(c, async () => {
|
79
79
|
A && clearTimeout(A), A = setTimeout(
|
80
80
|
() => {
|
81
81
|
var e;
|
82
|
-
return (e =
|
82
|
+
return (e = s.value) == null ? void 0 : e.reset();
|
83
83
|
},
|
84
84
|
700
|
85
85
|
);
|
@@ -103,8 +103,8 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
103
103
|
}
|
104
104
|
], E = function(e) {
|
105
105
|
const a = e;
|
106
|
-
let
|
107
|
-
return a.details.amount && (
|
106
|
+
let u = "-";
|
107
|
+
return a.details && a.details.amount && (u = G(a.details.amount).toFormat("$0.00")), {
|
108
108
|
id: e._id,
|
109
109
|
refId: e.refId,
|
110
110
|
terminalId: e.terminalId,
|
@@ -112,7 +112,7 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
112
112
|
action: e.action,
|
113
113
|
gateway: e.gateway,
|
114
114
|
ecrGateway: e.ecrGateway,
|
115
|
-
amount:
|
115
|
+
amount: u
|
116
116
|
};
|
117
117
|
}, O = [
|
118
118
|
{
|
@@ -143,8 +143,8 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
143
143
|
accessorKey: "action",
|
144
144
|
header: () => "Status",
|
145
145
|
meta: {
|
146
|
-
textAlign: "
|
147
|
-
maxWidth: "
|
146
|
+
textAlign: "right",
|
147
|
+
maxWidth: "132px"
|
148
148
|
},
|
149
149
|
cell: ({ cell: e, row: a }) => h(H, { row: a, data: e.getValue() })
|
150
150
|
},
|
@@ -171,17 +171,17 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
171
171
|
}
|
172
172
|
];
|
173
173
|
return (e, a) => {
|
174
|
-
const
|
174
|
+
const u = p("FmSearch"), y = p("FmSelect"), v = p("FmDateRangePicker");
|
175
175
|
return _(), R(j, {
|
176
176
|
title: "Offline Transactions",
|
177
177
|
description: "Transactions are purchases or payments made in retail using electronic devices such as POS systems, kiosks, terminals, or ECRs.",
|
178
178
|
loading: !1
|
179
179
|
}, {
|
180
180
|
default: C(() => [
|
181
|
-
|
182
|
-
|
181
|
+
d("div", J, [
|
182
|
+
d("div", X, [
|
183
183
|
i(P),
|
184
|
-
i(
|
184
|
+
i(u, {
|
185
185
|
"model-value": t(c),
|
186
186
|
"onUpdate:modelValue": a[0] || (a[0] = (r) => g(c) ? c.value = r : null),
|
187
187
|
class: "mr-8",
|
@@ -198,13 +198,13 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
198
198
|
items: S
|
199
199
|
}, null, 8, ["modelValue"]),
|
200
200
|
i(v, {
|
201
|
-
modelValue: t(
|
202
|
-
"onUpdate:modelValue": a[2] || (a[2] = (r) => g(
|
201
|
+
modelValue: t(o),
|
202
|
+
"onUpdate:modelValue": a[2] || (a[2] = (r) => g(o) ? o.value = r : null),
|
203
203
|
compare: "",
|
204
204
|
"show-predefined-range": ""
|
205
205
|
}, null, 8, ["modelValue"])
|
206
206
|
]),
|
207
|
-
|
207
|
+
d("div", Z, [
|
208
208
|
i(Y, {
|
209
209
|
button: {
|
210
210
|
appendIcon: "file_download",
|
@@ -213,14 +213,14 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
213
213
|
},
|
214
214
|
handler: () => {
|
215
215
|
var r;
|
216
|
-
return t(x).downloadTransactions(((r =
|
216
|
+
return t(x).downloadTransactions(((r = s.value) == null ? void 0 : r.data()) ?? []);
|
217
217
|
}
|
218
218
|
}, null, 8, ["handler"])
|
219
219
|
])
|
220
220
|
]),
|
221
221
|
i($, {
|
222
222
|
ref_key: "controller",
|
223
|
-
ref:
|
223
|
+
ref: s,
|
224
224
|
"column-defs": O,
|
225
225
|
"rows-defs": E,
|
226
226
|
paginate: (r, b) => t(x).readRestaurantTransactions({
|
@@ -228,8 +228,8 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ N({
|
|
228
228
|
searchKey: t(c),
|
229
229
|
limit: r,
|
230
230
|
cursor: b,
|
231
|
-
start: t(
|
232
|
-
end: t(
|
231
|
+
start: t(o).startDate,
|
232
|
+
end: t(o).endDate
|
233
233
|
}),
|
234
234
|
onRowClick: () => {
|
235
235
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as _, resolveComponent as T, openBlock as f, createBlock as N, normalizeClass as k, withCtx as R, createElementVNode as y, toDisplayString as K, createElementBlock as O, unref as o, ref as A, h as x, onMounted as V, watch as E, createVNode as p, isRef as F } from "vue";
|
2
|
-
import { t as I, a as C } from "./transaction-
|
2
|
+
import { t as I, a as C } from "./transaction-DdbmOKZ7.js";
|
3
3
|
import { c as S, u as P } from "./index-Cnxt2xmc.js";
|
4
4
|
import { useSnackbar as $ } from "@feedmepos/ui-library";
|
5
5
|
import "./dinero-CIVmXLL-.js";
|