@feedmepos/mf-payment 1.0.28 → 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/{PDFViewer-xrBtzrlR.js → PDFViewer-BQfgFexr.js} +2 -1
- package/dist/{PayoutAccount-QybE7meK.js → PayoutAccount-BpMu58oE.js} +5 -5
- package/dist/{PayoutAccount-C53rv89t.js → PayoutAccount-z-gdodfR.js} +361 -360
- package/dist/PayoutAccountSetting-jZJu4WWL.js +723 -0
- package/dist/{Restaurant-B1ed_oVp.js → Restaurant-DfBX5uPS.js} +56 -54
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-hJAJYKmE.js +33 -0
- package/dist/{RestaurantSetting-CKG5jn2J.js → RestaurantSetting-KPtRoif-.js} +3 -3
- package/dist/{Settlement-Fh86ozFD.js → Settlement-DbMQAA0_.js} +9 -8
- package/dist/Settlement-smC2PDKA.js +445 -0
- package/dist/{SettlementTransactions-BSF2Jw-L.js → SettlementTransactions-Bs8Il-GO.js} +14 -14
- package/dist/SettlementTransactions-Cw9DnODr.js +291 -0
- package/dist/{Terminal-BUBkiYYw.js → Terminal-HLOGtr0x.js} +323 -342
- package/dist/{TerminalSetting-CfCa-6pK.js → TerminalSetting-DraCszpQ.js} +27 -27
- package/dist/Transaction-B8cHQbbP.js +250 -0
- package/dist/{Transaction-DWzZ31qR.js → Transaction-_CB4VTT9.js} +123 -105
- package/dist/TransactionOld-BhzUSu5h.js +99 -0
- package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-UcnQKwQ5.js +304 -0
- package/dist/api/payout/index.d.ts +5 -1
- package/dist/api/terminal/index.d.ts +6 -10
- package/dist/api/transaction/index.d.ts +12 -11
- package/dist/{app-DC4HbItX.js → app-DWRPKvx2.js} +1115 -780
- package/dist/app.d.ts +278 -0
- package/dist/app.js +4 -3
- package/dist/{assets-BySnqkmr.js → assets-BImh8bhR.js} +208 -56
- package/dist/components/SourceSelector.vue.d.ts +12 -0
- package/dist/{grafana-b2ht7XmY.js → grafana-CPOGSE20.js} +2 -2
- package/dist/{index-d3nubgyT.js → index-8eCaI4jI.js} +1 -1
- package/dist/{index-iiG_kivD.js → index-CNZFZxie.js} +8163 -8081
- package/dist/{index-DXV5GQaF.js → index-D5DlMaeB.js} +1 -1
- package/dist/index-DtT3I2PI.js +45 -0
- package/dist/index-DuSw-EaU.js +66 -0
- package/dist/{index-CvJ2nft4.js → index-eznEOmAe.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Du3twb8U.js → index.vue_vue_type_script_setup_true_lang-DNXWZt8k.js} +8 -7
- package/dist/model/payout-account.d.ts +1 -1
- package/dist/model/transaction.d.ts +13 -5
- package/dist/package.json +9 -8
- package/dist/{payout-account-DPdwKVTr.js → payout-account-CjDkY3wf.js} +2 -2
- package/dist/router/index.d.ts +1 -0
- package/dist/stores/payoutAccount.d.ts +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +133 -0
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +133 -0
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/cell/Actions.vue.d.ts +8 -0
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +10 -23
- package/dist/views/admin/{terminal-transaction/TerminalTransaction.vue.d.ts → payout-account/tabs/gateway/MacauPassGateway.vue.d.ts} +1 -1
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/Terminal.vue.d.ts +4 -1
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +2 -2
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +2 -0
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +16 -16
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +8 -8
- package/dist/views/{admin/terminal-transaction → transaction}/cell/Actions.vue.d.ts +3 -3
- package/package.json +9 -8
- package/dist/PayoutAccountSetting-Zhkm_GN8.js +0 -426
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-p4qddIbp.js +0 -33
- package/dist/Settlement-SeGVEdZj.js +0 -444
- package/dist/SettlementTransactions-CHRsIcoh.js +0 -291
- package/dist/TerminalTransaction-DIM7WO_C.js +0 -589
- package/dist/TerminalTransaction-DQZnx7dy.js +0 -333
- package/dist/Transaction-DRYwBnHK.js +0 -247
- package/dist/TransactionOld-Pj412ujb.js +0 -99
- package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-B3FGhKjA.js +0 -159
- package/dist/components/PayoutAccountSelector.vue.d.ts +0 -23
- package/dist/index-BJpE0YhF.js +0 -52
- package/dist/index-BqzuW2qa.js +0 -40
- package/dist/index-Dwv1hbHU.js +0 -77
- package/dist/transaction-CzLoSCVe.js +0 -136
- package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +0 -50
- package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +0 -52
- package/dist/views/admin/terminal-transaction/cell/Gateway.vue.d.ts +0 -7
- package/dist/views/admin/terminal-transaction/cell/Method.vue.d.ts +0 -7
- package/dist/views/admin/terminal-transaction/cell/Status.vue.d.ts +0 -7
- package/dist/views/terminal-transaction/TerminalTransaction.vue.d.ts +0 -2
- package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +0 -7
- package/dist/views/terminal-transaction/cell/Method.vue.d.ts +0 -7
- package/dist/views/terminal-transaction/cell/Status.vue.d.ts +0 -7
@@ -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";
|
@@ -17,7 +17,7 @@ const Z = /* @__PURE__ */ T({
|
|
17
17
|
}
|
18
18
|
},
|
19
19
|
setup(y) {
|
20
|
-
return (
|
20
|
+
return (c, e) => (b(), N(Y, null, [
|
21
21
|
e[0] || (e[0] = g("b", null, "Name", -1)),
|
22
22
|
V(": " + S(y.terminal.name), 1),
|
23
23
|
e[1] || (e[1] = g("br", null, null, -1)),
|
@@ -48,20 +48,20 @@ const Z = /* @__PURE__ */ T({
|
|
48
48
|
}
|
49
49
|
},
|
50
50
|
setup(y) {
|
51
|
-
const { isLoading:
|
51
|
+
const { isLoading: c, startAsyncCall: e } = R(), d = y, a = M(() => d.terminal), o = F(), v = F(), n = F(-1), p = F({
|
52
52
|
terminalId: ""
|
53
53
|
}), i = () => {
|
54
54
|
p.value.terminalId = "", n.value = -1;
|
55
55
|
}, l = () => {
|
56
56
|
if (e(async () => {
|
57
|
-
o.value = await C.getTerminals(
|
58
|
-
}), !
|
57
|
+
o.value = await C.getTerminals();
|
58
|
+
}), !d.terminal.ecrs)
|
59
59
|
return i();
|
60
|
-
const t =
|
60
|
+
const t = d.terminal.ecrs.findIndex((m) => m && m.gateway && m.gateway === "FeedMe");
|
61
61
|
if (t === -1)
|
62
62
|
return i();
|
63
63
|
n.value = t;
|
64
|
-
const r =
|
64
|
+
const r = d.terminal.ecrs.at(t);
|
65
65
|
r.gateway === "FeedMe" && r.config && (p.value = {
|
66
66
|
terminalId: r.config.terminalId
|
67
67
|
});
|
@@ -73,18 +73,18 @@ const Z = /* @__PURE__ */ T({
|
|
73
73
|
})));
|
74
74
|
async function u(t) {
|
75
75
|
var r;
|
76
|
-
(r =
|
76
|
+
(r = d.terminal.ecrs) == null || r.splice(t, 1), d.onUpdate(d.terminal);
|
77
77
|
}
|
78
78
|
return (t, r) => {
|
79
79
|
const m = f("FmCircularProgress"), k = f("FmSelect"), w = f("FmButton"), K = f("FmForm");
|
80
|
-
return _(
|
80
|
+
return _(c) ? (b(), N("div", ee, [
|
81
81
|
I(m, { size: "xxl" })
|
82
82
|
])) : (b(), x(K, {
|
83
83
|
key: 1,
|
84
84
|
ref: v.value,
|
85
85
|
class: "flex flex-col gap-16 w-[500px]",
|
86
86
|
onValidationSuccess: r[1] || (r[1] = () => {
|
87
|
-
n.value > -1 ? a.value.ecrs[n.value] = { gateway: "FeedMe", config: p.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "FeedMe", config: p.value })),
|
87
|
+
n.value > -1 ? a.value.ecrs[n.value] = { gateway: "FeedMe", config: p.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "FeedMe", config: p.value })), d.onUpdate(a.value);
|
88
88
|
})
|
89
89
|
}, {
|
90
90
|
default: q(() => [
|
@@ -128,7 +128,7 @@ const Z = /* @__PURE__ */ T({
|
|
128
128
|
}
|
129
129
|
},
|
130
130
|
setup(y) {
|
131
|
-
const
|
131
|
+
const c = y, e = $().currentCountry, d = [
|
132
132
|
{
|
133
133
|
label: "Fiuu Malaysia",
|
134
134
|
value: "cc.feedme.payment.rms",
|
@@ -144,7 +144,7 @@ const Z = /* @__PURE__ */ T({
|
|
144
144
|
value: "cc.feedme.payment.fiuu_sg",
|
145
145
|
region: U.F_COUNTRY.enum.SG
|
146
146
|
}
|
147
|
-
], a = M(() =>
|
147
|
+
], a = M(() => c.terminal), o = F(), v = F(-1), n = F({
|
148
148
|
packageId: "",
|
149
149
|
uniqueId: ""
|
150
150
|
}), p = () => {
|
@@ -165,7 +165,7 @@ const Z = /* @__PURE__ */ T({
|
|
165
165
|
D(a, i), G(i);
|
166
166
|
async function l(s) {
|
167
167
|
var u;
|
168
|
-
(u = a.value.gateways) == null || u.splice(s, 1),
|
168
|
+
(u = a.value.gateways) == null || u.splice(s, 1), c.onUpdate(a.value);
|
169
169
|
}
|
170
170
|
return (s, u) => {
|
171
171
|
const t = f("FmSelect"), r = f("FmTextField"), m = f("FmButton"), k = f("FmForm");
|
@@ -173,7 +173,7 @@ const Z = /* @__PURE__ */ T({
|
|
173
173
|
ref: o.value,
|
174
174
|
class: "flex flex-col gap-16 w-[500px]",
|
175
175
|
onValidationSuccess: u[2] || (u[2] = () => {
|
176
|
-
v.value > -1 ? a.value.gateways[v.value] = { gateway: "Fiuu", config: n.value } : (a.value.gateways || (a.value.gateways = []), a.value.gateways.push({ gateway: "Fiuu", config: n.value })),
|
176
|
+
v.value > -1 ? a.value.gateways[v.value] = { gateway: "Fiuu", config: n.value } : (a.value.gateways || (a.value.gateways = []), a.value.gateways.push({ gateway: "Fiuu", config: n.value })), c.onUpdate(a.value);
|
177
177
|
})
|
178
178
|
}, {
|
179
179
|
default: q(() => [
|
@@ -181,7 +181,7 @@ const Z = /* @__PURE__ */ T({
|
|
181
181
|
modelValue: n.value.packageId,
|
182
182
|
"onUpdate:modelValue": u[0] || (u[0] = (w) => n.value.packageId = w),
|
183
183
|
label: "Package ID",
|
184
|
-
items:
|
184
|
+
items: d.filter((w) => w.region === _(e))
|
185
185
|
}, null, 8, ["modelValue", "items"]),
|
186
186
|
I(r, {
|
187
187
|
modelValue: n.value.uniqueId,
|
@@ -221,7 +221,7 @@ const Z = /* @__PURE__ */ T({
|
|
221
221
|
}
|
222
222
|
},
|
223
223
|
setup(y) {
|
224
|
-
const
|
224
|
+
const c = y, e = M(() => c.terminal), d = F(), a = F(-1), o = F({
|
225
225
|
merchantId: "",
|
226
226
|
terminalId: "",
|
227
227
|
privateKey: ""
|
@@ -244,15 +244,15 @@ const Z = /* @__PURE__ */ T({
|
|
244
244
|
D(e, n), G(n);
|
245
245
|
async function p(i) {
|
246
246
|
var l;
|
247
|
-
(l = e.value.ecrs) == null || l.splice(i, 1),
|
247
|
+
(l = e.value.ecrs) == null || l.splice(i, 1), c.onUpdate(e.value);
|
248
248
|
}
|
249
249
|
return (i, l) => {
|
250
250
|
const s = f("FmTextField"), u = f("FmTextarea"), t = f("FmButton"), r = f("FmForm");
|
251
251
|
return b(), x(r, {
|
252
|
-
ref:
|
252
|
+
ref: d.value,
|
253
253
|
class: "flex flex-col gap-16 w-[500px]",
|
254
254
|
onValidationSuccess: l[3] || (l[3] = () => {
|
255
|
-
a.value > -1 ? e.value.ecrs[a.value] = { gateway: "Ghl", config: o.value } : (e.value.ecrs || (e.value.ecrs = []), e.value.ecrs.push({ gateway: "Ghl", config: o.value })),
|
255
|
+
a.value > -1 ? e.value.ecrs[a.value] = { gateway: "Ghl", config: o.value } : (e.value.ecrs || (e.value.ecrs = []), e.value.ecrs.push({ gateway: "Ghl", config: o.value })), c.onUpdate(e.value);
|
256
256
|
})
|
257
257
|
}, {
|
258
258
|
default: q(() => [
|
@@ -300,21 +300,21 @@ const Z = /* @__PURE__ */ T({
|
|
300
300
|
}
|
301
301
|
},
|
302
302
|
setup(y) {
|
303
|
-
const
|
303
|
+
const c = y, { tab: e } = H({
|
304
304
|
tab: "information"
|
305
|
-
}), { isLoading:
|
305
|
+
}), { isLoading: d, startAsyncCall: a } = R(!0), o = E(), v = Q(), n = F();
|
306
306
|
async function p(t) {
|
307
307
|
a(async () => {
|
308
308
|
try {
|
309
309
|
await C.updateById(
|
310
|
-
|
310
|
+
c.terminalId,
|
311
311
|
{
|
312
312
|
name: t.name,
|
313
313
|
status: t.status,
|
314
314
|
ecrs: t.ecrs ?? [],
|
315
315
|
gateways: t.gateways ?? []
|
316
316
|
}
|
317
|
-
), n.value = await C.readById(
|
317
|
+
), n.value = await C.readById(c.terminalId), v.open({
|
318
318
|
type: "success",
|
319
319
|
message: "Terminal updated successfully"
|
320
320
|
});
|
@@ -346,7 +346,7 @@ const Z = /* @__PURE__ */ T({
|
|
346
346
|
});
|
347
347
|
async function u() {
|
348
348
|
a(async () => {
|
349
|
-
n.value = await C.readById(
|
349
|
+
n.value = await C.readById(c.terminalId), n.value.deviceType !== "TERMINAL" && (i.push({
|
350
350
|
label: "FeedMe Terminal",
|
351
351
|
value: "terminal",
|
352
352
|
icon: "shopping_cart_checkout",
|
@@ -364,7 +364,7 @@ const Z = /* @__PURE__ */ T({
|
|
364
364
|
const m = f("FmTabs");
|
365
365
|
return b(), x(A, {
|
366
366
|
title: `Terminal (${(k = n.value) == null ? void 0 : k._id})`,
|
367
|
-
loading: _(
|
367
|
+
loading: _(d),
|
368
368
|
onBack: _(o).back
|
369
369
|
}, {
|
370
370
|
default: q(() => [
|
@@ -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
|
+
};
|