@feedmepos/mf-payment 1.0.0-beta.1 → 1.0.0-beta.3
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/README.md +11 -1
- package/dist/{PayoutAccount-Bj5zvmoj.js → PayoutAccount-2--U2ftW.js} +91 -81
- package/dist/{PayoutAccount-BHRhEZ9h.js → PayoutAccount-NCJHAy6W.js} +1 -1
- package/dist/SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js +42 -0
- package/dist/{TerminalTransaction-B77YK3hF.js → TerminalTransaction-B-8PEfAs.js} +187 -129
- package/dist/{TerminalTransaction---9nk_4q.js → TerminalTransaction-CCfrLWpi.js} +87 -77
- package/dist/{app-DjzULXn3.js → app-aEVoN1BQ.js} +109 -109
- package/dist/app.js +1 -1
- package/dist/components/SelectAll.vue.d.ts +57 -0
- package/dist/helpers/idToDate.d.ts +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-CBT1rfSS.js → payout-account-aKqgNIJX.js} +1 -1
- 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
@@ -1,81 +1,82 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { c as
|
3
|
-
import { h
|
4
|
-
import { u as
|
5
|
-
import { _ as
|
1
|
+
import { defineComponent as N, openBlock as f, createElementBlock as S, Fragment as F, unref as r, createCommentVNode as V, createElementVNode as d, resolveComponent as _, createBlock as C, normalizeClass as k, withCtx as y, toDisplayString as D, ref as K, watch as g, createVNode as c, isRef as p, h as I } from "vue";
|
2
|
+
import { c as m } from "./index-CWaKb7bG.js";
|
3
|
+
import { h } from "./moment-h96o7c8I.js";
|
4
|
+
import { u as $ } from "./index-7KNaibcq.js";
|
5
|
+
import { _ as M } from "./index.vue_vue_type_script_setup_true_lang-JdAFa8vy.js";
|
6
6
|
import "@feedmepos/ui-library";
|
7
7
|
import { g as L } from "./assets-NrCec-W0.js";
|
8
|
-
import { E as B, t as
|
8
|
+
import { E as B, t as R } from "./index-DbJpbpSs.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";
|
12
12
|
import { _ as Y } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
13
13
|
import { _ as W } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
|
14
14
|
import { _ as j } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
15
|
-
|
15
|
+
import { _ as q } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
16
|
+
const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
16
17
|
__name: "Gateway",
|
17
18
|
props: {
|
18
19
|
row: {},
|
19
20
|
data: {}
|
20
21
|
},
|
21
|
-
setup(
|
22
|
-
return (
|
23
|
-
|
22
|
+
setup(A) {
|
23
|
+
return (o, s) => (f(), S(F, null, [
|
24
|
+
o.row.original.ecrGateway ? (f(), S("img", {
|
24
25
|
key: 0,
|
25
26
|
class: "bg-fm-color-overlay-background rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
26
|
-
src:
|
27
|
-
}, null, 8,
|
27
|
+
src: r(B)
|
28
|
+
}, null, 8, z)) : V("", !0),
|
28
29
|
d("img", {
|
29
30
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
30
|
-
src:
|
31
|
-
}, null, 8,
|
31
|
+
src: r(L)(o.row.original.gateway)
|
32
|
+
}, null, 8, Q)
|
32
33
|
], 64));
|
33
34
|
}
|
34
|
-
}),
|
35
|
+
}), J = /* @__PURE__ */ N({
|
35
36
|
__name: "Status",
|
36
37
|
props: {
|
37
38
|
row: {},
|
38
39
|
data: {}
|
39
40
|
},
|
40
|
-
setup(
|
41
|
-
const
|
41
|
+
setup(A) {
|
42
|
+
const o = A;
|
42
43
|
function s() {
|
43
|
-
return
|
44
|
+
return o.data === m.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === m.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : o.data === m.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
44
45
|
}
|
45
|
-
return (
|
46
|
-
const
|
47
|
-
return
|
46
|
+
return (l, n) => {
|
47
|
+
const i = _("FmBadge");
|
48
|
+
return f(), C(i, {
|
48
49
|
inline: "",
|
49
|
-
class:
|
50
|
+
class: k(s())
|
50
51
|
}, {
|
51
|
-
default:
|
52
|
-
d("div", null,
|
52
|
+
default: y(() => [
|
53
|
+
d("div", null, D(l.data.toUpperCase()), 1)
|
53
54
|
]),
|
54
55
|
_: 1
|
55
56
|
}, 8, ["class"]);
|
56
57
|
};
|
57
58
|
}
|
58
|
-
}),
|
59
|
+
}), X = { class: "flex justify-between mb-6 items-start" }, Z = { class: "flex space-x-8 items-start" }, ee = { class: "flex space-x-4" }, Ae = /* @__PURE__ */ N({
|
59
60
|
__name: "TerminalTransaction",
|
60
|
-
setup(
|
61
|
-
const { currentRestaurant:
|
61
|
+
setup(A) {
|
62
|
+
const { currentRestaurant: o } = U(), s = K(), { dateRange: l, status: n, searchKey: i } = $({
|
62
63
|
searchKey: "",
|
63
|
-
status: [
|
64
|
+
status: [m.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
|
64
65
|
dateRange: {
|
65
|
-
startDate:
|
66
|
-
endDate:
|
66
|
+
startDate: h().startOf("day").toISOString(),
|
67
|
+
endDate: h().endOf("day").toISOString()
|
67
68
|
}
|
68
69
|
});
|
69
|
-
|
70
|
+
g([l, n], () => {
|
70
71
|
var e;
|
71
72
|
return (e = s.value) == null ? void 0 : e.reset();
|
72
|
-
}),
|
73
|
+
}), g(o, () => {
|
73
74
|
var e;
|
74
75
|
return (e = s.value) == null ? void 0 : e.reset();
|
75
76
|
});
|
76
|
-
let
|
77
|
-
|
78
|
-
|
77
|
+
let T;
|
78
|
+
g(i, async () => {
|
79
|
+
T && clearTimeout(T), T = setTimeout(
|
79
80
|
() => {
|
80
81
|
var e;
|
81
82
|
return (e = s.value) == null ? void 0 : e.reset();
|
@@ -83,24 +84,24 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ y({
|
|
83
84
|
700
|
84
85
|
);
|
85
86
|
});
|
86
|
-
const
|
87
|
+
const x = [
|
87
88
|
{
|
88
89
|
label: "Success",
|
89
|
-
value:
|
90
|
+
value: m.F_TERMINAL_TRANSACTION_ACTION.Enum.success
|
90
91
|
},
|
91
92
|
{
|
92
93
|
label: "Refunded",
|
93
|
-
value:
|
94
|
+
value: m.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded
|
94
95
|
},
|
95
96
|
{
|
96
97
|
label: "Process",
|
97
|
-
value:
|
98
|
+
value: m.F_TERMINAL_TRANSACTION_ACTION.Enum.process
|
98
99
|
},
|
99
100
|
{
|
100
101
|
label: "Failed",
|
101
|
-
value:
|
102
|
+
value: m.F_TERMINAL_TRANSACTION_ACTION.Enum.failed
|
102
103
|
}
|
103
|
-
],
|
104
|
+
], v = function(e) {
|
104
105
|
const a = e;
|
105
106
|
let u = "-";
|
106
107
|
return a.details && a.details.amount && (u = G(a.details.amount).toFormat("$0.00")), {
|
@@ -108,20 +109,20 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ y({
|
|
108
109
|
orderId: e.orderId,
|
109
110
|
refId: e.refId,
|
110
111
|
terminalId: e.terminalId,
|
111
|
-
transactionAt:
|
112
|
+
transactionAt: h(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
|
112
113
|
action: e.action,
|
113
114
|
gateway: e.gateway,
|
114
115
|
ecrGateway: e.ecrGateway,
|
115
116
|
amount: u
|
116
117
|
};
|
117
|
-
},
|
118
|
+
}, E = [
|
118
119
|
{
|
119
120
|
accessorKey: "id",
|
120
121
|
header: () => "Transaction ID",
|
121
122
|
meta: {
|
122
123
|
textAlign: "left"
|
123
124
|
},
|
124
|
-
cell: ({ cell: e }) =>
|
125
|
+
cell: ({ cell: e }) => I(W, { data: e.getValue() })
|
125
126
|
},
|
126
127
|
{
|
127
128
|
accessorKey: "orderId",
|
@@ -144,7 +145,7 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ y({
|
|
144
145
|
textAlign: "center",
|
145
146
|
maxWidth: "128px"
|
146
147
|
},
|
147
|
-
cell: ({ cell: e, row: a }) =>
|
148
|
+
cell: ({ cell: e, row: a }) => I(H, { row: a, data: e.getValue() })
|
148
149
|
},
|
149
150
|
{
|
150
151
|
accessorKey: "action",
|
@@ -153,7 +154,7 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ y({
|
|
153
154
|
textAlign: "right",
|
154
155
|
maxWidth: "132px"
|
155
156
|
},
|
156
|
-
cell: ({ cell: e, row: a }) =>
|
157
|
+
cell: ({ cell: e, row: a }) => I(J, { row: a, data: e.getValue() })
|
157
158
|
},
|
158
159
|
{
|
159
160
|
accessorKey: "amount",
|
@@ -178,64 +179,73 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ y({
|
|
178
179
|
}
|
179
180
|
];
|
180
181
|
return (e, a) => {
|
181
|
-
const u =
|
182
|
-
return
|
182
|
+
const u = _("FmSearch"), w = _("FmSelect"), O = _("FmSimpleDateRangePicker");
|
183
|
+
return f(), C(j, {
|
183
184
|
title: "Offline Transactions",
|
184
185
|
description: "Transactions are purchases or payments made in retail using electronic devices such as POS systems, kiosks, terminals, or ECRs.",
|
185
186
|
loading: !1
|
186
187
|
}, {
|
187
|
-
default:
|
188
|
-
d("div",
|
189
|
-
d("div",
|
190
|
-
|
191
|
-
|
192
|
-
"model-value":
|
193
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
188
|
+
default: y(() => [
|
189
|
+
d("div", X, [
|
190
|
+
d("div", Z, [
|
191
|
+
c(P),
|
192
|
+
c(u, {
|
193
|
+
"model-value": r(i),
|
194
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => p(i) ? i.value = t : null),
|
194
195
|
class: "mr-8",
|
195
196
|
label: "Search",
|
196
197
|
placeholder: "Search Transactions ..."
|
197
198
|
}, null, 8, ["model-value"]),
|
198
|
-
|
199
|
-
modelValue:
|
200
|
-
"onUpdate:modelValue": a[
|
199
|
+
c(w, {
|
200
|
+
modelValue: r(n),
|
201
|
+
"onUpdate:modelValue": a[2] || (a[2] = (t) => p(n) ? n.value = t : null),
|
201
202
|
class: "mr-6 w-[300px]",
|
202
203
|
label: "Status",
|
203
204
|
"label-mark": "required",
|
204
205
|
multiselect: "",
|
205
|
-
items:
|
206
|
-
},
|
207
|
-
|
208
|
-
|
209
|
-
|
206
|
+
items: x
|
207
|
+
}, {
|
208
|
+
"prepend-menu": y(() => [
|
209
|
+
c(q, {
|
210
|
+
modelValue: r(n),
|
211
|
+
"onUpdate:modelValue": a[1] || (a[1] = (t) => p(n) ? n.value = t : null),
|
212
|
+
items: x
|
213
|
+
}, null, 8, ["modelValue"])
|
214
|
+
]),
|
215
|
+
_: 1
|
216
|
+
}, 8, ["modelValue"]),
|
217
|
+
c(O, {
|
218
|
+
modelValue: r(l),
|
219
|
+
"onUpdate:modelValue": a[3] || (a[3] = (t) => p(l) ? l.value = t : null),
|
210
220
|
"show-predefined-range": ""
|
211
221
|
}, null, 8, ["modelValue"])
|
212
222
|
]),
|
213
|
-
d("div",
|
214
|
-
|
223
|
+
d("div", ee, [
|
224
|
+
c(Y, {
|
215
225
|
button: {
|
216
226
|
appendIcon: "file_download",
|
217
227
|
variant: "primary",
|
218
228
|
label: "Export"
|
219
229
|
},
|
220
230
|
handler: () => {
|
221
|
-
var
|
222
|
-
return
|
231
|
+
var t;
|
232
|
+
return r(R).downloadTransactions(((t = s.value) == null ? void 0 : t.data()) ?? []);
|
223
233
|
}
|
224
234
|
}, null, 8, ["handler"])
|
225
235
|
])
|
226
236
|
]),
|
227
|
-
|
237
|
+
c(M, {
|
228
238
|
ref_key: "controller",
|
229
239
|
ref: s,
|
230
|
-
"column-defs":
|
231
|
-
"rows-defs":
|
232
|
-
paginate: (
|
233
|
-
status:
|
234
|
-
searchKey:
|
235
|
-
limit:
|
240
|
+
"column-defs": E,
|
241
|
+
"rows-defs": v,
|
242
|
+
paginate: (t, b) => r(R).readRestaurantTransactions({
|
243
|
+
status: r(n),
|
244
|
+
searchKey: r(i),
|
245
|
+
limit: t,
|
236
246
|
cursor: b,
|
237
|
-
start:
|
238
|
-
end:
|
247
|
+
start: r(l).startDate,
|
248
|
+
end: r(l).endDate
|
239
249
|
})
|
240
250
|
}, null, 8, ["paginate"])
|
241
251
|
]),
|
@@ -245,5 +255,5 @@ const q = ["src"], z = ["src"], Q = /* @__PURE__ */ y({
|
|
245
255
|
}
|
246
256
|
});
|
247
257
|
export {
|
248
|
-
|
258
|
+
Ae as default
|
249
259
|
};
|