@feedmepos/mf-payment 0.0.0-beta.12 → 0.0.0-beta.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js +42 -0
- package/dist/Modal-DB8M9o1T.js +13 -0
- package/dist/{PayoutAccount-DQm62Wf2.js → PayoutAccount-CIKS18wv.js} +37 -34
- package/dist/{PayoutAccount-CeLwLffx.js → PayoutAccount-Daxv1Djz.js} +288 -3160
- package/dist/{PayoutAccountSetting-CIeos0md.js → PayoutAccountSetting-CnjAKH1q.js} +3 -3
- package/dist/Settlement-C7X_gzIk.js +142 -0
- package/dist/Settlement-DxQ9WNy-.js +146 -0
- package/dist/{SettlementTransactions-CYES5YMF.js → SettlementTransactions-Bne5lD30.js} +4 -4
- package/dist/{SettlementTransactions-B1v0f-0o.js → SettlementTransactions-RqT0OWUX.js} +100 -107
- package/dist/Terminal-CddS-zgz.js +318 -0
- package/dist/TerminalSetting-B2aM1gW-.js +176 -0
- package/dist/{TerminalTransaction-LofDTVwC.js → TerminalTransaction-XrqXeZZH.js} +18 -18
- package/dist/{Transaction-CaOxsIQH.js → Transaction-B16xeZ39.js} +80 -74
- package/dist/Transaction-CpOhK6md.js +249 -0
- package/dist/api/index.d.ts +7 -0
- package/dist/api/settlement/index.d.ts +7 -13
- package/dist/api/terminal/index.d.ts +8 -1
- package/dist/api/transaction/index.d.ts +6 -2
- package/dist/app.js +46 -40
- package/dist/{assets-DnuLfRTO.js → assets-nIQ0r4oP.js} +1 -1
- package/dist/components/AsyncButton.vue.d.ts +21 -0
- package/dist/components/CursorTable/index.vue.d.ts +16 -5
- package/dist/{index-Bmka-1lQ.js → index-CIIojtd5.js} +1 -1
- package/dist/index-CxYMbN69.js +37 -0
- package/dist/index-DflgpHga.js +55560 -0
- package/dist/{index-Coz5aeIO.js → index-DhPhiNvt.js} +13 -23
- package/dist/{index-CF56zGyu.js → index-DqQBDo_Y.js} +1 -1
- package/dist/index.vue_vue_type_script_setup_true_lang-CcY9Uu6G.js +155 -0
- package/dist/package.json +3 -3
- package/dist/{payout-account-OR4juI9N.js → payout-account-C4iFFgWi.js} +260 -260
- package/dist/{transaction-vRrBf3FN.js → transaction-B4rEbejx.js} +28 -15
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/validator-D5jtpt9A.js +2877 -0
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +61 -0
- package/dist/views/admin/terminal/TerminalSetting.vue.d.ts +12 -0
- package/dist/views/admin/terminal/cell/Actions.vue.d.ts +58 -9
- package/dist/views/admin/terminal/tabs/Fiuu.vue.d.ts +72 -0
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +63 -0
- package/package.json +3 -3
- package/dist/Settlement-BVGACeme.js +0 -136
- package/dist/Settlement-Ce48KHrc.js +0 -132
- package/dist/Terminal-ByKV2Rof.js +0 -204
- package/dist/Transaction-C-X11abA.js +0 -242
- package/dist/index-DCPNrUDq.js +0 -40075
- package/dist/index.vue_vue_type_script_setup_true_lang-CAR-bNaR.js +0 -150
@@ -1,68 +1,69 @@
|
|
1
|
-
import { defineComponent as _, resolveComponent as
|
2
|
-
import { t as
|
3
|
-
import { e as A, u as
|
4
|
-
import "@feedmepos/ui-library";
|
1
|
+
import { defineComponent as _, resolveComponent as c, openBlock as f, createBlock as g, normalizeClass as O, withCtx as R, createElementVNode as w, toDisplayString as K, unref as s, ref as F, h as S, onMounted as V, watch as N, createVNode as T, isRef as b } from "vue";
|
2
|
+
import { t as E, a as k } from "./transaction-B4rEbejx.js";
|
3
|
+
import { e as A, u as C } from "./index-DflgpHga.js";
|
4
|
+
import { useSnackbar as P } from "@feedmepos/ui-library";
|
5
5
|
import "./dinero-CIVmXLL-.js";
|
6
6
|
import { h as I } from "./moment-h96o7c8I.js";
|
7
|
-
import { g as
|
8
|
-
import { useCoreStore as
|
9
|
-
import { _ as
|
10
|
-
import { u as
|
11
|
-
|
7
|
+
import { g as L, a as M } from "./assets-nIQ0r4oP.js";
|
8
|
+
import { useCoreStore as U } from "@feedmepos/mf-common";
|
9
|
+
import { _ as B } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
10
|
+
import { u as $ } from "./index-CIIojtd5.js";
|
11
|
+
import { _ as G } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
12
|
+
const Y = /* @__PURE__ */ _({
|
12
13
|
__name: "Status",
|
13
14
|
props: {
|
14
15
|
row: {},
|
15
16
|
data: {}
|
16
17
|
},
|
17
18
|
setup(l) {
|
18
|
-
const
|
19
|
+
const n = l;
|
19
20
|
function a() {
|
20
|
-
return
|
21
|
+
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";
|
21
22
|
}
|
22
23
|
return (r, u) => {
|
23
|
-
const d =
|
24
|
-
return
|
24
|
+
const d = c("FmBadge");
|
25
|
+
return f(), g(d, {
|
25
26
|
inline: "",
|
26
|
-
class:
|
27
|
+
class: O(a())
|
27
28
|
}, {
|
28
29
|
default: R(() => [
|
29
|
-
w("div", null,
|
30
|
+
w("div", null, K(r.data), 1)
|
30
31
|
]),
|
31
32
|
_: 1
|
32
33
|
}, 8, ["class"]);
|
33
34
|
};
|
34
35
|
}
|
35
|
-
}),
|
36
|
+
}), q = /* @__PURE__ */ _({
|
36
37
|
__name: "Gateway",
|
37
38
|
props: {
|
38
39
|
row: {},
|
39
40
|
data: {}
|
40
41
|
},
|
41
42
|
setup(l) {
|
42
|
-
return (
|
43
|
-
const r =
|
44
|
-
return
|
45
|
-
src:
|
43
|
+
return (n, a) => {
|
44
|
+
const r = c("FmThumbnail");
|
45
|
+
return f(), g(r, {
|
46
|
+
src: s(L)(n.row.original.gateway),
|
46
47
|
class: "mr-2 border-transparent w-[32px] h-[32px]"
|
47
48
|
}, null, 8, ["src"]);
|
48
49
|
};
|
49
50
|
}
|
50
|
-
}),
|
51
|
+
}), J = /* @__PURE__ */ _({
|
51
52
|
__name: "Method",
|
52
53
|
props: {
|
53
54
|
row: {},
|
54
55
|
data: {}
|
55
56
|
},
|
56
57
|
setup(l) {
|
57
|
-
return (
|
58
|
-
const r =
|
59
|
-
return
|
60
|
-
src:
|
58
|
+
return (n, a) => {
|
59
|
+
const r = c("FmThumbnail");
|
60
|
+
return f(), g(r, {
|
61
|
+
src: s(M)(n.row.original.method.issuer),
|
61
62
|
class: "mr-2 border-transparent w-[32px] h-[32px]"
|
62
63
|
}, null, 8, ["src"]);
|
63
64
|
};
|
64
65
|
}
|
65
|
-
}),
|
66
|
+
}), j = /* @__PURE__ */ _({
|
66
67
|
__name: "TransactionTable",
|
67
68
|
props: {
|
68
69
|
data: {
|
@@ -75,8 +76,8 @@ const $ = /* @__PURE__ */ _({
|
|
75
76
|
}
|
76
77
|
},
|
77
78
|
emits: ["row-click"],
|
78
|
-
setup(l, { emit:
|
79
|
-
const a = l, r =
|
79
|
+
setup(l, { emit: n }) {
|
80
|
+
const a = l, r = n, u = F(""), d = [
|
80
81
|
{
|
81
82
|
header: () => "Transaction ID",
|
82
83
|
accessorKey: "id"
|
@@ -91,7 +92,7 @@ const $ = /* @__PURE__ */ _({
|
|
91
92
|
meta: {
|
92
93
|
textAlign: "center"
|
93
94
|
},
|
94
|
-
cell: ({ cell:
|
95
|
+
cell: ({ cell: t, row: e }) => e.original.method ? S(q, { row: e, data: t.getValue() }) : ""
|
95
96
|
},
|
96
97
|
{
|
97
98
|
header: () => "Method",
|
@@ -99,7 +100,7 @@ const $ = /* @__PURE__ */ _({
|
|
99
100
|
meta: {
|
100
101
|
textAlign: "center"
|
101
102
|
},
|
102
|
-
cell: ({ cell:
|
103
|
+
cell: ({ cell: t, row: e }) => e.original.method ? S(J, { row: e, data: t.getValue() }) : ""
|
103
104
|
},
|
104
105
|
{
|
105
106
|
header: () => "Type",
|
@@ -107,17 +108,17 @@ const $ = /* @__PURE__ */ _({
|
|
107
108
|
meta: {
|
108
109
|
textAlign: "center"
|
109
110
|
},
|
110
|
-
cell: ({ row:
|
111
|
-
if (!
|
111
|
+
cell: ({ row: t }) => {
|
112
|
+
if (!t.original.method)
|
112
113
|
return "";
|
113
|
-
const e =
|
114
|
+
const e = t.original.method.variant;
|
114
115
|
return e.includes("_ONLINE") ? "ONLINE" : e.includes("_OFFLINE") ? "OFFLINE" : e;
|
115
116
|
}
|
116
117
|
},
|
117
118
|
{
|
118
119
|
header: () => "Status",
|
119
120
|
accessorKey: "status",
|
120
|
-
cell: ({ cell:
|
121
|
+
cell: ({ cell: t, row: e }) => S(Y, { row: e, data: t.getValue() })
|
121
122
|
},
|
122
123
|
{
|
123
124
|
header: () => "Transaction At",
|
@@ -139,95 +140,100 @@ const $ = /* @__PURE__ */ _({
|
|
139
140
|
accessorKey: "payout"
|
140
141
|
}
|
141
142
|
];
|
142
|
-
return (
|
143
|
-
const h =
|
144
|
-
return
|
143
|
+
return (t, e) => {
|
144
|
+
const h = c("FmTable");
|
145
|
+
return f(), g(h, {
|
145
146
|
modelValue: u.value,
|
146
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
147
|
+
"onUpdate:modelValue": e[0] || (e[0] = (i) => u.value = i),
|
147
148
|
"column-defs": d,
|
148
149
|
"row-data": a.data,
|
149
150
|
loading: a.loading,
|
150
|
-
onRowClick: e[1] || (e[1] = (
|
151
|
+
onRowClick: e[1] || (e[1] = (i) => r("row-click", a.data.at(i.index)))
|
151
152
|
}, null, 8, ["modelValue", "row-data", "loading"]);
|
152
153
|
};
|
153
154
|
}
|
154
|
-
}),
|
155
|
+
}), z = { class: "flex justify-between mb-6 items-center" }, Q = { class: "flex space-x-4" }, H = { class: "flex space-x-4" }, ie = /* @__PURE__ */ _({
|
155
156
|
__name: "Transaction",
|
156
157
|
setup(l) {
|
157
|
-
const { dateRange:
|
158
|
+
const { dateRange: n, searchKey: a } = $({
|
158
159
|
searchKey: "",
|
159
160
|
dateRange: {
|
160
161
|
startDate: I().startOf("day").toISOString(),
|
161
162
|
endDate: I().endOf("day").toISOString()
|
162
163
|
}
|
163
|
-
}), { isLoading: r, startAsyncCall: u } =
|
164
|
+
}), { isLoading: r, startAsyncCall: u } = C(!0);
|
165
|
+
P();
|
166
|
+
const { currentRestaurant: d } = U(), t = F([]), e = F([]);
|
164
167
|
async function h() {
|
165
168
|
await u(async () => {
|
166
|
-
const { startDate: y, endDate: o } =
|
169
|
+
const { startDate: y, endDate: o } = n.value, m = await E.readRestaurantTransactions({
|
167
170
|
start: y,
|
168
171
|
end: o
|
169
172
|
});
|
170
|
-
if (
|
171
|
-
var
|
172
|
-
e.value =
|
173
|
-
const
|
174
|
-
return
|
173
|
+
if (t.value = k(m), e.value = t.value, a.value > "") {
|
174
|
+
var x = new RegExp(a.value, "i");
|
175
|
+
e.value = t.value.filter((p) => {
|
176
|
+
const D = JSON.stringify(p);
|
177
|
+
return x.test(D);
|
175
178
|
});
|
176
179
|
}
|
177
180
|
});
|
178
181
|
}
|
179
|
-
function
|
182
|
+
function i() {
|
180
183
|
h();
|
181
184
|
}
|
182
|
-
|
183
|
-
let
|
184
|
-
return
|
185
|
-
|
185
|
+
V(i), N(d, i);
|
186
|
+
let v;
|
187
|
+
return N(a, async () => {
|
188
|
+
v && clearTimeout(v), v = setTimeout(() => {
|
186
189
|
var y = new RegExp(a.value, "i");
|
187
|
-
e.value =
|
190
|
+
e.value = t.value.filter((o) => {
|
188
191
|
const m = JSON.stringify(o);
|
189
192
|
return y.test(m);
|
190
193
|
});
|
191
194
|
}, 700);
|
192
195
|
}), (y, o) => {
|
193
|
-
const m =
|
194
|
-
return
|
196
|
+
const m = c("FmSearch"), x = c("FmDateRangePicker");
|
197
|
+
return f(), g(B, {
|
195
198
|
title: "Transactions",
|
196
199
|
description: "Transactions are purchases or payments made over the internet using electronic methods like cards or digital wallets.",
|
197
|
-
loading:
|
200
|
+
loading: s(r)
|
198
201
|
}, {
|
199
202
|
default: R(() => [
|
200
|
-
w("div",
|
201
|
-
w("div",
|
203
|
+
w("div", z, [
|
204
|
+
w("div", Q, [
|
202
205
|
T(m, {
|
203
|
-
"model-value":
|
204
|
-
"onUpdate:modelValue": o[0] || (o[0] = (p) =>
|
206
|
+
"model-value": s(a),
|
207
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => b(a) ? a.value = p : null),
|
205
208
|
class: "mr-8",
|
206
209
|
label: "Search",
|
207
210
|
placeholder: "Search Transactions ..."
|
208
211
|
}, null, 8, ["model-value"]),
|
209
|
-
T(
|
210
|
-
modelValue:
|
212
|
+
T(x, {
|
213
|
+
modelValue: s(n),
|
211
214
|
"onUpdate:modelValue": [
|
212
|
-
o[1] || (o[1] = (p) =>
|
215
|
+
o[1] || (o[1] = (p) => b(n) ? n.value = p : null),
|
213
216
|
h
|
214
217
|
],
|
215
218
|
compare: "",
|
216
219
|
"show-predefined-range": ""
|
217
220
|
}, null, 8, ["modelValue"])
|
218
221
|
]),
|
219
|
-
w("div",
|
220
|
-
T(
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
222
|
+
w("div", H, [
|
223
|
+
T(G, {
|
224
|
+
button: {
|
225
|
+
appendIcon: "file_download",
|
226
|
+
variant: "primary",
|
227
|
+
label: "Export"
|
228
|
+
},
|
229
|
+
handler: async () => {
|
230
|
+
await s(E).downloadRestaurantTransactionReport(t.value);
|
225
231
|
}
|
226
|
-
})
|
232
|
+
}, null, 8, ["handler"])
|
227
233
|
])
|
228
234
|
]),
|
229
|
-
T(
|
230
|
-
loading:
|
235
|
+
T(j, {
|
236
|
+
loading: s(r),
|
231
237
|
data: e.value
|
232
238
|
}, null, 8, ["loading", "data"])
|
233
239
|
]),
|
@@ -237,5 +243,5 @@ const $ = /* @__PURE__ */ _({
|
|
237
243
|
}
|
238
244
|
});
|
239
245
|
export {
|
240
|
-
|
246
|
+
ie as default
|
241
247
|
};
|
@@ -0,0 +1,249 @@
|
|
1
|
+
import { defineComponent as _, resolveComponent as d, openBlock as f, createBlock as g, normalizeClass as D, withCtx as E, createElementVNode as T, toDisplayString as O, unref as o, ref as A, h as v, onMounted as R, watch as K, createVNode as y, isRef as F } from "vue";
|
2
|
+
import { t as N, a as V } from "./transaction-B4rEbejx.js";
|
3
|
+
import { e as S, u as C } from "./index-DflgpHga.js";
|
4
|
+
import "@feedmepos/ui-library";
|
5
|
+
import "./dinero-CIVmXLL-.js";
|
6
|
+
import { h as b } from "./moment-h96o7c8I.js";
|
7
|
+
import { g as P, a as k } from "./assets-nIQ0r4oP.js";
|
8
|
+
import { useCoreStore as L } from "@feedmepos/mf-common";
|
9
|
+
import { u as M } from "./index-CIIojtd5.js";
|
10
|
+
import { _ as U } from "./AdminLayout.vue_vue_type_script_setup_true_lang-oPYFBeEo.js";
|
11
|
+
import { _ as B } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
12
|
+
const $ = /* @__PURE__ */ _({
|
13
|
+
__name: "Status",
|
14
|
+
props: {
|
15
|
+
row: {},
|
16
|
+
data: {}
|
17
|
+
},
|
18
|
+
setup(c) {
|
19
|
+
const a = c;
|
20
|
+
function t() {
|
21
|
+
return a.data === S.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === S.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : a.data === S.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
22
|
+
}
|
23
|
+
return (r, u) => {
|
24
|
+
const s = d("FmBadge");
|
25
|
+
return f(), g(s, {
|
26
|
+
inline: "",
|
27
|
+
class: D(t())
|
28
|
+
}, {
|
29
|
+
default: E(() => [
|
30
|
+
T("div", null, O(r.data), 1)
|
31
|
+
]),
|
32
|
+
_: 1
|
33
|
+
}, 8, ["class"]);
|
34
|
+
};
|
35
|
+
}
|
36
|
+
}), G = /* @__PURE__ */ _({
|
37
|
+
__name: "Gateway",
|
38
|
+
props: {
|
39
|
+
row: {},
|
40
|
+
data: {}
|
41
|
+
},
|
42
|
+
setup(c) {
|
43
|
+
return (a, t) => {
|
44
|
+
const r = d("FmThumbnail");
|
45
|
+
return f(), g(r, {
|
46
|
+
src: o(P)(a.row.original.gateway),
|
47
|
+
class: "mr-2 border-transparent w-[32px] h-[32px]"
|
48
|
+
}, null, 8, ["src"]);
|
49
|
+
};
|
50
|
+
}
|
51
|
+
}), Y = /* @__PURE__ */ _({
|
52
|
+
__name: "Method",
|
53
|
+
props: {
|
54
|
+
row: {},
|
55
|
+
data: {}
|
56
|
+
},
|
57
|
+
setup(c) {
|
58
|
+
return (a, t) => {
|
59
|
+
const r = d("FmThumbnail");
|
60
|
+
return f(), g(r, {
|
61
|
+
src: o(k)(a.row.original.method.issuer),
|
62
|
+
class: "mr-2 border-transparent w-[32px] h-[32px]"
|
63
|
+
}, null, 8, ["src"]);
|
64
|
+
};
|
65
|
+
}
|
66
|
+
}), q = /* @__PURE__ */ _({
|
67
|
+
__name: "TransactionTable",
|
68
|
+
props: {
|
69
|
+
data: {
|
70
|
+
type: Array,
|
71
|
+
required: !0
|
72
|
+
},
|
73
|
+
loading: {
|
74
|
+
type: Boolean,
|
75
|
+
required: !0
|
76
|
+
}
|
77
|
+
},
|
78
|
+
emits: ["row-click"],
|
79
|
+
setup(c, { emit: a }) {
|
80
|
+
const t = c, r = a, u = A(""), s = [
|
81
|
+
{
|
82
|
+
header: () => "Transaction ID",
|
83
|
+
accessorKey: "id"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
header: () => "Pay ID",
|
87
|
+
accessorKey: "payId"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
header: () => "Gateway",
|
91
|
+
accessorKey: "gateway",
|
92
|
+
meta: {
|
93
|
+
textAlign: "center"
|
94
|
+
},
|
95
|
+
cell: ({ cell: n, row: e }) => e.original.method ? v(G, { row: e, data: n.getValue() }) : ""
|
96
|
+
},
|
97
|
+
{
|
98
|
+
header: () => "Method",
|
99
|
+
accessorKey: "method",
|
100
|
+
meta: {
|
101
|
+
textAlign: "center"
|
102
|
+
},
|
103
|
+
cell: ({ cell: n, row: e }) => e.original.method ? v(Y, { row: e, data: n.getValue() }) : ""
|
104
|
+
},
|
105
|
+
{
|
106
|
+
header: () => "Type",
|
107
|
+
accessorKey: "type",
|
108
|
+
meta: {
|
109
|
+
textAlign: "center"
|
110
|
+
},
|
111
|
+
cell: ({ row: n }) => {
|
112
|
+
if (!n.original.method)
|
113
|
+
return "";
|
114
|
+
const e = n.original.method.variant;
|
115
|
+
return e.includes("_ONLINE") ? "ONLINE" : e.includes("_OFFLINE") ? "OFFLINE" : e;
|
116
|
+
}
|
117
|
+
},
|
118
|
+
{
|
119
|
+
header: () => "Status",
|
120
|
+
accessorKey: "status",
|
121
|
+
cell: ({ cell: n, row: e }) => v($, { row: e, data: n.getValue() })
|
122
|
+
},
|
123
|
+
{
|
124
|
+
header: () => "Transaction At",
|
125
|
+
accessorKey: "transactionAt",
|
126
|
+
meta: {
|
127
|
+
width: "180px"
|
128
|
+
}
|
129
|
+
},
|
130
|
+
{
|
131
|
+
header: () => "Sales Amount",
|
132
|
+
accessorKey: "amount"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
header: () => "Fee",
|
136
|
+
accessorKey: "fee"
|
137
|
+
},
|
138
|
+
{
|
139
|
+
header: () => "Settlement Amount",
|
140
|
+
accessorKey: "payout"
|
141
|
+
}
|
142
|
+
];
|
143
|
+
return (n, e) => {
|
144
|
+
const w = d("FmTable");
|
145
|
+
return f(), g(w, {
|
146
|
+
modelValue: u.value,
|
147
|
+
"onUpdate:modelValue": e[0] || (e[0] = (i) => u.value = i),
|
148
|
+
"column-defs": s,
|
149
|
+
"row-data": t.data,
|
150
|
+
loading: t.loading,
|
151
|
+
onRowClick: e[1] || (e[1] = (i) => r("row-click", t.data.at(i.index)))
|
152
|
+
}, null, 8, ["modelValue", "row-data", "loading"]);
|
153
|
+
};
|
154
|
+
}
|
155
|
+
}), J = { class: "flex justify-between mb-6 items-center" }, j = { class: "flex space-x-4" }, z = { class: "flex space-x-4" }, se = /* @__PURE__ */ _({
|
156
|
+
__name: "Transaction",
|
157
|
+
setup(c) {
|
158
|
+
const { dateRange: a, searchKey: t } = M({
|
159
|
+
searchKey: "",
|
160
|
+
dateRange: {
|
161
|
+
startDate: b().startOf("day").toISOString(),
|
162
|
+
endDate: b().endOf("day").toISOString()
|
163
|
+
}
|
164
|
+
}), { isLoading: r, startAsyncCall: u } = C(!0);
|
165
|
+
L();
|
166
|
+
const s = A([]), n = A([]);
|
167
|
+
async function e() {
|
168
|
+
await u(async () => {
|
169
|
+
const { startDate: h, endDate: l } = a.value, m = await N.readTransactions({
|
170
|
+
start: h,
|
171
|
+
end: l
|
172
|
+
});
|
173
|
+
if (s.value = V(m), n.value = s.value, t.value > "") {
|
174
|
+
var x = new RegExp(t.value, "i");
|
175
|
+
n.value = s.value.filter((p) => {
|
176
|
+
const I = JSON.stringify(p);
|
177
|
+
return x.test(I);
|
178
|
+
});
|
179
|
+
}
|
180
|
+
});
|
181
|
+
}
|
182
|
+
function w() {
|
183
|
+
e();
|
184
|
+
}
|
185
|
+
R(w);
|
186
|
+
let i;
|
187
|
+
return K(t, async () => {
|
188
|
+
i && clearTimeout(i), i = setTimeout(() => {
|
189
|
+
var h = new RegExp(t.value, "i");
|
190
|
+
n.value = s.value.filter((l) => {
|
191
|
+
const m = JSON.stringify(l);
|
192
|
+
return h.test(m);
|
193
|
+
});
|
194
|
+
}, 700);
|
195
|
+
}), (h, l) => {
|
196
|
+
const m = d("FmSearch"), x = d("FmDateRangePicker");
|
197
|
+
return f(), g(U, {
|
198
|
+
title: "Transactions",
|
199
|
+
loading: o(r)
|
200
|
+
}, {
|
201
|
+
default: E(() => [
|
202
|
+
T("div", J, [
|
203
|
+
T("div", j, [
|
204
|
+
y(m, {
|
205
|
+
"model-value": o(t),
|
206
|
+
"onUpdate:modelValue": l[0] || (l[0] = (p) => F(t) ? t.value = p : null),
|
207
|
+
class: "mr-8",
|
208
|
+
label: "Search",
|
209
|
+
placeholder: "Search Transactions ..."
|
210
|
+
}, null, 8, ["model-value"]),
|
211
|
+
y(x, {
|
212
|
+
modelValue: o(a),
|
213
|
+
"onUpdate:modelValue": [
|
214
|
+
l[1] || (l[1] = (p) => F(a) ? a.value = p : null),
|
215
|
+
e
|
216
|
+
],
|
217
|
+
compare: "",
|
218
|
+
"show-predefined-range": ""
|
219
|
+
}, null, 8, ["modelValue"])
|
220
|
+
]),
|
221
|
+
T("div", z, [
|
222
|
+
y(B, {
|
223
|
+
button: {
|
224
|
+
appendIcon: "file_download",
|
225
|
+
variant: "primary",
|
226
|
+
label: "Export"
|
227
|
+
},
|
228
|
+
handler: async () => {
|
229
|
+
await o(N).downloadTransactionReport({
|
230
|
+
start: o(a).startDate,
|
231
|
+
end: o(a).endDate
|
232
|
+
});
|
233
|
+
}
|
234
|
+
}, null, 8, ["handler"])
|
235
|
+
])
|
236
|
+
]),
|
237
|
+
y(q, {
|
238
|
+
loading: o(r),
|
239
|
+
data: n.value
|
240
|
+
}, null, 8, ["loading", "data"])
|
241
|
+
]),
|
242
|
+
_: 1
|
243
|
+
}, 8, ["loading"]);
|
244
|
+
};
|
245
|
+
}
|
246
|
+
});
|
247
|
+
export {
|
248
|
+
se as default
|
249
|
+
};
|
package/dist/api/index.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { type PaginatedResult } from "@feedmepos/payment-entity";
|
2
2
|
import { type AxiosInstance, type AxiosResponse } from "axios";
|
3
|
+
import type { WorkBook } from "xlsx";
|
3
4
|
type ApiVariant = "portal" | "auth";
|
4
5
|
interface ApiUrl {
|
5
6
|
portalBackendUrl: string;
|
@@ -29,6 +30,12 @@ export declare const authInstance: (config?: {
|
|
29
30
|
}) => AxiosInstance;
|
30
31
|
export declare const businessClientInstance: () => AxiosInstance;
|
31
32
|
export declare const restaurantClientInstance: (prefix?: string) => AxiosInstance;
|
33
|
+
type TransformFunction<T> = (value: T) => any;
|
34
|
+
type TransformFunctions<T> = {
|
35
|
+
[K in keyof T]?: TransformFunction<T[K]>;
|
36
|
+
};
|
37
|
+
export declare function localWorkbookAndDownload<T extends Object>(data: T[], transformers?: TransformFunctions<T>): void;
|
38
|
+
export declare function getWorkbookAndDownload(response: AxiosResponse<WorkBook>, filename: string): void;
|
32
39
|
export declare function getData<T>(response: AxiosResponse<T>): T;
|
33
40
|
export declare function getPaginatedResult<T>(response: AxiosResponse<PaginatedResult<T>>): PaginatedResult<T>;
|
34
41
|
export {};
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { type WorkBook } from "xlsx";
|
1
|
+
import { type SettlementDtoOutput } from "@feedmepos/payment-entity";
|
3
2
|
export declare const settlementApi: {
|
4
3
|
updateRemark(payload: {
|
5
4
|
id: string;
|
@@ -9,23 +8,18 @@ export declare const settlementApi: {
|
|
9
8
|
start: string;
|
10
9
|
end: string;
|
11
10
|
}): Promise<SettlementDtoOutput[]>;
|
12
|
-
|
11
|
+
downloadSettlementReport(date: {
|
13
12
|
start: string;
|
14
13
|
end: string;
|
15
|
-
}): Promise<
|
16
|
-
|
14
|
+
}): Promise<void>;
|
15
|
+
downloadRestaurantSettlementReport(date: {
|
16
|
+
start: string;
|
17
|
+
end: string;
|
18
|
+
}): Promise<void>;
|
17
19
|
readById(settlementId: string): Promise<SettlementDtoOutput>;
|
18
20
|
readRestaurantSettlementById(settlementId: string): Promise<SettlementDtoOutput>;
|
19
21
|
readRestaurantSettlements(dateRange: {
|
20
22
|
start: string;
|
21
23
|
end: string;
|
22
24
|
}): Promise<SettlementDtoOutput[]>;
|
23
|
-
readRestaurantRMSSettlements(dateRange: {
|
24
|
-
start: string;
|
25
|
-
end: string;
|
26
|
-
}): Promise<RMSSettlementDto[]>;
|
27
|
-
readRestaurantSettlementReport(dateRange: {
|
28
|
-
start: string;
|
29
|
-
end: string;
|
30
|
-
}): Promise<any>;
|
31
25
|
};
|
@@ -1,10 +1,17 @@
|
|
1
|
-
import { type PaginatedResult } from "@feedmepos/payment-entity";
|
1
|
+
import { UpdateTerminalByIdDto, type PaginatedResult } from "@feedmepos/payment-entity";
|
2
2
|
import { FdoTerminal } from "@feedmepos/payment-entity";
|
3
3
|
export declare const temrinalApi: {
|
4
|
+
create(payload: {
|
5
|
+
name: string;
|
6
|
+
referenceId: string;
|
7
|
+
}): Promise<PaginatedResult<FdoTerminal>>;
|
4
8
|
read(payload: {
|
5
9
|
searchKey: string;
|
6
10
|
limit: number;
|
7
11
|
cursor: string;
|
8
12
|
}): Promise<PaginatedResult<FdoTerminal>>;
|
13
|
+
readById(id: string): Promise<FdoTerminal>;
|
14
|
+
updateById(id: string, payload: UpdateTerminalByIdDto): Promise<FdoTerminal>;
|
9
15
|
getBindCode(id: string): Promise<string>;
|
16
|
+
unbind(id: string): Promise<any>;
|
10
17
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import type { PortalPaymentTransaction } from "@/model/transaction";
|
2
2
|
import { PaymentRefundByTransactionIdDto, type PaymentTransactionDtoOutput } from "@feedmepos/payment-entity";
|
3
3
|
export declare const transactionApi: {
|
4
4
|
readBySettlementId(settlementId: string): Promise<PaymentTransactionDtoOutput[]>;
|
@@ -16,5 +16,9 @@ export declare const transactionApi: {
|
|
16
16
|
end: string;
|
17
17
|
}): Promise<PaymentTransactionDtoOutput[]>;
|
18
18
|
readRestaurantTransactionsBySettlementId(settlementId: string): Promise<PaymentTransactionDtoOutput[]>;
|
19
|
+
downloadRestaurantTransactionReport(data: PortalPaymentTransaction[]): Promise<void>;
|
20
|
+
downloadTransactionReport(date: {
|
21
|
+
start: string;
|
22
|
+
end: string;
|
23
|
+
}): Promise<void>;
|
19
24
|
};
|
20
|
-
export declare function getStatusColor(status: F_PAYMENT_TRANSACTION_STATUS): "warning" | "negative" | "positive" | "grey";
|