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