@feedmepos/mf-payment 1.1.0-beta.1 → 1.1.0-beta.2
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-BHJpjUqD.js → PayoutAccount-BpMu58oE.js} +5 -5
- package/dist/{PayoutAccount-DCkf_1yL.js → PayoutAccount-z-gdodfR.js} +360 -360
- package/dist/{PayoutAccountSetting-Bk-g7ucZ.js → PayoutAccountSetting-jZJu4WWL.js} +3 -3
- package/dist/{Restaurant-D2qq84VL.js → Restaurant-DfBX5uPS.js} +4 -4
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-hJAJYKmE.js +33 -0
- package/dist/{RestaurantSetting-DAtrtX6S.js → RestaurantSetting-KPtRoif-.js} +3 -3
- package/dist/{Settlement-Cx1tc5wt.js → Settlement-DbMQAA0_.js} +3 -3
- package/dist/Settlement-smC2PDKA.js +445 -0
- package/dist/{SettlementTransactions-C82DyYlO.js → SettlementTransactions-Bs8Il-GO.js} +3 -3
- package/dist/SettlementTransactions-Cw9DnODr.js +291 -0
- package/dist/{Terminal-Az2k8E6F.js → Terminal-HLOGtr0x.js} +5 -5
- package/dist/{TerminalSetting-C-xlLYXa.js → TerminalSetting-DraCszpQ.js} +3 -3
- package/dist/Transaction-B8cHQbbP.js +250 -0
- package/dist/{Transaction-Y_mc0yQv.js → Transaction-_CB4VTT9.js} +5 -5
- package/dist/TransactionOld-BhzUSu5h.js +99 -0
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-dwwesT4_.js → TransactionTable.vue_vue_type_script_setup_true_lang-UcnQKwQ5.js} +87 -87
- package/dist/{app-OBp4HaEY.js → app-DWRPKvx2.js} +721 -448
- package/dist/app.d.ts +278 -0
- package/dist/app.js +4 -3
- package/dist/{assets-pLBp82yE.js → assets-BImh8bhR.js} +1 -1
- package/dist/{grafana-hv7inD36.js → grafana-CPOGSE20.js} +1 -1
- package/dist/{index-1xF00w89.js → index-8eCaI4jI.js} +1 -1
- package/dist/{index-DGKxdJVj.js → index-CNZFZxie.js} +1 -1
- package/dist/{index-DD5mEX0D.js → index-D5DlMaeB.js} +1 -1
- package/dist/{index-oM4Z9ffu.js → index-DtT3I2PI.js} +1 -1
- package/dist/{index-Cqq3p9PP.js → index-DuSw-EaU.js} +1 -1
- package/dist/{index-CFYD8Dv4.js → index-eznEOmAe.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-C9tnqgzY.js → index.vue_vue_type_script_setup_true_lang-DNXWZt8k.js} +1 -1
- package/dist/package.json +8 -7
- package/dist/{payout-account-DPaS3dIs.js → payout-account-CjDkY3wf.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-p4qddIbp.js +0 -33
- package/dist/Settlement-BVIsszEJ.js +0 -447
- package/dist/SettlementTransactions-CeN4SRWa.js +0 -291
- package/dist/Transaction-CC8hc8_r.js +0 -250
- package/dist/TransactionOld-BxhI-wwm.js +0 -99
@@ -0,0 +1,291 @@
|
|
1
|
+
import { defineComponent as w, resolveComponent as g, openBlock as T, createBlock as L, normalizeClass as z, withCtx as i, createElementVNode as l, toDisplayString as n, createElementBlock as O, unref as a, ref as v, onMounted as G, watch as R, createVNode as o, createTextVNode as d, h as I } from "vue";
|
2
|
+
import { e as C, u as Y } from "./index-CNZFZxie.js";
|
3
|
+
import "@feedmepos/ui-library";
|
4
|
+
import { d as E } from "./dinero-CIVmXLL-.js";
|
5
|
+
import { g as H, a as q, t as J, b as Q } from "./assets-BImh8bhR.js";
|
6
|
+
import { _ as W } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
7
|
+
import { useRouter as X } from "vue-router";
|
8
|
+
import { s as Z } from "./index-D5DlMaeB.js";
|
9
|
+
import { useI18n as ee, useCoreStore as te } from "@feedmepos/mf-common";
|
10
|
+
const ae = /* @__PURE__ */ w({
|
11
|
+
__name: "Status",
|
12
|
+
props: {
|
13
|
+
row: {},
|
14
|
+
data: {}
|
15
|
+
},
|
16
|
+
setup(_) {
|
17
|
+
const e = _;
|
18
|
+
function f() {
|
19
|
+
return e.data === C.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : e.data === C.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : e.data === C.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
20
|
+
}
|
21
|
+
return (h, k) => {
|
22
|
+
const F = g("FmBadge");
|
23
|
+
return T(), L(F, {
|
24
|
+
inline: "",
|
25
|
+
class: z(f())
|
26
|
+
}, {
|
27
|
+
default: i(() => [
|
28
|
+
l("div", null, n(h.data), 1)
|
29
|
+
]),
|
30
|
+
_: 1
|
31
|
+
}, 8, ["class"]);
|
32
|
+
};
|
33
|
+
}
|
34
|
+
}), ne = ["src"], le = /* @__PURE__ */ w({
|
35
|
+
__name: "Gateway",
|
36
|
+
props: {
|
37
|
+
row: {},
|
38
|
+
data: {}
|
39
|
+
},
|
40
|
+
setup(_) {
|
41
|
+
return (e, f) => (T(), O("img", {
|
42
|
+
class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
|
43
|
+
src: a(H)(e.row.original.gateway)
|
44
|
+
}, null, 8, ne));
|
45
|
+
}
|
46
|
+
}), oe = ["src"], se = /* @__PURE__ */ w({
|
47
|
+
__name: "Method",
|
48
|
+
props: {
|
49
|
+
row: {},
|
50
|
+
data: {}
|
51
|
+
},
|
52
|
+
setup(_) {
|
53
|
+
return (e, f) => (T(), O("img", {
|
54
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
55
|
+
src: a(q)(e.row.original.method.issuer, e.row.original.method.variant)
|
56
|
+
}, null, 8, oe));
|
57
|
+
}
|
58
|
+
}), re = { class: "flex mb-6" }, ie = { class: "my-6 w-[240px]" }, be = /* @__PURE__ */ w({
|
59
|
+
__name: "SettlementTransactions",
|
60
|
+
props: {
|
61
|
+
settlementId: {
|
62
|
+
type: String,
|
63
|
+
required: !0
|
64
|
+
}
|
65
|
+
},
|
66
|
+
setup(_) {
|
67
|
+
const { t: e } = ee(), f = _, { isLoading: h, startAsyncCall: k } = Y(!0), { currentRestaurant: F } = te(), M = X(), u = v(), x = v([]), N = v([]);
|
68
|
+
async function P(s = !1) {
|
69
|
+
k(async () => {
|
70
|
+
s || (u.value = await Z.readRestaurantSettlementById(f.settlementId));
|
71
|
+
const t = await J.readRestaurantTransactionsBySettlementId(f.settlementId);
|
72
|
+
x.value = Q(t), N.value = x.value;
|
73
|
+
});
|
74
|
+
}
|
75
|
+
function B() {
|
76
|
+
P();
|
77
|
+
}
|
78
|
+
G(B), R(F, B);
|
79
|
+
const V = v(""), U = [
|
80
|
+
{
|
81
|
+
header: () => e("settlements.dialog.feedme.id"),
|
82
|
+
accessorKey: "id"
|
83
|
+
},
|
84
|
+
{
|
85
|
+
header: () => e("settlements.dialog.feedme.pay_id"),
|
86
|
+
accessorKey: "payId"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
header: () => e("settlements.dialog.feedme.gateway"),
|
90
|
+
accessorKey: "gateway",
|
91
|
+
meta: {
|
92
|
+
textAlign: "center"
|
93
|
+
},
|
94
|
+
cell: ({ cell: s, row: t }) => t.original.method ? I(le, { row: t, data: s.getValue() }) : ""
|
95
|
+
},
|
96
|
+
{
|
97
|
+
header: () => e("settlements.dialog.feedme.method"),
|
98
|
+
accessorKey: "method",
|
99
|
+
meta: {
|
100
|
+
textAlign: "center"
|
101
|
+
},
|
102
|
+
cell: ({ cell: s, row: t }) => t.original.method ? I(se, { row: t, data: s.getValue() }) : ""
|
103
|
+
},
|
104
|
+
{
|
105
|
+
header: () => e("settlements.dialog.feedme.type"),
|
106
|
+
accessorKey: "type",
|
107
|
+
meta: {
|
108
|
+
textAlign: "center"
|
109
|
+
},
|
110
|
+
cell: ({ row: s }) => {
|
111
|
+
if (!s.original.method)
|
112
|
+
return "";
|
113
|
+
const t = s.original.method.variant;
|
114
|
+
return t.includes("_ONLINE") ? "ONLINE" : t.includes("_OFFLINE") ? "OFFLINE" : t;
|
115
|
+
}
|
116
|
+
},
|
117
|
+
{
|
118
|
+
header: () => e("settlements.dialog.feedme.status"),
|
119
|
+
accessorKey: "status",
|
120
|
+
cell: ({ cell: s, row: t }) => I(ae, { row: t, data: s.getValue() })
|
121
|
+
},
|
122
|
+
{
|
123
|
+
header: () => e("settlements.dialog.feedme.transaction_at"),
|
124
|
+
accessorKey: "transactionAt",
|
125
|
+
meta: {
|
126
|
+
width: "180px"
|
127
|
+
}
|
128
|
+
},
|
129
|
+
{
|
130
|
+
header: () => e("settlements.dialog.feedme.sales_amount"),
|
131
|
+
accessorKey: "amount"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
header: () => e("settlements.dialog.feedme.fee"),
|
135
|
+
accessorKey: "fee"
|
136
|
+
},
|
137
|
+
{
|
138
|
+
header: () => e("settlements.dialog.feedme.settlement_amount"),
|
139
|
+
accessorKey: "payout"
|
140
|
+
}
|
141
|
+
], y = v("");
|
142
|
+
let S;
|
143
|
+
return R(y, async () => {
|
144
|
+
S && clearTimeout(S), S = setTimeout(() => {
|
145
|
+
var s = new RegExp(y.value, "i");
|
146
|
+
N.value = x.value.filter((t) => {
|
147
|
+
const b = JSON.stringify(t);
|
148
|
+
return s.test(b);
|
149
|
+
});
|
150
|
+
}, 700);
|
151
|
+
}), (s, t) => {
|
152
|
+
var K;
|
153
|
+
const b = g("FmCardHeader"), p = g("FmCardSection"), A = g("FmCard"), D = g("FmSearch"), j = g("FmTable");
|
154
|
+
return T(), L(W, {
|
155
|
+
title: `${a(e)("settlements.dialog.title")} (${(K = u.value) == null ? void 0 : K._id})`,
|
156
|
+
loading: a(h),
|
157
|
+
onBack: a(M).back
|
158
|
+
}, {
|
159
|
+
default: i(() => [
|
160
|
+
l("div", re, [
|
161
|
+
o(A, {
|
162
|
+
horizontal: "",
|
163
|
+
class: "flex-1 p-6",
|
164
|
+
variant: "elevated"
|
165
|
+
}, {
|
166
|
+
default: i(() => [
|
167
|
+
o(p, { class: "flex flex-col gap-16 justify-between" }, {
|
168
|
+
default: i(() => [
|
169
|
+
o(b, {
|
170
|
+
class: "p-0",
|
171
|
+
title: a(e)("settlements.dialog.info.transaction.title"),
|
172
|
+
subtitle: ""
|
173
|
+
}, null, 8, ["title"]),
|
174
|
+
o(p, { class: "p-0" }, {
|
175
|
+
default: i(() => {
|
176
|
+
var r, m, c, $;
|
177
|
+
return [
|
178
|
+
l("b", null, n(a(e)("settlements.dialog.info.transaction.for")), 1),
|
179
|
+
d(": " + n((m = (r = u.value) == null ? void 0 : r.store) == null ? void 0 : m.event) + " ", 1),
|
180
|
+
t[2] || (t[2] = l("br", null, null, -1)),
|
181
|
+
l("b", null, n(a(e)("settlements.dialog.info.transaction.reference")), 1),
|
182
|
+
d(": " + n(($ = (c = u.value) == null ? void 0 : c.store) == null ? void 0 : $.id), 1),
|
183
|
+
t[3] || (t[3] = l("br", null, null, -1)),
|
184
|
+
l("b", null, n(a(e)("settlements.dialog.info.transaction.count")), 1),
|
185
|
+
d(": " + n(x.value.length), 1)
|
186
|
+
];
|
187
|
+
}),
|
188
|
+
_: 1
|
189
|
+
})
|
190
|
+
]),
|
191
|
+
_: 1
|
192
|
+
})
|
193
|
+
]),
|
194
|
+
_: 1
|
195
|
+
}),
|
196
|
+
o(A, {
|
197
|
+
horizontal: "",
|
198
|
+
class: "flex-1 p-6 mx-6",
|
199
|
+
variant: "elevated"
|
200
|
+
}, {
|
201
|
+
default: i(() => [
|
202
|
+
o(p, { class: "flex flex-col gap-16 justify-between" }, {
|
203
|
+
default: i(() => [
|
204
|
+
o(b, {
|
205
|
+
class: "p-0",
|
206
|
+
title: a(e)("settlements.dialog.info.bank.title"),
|
207
|
+
subtitle: ""
|
208
|
+
}, null, 8, ["title"]),
|
209
|
+
o(p, { class: "p-0" }, {
|
210
|
+
default: i(() => {
|
211
|
+
var r, m, c;
|
212
|
+
return [
|
213
|
+
l("b", null, n(a(e)("settlements.dialog.info.bank.for")), 1),
|
214
|
+
d(": " + n((r = u.value) == null ? void 0 : r.beneficiaryBank.name), 1),
|
215
|
+
t[4] || (t[4] = l("br", null, null, -1)),
|
216
|
+
l("b", null, n(a(e)("settlements.dialog.info.bank.name")), 1),
|
217
|
+
d(": " + n((m = u.value) == null ? void 0 : m.beneficiaryBank.holderName), 1),
|
218
|
+
t[5] || (t[5] = l("br", null, null, -1)),
|
219
|
+
l("b", null, n(a(e)("settlements.dialog.info.bank.number")), 1),
|
220
|
+
d(": " + n((c = u.value) == null ? void 0 : c.beneficiaryBank.accountNumber), 1)
|
221
|
+
];
|
222
|
+
}),
|
223
|
+
_: 1
|
224
|
+
})
|
225
|
+
]),
|
226
|
+
_: 1
|
227
|
+
})
|
228
|
+
]),
|
229
|
+
_: 1
|
230
|
+
}),
|
231
|
+
o(A, {
|
232
|
+
horizontal: "",
|
233
|
+
class: "flex-1 p-6",
|
234
|
+
variant: "elevated"
|
235
|
+
}, {
|
236
|
+
default: i(() => [
|
237
|
+
o(p, { class: "flex flex-col gap-16 justify-between" }, {
|
238
|
+
default: i(() => [
|
239
|
+
o(b, {
|
240
|
+
class: "p-0",
|
241
|
+
title: a(e)("settlements.dialog.info.payout.title"),
|
242
|
+
subtitle: ""
|
243
|
+
}, null, 8, ["title"]),
|
244
|
+
o(p, { class: "p-0" }, {
|
245
|
+
default: i(() => {
|
246
|
+
var r, m, c;
|
247
|
+
return [
|
248
|
+
l("b", null, n(a(e)("settlements.dialog.info.payout.amount")), 1),
|
249
|
+
d(": " + n(a(E)((r = u.value) == null ? void 0 : r.totalAmount).toFormat("$0.00")), 1),
|
250
|
+
t[6] || (t[6] = l("br", null, null, -1)),
|
251
|
+
l("b", null, n(a(e)("settlements.dialog.info.payout.fee")), 1),
|
252
|
+
d(": " + n(a(E)((m = u.value) == null ? void 0 : m.totalFee).toFormat("$0.00")), 1),
|
253
|
+
t[7] || (t[7] = l("br", null, null, -1)),
|
254
|
+
l("b", null, n(a(e)("settlements.dialog.info.payout.payout")), 1),
|
255
|
+
d(": " + n(a(E)((c = u.value) == null ? void 0 : c.totalPayout).toFormat("$0.00")), 1)
|
256
|
+
];
|
257
|
+
}),
|
258
|
+
_: 1
|
259
|
+
})
|
260
|
+
]),
|
261
|
+
_: 1
|
262
|
+
})
|
263
|
+
]),
|
264
|
+
_: 1
|
265
|
+
})
|
266
|
+
]),
|
267
|
+
l("div", ie, [
|
268
|
+
o(D, {
|
269
|
+
modelValue: y.value,
|
270
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => y.value = r),
|
271
|
+
placeholder: a(e)("settlements.dialog.search")
|
272
|
+
}, null, 8, ["modelValue", "placeholder"])
|
273
|
+
]),
|
274
|
+
o(j, {
|
275
|
+
modelValue: V.value,
|
276
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => V.value = r),
|
277
|
+
"shrink-at": !1,
|
278
|
+
"search-value": y.value,
|
279
|
+
"row-data": N.value,
|
280
|
+
"column-defs": U,
|
281
|
+
loading: a(h)
|
282
|
+
}, null, 8, ["modelValue", "search-value", "row-data", "loading"])
|
283
|
+
]),
|
284
|
+
_: 1
|
285
|
+
}, 8, ["title", "loading", "onBack"]);
|
286
|
+
};
|
287
|
+
}
|
288
|
+
});
|
289
|
+
export {
|
290
|
+
be as default
|
291
|
+
};
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { defineComponent as z, ref as I, onUpdated as oe, h as M, onMounted as he, Fragment as ie, openBlock as N, createElementBlock as G, createElementVNode as A, createTextVNode as ee, toDisplayString as se, createVNode as k, resolveComponent as _, normalizeClass as me, withCtx as q, createBlock as D, createCommentVNode as V, computed as pe, unref as P, watch as te, isRef as ge } from "vue";
|
2
|
-
import { e as Ce } from "./index-
|
2
|
+
import { e as Ce } from "./index-CNZFZxie.js";
|
3
3
|
import { h as ye } from "./moment-h96o7c8I.js";
|
4
|
-
import { u as we } from "./index-
|
5
|
-
import { _ as Ee } from "./index.vue_vue_type_script_setup_true_lang-
|
4
|
+
import { u as we } from "./index-8eCaI4jI.js";
|
5
|
+
import { _ as Ee } from "./index.vue_vue_type_script_setup_true_lang-DNXWZt8k.js";
|
6
6
|
import { _ as Me } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
7
7
|
import { useSnackbar as W, useDialogChild as Re, useDialog as Ae } from "@feedmepos/ui-library";
|
8
|
-
import { t as Q } from "./index-
|
8
|
+
import { t as Q } from "./index-DtT3I2PI.js";
|
9
9
|
import { c as le } from "./clipboard-4jh1WteU.js";
|
10
10
|
import { useCoreStore as ue } from "@feedmepos/mf-common";
|
11
|
-
import { g as Se } from "./grafana-
|
11
|
+
import { g as Se } from "./grafana-CPOGSE20.js";
|
12
12
|
import { u as Y } from "./error-K1CakhA9.js";
|
13
13
|
import { z as re, a as ne } from "./validator-D5jtpt9A.js";
|
14
14
|
import { w as ae } from "./Modal-DB8M9o1T.js";
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { defineComponent as T, openBlock as b, createElementBlock as N, Fragment as Y, createElementVNode as g, createTextVNode as V, toDisplayString as S, toRef as M, ref as F, watch as D, onMounted as G, computed as O, resolveComponent as f, unref as _, createVNode as I, createBlock as x, withCtx as q, createCommentVNode as B, isRef as h, resolveDynamicComponent as L, normalizeProps as j, mergeProps as z } from "vue";
|
2
|
-
import { u as R, e as U } from "./index-
|
2
|
+
import { u as R, e as U } from "./index-CNZFZxie.js";
|
3
3
|
import { useRouter as E } from "vue-router";
|
4
|
-
import { t as C } from "./index-
|
4
|
+
import { t as C } from "./index-DtT3I2PI.js";
|
5
5
|
import { _ as A } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
6
|
-
import { u as H } from "./index-
|
6
|
+
import { u as H } from "./index-8eCaI4jI.js";
|
7
7
|
import { useSnackbar as Q } from "@feedmepos/ui-library";
|
8
8
|
import { u as J } from "./error-K1CakhA9.js";
|
9
9
|
import { z as W, a as X } from "./validator-D5jtpt9A.js";
|
@@ -0,0 +1,250 @@
|
|
1
|
+
import { defineComponent as B, ref as g, watch as E, computed as I, onMounted as J, resolveComponent as y, 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 b } from "vue";
|
2
|
+
import { t as L, b as G } from "./assets-BImh8bhR.js";
|
3
|
+
import { u as K, _ as C } from "./index-CNZFZxie.js";
|
4
|
+
import { _ as Q } from "./TransactionTable.vue_vue_type_script_setup_true_lang-UcnQKwQ5.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-8eCaI4jI.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-DuSw-EaU.js";
|
13
|
+
import { t as ae } from "./index-DtT3I2PI.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: c, readRestaurants: r } = q(), { isLoading: l, startAsyncCall: m } = K(!0), d = g([]), u = g([]), a = g();
|
23
|
+
E(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 && "components.restaurant",
|
28
|
+
u.value.length > 0 && "components.device",
|
29
|
+
d.value.length > 0 && "components.payout_account"
|
30
|
+
].filter((e) => !!e)), w = I(() => ({
|
31
|
+
"components.restaurant": s.value.filter((e) => e.managable).map((e) => ({
|
32
|
+
by: "RESTAURANT",
|
33
|
+
prefix: f("components.restaurant"),
|
34
|
+
label: e.profile.name,
|
35
|
+
value: e._id
|
36
|
+
})),
|
37
|
+
"components.device": u.value.filter((e) => e.deviceType).map((e) => ({
|
38
|
+
by: "DEVICE",
|
39
|
+
prefix: f("components.device"),
|
40
|
+
label: e.deviceType + " | " + (e.deviceType === "TERMINAL" ? e.name : e.restaurant.profile.name),
|
41
|
+
value: e._id
|
42
|
+
})),
|
43
|
+
"components.payout_account": d.value.filter((e) => e.store.event).map((e) => {
|
44
|
+
var o, p;
|
45
|
+
return {
|
46
|
+
by: "PAYOUT_ACCOUNT",
|
47
|
+
prefix: f("components.payout_account"),
|
48
|
+
label: e.store.event + " | " + (((p = (o = e.ref) == null ? void 0 : o.profile) == null ? void 0 : p.name) ?? e.ref.name),
|
49
|
+
value: e._id
|
50
|
+
};
|
51
|
+
})
|
52
|
+
}));
|
53
|
+
async function A() {
|
54
|
+
return m(async () => {
|
55
|
+
let e = await te.readBusinessPayoutAccounts();
|
56
|
+
e.length !== 0 && (d.value = e);
|
57
|
+
});
|
58
|
+
}
|
59
|
+
async function R() {
|
60
|
+
return m(async () => {
|
61
|
+
let e = await ae.getTerminals();
|
62
|
+
e.length !== 0 && (u.value = e);
|
63
|
+
});
|
64
|
+
}
|
65
|
+
async function _() {
|
66
|
+
l.value = !0, await A(), await r(), await R(), l.value = !1;
|
67
|
+
}
|
68
|
+
return J(_), E(c, _), (e, o) => {
|
69
|
+
const p = y("FmCircularProgress"), n = y("FmChip"), U = y("FmMenuItem"), D = y("FmMenu");
|
70
|
+
return v(), P(Y, null, [
|
71
|
+
t(l) ? (v(), N(p, {
|
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)("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: c, searchKey: r, status: l, id: m, by: d } = 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 = g([]), a = g([]);
|
127
|
+
async function h() {
|
128
|
+
await F(async () => {
|
129
|
+
const { startDate: _, endDate: e } = c.value, o = await L.readTransactionsV2({
|
130
|
+
status: l.value,
|
131
|
+
id: m.value,
|
132
|
+
by: d.value,
|
133
|
+
start: _,
|
134
|
+
end: e
|
135
|
+
});
|
136
|
+
if (u.value = G(o), a.value = u.value, r.value > "") {
|
137
|
+
var p = new RegExp(r.value, "i");
|
138
|
+
a.value = u.value.filter((n) => {
|
139
|
+
const U = JSON.stringify(n);
|
140
|
+
return p.test(U);
|
141
|
+
});
|
142
|
+
}
|
143
|
+
});
|
144
|
+
}
|
145
|
+
function w() {
|
146
|
+
h();
|
147
|
+
}
|
148
|
+
J(w), E(f, w), E([m, c, l], h);
|
149
|
+
let A;
|
150
|
+
E(r, async () => {
|
151
|
+
A && clearTimeout(A), A = setTimeout(() => {
|
152
|
+
var _ = new RegExp(r.value, "i");
|
153
|
+
a.value = u.value.filter((e) => {
|
154
|
+
const o = JSON.stringify(e);
|
155
|
+
return _.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 (_, e) => {
|
178
|
+
const o = y("FmSearch"), p = y("FmSelect");
|
179
|
+
return v(), N(H, {
|
180
|
+
title: t(s)("transactions.title"),
|
181
|
+
description: t(s)("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) => b(r) ? r.value = n : null),
|
190
|
+
class: "mr-8",
|
191
|
+
label: t(s)("transactions.search.title"),
|
192
|
+
placeholder: t(s)("transactions.search.placeholder")
|
193
|
+
}, null, 8, ["model-value", "label", "placeholder"]),
|
194
|
+
i(p, {
|
195
|
+
modelValue: t(l),
|
196
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => b(l) ? l.value = n : null),
|
197
|
+
class: "mr-6 w-[300px]",
|
198
|
+
label: t(s)("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) => b(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)("transactions.button.export")
|
219
|
+
},
|
220
|
+
handler: async () => {
|
221
|
+
await t(L).downloadPortalTransactionReport(t(c), u.value);
|
222
|
+
}
|
223
|
+
}, null, 8, ["button", "handler"])
|
224
|
+
])
|
225
|
+
]),
|
226
|
+
V("div", re, [
|
227
|
+
i(ne, {
|
228
|
+
id: t(m),
|
229
|
+
"onUpdate:id": e[3] || (e[3] = (n) => b(m) ? m.value = n : null),
|
230
|
+
by: t(d),
|
231
|
+
"onUpdate:by": e[4] || (e[4] = (n) => b(d) ? d.value = n : null)
|
232
|
+
}, null, 8, ["id", "by"]),
|
233
|
+
i(ee, {
|
234
|
+
modelValue: t(c),
|
235
|
+
"onUpdate:modelValue": e[5] || (e[5] = (n) => b(c) ? c.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,16 +1,16 @@
|
|
1
1
|
import { defineComponent as b, resolveComponent as h, openBlock as m, createBlock as F, normalizeClass as V, withCtx as T, createElementVNode as _, toDisplayString as Y, createElementBlock as A, unref as d, createVNode as f, Fragment as $, renderList as C, ref as O, watch as v, isRef as I, h as y } from "vue";
|
2
|
-
import { g as P, a as U, t as g, b as B, c as N } from "./assets-
|
2
|
+
import { g as P, a as U, t as g, b as B, c as N } from "./assets-BImh8bhR.js";
|
3
3
|
import { h as w } from "./moment-h96o7c8I.js";
|
4
|
-
import { u as G } from "./index-
|
4
|
+
import { u as G } from "./index-8eCaI4jI.js";
|
5
5
|
import { _ as L } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
6
6
|
import { _ as j } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
7
7
|
import { useSnackbar as Q, useDialog as z } from "@feedmepos/ui-library";
|
8
8
|
import { w as k } from "./Modal-DB8M9o1T.js";
|
9
9
|
import { u as D } from "./error-K1CakhA9.js";
|
10
10
|
import { _ as H } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
11
|
-
import { g as J } from "./grafana-
|
12
|
-
import { _ as W } from "./index.vue_vue_type_script_setup_true_lang-
|
13
|
-
import { e as S } from "./index-
|
11
|
+
import { g as J } from "./grafana-CPOGSE20.js";
|
12
|
+
import { _ as W } from "./index.vue_vue_type_script_setup_true_lang-DNXWZt8k.js";
|
13
|
+
import { e as S } from "./index-CNZFZxie.js";
|
14
14
|
import { _ as X } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
15
15
|
const Z = /* @__PURE__ */ b({
|
16
16
|
__name: "Status",
|