@feedmepos/mf-payment 1.7.1 → 1.7.4-dev
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/{Actions.vue_vue_type_script_setup_true_lang-CRNNEhdb.js → Actions.vue_vue_type_script_setup_true_lang-B5sqVL7d.js} +1 -1
- package/dist/AdminBusinessSelector.vue_vue_type_script_setup_true_lang-B2sVLkI5.js +140 -0
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-DjiSltH9.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-D_hGHpb0.js} +2 -2
- package/dist/{Chargeback-CLmIb_z0.js → Chargeback-CtYYjuEB.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-Cy-vikjQ.js → DocumentViewer.vue_vue_type_script_setup_true_lang-BW-Gu-nZ.js} +1 -1
- package/dist/{OnboardForm-DJcR03we.js → OnboardForm-CIFQEBec.js} +5 -5
- package/dist/{OnboardForm--egFxuAd.js → OnboardForm-IRLkWmoI.js} +5 -5
- package/dist/{OnboardSubmission-D5uJWKHh.js → OnboardSubmission-C9M8t5vU.js} +5 -5
- package/dist/{OnboardSubmission-BaM01HIV.js → OnboardSubmission-CndjRMqy.js} +2 -2
- package/dist/{PayoutAccount-DYZ2gQGD.js → PayoutAccount-BSXnemjX.js} +5 -5
- package/dist/PayoutAccount-CpuAa-qa.js +399 -0
- package/dist/{PayoutAccountSetting-DlF_FPHr.js → PayoutAccountSetting-CMkQNnDb.js} +6 -6
- package/dist/{Restaurant-KGa0xV0K.js → Restaurant-bpdNibYe.js} +4 -4
- package/dist/{RestaurantSetting-Bg5M-n6p.js → RestaurantSetting-NbagQfTz.js} +3 -3
- package/dist/{Settlement-C4q03i6e.js → Settlement-D_yGtVZV.js} +4 -4
- package/dist/{Settlement-DAkVWztP.js → Settlement-TAZg6fCx.js} +3 -3
- package/dist/{SettlementTransactions-XjsIKvXQ.js → SettlementTransactions-DHxHNPdw.js} +4 -4
- package/dist/{SettlementTransactions-CsvfmLM_.js → SettlementTransactions-ENvQRM79.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-ExFNksup.js → Status.vue_vue_type_script_setup_true_lang-B0FnrTJk.js} +1 -1
- package/dist/{Terminal-DkeT7bTc.js → Terminal-z_7q3GBS.js} +5 -5
- package/dist/{TerminalSetting-AnoIOO73.js → TerminalSetting-C5UmznfX.js} +655 -521
- package/dist/Transaction-DNkc6es6.js +1005 -0
- package/dist/{Transaction-mo1v6xz1.js → Transaction-zDTbTtVx.js} +10 -10
- package/dist/{TransactionOld-nzUGTELC.js → TransactionOld-Dm5PvUqF.js} +7 -7
- package/dist/api/payout/index.d.ts +4 -0
- package/dist/{app-1rw4JLKr.js → app-ByzqMQl4.js} +452 -442
- package/dist/app.js +1 -1
- package/dist/{assets-CPEv5xmO.js → assets-DXXXC51N.js} +1 -1
- package/dist/{grafana-fcTmH2tm.js → grafana-U9VBVEEb.js} +1 -1
- package/dist/{index-Ch9pmMdq.js → index-BMLgxxih.js} +1 -1
- package/dist/{index-B0rOAUW-.js → index-BZ6UOzJf.js} +34 -29
- package/dist/{index-DTBJopG8.js → index-C6uyHnHe.js} +1 -1
- package/dist/{index-CIbvJ5oc.js → index-COd-DEdZ.js} +1 -1
- package/dist/{index-gbUzsHq5.js → index-CbRKtmjR.js} +1 -1
- package/dist/{index-CVs0aN89.js → index-D5SllCXu.js} +26 -31
- package/dist/{index-BiKaun0K.js → index-DR01zn4-.js} +1 -1
- package/dist/{index-DYl43WIP.js → index-DmTVLzm7.js} +5544 -5474
- package/dist/{index-Qmbuelbf.js → index-udIS6_YQ.js} +2 -2
- package/dist/{index.vue_vue_type_script_setup_true_lang-Ld8QyF50.js → index.vue_vue_type_script_setup_true_lang-QSCHnqzi.js} +1 -1
- package/dist/model/payout-account.d.ts +2 -2
- package/dist/package.json +2 -2
- package/dist/{payout-account-B4W2N8Xm.js → payout-account-DlZkCb88.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +22 -22
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +20 -16
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +20 -16
- package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +20 -16
- package/dist/views/admin/payout-account/CreateDummyPayoutDialog.vue.d.ts +2 -0
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +44 -44
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +44 -44
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +44 -44
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +10 -10
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +10 -10
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +10 -10
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +6 -6
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +16 -16
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +140 -0
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +14 -14
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +44 -44
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +80 -80
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +40 -40
- package/dist/views/settlement/SettlementTable.vue.d.ts +16 -16
- package/package.json +2 -2
- package/dist/PayoutAccount-CEr0rx4J.js +0 -273
- package/dist/Transaction-BEkrFPHL.js +0 -1135
|
@@ -1,1135 +0,0 @@
|
|
|
1
|
-
import { reactive as ye, computed as h, watch as R, defineComponent as q, useModel as se, ref as H, resolveComponent as b, openBlock as f, createBlock as D, withCtx as P, createVNode as _, createElementVNode as I, unref as S, createElementBlock as O, Fragment as le, renderList as re, toDisplayString as Q, createCommentVNode as ie, withModifiers as fe, mergeModels as ae, toRef as be, createTextVNode as he, onBeforeUnmount as _e, isRef as X, h as L } from "vue";
|
|
2
|
-
import { t as Y } from "./index-gbUzsHq5.js";
|
|
3
|
-
import { h as Z } from "./moment-h96o7c8I.js";
|
|
4
|
-
import { g as Fe, b as ue, p as $ } from "./index-DYl43WIP.js";
|
|
5
|
-
import { g as Te, a as Se, t as Ie, _ as Ae, b as ee } from "./assets-CPEv5xmO.js";
|
|
6
|
-
import { u as we } from "./index-BiKaun0K.js";
|
|
7
|
-
import { useRoute as xe, useRouter as De } from "vue-router";
|
|
8
|
-
import { _ as Pe } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
9
|
-
import { _ as ke } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
10
|
-
import { _ as Ve } from "./SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js";
|
|
11
|
-
import { useSnackbar as Ce, useDialog as Ne } from "@feedmepos/ui-library";
|
|
12
|
-
import { w as ce } from "./Modal-DB8M9o1T.js";
|
|
13
|
-
import { u as W } from "./error-K1CakhA9.js";
|
|
14
|
-
import { _ as Me } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js";
|
|
15
|
-
import { u as J, _ as $e } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-DjiSltH9.js";
|
|
16
|
-
import { useI18n as ve, useCoreStore as Oe } from "@feedmepos/mf-common";
|
|
17
|
-
import { k as ge, h as de } from "./app-1rw4JLKr.js";
|
|
18
|
-
import { p as ne } from "./index-B0rOAUW-.js";
|
|
19
|
-
import { g as qe } from "./grafana-fcTmH2tm.js";
|
|
20
|
-
import { _ as Ee } from "./index.vue_vue_type_script_setup_true_lang-Ld8QyF50.js";
|
|
21
|
-
import { _ as Ue } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
|
|
22
|
-
import { _ as me } from "./TextInputDialog.vue_vue_type_script_setup_true_lang-C3AeZqwO.js";
|
|
23
|
-
import { u as Be, a as Re } from "./index-n58-Qewm.js";
|
|
24
|
-
import { s as pe } from "./validator-CTlVogBQ.js";
|
|
25
|
-
const te = {
|
|
26
|
-
businessFilter: "",
|
|
27
|
-
restaurantFilter: "",
|
|
28
|
-
payoutAccountId: "",
|
|
29
|
-
amount: null
|
|
30
|
-
};
|
|
31
|
-
function Ge() {
|
|
32
|
-
var i, w, T;
|
|
33
|
-
const o = xe(), a = De(), n = ye({
|
|
34
|
-
...te,
|
|
35
|
-
businessFilter: ((i = o.query.businessFilter) == null ? void 0 : i.toString()) || "",
|
|
36
|
-
restaurantFilter: ((w = o.query.restaurantFilter) == null ? void 0 : w.toString()) || "",
|
|
37
|
-
payoutAccountId: ((T = o.query.payoutAccountFilter) == null ? void 0 : T.toString()) || ""
|
|
38
|
-
}), v = h(() => {
|
|
39
|
-
let g = 0;
|
|
40
|
-
return n.businessFilter && g++, n.restaurantFilter && g++, n.payoutAccountId && g++, n.amount !== null && n.amount !== void 0 && g++, g;
|
|
41
|
-
}), y = h(() => v.value > 0);
|
|
42
|
-
function s() {
|
|
43
|
-
Object.assign(n, { ...te });
|
|
44
|
-
}
|
|
45
|
-
function A(g) {
|
|
46
|
-
Object.assign(n, { ...g });
|
|
47
|
-
}
|
|
48
|
-
return R(
|
|
49
|
-
() => [n.businessFilter, n.restaurantFilter, n.payoutAccountId],
|
|
50
|
-
([g, d, m]) => {
|
|
51
|
-
a.replace({
|
|
52
|
-
name: o.name,
|
|
53
|
-
query: {
|
|
54
|
-
...o.query,
|
|
55
|
-
businessFilter: g || void 0,
|
|
56
|
-
restaurantFilter: d || void 0,
|
|
57
|
-
payoutAccountFilter: m || void 0
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
), {
|
|
62
|
-
filter: n,
|
|
63
|
-
activeCount: v,
|
|
64
|
-
hasActiveFilters: y,
|
|
65
|
-
reset: s,
|
|
66
|
-
apply: A,
|
|
67
|
-
defaultState: te
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
const oe = {
|
|
71
|
-
async readBusinessesWithPagination(o) {
|
|
72
|
-
return (await ue().get("/payments/businesses", {
|
|
73
|
-
params: { ...o, limit: o.limit ?? 20 }
|
|
74
|
-
})).data;
|
|
75
|
-
},
|
|
76
|
-
async readBusinessById(o) {
|
|
77
|
-
return Fe(
|
|
78
|
-
await ue().get(`/payments/businesses/${o}`)
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
}, Ke = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer" }, Le = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, Ye = { class: "relative min-w-[280px]" }, ze = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, je = {
|
|
82
|
-
key: 0,
|
|
83
|
-
class: "px-8 py-12 text-center fm-typo-en-body-md-400 text-fm-color-neutral-gray-500"
|
|
84
|
-
}, Je = /* @__PURE__ */ q({
|
|
85
|
-
__name: "AdminBusinessSelector",
|
|
86
|
-
props: /* @__PURE__ */ ae({
|
|
87
|
-
label: {},
|
|
88
|
-
labelMark: {},
|
|
89
|
-
placeholder: {},
|
|
90
|
-
searchPlaceholder: {},
|
|
91
|
-
rules: {}
|
|
92
|
-
}, {
|
|
93
|
-
modelValue: { default: "" },
|
|
94
|
-
modelModifiers: {}
|
|
95
|
-
}),
|
|
96
|
-
emits: ["update:modelValue"],
|
|
97
|
-
setup(o) {
|
|
98
|
-
const a = o, n = se(o, "modelValue"), { t: v } = ve(), y = H(""), s = H("");
|
|
99
|
-
let A = null;
|
|
100
|
-
R(y, (p) => {
|
|
101
|
-
A && clearTimeout(A), A = setTimeout(() => s.value = p, 300);
|
|
102
|
-
});
|
|
103
|
-
const i = (p) => ({
|
|
104
|
-
label: p.name,
|
|
105
|
-
value: p._id
|
|
106
|
-
}), { data: w, isLoading: T } = J({
|
|
107
|
-
queryKey: ["admin-businesses"],
|
|
108
|
-
queryFn: () => oe.readBusinessesWithPagination({ limit: 20 }).then((p) => p.data),
|
|
109
|
-
select: (p) => p.map(i)
|
|
110
|
-
}), { data: g, isLoading: d } = J({
|
|
111
|
-
queryKey: h(() => [
|
|
112
|
-
"admin-businesses",
|
|
113
|
-
"search",
|
|
114
|
-
s.value
|
|
115
|
-
]),
|
|
116
|
-
queryFn: () => oe.readBusinessesWithPagination({
|
|
117
|
-
limit: 20,
|
|
118
|
-
search: s.value
|
|
119
|
-
}).then((p) => p.data),
|
|
120
|
-
select: (p) => p.map(i),
|
|
121
|
-
enabled: h(() => s.value.length > 0),
|
|
122
|
-
placeholderData: ge
|
|
123
|
-
}), { data: m, isLoading: k } = J({
|
|
124
|
-
queryKey: h(() => ["admin-businesses", n.value]),
|
|
125
|
-
queryFn: () => oe.readBusinessById(n.value).then((p) => p ? i(p) : null),
|
|
126
|
-
enabled: h(
|
|
127
|
-
() => !!n.value && !(w.value ?? []).some((p) => p.value === n.value)
|
|
128
|
-
)
|
|
129
|
-
}), E = h(() => w.value ?? []), C = h(
|
|
130
|
-
() => y.value ? g.value ?? [] : E.value
|
|
131
|
-
), F = h(
|
|
132
|
-
() => T.value || d.value || k.value
|
|
133
|
-
), G = h(
|
|
134
|
-
() => E.value.find((p) => p.value === n.value) ?? m.value ?? void 0
|
|
135
|
-
), z = h(
|
|
136
|
-
() => y.value && !F.value && C.value.length === 0
|
|
137
|
-
), j = (p) => {
|
|
138
|
-
n.value = p, y.value = "";
|
|
139
|
-
};
|
|
140
|
-
return (p, N) => {
|
|
141
|
-
const K = b("FmIcon"), l = b("FmCircularProgress"), V = b("FmSearch"), M = b("FmMenuItem"), U = b("FmMenu"), B = b("FmFormGroup");
|
|
142
|
-
return f(), D(B, {
|
|
143
|
-
modelValue: n.value,
|
|
144
|
-
"onUpdate:modelValue": N[2] || (N[2] = (t) => n.value = t),
|
|
145
|
-
label: a.label ?? "Business",
|
|
146
|
-
"label-mark": a.labelMark,
|
|
147
|
-
rules: a.rules
|
|
148
|
-
}, {
|
|
149
|
-
default: P(() => [
|
|
150
|
-
_(U, { "close-on-click": !0 }, {
|
|
151
|
-
"menu-button": P(() => {
|
|
152
|
-
var t;
|
|
153
|
-
return [
|
|
154
|
-
I("div", Ke, [
|
|
155
|
-
_(K, {
|
|
156
|
-
name: "business",
|
|
157
|
-
size: "sm"
|
|
158
|
-
}),
|
|
159
|
-
I("div", Le, Q(((t = G.value) == null ? void 0 : t.label) ?? a.placeholder ?? S(v)("payment.components.select")), 1),
|
|
160
|
-
F.value ? (f(), D(l, {
|
|
161
|
-
key: 0,
|
|
162
|
-
size: "md"
|
|
163
|
-
})) : G.value ? (f(), D(K, {
|
|
164
|
-
key: 1,
|
|
165
|
-
name: "close",
|
|
166
|
-
size: "sm",
|
|
167
|
-
onClick: N[0] || (N[0] = fe((e) => n.value = "", ["stop"]))
|
|
168
|
-
})) : (f(), D(K, {
|
|
169
|
-
key: 2,
|
|
170
|
-
name: "expand_more",
|
|
171
|
-
size: "sm"
|
|
172
|
-
}))
|
|
173
|
-
])
|
|
174
|
-
];
|
|
175
|
-
}),
|
|
176
|
-
default: P(() => [
|
|
177
|
-
I("div", Ye, [
|
|
178
|
-
I("div", ze, [
|
|
179
|
-
_(V, {
|
|
180
|
-
"model-value": y.value,
|
|
181
|
-
"onUpdate:modelValue": N[1] || (N[1] = (t) => y.value = t),
|
|
182
|
-
placeholder: a.searchPlaceholder ?? a.placeholder ?? S(v)("payment.components.select")
|
|
183
|
-
}, null, 8, ["model-value", "placeholder"])
|
|
184
|
-
]),
|
|
185
|
-
(f(!0), O(le, null, re(C.value, (t) => (f(), D(M, {
|
|
186
|
-
key: t.value,
|
|
187
|
-
label: t.label,
|
|
188
|
-
sublabel: "Business",
|
|
189
|
-
onClick: (e) => j(t.value)
|
|
190
|
-
}, null, 8, ["label", "onClick"]))), 128)),
|
|
191
|
-
z.value ? (f(), O("div", je, Q(S(v)("payment.components.no_results")), 1)) : ie("", !0)
|
|
192
|
-
])
|
|
193
|
-
]),
|
|
194
|
-
_: 1
|
|
195
|
-
})
|
|
196
|
-
]),
|
|
197
|
-
_: 1
|
|
198
|
-
}, 8, ["modelValue", "label", "label-mark", "rules"]);
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
}), Qe = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer" }, We = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, He = { class: "relative min-w-[280px]" }, Xe = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, Ze = {
|
|
202
|
-
key: 0,
|
|
203
|
-
class: "px-8 py-12 text-center fm-typo-en-body-md-400 text-fm-color-neutral-gray-500"
|
|
204
|
-
}, et = /* @__PURE__ */ q({
|
|
205
|
-
__name: "AdminPayoutAccountSelector",
|
|
206
|
-
props: /* @__PURE__ */ ae({
|
|
207
|
-
label: {},
|
|
208
|
-
labelMark: {},
|
|
209
|
-
placeholder: {},
|
|
210
|
-
searchPlaceholder: {},
|
|
211
|
-
rules: {},
|
|
212
|
-
businessId: {}
|
|
213
|
-
}, {
|
|
214
|
-
modelValue: { default: "" },
|
|
215
|
-
modelModifiers: {}
|
|
216
|
-
}),
|
|
217
|
-
emits: ["update:modelValue"],
|
|
218
|
-
setup(o) {
|
|
219
|
-
const a = o, n = se(o, "modelValue"), { t: v } = ve(), y = be(a, "businessId"), s = H(""), A = H("");
|
|
220
|
-
let i = null;
|
|
221
|
-
R(s, (l) => {
|
|
222
|
-
i && clearTimeout(i), i = setTimeout(() => A.value = l, 300);
|
|
223
|
-
}), R(y, () => {
|
|
224
|
-
n.value = "";
|
|
225
|
-
});
|
|
226
|
-
function w(l) {
|
|
227
|
-
return l.charAt(0).toUpperCase() + l.slice(1).toLowerCase();
|
|
228
|
-
}
|
|
229
|
-
const T = (l) => {
|
|
230
|
-
var M, U, B, t, e;
|
|
231
|
-
const V = (M = l.store) != null && M.event ? w(l.store.event) : void 0;
|
|
232
|
-
return {
|
|
233
|
-
label: ((B = (U = l.ref) == null ? void 0 : U.profile) == null ? void 0 : B.name) ?? ((t = l.ref) == null ? void 0 : t.name) ?? ((e = l.store) == null ? void 0 : e.id) ?? l._id,
|
|
234
|
-
sublabel: V ? `Payout Account (${V})` : "Payout Account",
|
|
235
|
-
value: l._id
|
|
236
|
-
};
|
|
237
|
-
}, g = h(
|
|
238
|
-
() => y.value ? ["admin-payout-accounts", "business", y.value] : ["admin-payout-accounts"]
|
|
239
|
-
), { data: d, isLoading: m } = J({
|
|
240
|
-
queryKey: g,
|
|
241
|
-
queryFn: () => ne.read({
|
|
242
|
-
status: [
|
|
243
|
-
$.F_PAYOUT_ACCOUNT_STATUS.Enum.APPROVED,
|
|
244
|
-
$.F_PAYOUT_ACCOUNT_STATUS.Enum.PENDING
|
|
245
|
-
],
|
|
246
|
-
searchKey: "",
|
|
247
|
-
cursor: "",
|
|
248
|
-
limit: 20,
|
|
249
|
-
businessId: y.value
|
|
250
|
-
}).then((l) => l.data),
|
|
251
|
-
select: (l) => l.map(T)
|
|
252
|
-
}), { data: k, isLoading: E } = J({
|
|
253
|
-
queryKey: h(() => [...g.value, "search", A.value]),
|
|
254
|
-
queryFn: () => ne.read({
|
|
255
|
-
status: [
|
|
256
|
-
$.F_PAYOUT_ACCOUNT_STATUS.Enum.APPROVED,
|
|
257
|
-
$.F_PAYOUT_ACCOUNT_STATUS.Enum.PENDING
|
|
258
|
-
],
|
|
259
|
-
searchKey: A.value,
|
|
260
|
-
cursor: "",
|
|
261
|
-
limit: 20,
|
|
262
|
-
businessId: y.value
|
|
263
|
-
}).then((l) => l.data),
|
|
264
|
-
select: (l) => l.map(T),
|
|
265
|
-
enabled: h(() => A.value.length > 0),
|
|
266
|
-
placeholderData: ge
|
|
267
|
-
}), { data: C, isLoading: F } = J({
|
|
268
|
-
queryKey: h(() => ["admin-payout-accounts", n.value]),
|
|
269
|
-
queryFn: () => ne.readById(n.value).then((l) => l ? T(l) : null),
|
|
270
|
-
enabled: h(
|
|
271
|
-
() => !!n.value && !(d.value ?? []).some((l) => l.value === n.value)
|
|
272
|
-
)
|
|
273
|
-
}), G = h(() => d.value ?? []), z = h(
|
|
274
|
-
() => s.value ? k.value ?? [] : G.value
|
|
275
|
-
), j = h(
|
|
276
|
-
() => m.value || E.value || F.value
|
|
277
|
-
), p = h(
|
|
278
|
-
() => G.value.find((l) => l.value === n.value) ?? C.value ?? void 0
|
|
279
|
-
), N = h(
|
|
280
|
-
() => s.value && !j.value && z.value.length === 0
|
|
281
|
-
), K = (l) => {
|
|
282
|
-
n.value = l, s.value = "";
|
|
283
|
-
};
|
|
284
|
-
return (l, V) => {
|
|
285
|
-
const M = b("FmIcon"), U = b("FmCircularProgress"), B = b("FmSearch"), t = b("FmMenuItem"), e = b("FmMenu"), r = b("FmFormGroup");
|
|
286
|
-
return f(), D(r, {
|
|
287
|
-
modelValue: n.value,
|
|
288
|
-
"onUpdate:modelValue": V[2] || (V[2] = (c) => n.value = c),
|
|
289
|
-
label: a.label ?? "Payout Account",
|
|
290
|
-
"label-mark": a.labelMark,
|
|
291
|
-
rules: a.rules
|
|
292
|
-
}, {
|
|
293
|
-
default: P(() => [
|
|
294
|
-
_(e, { "close-on-click": !0 }, {
|
|
295
|
-
"menu-button": P(() => {
|
|
296
|
-
var c;
|
|
297
|
-
return [
|
|
298
|
-
I("div", Qe, [
|
|
299
|
-
_(M, {
|
|
300
|
-
name: "account_balance_wallet",
|
|
301
|
-
size: "sm"
|
|
302
|
-
}),
|
|
303
|
-
I("div", We, Q(((c = p.value) == null ? void 0 : c.label) ?? a.placeholder ?? S(v)("payment.components.select")), 1),
|
|
304
|
-
j.value ? (f(), D(U, {
|
|
305
|
-
key: 0,
|
|
306
|
-
size: "md"
|
|
307
|
-
})) : p.value ? (f(), D(M, {
|
|
308
|
-
key: 1,
|
|
309
|
-
name: "close",
|
|
310
|
-
size: "sm",
|
|
311
|
-
onClick: V[0] || (V[0] = fe((u) => n.value = "", ["stop"]))
|
|
312
|
-
})) : (f(), D(M, {
|
|
313
|
-
key: 2,
|
|
314
|
-
name: "expand_more",
|
|
315
|
-
size: "sm"
|
|
316
|
-
}))
|
|
317
|
-
])
|
|
318
|
-
];
|
|
319
|
-
}),
|
|
320
|
-
default: P(() => [
|
|
321
|
-
I("div", He, [
|
|
322
|
-
I("div", Xe, [
|
|
323
|
-
_(B, {
|
|
324
|
-
"model-value": s.value,
|
|
325
|
-
"onUpdate:modelValue": V[1] || (V[1] = (c) => s.value = c),
|
|
326
|
-
placeholder: a.searchPlaceholder ?? a.placeholder ?? S(v)("payment.components.select")
|
|
327
|
-
}, null, 8, ["model-value", "placeholder"])
|
|
328
|
-
]),
|
|
329
|
-
(f(!0), O(le, null, re(z.value, (c) => (f(), D(t, {
|
|
330
|
-
key: c.value,
|
|
331
|
-
label: c.label,
|
|
332
|
-
sublabel: c.sublabel,
|
|
333
|
-
onClick: (u) => K(c.value)
|
|
334
|
-
}, null, 8, ["label", "sublabel", "onClick"]))), 128)),
|
|
335
|
-
N.value ? (f(), O("div", Ze, Q(S(v)("payment.components.no_results")), 1)) : ie("", !0)
|
|
336
|
-
])
|
|
337
|
-
]),
|
|
338
|
-
_: 1
|
|
339
|
-
})
|
|
340
|
-
]),
|
|
341
|
-
_: 1
|
|
342
|
-
}, 8, ["modelValue", "label", "label-mark", "rules"]);
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
}), tt = { class: "relative inline-flex" }, at = { class: "flex flex-col gap-6 px-4 py-6" }, nt = { class: "flex gap-2 items-center justify-start" }, ot = /* @__PURE__ */ q({
|
|
346
|
-
__name: "AdvancedFilterPanel",
|
|
347
|
-
props: /* @__PURE__ */ ae({
|
|
348
|
-
filter: {},
|
|
349
|
-
activeCount: {},
|
|
350
|
-
hasActiveFilters: { type: Boolean },
|
|
351
|
-
disable: { type: Boolean }
|
|
352
|
-
}, {
|
|
353
|
-
modelValue: { type: Boolean, default: !1 },
|
|
354
|
-
modelModifiers: {}
|
|
355
|
-
}),
|
|
356
|
-
emits: /* @__PURE__ */ ae(["apply", "reset"], ["update:modelValue"]),
|
|
357
|
-
setup(o, { emit: a }) {
|
|
358
|
-
const n = o, v = a, y = se(o, "modelValue"), s = ye({ ...n.filter }), A = h({
|
|
359
|
-
get: () => s.amount != null ? String(s.amount) : "",
|
|
360
|
-
set: (g) => {
|
|
361
|
-
const d = Number(g);
|
|
362
|
-
s.amount = g === "" ? null : Number.isFinite(d) ? d : null;
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
R(y, (g) => {
|
|
366
|
-
g && Object.assign(s, { ...n.filter });
|
|
367
|
-
}), R(
|
|
368
|
-
() => s.businessFilter,
|
|
369
|
-
(g, d) => {
|
|
370
|
-
g !== d && (s.restaurantFilter = "", s.payoutAccountId = "");
|
|
371
|
-
}
|
|
372
|
-
);
|
|
373
|
-
function i() {
|
|
374
|
-
v("apply", { ...s }), y.value = !1;
|
|
375
|
-
}
|
|
376
|
-
function w() {
|
|
377
|
-
Object.assign(s, { ...te }), v("reset"), y.value = !1;
|
|
378
|
-
}
|
|
379
|
-
function T() {
|
|
380
|
-
y.value = !1;
|
|
381
|
-
}
|
|
382
|
-
return (g, d) => {
|
|
383
|
-
const m = b("FmButton"), k = b("FmBadge"), E = b("FmTextField"), C = b("FmSideSheet");
|
|
384
|
-
return f(), D(C, {
|
|
385
|
-
modelValue: y.value,
|
|
386
|
-
"onUpdate:modelValue": d[6] || (d[6] = (F) => y.value = F),
|
|
387
|
-
header: "Advanced filters",
|
|
388
|
-
"dismiss-away": "",
|
|
389
|
-
"onOn:clickedAway": T
|
|
390
|
-
}, {
|
|
391
|
-
"side-sheet-button": P(() => [
|
|
392
|
-
I("div", tt, [
|
|
393
|
-
_(m, {
|
|
394
|
-
variant: "plain",
|
|
395
|
-
size: "md",
|
|
396
|
-
"prepend-icon": "tune",
|
|
397
|
-
label: "Advanced filters"
|
|
398
|
-
}),
|
|
399
|
-
o.hasActiveFilters ? (f(), D(k, {
|
|
400
|
-
key: 0,
|
|
401
|
-
value: o.activeCount,
|
|
402
|
-
variant: "neutral",
|
|
403
|
-
class: "bg-fm-color-primary text-fm-color-typo-white"
|
|
404
|
-
}, null, 8, ["value"])) : ie("", !0)
|
|
405
|
-
])
|
|
406
|
-
]),
|
|
407
|
-
"side-sheet-footer": P(() => [
|
|
408
|
-
I("div", nt, [
|
|
409
|
-
_(m, {
|
|
410
|
-
variant: "primary",
|
|
411
|
-
label: "Apply",
|
|
412
|
-
onClick: d[4] || (d[4] = (F) => i())
|
|
413
|
-
}),
|
|
414
|
-
_(m, {
|
|
415
|
-
variant: "secondary",
|
|
416
|
-
label: "Reset",
|
|
417
|
-
onClick: d[5] || (d[5] = (F) => w())
|
|
418
|
-
})
|
|
419
|
-
])
|
|
420
|
-
]),
|
|
421
|
-
default: P(() => [
|
|
422
|
-
I("div", at, [
|
|
423
|
-
_(Je, {
|
|
424
|
-
modelValue: s.businessFilter,
|
|
425
|
-
"onUpdate:modelValue": d[0] || (d[0] = (F) => s.businessFilter = F),
|
|
426
|
-
label: "Business",
|
|
427
|
-
placeholder: "All businesses",
|
|
428
|
-
"search-placeholder": "Search businesses"
|
|
429
|
-
}, null, 8, ["modelValue"]),
|
|
430
|
-
_($e, {
|
|
431
|
-
modelValue: s.restaurantFilter,
|
|
432
|
-
"onUpdate:modelValue": d[1] || (d[1] = (F) => s.restaurantFilter = F),
|
|
433
|
-
"business-id": s.businessFilter,
|
|
434
|
-
label: "Restaurant",
|
|
435
|
-
placeholder: "All restaurants",
|
|
436
|
-
"search-placeholder": "Search restaurants"
|
|
437
|
-
}, null, 8, ["modelValue", "business-id"]),
|
|
438
|
-
_(et, {
|
|
439
|
-
modelValue: s.payoutAccountId,
|
|
440
|
-
"onUpdate:modelValue": d[2] || (d[2] = (F) => s.payoutAccountId = F),
|
|
441
|
-
"business-id": s.businessFilter,
|
|
442
|
-
label: "Payout Account",
|
|
443
|
-
placeholder: "All payout accounts",
|
|
444
|
-
"search-placeholder": "Search payout accounts"
|
|
445
|
-
}, null, 8, ["modelValue", "business-id"]),
|
|
446
|
-
_(E, {
|
|
447
|
-
modelValue: A.value,
|
|
448
|
-
"onUpdate:modelValue": d[3] || (d[3] = (F) => A.value = F),
|
|
449
|
-
label: "Amount",
|
|
450
|
-
type: "number",
|
|
451
|
-
placeholder: "Exact amount",
|
|
452
|
-
disabled: o.disable
|
|
453
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
454
|
-
])
|
|
455
|
-
]),
|
|
456
|
-
_: 1
|
|
457
|
-
}, 8, ["modelValue"]);
|
|
458
|
-
};
|
|
459
|
-
}
|
|
460
|
-
}), st = ["src"], lt = /* @__PURE__ */ q({
|
|
461
|
-
__name: "Gateway",
|
|
462
|
-
props: {
|
|
463
|
-
row: {},
|
|
464
|
-
data: {}
|
|
465
|
-
},
|
|
466
|
-
setup(o) {
|
|
467
|
-
return (a, n) => {
|
|
468
|
-
const v = b("FmTooltip");
|
|
469
|
-
return f(), D(v, {
|
|
470
|
-
variant: "plain",
|
|
471
|
-
placement: "top",
|
|
472
|
-
content: o.row.original.gateway,
|
|
473
|
-
"hide-arrow": !0
|
|
474
|
-
}, {
|
|
475
|
-
default: P(() => [
|
|
476
|
-
I("img", {
|
|
477
|
-
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
478
|
-
src: S(Te)(o.row.original.gateway)
|
|
479
|
-
}, null, 8, st)
|
|
480
|
-
]),
|
|
481
|
-
_: 1
|
|
482
|
-
}, 8, ["content"]);
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
}), rt = ["src"], it = /* @__PURE__ */ q({
|
|
486
|
-
__name: "Method",
|
|
487
|
-
props: {
|
|
488
|
-
row: {},
|
|
489
|
-
data: {}
|
|
490
|
-
},
|
|
491
|
-
setup(o) {
|
|
492
|
-
return (a, n) => {
|
|
493
|
-
const v = b("FmTooltip");
|
|
494
|
-
return f(), D(v, {
|
|
495
|
-
variant: "plain",
|
|
496
|
-
placement: "top",
|
|
497
|
-
content: o.row.original.method.issuer,
|
|
498
|
-
"hide-arrow": !0
|
|
499
|
-
}, {
|
|
500
|
-
default: P(() => [
|
|
501
|
-
I("img", {
|
|
502
|
-
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
503
|
-
src: S(Se)(o.row.original.method.issuer, o.row.original.method.variant)
|
|
504
|
-
}, null, 8, rt)
|
|
505
|
-
]),
|
|
506
|
-
_: 1
|
|
507
|
-
}, 8, ["content"]);
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
}), ut = /* @__PURE__ */ q({
|
|
511
|
-
__name: "Actions",
|
|
512
|
-
props: {
|
|
513
|
-
onAction: { type: Function },
|
|
514
|
-
transaction: {}
|
|
515
|
-
},
|
|
516
|
-
setup(o) {
|
|
517
|
-
const a = h(() => [
|
|
518
|
-
o.transaction.flags.query && {
|
|
519
|
-
label: "Query",
|
|
520
|
-
sublabel: "Perform transaction status inquriy",
|
|
521
|
-
icon: "question_answer",
|
|
522
|
-
action: "query"
|
|
523
|
-
},
|
|
524
|
-
o.transaction.flags.refund && {
|
|
525
|
-
label: "Refund",
|
|
526
|
-
sublabel: "Perform transaction refund request",
|
|
527
|
-
icon: "request_page",
|
|
528
|
-
action: "refund"
|
|
529
|
-
},
|
|
530
|
-
o.transaction.flags.notify && {
|
|
531
|
-
label: "Notify",
|
|
532
|
-
sublabel: "Perform webhook notification for transaction",
|
|
533
|
-
icon: "webhook",
|
|
534
|
-
action: "notify"
|
|
535
|
-
},
|
|
536
|
-
o.transaction.callbackResponse != null && {
|
|
537
|
-
label: "Show Transaction Metadata",
|
|
538
|
-
sublabel: "Display the transaction callback metadata in JSON.",
|
|
539
|
-
icon: "code",
|
|
540
|
-
action: "transactionMetadata"
|
|
541
|
-
},
|
|
542
|
-
{
|
|
543
|
-
label: "Log",
|
|
544
|
-
sublabel: "Inspect transaction historical actions, requests and responses.",
|
|
545
|
-
icon: "history",
|
|
546
|
-
action: "history"
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
label: "Set Pay ID",
|
|
550
|
-
sublabel: "Set a pay ID for this transaction",
|
|
551
|
-
icon: "receipt_long",
|
|
552
|
-
action: "setPayId"
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
label: "Set Gateway ID",
|
|
556
|
-
sublabel: "Set a gateway transaction ID",
|
|
557
|
-
icon: "link",
|
|
558
|
-
action: "setGatewayId"
|
|
559
|
-
}
|
|
560
|
-
]);
|
|
561
|
-
return (n, v) => {
|
|
562
|
-
const y = b("FmIcon"), s = b("FmMenuItem"), A = b("FmMenu");
|
|
563
|
-
return f(), O("div", {
|
|
564
|
-
onClick: v[0] || (v[0] = (i) => {
|
|
565
|
-
i.stopPropagation();
|
|
566
|
-
})
|
|
567
|
-
}, [
|
|
568
|
-
_(A, null, {
|
|
569
|
-
"menu-button": P(() => [
|
|
570
|
-
_(y, { name: "settings" })
|
|
571
|
-
]),
|
|
572
|
-
default: P(() => [
|
|
573
|
-
(f(!0), O(le, null, re(a.value.filter((i) => !!i), (i) => (f(), D(s, {
|
|
574
|
-
selectable: !0,
|
|
575
|
-
key: i.label,
|
|
576
|
-
sublabel: i.sublabel,
|
|
577
|
-
label: i.label,
|
|
578
|
-
icon: i.icon,
|
|
579
|
-
onclick: () => o.onAction(i.action)
|
|
580
|
-
}, null, 8, ["sublabel", "label", "icon", "onclick"]))), 128))
|
|
581
|
-
]),
|
|
582
|
-
_: 1
|
|
583
|
-
})
|
|
584
|
-
]);
|
|
585
|
-
};
|
|
586
|
-
}
|
|
587
|
-
}), ct = { class: "pb-24" }, dt = {
|
|
588
|
-
key: 0,
|
|
589
|
-
class: "bg-gray-50 border border-gray-200 rounded-md p-16 text-xs font-mono overflow-auto max-h-[60vh]"
|
|
590
|
-
}, mt = {
|
|
591
|
-
key: 1,
|
|
592
|
-
class: "text-gray-500 text-sm"
|
|
593
|
-
}, pt = /* @__PURE__ */ q({
|
|
594
|
-
__name: "TransactionMetadataDialog",
|
|
595
|
-
props: {
|
|
596
|
-
transactionMetadata: {}
|
|
597
|
-
},
|
|
598
|
-
setup(o) {
|
|
599
|
-
const a = o, n = () => {
|
|
600
|
-
if (a.transactionMetadata == null)
|
|
601
|
-
return "No transaction metadata available.";
|
|
602
|
-
try {
|
|
603
|
-
return JSON.stringify(a.transactionMetadata, null, 2);
|
|
604
|
-
} catch {
|
|
605
|
-
return String(a.transactionMetadata);
|
|
606
|
-
}
|
|
607
|
-
};
|
|
608
|
-
return (v, y) => (f(), O("div", ct, [
|
|
609
|
-
a.transactionMetadata != null ? (f(), O("pre", dt, Q(n()), 1)) : (f(), O("div", mt, " No transaction metadata available for this transaction. "))
|
|
610
|
-
]));
|
|
611
|
-
}
|
|
612
|
-
}), yt = { class: "flex items-center gap-1" }, ft = /* @__PURE__ */ q({
|
|
613
|
-
__name: "BillSeqNumber",
|
|
614
|
-
props: {
|
|
615
|
-
row: {},
|
|
616
|
-
data: {}
|
|
617
|
-
},
|
|
618
|
-
setup(o) {
|
|
619
|
-
return (a, n) => {
|
|
620
|
-
const v = b("FmIcon");
|
|
621
|
-
return f(), O("span", yt, [
|
|
622
|
-
he(Q(o.row.original.seqNumber) + " ", 1),
|
|
623
|
-
_(v, {
|
|
624
|
-
size: "md",
|
|
625
|
-
name: "check",
|
|
626
|
-
color: "#16a34a"
|
|
627
|
-
})
|
|
628
|
-
]);
|
|
629
|
-
};
|
|
630
|
-
}
|
|
631
|
-
}), vt = { class: "flex flex-row justify-between items-end mb-6" }, gt = { class: "flex flex-col" }, bt = { class: "flex items-start mb-2 gap-3" }, ht = { class: "flex gap-3" }, Lt = /* @__PURE__ */ q({
|
|
632
|
-
__name: "Transaction",
|
|
633
|
-
setup(o) {
|
|
634
|
-
const a = H(), { filter: n, activeCount: v, hasActiveFilters: y, reset: s, apply: A } = Ge(), { dateRange: i, searchKey: w, status: T } = we({
|
|
635
|
-
searchKey: "",
|
|
636
|
-
status: [$.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
|
637
|
-
dateRange: {
|
|
638
|
-
startDate: Z().startOf("day").format("YYYY-MM-DD"),
|
|
639
|
-
endDate: Z().endOf("day").format("YYYY-MM-DD")
|
|
640
|
-
}
|
|
641
|
-
}), g = [
|
|
642
|
-
{
|
|
643
|
-
label: "Success",
|
|
644
|
-
value: $.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
label: "Refunded",
|
|
648
|
-
value: $.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
|
649
|
-
},
|
|
650
|
-
{
|
|
651
|
-
label: "Process",
|
|
652
|
-
value: $.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
|
653
|
-
},
|
|
654
|
-
{
|
|
655
|
-
label: "Pending Settlement",
|
|
656
|
-
value: $.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING_SETTLEMENT
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
label: "Failed",
|
|
660
|
-
value: $.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
|
661
|
-
}
|
|
662
|
-
], { sessionUser: d } = Oe(), m = Ce(), k = Ne(), { getBillLink: E } = Be();
|
|
663
|
-
let C;
|
|
664
|
-
const F = () => {
|
|
665
|
-
C && (clearTimeout(C), C = void 0);
|
|
666
|
-
}, {
|
|
667
|
-
promptSuggestion: G,
|
|
668
|
-
closeSuggestion: z
|
|
669
|
-
} = Re({
|
|
670
|
-
searchKey: w,
|
|
671
|
-
dateRange: i,
|
|
672
|
-
onBeforeApply: F
|
|
673
|
-
}), j = async (t, e) => {
|
|
674
|
-
const r = await Y.readTransactions({
|
|
675
|
-
start: Z(i.value.startDate).startOf("day").toISOString(),
|
|
676
|
-
end: Z(i.value.endDate).endOf("day").toISOString(),
|
|
677
|
-
limit: t,
|
|
678
|
-
cursor: e,
|
|
679
|
-
status: T.value,
|
|
680
|
-
businessId: n.businessFilter || void 0,
|
|
681
|
-
restaurantId: n.restaurantFilter || void 0,
|
|
682
|
-
payoutAccountId: n.payoutAccountId || void 0,
|
|
683
|
-
amount: n.amount ?? void 0,
|
|
684
|
-
search: w.value
|
|
685
|
-
});
|
|
686
|
-
return {
|
|
687
|
-
data: Ie(r.data),
|
|
688
|
-
meta: r.meta
|
|
689
|
-
};
|
|
690
|
-
};
|
|
691
|
-
R([i, T], () => {
|
|
692
|
-
var t;
|
|
693
|
-
(t = a.value) == null || t.reset();
|
|
694
|
-
}), R(w, () => {
|
|
695
|
-
F(), G(), C = setTimeout(() => {
|
|
696
|
-
var t;
|
|
697
|
-
(t = a.value) == null || t.reset();
|
|
698
|
-
}, 700);
|
|
699
|
-
}), _e(() => {
|
|
700
|
-
F(), z();
|
|
701
|
-
});
|
|
702
|
-
async function p(t) {
|
|
703
|
-
var r, c;
|
|
704
|
-
const e = (r = a.value) == null ? void 0 : r.pageData().at(t);
|
|
705
|
-
if (!e) {
|
|
706
|
-
m.open({
|
|
707
|
-
type: "error",
|
|
708
|
-
title: "Something went wrong",
|
|
709
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
710
|
-
});
|
|
711
|
-
return;
|
|
712
|
-
}
|
|
713
|
-
try {
|
|
714
|
-
const u = await Y.refetchTransaction({
|
|
715
|
-
transactionId: e.id
|
|
716
|
-
});
|
|
717
|
-
(c = a.value) == null || c.replaceData(t, ee(u)), m.open({
|
|
718
|
-
type: "success",
|
|
719
|
-
title: "Transaction queried and updated successfully."
|
|
720
|
-
});
|
|
721
|
-
} catch (u) {
|
|
722
|
-
m.open({
|
|
723
|
-
type: "error",
|
|
724
|
-
title: "Fail to query transaction.",
|
|
725
|
-
message: W(u)
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
async function N(t) {
|
|
730
|
-
var r;
|
|
731
|
-
const e = (r = a.value) == null ? void 0 : r.pageData().at(t);
|
|
732
|
-
if (!e) {
|
|
733
|
-
m.open({
|
|
734
|
-
type: "error",
|
|
735
|
-
title: "Something went wrong",
|
|
736
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
737
|
-
});
|
|
738
|
-
return;
|
|
739
|
-
}
|
|
740
|
-
ce(
|
|
741
|
-
k,
|
|
742
|
-
"Refund Transaction",
|
|
743
|
-
"Are you sure to refund transaction? This action cannot be revert!",
|
|
744
|
-
async () => {
|
|
745
|
-
var c;
|
|
746
|
-
try {
|
|
747
|
-
const u = await Y.refundTransaction({
|
|
748
|
-
transactionId: e.id,
|
|
749
|
-
reason: "portal transaction refund",
|
|
750
|
-
amount: e.fdoAmount
|
|
751
|
-
});
|
|
752
|
-
(c = a.value) == null || c.replaceData(t, ee(u)), m.open({
|
|
753
|
-
type: "success",
|
|
754
|
-
title: "Transaction refund request initiated."
|
|
755
|
-
});
|
|
756
|
-
} catch (u) {
|
|
757
|
-
m.open({
|
|
758
|
-
type: "error",
|
|
759
|
-
title: "Fail to request refund transaction.",
|
|
760
|
-
message: W(u)
|
|
761
|
-
});
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
);
|
|
765
|
-
}
|
|
766
|
-
async function K(t) {
|
|
767
|
-
var r;
|
|
768
|
-
const e = (r = a.value) == null ? void 0 : r.pageData().at(t);
|
|
769
|
-
if (!e) {
|
|
770
|
-
m.open({
|
|
771
|
-
type: "error",
|
|
772
|
-
title: "Something went wrong",
|
|
773
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
774
|
-
});
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
|
-
ce(
|
|
778
|
-
k,
|
|
779
|
-
"Notify Transaction",
|
|
780
|
-
"Are you sure to perform notify transaction?",
|
|
781
|
-
async () => {
|
|
782
|
-
try {
|
|
783
|
-
await Y.renotifyTransaction(e.id), m.open({
|
|
784
|
-
type: "success",
|
|
785
|
-
title: "Transaction notify successfully."
|
|
786
|
-
});
|
|
787
|
-
} catch (c) {
|
|
788
|
-
m.open({
|
|
789
|
-
type: "error",
|
|
790
|
-
title: "Fail to notify transaction.",
|
|
791
|
-
message: W(c)
|
|
792
|
-
});
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
);
|
|
796
|
-
}
|
|
797
|
-
async function l(t) {
|
|
798
|
-
var c;
|
|
799
|
-
const e = (c = a.value) == null ? void 0 : c.pageData().at(t);
|
|
800
|
-
if (!e) {
|
|
801
|
-
m.open({
|
|
802
|
-
type: "error",
|
|
803
|
-
title: "Something went wrong",
|
|
804
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
805
|
-
});
|
|
806
|
-
return;
|
|
807
|
-
}
|
|
808
|
-
const r = qe(
|
|
809
|
-
[
|
|
810
|
-
{
|
|
811
|
-
type: "span",
|
|
812
|
-
queryKey: "transaction.id",
|
|
813
|
-
queryValue: e.id
|
|
814
|
-
}
|
|
815
|
-
],
|
|
816
|
-
e.transactionAt
|
|
817
|
-
);
|
|
818
|
-
window.open(r, "_blank");
|
|
819
|
-
}
|
|
820
|
-
async function V(t) {
|
|
821
|
-
var r;
|
|
822
|
-
const e = (r = a.value) == null ? void 0 : r.pageData().at(t);
|
|
823
|
-
if (!e) {
|
|
824
|
-
m.open({
|
|
825
|
-
type: "error",
|
|
826
|
-
title: "Something went wrong",
|
|
827
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
828
|
-
});
|
|
829
|
-
return;
|
|
830
|
-
}
|
|
831
|
-
k.open({
|
|
832
|
-
title: "Set Pay ID",
|
|
833
|
-
closeButton: !0,
|
|
834
|
-
overlay: !0,
|
|
835
|
-
contentComponent: me,
|
|
836
|
-
contentComponentProps: {
|
|
837
|
-
label: "Pay ID",
|
|
838
|
-
placeholder: "Enter Pay ID",
|
|
839
|
-
schema: pe().trim().min(1, "Pay ID is required")
|
|
840
|
-
}
|
|
841
|
-
}).onPrimary(async (c) => {
|
|
842
|
-
var u;
|
|
843
|
-
try {
|
|
844
|
-
const x = await Y.bindPayId({
|
|
845
|
-
transactionId: e.id,
|
|
846
|
-
payId: c
|
|
847
|
-
});
|
|
848
|
-
(u = a.value) == null || u.replaceData(t, ee(x)), m.open({
|
|
849
|
-
type: "success",
|
|
850
|
-
title: "Pay ID set successfully."
|
|
851
|
-
}), k.close();
|
|
852
|
-
} catch (x) {
|
|
853
|
-
m.open({
|
|
854
|
-
type: "error",
|
|
855
|
-
title: "Failed to set Pay ID.",
|
|
856
|
-
message: W(x)
|
|
857
|
-
});
|
|
858
|
-
}
|
|
859
|
-
});
|
|
860
|
-
}
|
|
861
|
-
async function M(t) {
|
|
862
|
-
var r;
|
|
863
|
-
const e = (r = a.value) == null ? void 0 : r.pageData().at(t);
|
|
864
|
-
if (!e) {
|
|
865
|
-
m.open({
|
|
866
|
-
type: "error",
|
|
867
|
-
title: "Something went wrong",
|
|
868
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
869
|
-
});
|
|
870
|
-
return;
|
|
871
|
-
}
|
|
872
|
-
k.open({
|
|
873
|
-
title: "Set Gateway ID",
|
|
874
|
-
closeButton: !0,
|
|
875
|
-
overlay: !0,
|
|
876
|
-
contentComponent: me,
|
|
877
|
-
contentComponentProps: {
|
|
878
|
-
label: "Gateway Transaction ID",
|
|
879
|
-
placeholder: "Enter Gateway Transaction ID",
|
|
880
|
-
schema: pe().trim().min(1, "Gateway Transaction ID is required")
|
|
881
|
-
}
|
|
882
|
-
}).onPrimary(async (c) => {
|
|
883
|
-
var u;
|
|
884
|
-
try {
|
|
885
|
-
const x = await Y.setGatewayId({
|
|
886
|
-
transactionId: e.id,
|
|
887
|
-
gatewayTransactionId: c
|
|
888
|
-
});
|
|
889
|
-
(u = a.value) == null || u.replaceData(t, ee(x)), m.open({
|
|
890
|
-
type: "success",
|
|
891
|
-
title: "Gateway ID set successfully."
|
|
892
|
-
}), k.close();
|
|
893
|
-
} catch (x) {
|
|
894
|
-
m.open({
|
|
895
|
-
type: "error",
|
|
896
|
-
title: "Failed to set Gateway ID.",
|
|
897
|
-
message: W(x)
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
async function U(t) {
|
|
903
|
-
var r;
|
|
904
|
-
const e = (r = a.value) == null ? void 0 : r.pageData().at(t);
|
|
905
|
-
if (!e) {
|
|
906
|
-
m.open({
|
|
907
|
-
type: "error",
|
|
908
|
-
title: "Something went wrong",
|
|
909
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
910
|
-
});
|
|
911
|
-
return;
|
|
912
|
-
}
|
|
913
|
-
k.open({
|
|
914
|
-
title: "Transaction Metadata",
|
|
915
|
-
closeButton: !0,
|
|
916
|
-
overlay: !0,
|
|
917
|
-
contentComponent: pt,
|
|
918
|
-
contentComponentProps: {
|
|
919
|
-
transactionMetadata: e.callbackResponse
|
|
920
|
-
}
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
const B = [
|
|
924
|
-
{
|
|
925
|
-
header: () => "Transaction ID",
|
|
926
|
-
accessorKey: "id",
|
|
927
|
-
cell: ({ cell: t }) => {
|
|
928
|
-
let e = "";
|
|
929
|
-
return de(d.value) && t.row.original.transactionId && (e = `
|
|
930
|
-
ID: ${t.row.original.transactionId}`), L(Ue, { data: t.getValue(), extra: e });
|
|
931
|
-
}
|
|
932
|
-
},
|
|
933
|
-
{
|
|
934
|
-
header: () => "Pay ID",
|
|
935
|
-
accessorKey: "payId",
|
|
936
|
-
cell: ({ cell: t, row: e }) => {
|
|
937
|
-
const r = E(e.original);
|
|
938
|
-
return r ? L(
|
|
939
|
-
"a",
|
|
940
|
-
{
|
|
941
|
-
href: r,
|
|
942
|
-
class: "text-blue-600 underline"
|
|
943
|
-
},
|
|
944
|
-
t.getValue()
|
|
945
|
-
) : t.getValue();
|
|
946
|
-
}
|
|
947
|
-
},
|
|
948
|
-
{
|
|
949
|
-
header: () => "Bill",
|
|
950
|
-
accessorKey: "seqNumber",
|
|
951
|
-
cell: ({ cell: t, row: e }) => e.original.seqNumberBinded ? L(ft, { row: e, data: t.getValue() }) : e.original.seqNumber
|
|
952
|
-
},
|
|
953
|
-
{
|
|
954
|
-
header: () => "Gateway",
|
|
955
|
-
accessorKey: "gateway",
|
|
956
|
-
meta: {
|
|
957
|
-
textAlign: "center"
|
|
958
|
-
},
|
|
959
|
-
cell: ({ cell: t, row: e }) => e.original.method ? L(lt, { row: e, data: t.getValue() }) : ""
|
|
960
|
-
},
|
|
961
|
-
{
|
|
962
|
-
header: () => "Method",
|
|
963
|
-
accessorKey: "method",
|
|
964
|
-
meta: {
|
|
965
|
-
textAlign: "center"
|
|
966
|
-
},
|
|
967
|
-
cell: ({ cell: t, row: e }) => e.original.method ? L(it, { row: e, data: t.getValue() }) : ""
|
|
968
|
-
},
|
|
969
|
-
{
|
|
970
|
-
header: () => "Gateway ID",
|
|
971
|
-
accessorKey: "gatewayTransactionId",
|
|
972
|
-
cell: ({ cell: t, row: e }) => e.original.status === "REFUNDED" ? e.original.gatewayRefundId : e.original.gatewayTransactionId
|
|
973
|
-
},
|
|
974
|
-
{
|
|
975
|
-
header: () => "Type",
|
|
976
|
-
accessorKey: "payFor",
|
|
977
|
-
meta: {
|
|
978
|
-
textAlign: "center"
|
|
979
|
-
}
|
|
980
|
-
},
|
|
981
|
-
{
|
|
982
|
-
header: () => "Status",
|
|
983
|
-
accessorKey: "status",
|
|
984
|
-
cell: ({ cell: t }) => L(Ae, { data: t.getValue() })
|
|
985
|
-
},
|
|
986
|
-
{
|
|
987
|
-
header: () => "Restaurant",
|
|
988
|
-
accessorKey: "restaurantId"
|
|
989
|
-
},
|
|
990
|
-
{
|
|
991
|
-
header: () => "Source",
|
|
992
|
-
accessorKey: "source",
|
|
993
|
-
cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
|
|
994
|
-
},
|
|
995
|
-
{
|
|
996
|
-
header: () => "Transaction At",
|
|
997
|
-
accessorKey: "transactionAt",
|
|
998
|
-
meta: {
|
|
999
|
-
width: "180px"
|
|
1000
|
-
}
|
|
1001
|
-
},
|
|
1002
|
-
{
|
|
1003
|
-
header: () => "Sales Amount",
|
|
1004
|
-
accessorKey: "amount",
|
|
1005
|
-
cell: ({ cell: t, row: e }) => de(d.value) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount
|
|
1006
|
-
},
|
|
1007
|
-
{
|
|
1008
|
-
header: () => "Actions",
|
|
1009
|
-
accessorKey: "actions",
|
|
1010
|
-
cell: ({ row: t }) => {
|
|
1011
|
-
var r;
|
|
1012
|
-
const e = (r = a.value) == null ? void 0 : r.pageData().at(t.index);
|
|
1013
|
-
if (!e) {
|
|
1014
|
-
m.open({
|
|
1015
|
-
type: "error",
|
|
1016
|
-
title: "Something went wrong",
|
|
1017
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
1018
|
-
});
|
|
1019
|
-
return;
|
|
1020
|
-
}
|
|
1021
|
-
return L(ut, {
|
|
1022
|
-
transaction: e,
|
|
1023
|
-
onAction: (c) => {
|
|
1024
|
-
switch (c) {
|
|
1025
|
-
case "notify":
|
|
1026
|
-
return K(t.index);
|
|
1027
|
-
case "query":
|
|
1028
|
-
return p(t.index);
|
|
1029
|
-
case "refund":
|
|
1030
|
-
return N(t.index);
|
|
1031
|
-
case "transactionMetadata":
|
|
1032
|
-
return U(t.index);
|
|
1033
|
-
case "history":
|
|
1034
|
-
return l(t.index);
|
|
1035
|
-
case "setPayId":
|
|
1036
|
-
return V(t.index);
|
|
1037
|
-
case "setGatewayId":
|
|
1038
|
-
return M(t.index);
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
});
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
];
|
|
1045
|
-
return (t, e) => {
|
|
1046
|
-
const r = b("FmSearch"), c = b("FmSelect");
|
|
1047
|
-
return f(), D(Pe, {
|
|
1048
|
-
title: "Transactions",
|
|
1049
|
-
loading: !1
|
|
1050
|
-
}, {
|
|
1051
|
-
default: P(() => [
|
|
1052
|
-
I("div", vt, [
|
|
1053
|
-
I("div", gt, [
|
|
1054
|
-
I("div", bt, [
|
|
1055
|
-
_(r, {
|
|
1056
|
-
"model-value": S(w),
|
|
1057
|
-
"onUpdate:modelValue": e[0] || (e[0] = (u) => X(w) ? w.value = u : null),
|
|
1058
|
-
class: "mr-8",
|
|
1059
|
-
label: "Search",
|
|
1060
|
-
"label-info": "Search by Transaction ID, Pay ID or Gateway Transaction ID.",
|
|
1061
|
-
placeholder: "Search Transactions ..."
|
|
1062
|
-
}, null, 8, ["model-value"]),
|
|
1063
|
-
_(c, {
|
|
1064
|
-
modelValue: S(T),
|
|
1065
|
-
"onUpdate:modelValue": e[2] || (e[2] = (u) => X(T) ? T.value = u : null),
|
|
1066
|
-
class: "w-[300px]",
|
|
1067
|
-
label: "Status",
|
|
1068
|
-
"label-mark": "required",
|
|
1069
|
-
multiselect: "",
|
|
1070
|
-
items: g
|
|
1071
|
-
}, {
|
|
1072
|
-
"prepend-menu": P(() => [
|
|
1073
|
-
_(Ve, {
|
|
1074
|
-
modelValue: S(T),
|
|
1075
|
-
"onUpdate:modelValue": e[1] || (e[1] = (u) => X(T) ? T.value = u : null),
|
|
1076
|
-
items: g
|
|
1077
|
-
}, null, 8, ["modelValue"])
|
|
1078
|
-
]),
|
|
1079
|
-
_: 1
|
|
1080
|
-
}, 8, ["modelValue"])
|
|
1081
|
-
]),
|
|
1082
|
-
I("div", ht, [
|
|
1083
|
-
_(Me, {
|
|
1084
|
-
modelValue: S(i),
|
|
1085
|
-
"onUpdate:modelValue": e[3] || (e[3] = (u) => X(i) ? i.value = u : null)
|
|
1086
|
-
}, null, 8, ["modelValue"]),
|
|
1087
|
-
_(ot, {
|
|
1088
|
-
filter: S(n),
|
|
1089
|
-
"active-count": S(v),
|
|
1090
|
-
"has-active-filters": S(y),
|
|
1091
|
-
onApply: e[4] || (e[4] = (u) => {
|
|
1092
|
-
var x;
|
|
1093
|
-
S(A)(u), (x = a.value) == null || x.reset();
|
|
1094
|
-
}),
|
|
1095
|
-
onReset: e[5] || (e[5] = (u) => {
|
|
1096
|
-
var x;
|
|
1097
|
-
S(s)(), (x = a.value) == null || x.reset();
|
|
1098
|
-
})
|
|
1099
|
-
}, null, 8, ["filter", "active-count", "has-active-filters"])
|
|
1100
|
-
])
|
|
1101
|
-
]),
|
|
1102
|
-
I("div", null, [
|
|
1103
|
-
_(ke, {
|
|
1104
|
-
button: {
|
|
1105
|
-
appendIcon: "file_download",
|
|
1106
|
-
variant: "primary",
|
|
1107
|
-
label: "Export"
|
|
1108
|
-
},
|
|
1109
|
-
handler: async () => {
|
|
1110
|
-
var x;
|
|
1111
|
-
const u = await ((x = a.value) == null ? void 0 : x.allData());
|
|
1112
|
-
u != null && await S(Y).downloadPortalTransactionReport(
|
|
1113
|
-
S(i),
|
|
1114
|
-
u
|
|
1115
|
-
);
|
|
1116
|
-
}
|
|
1117
|
-
}, null, 8, ["handler"])
|
|
1118
|
-
])
|
|
1119
|
-
]),
|
|
1120
|
-
_(Ee, {
|
|
1121
|
-
ref_key: "controller",
|
|
1122
|
-
ref: a,
|
|
1123
|
-
"column-defs": B,
|
|
1124
|
-
"rows-defs": (u) => u,
|
|
1125
|
-
paginate: j
|
|
1126
|
-
}, null, 8, ["rows-defs"])
|
|
1127
|
-
]),
|
|
1128
|
-
_: 1
|
|
1129
|
-
});
|
|
1130
|
-
};
|
|
1131
|
-
}
|
|
1132
|
-
});
|
|
1133
|
-
export {
|
|
1134
|
-
Lt as default
|
|
1135
|
-
};
|