@feedmepos/mf-payment 1.0.28 → 1.1.0-beta.1
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-BHJpjUqD.js} +5 -5
- package/dist/{PayoutAccount-C53rv89t.js → PayoutAccount-DCkf_1yL.js} +5 -4
- package/dist/PayoutAccountSetting-Bk-g7ucZ.js +723 -0
- package/dist/{Restaurant-B1ed_oVp.js → Restaurant-D2qq84VL.js} +56 -54
- package/dist/{RestaurantSetting-CKG5jn2J.js → RestaurantSetting-DAtrtX6S.js} +3 -3
- package/dist/{Settlement-SeGVEdZj.js → Settlement-BVIsszEJ.js} +37 -34
- package/dist/{Settlement-Fh86ozFD.js → Settlement-Cx1tc5wt.js} +9 -8
- package/dist/{SettlementTransactions-BSF2Jw-L.js → SettlementTransactions-C82DyYlO.js} +14 -14
- package/dist/{SettlementTransactions-CHRsIcoh.js → SettlementTransactions-CeN4SRWa.js} +39 -39
- package/dist/{Terminal-BUBkiYYw.js → Terminal-Az2k8E6F.js} +323 -342
- package/dist/{TerminalSetting-CfCa-6pK.js → TerminalSetting-C-xlLYXa.js} +27 -27
- package/dist/Transaction-CC8hc8_r.js +250 -0
- package/dist/{Transaction-DWzZ31qR.js → Transaction-Y_mc0yQv.js} +123 -105
- package/dist/{TransactionOld-Pj412ujb.js → TransactionOld-BxhI-wwm.js} +7 -7
- package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-dwwesT4_.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-OBp4HaEY.js} +853 -791
- package/dist/app.js +1 -1
- package/dist/{assets-BySnqkmr.js → assets-pLBp82yE.js} +208 -56
- package/dist/components/SourceSelector.vue.d.ts +12 -0
- package/dist/{grafana-b2ht7XmY.js → grafana-hv7inD36.js} +2 -2
- package/dist/{index-d3nubgyT.js → index-1xF00w89.js} +1 -1
- package/dist/{index-CvJ2nft4.js → index-CFYD8Dv4.js} +1 -1
- package/dist/index-Cqq3p9PP.js +66 -0
- package/dist/{index-DXV5GQaF.js → index-DD5mEX0D.js} +1 -1
- package/dist/{index-iiG_kivD.js → index-DGKxdJVj.js} +8163 -8081
- package/dist/index-oM4Z9ffu.js +45 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-Du3twb8U.js → index.vue_vue_type_script_setup_true_lang-C9tnqgzY.js} +8 -7
- package/dist/model/payout-account.d.ts +1 -1
- package/dist/model/transaction.d.ts +13 -5
- package/dist/package.json +2 -2
- package/dist/{payout-account-DPdwKVTr.js → payout-account-DPaS3dIs.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 +2 -2
- package/dist/PayoutAccountSetting-Zhkm_GN8.js +0 -426
- package/dist/TerminalTransaction-DIM7WO_C.js +0 -589
- package/dist/TerminalTransaction-DQZnx7dy.js +0 -333
- package/dist/Transaction-DRYwBnHK.js +0 -247
- 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-DGKxdJVj.js";
|
3
3
|
import { useRouter as E } from "vue-router";
|
4
|
-
import { t as C } from "./index-
|
4
|
+
import { t as C } from "./index-oM4Z9ffu.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-1xF00w89.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 $, ref as C, watch as g, computed as Y, onMounted as B, resolveComponent as _, openBlock as p, createElementBlock as M, Fragment as V, unref as r, createBlock as S, createCommentVNode as I, withCtx as y, createVNode as u, renderList as k, createElementVNode as U, isRef as f } from "vue";
|
2
|
+
import { t as O, b as q } from "./assets-pLBp82yE.js";
|
3
|
+
import { u as J, _ as A } from "./index-DGKxdJVj.js";
|
4
|
+
import { _ as z } from "./TransactionTable.vue_vue_type_script_setup_true_lang-dwwesT4_.js";
|
5
|
+
import { h as L } from "./moment-h96o7c8I.js";
|
6
|
+
import { useCoreStore as K } from "@feedmepos/mf-common";
|
7
|
+
import { _ as G } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
8
|
+
import { u as Q } from "./index-1xF00w89.js";
|
9
|
+
import { _ as H } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
10
|
+
import { _ as W } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
11
|
+
import { _ as X } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
12
|
+
import { p as Z } from "./index-Cqq3p9PP.js";
|
13
|
+
import { t as ee } from "./index-oM4Z9ffu.js";
|
14
|
+
const ae = /* @__PURE__ */ $({
|
15
|
+
__name: "SourceSelector",
|
16
|
+
props: {
|
17
|
+
id: {},
|
18
|
+
by: {}
|
19
|
+
},
|
20
|
+
emits: ["update:id", "update:by"],
|
21
|
+
setup(j, { emit: D }) {
|
22
|
+
const E = D, { restaurants: N, currentBusiness: i, readRestaurants: s } = K(), { isLoading: n, startAsyncCall: c } = J(!0), m = C([]), o = C([]), a = C();
|
23
|
+
g(a, () => {
|
24
|
+
a.value && (E("update:id", a.value.value), E("update:by", a.value.by));
|
25
|
+
});
|
26
|
+
const F = Y(() => [
|
27
|
+
N.value.length > 0 && "Restaurant",
|
28
|
+
o.value.length > 0 && "Device",
|
29
|
+
m.value.length > 0 && "Payout Account"
|
30
|
+
].filter((e) => !!e)), h = Y(() => ({
|
31
|
+
Restaurant: N.value.filter((e) => e.managable).map((e) => ({
|
32
|
+
by: "RESTAURANT",
|
33
|
+
prefix: "Restaurant",
|
34
|
+
label: e.profile.name,
|
35
|
+
value: e._id
|
36
|
+
})),
|
37
|
+
Device: o.value.filter((e) => e.deviceType).map((e) => ({
|
38
|
+
by: "DEVICE",
|
39
|
+
prefix: "Device",
|
40
|
+
label: e.deviceType + " | " + (e.deviceType === "TERMINAL" ? e.name : e.restaurant.profile.name),
|
41
|
+
value: e._id
|
42
|
+
})),
|
43
|
+
"Payout Account": m.value.filter((e) => e.store.event).map((e) => {
|
44
|
+
var l, d;
|
45
|
+
return {
|
46
|
+
by: "PAYOUT_ACCOUNT",
|
47
|
+
prefix: "Payout Account",
|
48
|
+
label: e.store.event + " | " + (((d = (l = e.ref) == null ? void 0 : l.profile) == null ? void 0 : d.name) ?? e.ref.name),
|
49
|
+
value: e._id
|
50
|
+
};
|
51
|
+
})
|
52
|
+
}));
|
53
|
+
async function T() {
|
54
|
+
return c(async () => {
|
55
|
+
let e = await Z.readBusinessPayoutAccounts();
|
56
|
+
e.length !== 0 && (m.value = e);
|
57
|
+
});
|
58
|
+
}
|
59
|
+
async function R() {
|
60
|
+
return c(async () => {
|
61
|
+
let e = await ee.getTerminals();
|
62
|
+
e.length !== 0 && (o.value = e);
|
63
|
+
});
|
64
|
+
}
|
65
|
+
async function v() {
|
66
|
+
n.value = !0, await T(), await s(), await R(), n.value = !1;
|
67
|
+
}
|
68
|
+
return B(v), g(i, v), (e, l) => {
|
69
|
+
const d = _("FmCircularProgress"), t = _("FmChip"), w = _("FmMenuItem"), x = _("FmMenu");
|
70
|
+
return p(), M(V, null, [
|
71
|
+
r(n) ? (p(), S(d, {
|
72
|
+
key: 0,
|
73
|
+
size: "md"
|
74
|
+
})) : I("", !0),
|
75
|
+
r(n) ? I("", !0) : (p(), S(x, { key: 1 }, {
|
76
|
+
"menu-button": y(() => {
|
77
|
+
var b;
|
78
|
+
return [
|
79
|
+
u(t, {
|
80
|
+
icon: "account_box",
|
81
|
+
label: a.value ? a.value.prefix + " > " + ((b = a.value) == null ? void 0 : b.label) : "Select Entity",
|
82
|
+
removable: !!a.value,
|
83
|
+
onChipClosed: l[0] || (l[0] = (P) => a.value = void 0)
|
84
|
+
}, null, 8, ["label", "removable"])
|
85
|
+
];
|
86
|
+
}),
|
87
|
+
default: y(() => [
|
88
|
+
(p(!0), M(V, null, k(F.value, (b) => (p(), S(x, {
|
89
|
+
placement: "right-start",
|
90
|
+
width: 200
|
91
|
+
}, {
|
92
|
+
"menu-button": y(() => [
|
93
|
+
u(w, {
|
94
|
+
label: b,
|
95
|
+
expandable: ""
|
96
|
+
}, null, 8, ["label"])
|
97
|
+
]),
|
98
|
+
default: y(() => [
|
99
|
+
(p(!0), M(V, null, k(h.value[b], (P) => (p(), S(w, {
|
100
|
+
onClick: (se) => a.value = P,
|
101
|
+
key: P.value,
|
102
|
+
label: P.label,
|
103
|
+
selectable: ""
|
104
|
+
}, null, 8, ["onClick", "label"]))), 128))
|
105
|
+
]),
|
106
|
+
_: 2
|
107
|
+
}, 1024))), 256))
|
108
|
+
]),
|
109
|
+
_: 1
|
110
|
+
}))
|
111
|
+
], 64);
|
112
|
+
};
|
113
|
+
}
|
114
|
+
}), te = { class: "flex justify-between mb-6 items-center" }, ne = { class: "flex space-x-8 items-start" }, le = { class: "flex space-x-4 self-center" }, re = { class: "flex space-x-12 mb-6" }, Ae = /* @__PURE__ */ $({
|
115
|
+
__name: "Transaction",
|
116
|
+
setup(j) {
|
117
|
+
const { isLoading: D, startAsyncCall: E } = J(!0), { currentBusiness: N } = K(), { dateRange: i, searchKey: s, status: n, id: c, by: m } = Q({
|
118
|
+
by: "",
|
119
|
+
id: "",
|
120
|
+
searchKey: "",
|
121
|
+
status: [A.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
122
|
+
dateRange: {
|
123
|
+
startDate: L().startOf("day").format("YYYY-MM-DD"),
|
124
|
+
endDate: L().endOf("day").format("YYYY-MM-DD")
|
125
|
+
}
|
126
|
+
}), o = C([]), a = C([]);
|
127
|
+
async function F() {
|
128
|
+
await E(async () => {
|
129
|
+
const { startDate: v, endDate: e } = i.value, l = await O.readTransactionsV2({
|
130
|
+
status: n.value,
|
131
|
+
id: c.value,
|
132
|
+
by: m.value,
|
133
|
+
start: v,
|
134
|
+
end: e
|
135
|
+
});
|
136
|
+
if (o.value = q(l), a.value = o.value, s.value > "") {
|
137
|
+
var d = new RegExp(s.value, "i");
|
138
|
+
a.value = o.value.filter((t) => {
|
139
|
+
const w = JSON.stringify(t);
|
140
|
+
return d.test(w);
|
141
|
+
});
|
142
|
+
}
|
143
|
+
});
|
144
|
+
}
|
145
|
+
function h() {
|
146
|
+
F();
|
147
|
+
}
|
148
|
+
B(h), g(N, h), g([c, i, n], F);
|
149
|
+
let T;
|
150
|
+
g(s, async () => {
|
151
|
+
T && clearTimeout(T), T = setTimeout(() => {
|
152
|
+
var v = new RegExp(s.value, "i");
|
153
|
+
a.value = o.value.filter((e) => {
|
154
|
+
const l = JSON.stringify(e);
|
155
|
+
return v.test(l);
|
156
|
+
});
|
157
|
+
}, 700);
|
158
|
+
});
|
159
|
+
const R = [
|
160
|
+
{
|
161
|
+
label: "Success",
|
162
|
+
value: A.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
163
|
+
},
|
164
|
+
{
|
165
|
+
label: "Refunded",
|
166
|
+
value: A.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
167
|
+
},
|
168
|
+
{
|
169
|
+
label: "Process",
|
170
|
+
value: A.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
171
|
+
},
|
172
|
+
{
|
173
|
+
label: "Failed",
|
174
|
+
value: A.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
175
|
+
}
|
176
|
+
];
|
177
|
+
return (v, e) => {
|
178
|
+
const l = _("FmSearch"), d = _("FmSelect");
|
179
|
+
return p(), S(G, {
|
180
|
+
title: "Transactions",
|
181
|
+
description: "Transactions are purchases or payments made over the internet using electronic methods like cards or digital wallets.",
|
182
|
+
loading: !1
|
183
|
+
}, {
|
184
|
+
default: y(() => [
|
185
|
+
U("div", te, [
|
186
|
+
U("div", ne, [
|
187
|
+
u(l, {
|
188
|
+
"model-value": r(s),
|
189
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => f(s) ? s.value = t : null),
|
190
|
+
class: "mr-8",
|
191
|
+
label: "Search",
|
192
|
+
placeholder: "Search Transactions ..."
|
193
|
+
}, null, 8, ["model-value"]),
|
194
|
+
u(d, {
|
195
|
+
modelValue: r(n),
|
196
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => f(n) ? n.value = t : null),
|
197
|
+
class: "mr-6 w-[300px]",
|
198
|
+
label: "Status",
|
199
|
+
"label-mark": "required",
|
200
|
+
multiselect: "",
|
201
|
+
items: R
|
202
|
+
}, {
|
203
|
+
"prepend-menu": y(() => [
|
204
|
+
u(W, {
|
205
|
+
modelValue: r(n),
|
206
|
+
"onUpdate:modelValue": e[1] || (e[1] = (t) => f(n) ? n.value = t : null),
|
207
|
+
items: R
|
208
|
+
}, null, 8, ["modelValue"])
|
209
|
+
]),
|
210
|
+
_: 1
|
211
|
+
}, 8, ["modelValue"])
|
212
|
+
]),
|
213
|
+
U("div", le, [
|
214
|
+
u(H, {
|
215
|
+
button: {
|
216
|
+
appendIcon: "file_download",
|
217
|
+
variant: "primary",
|
218
|
+
label: "Export"
|
219
|
+
},
|
220
|
+
handler: async () => {
|
221
|
+
await r(O).downloadPortalTransactionReport(r(i), o.value);
|
222
|
+
}
|
223
|
+
}, null, 8, ["handler"])
|
224
|
+
])
|
225
|
+
]),
|
226
|
+
U("div", re, [
|
227
|
+
u(ae, {
|
228
|
+
id: r(c),
|
229
|
+
"onUpdate:id": e[3] || (e[3] = (t) => f(c) ? c.value = t : null),
|
230
|
+
by: r(m),
|
231
|
+
"onUpdate:by": e[4] || (e[4] = (t) => f(m) ? m.value = t : null)
|
232
|
+
}, null, 8, ["id", "by"]),
|
233
|
+
u(X, {
|
234
|
+
modelValue: r(i),
|
235
|
+
"onUpdate:modelValue": e[5] || (e[5] = (t) => f(i) ? i.value = t : null)
|
236
|
+
}, null, 8, ["modelValue"])
|
237
|
+
]),
|
238
|
+
u(z, {
|
239
|
+
loading: r(D),
|
240
|
+
data: a.value
|
241
|
+
}, null, 8, ["loading", "data"])
|
242
|
+
]),
|
243
|
+
_: 1
|
244
|
+
});
|
245
|
+
};
|
246
|
+
}
|
247
|
+
});
|
248
|
+
export {
|
249
|
+
Ae as default
|
250
|
+
};
|