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