@feedmepos/mf-payment 1.5.71-dev → 1.5.73-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-C2stiK29.js → Actions.vue_vue_type_script_setup_true_lang-BJupTyqX.js} +1 -1
- package/dist/{Chargeback-BjCClrZV.js → Chargeback-WYytp2pg.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-BF52Ma-4.js → DocumentViewer.vue_vue_type_script_setup_true_lang-BBnhnIeC.js} +1 -1
- package/dist/{OnboardForm-BMBvyEvu.js → OnboardForm-BCRC8dK2.js} +5 -5
- package/dist/{OnboardForm-C1ZJKDXD.js → OnboardForm-D3ShNAyH.js} +5 -5
- package/dist/{OnboardSubmission-jSsHufSg.js → OnboardSubmission-CEpJu58Y.js} +2 -2
- package/dist/{OnboardSubmission-k3_x1Shy.js → OnboardSubmission-wkUEgwE7.js} +5 -5
- package/dist/{PayoutAccount-CsR9_qUx.js → PayoutAccount-C-WF0dpN.js} +5 -5
- package/dist/{PayoutAccount-DlV4rRzo.js → PayoutAccount-CYJ3oHcE.js} +130 -130
- package/dist/{PayoutAccountSetting-BW6eS4Dg.js → PayoutAccountSetting-DbpY6GnD.js} +4 -4
- package/dist/{Restaurant-AHLA5_Dr.js → Restaurant-BlnPSy25.js} +4 -4
- package/dist/{RestaurantSetting-C5NqoLwe.js → RestaurantSetting-CaX_Clgi.js} +3 -3
- package/dist/{Settlement-CZfN7ra0.js → Settlement-BnHlR6gI.js} +4 -4
- package/dist/{Settlement-D0eKkwEv.js → Settlement-DYW7ySXJ.js} +3 -3
- package/dist/{SettlementTransactions-Sqz_p1n0.js → SettlementTransactions-D5P8KZrh.js} +4 -4
- package/dist/{SettlementTransactions-Xr2Wql6O.js → SettlementTransactions-DvFL6Rkr.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-JbaAUFTL.js → Status.vue_vue_type_script_setup_true_lang-DVnG6pdr.js} +1 -1
- package/dist/{Terminal-B17QgypB.js → Terminal-wudV6UoA.js} +5 -5
- package/dist/{TerminalSetting-BJ7FxfO0.js → TerminalSetting-Cz0W7cpS.js} +4 -4
- package/dist/{Transaction-C9ICgUIh.js → Transaction-D1Z4lBz2.js} +98 -101
- package/dist/Transaction-Dwy9_GrM.js +507 -0
- package/dist/TransactionOld-DnxCKSaY.js +313 -0
- package/dist/app-CP0wL5ns.js +9171 -0
- package/dist/app.js +1 -1
- package/dist/{assets-Dp4VQ9tU.js → assets-JQoSuSEA.js} +1 -1
- package/dist/{grafana-GNemwie7.js → grafana-6o8_cFtS.js} +1 -1
- package/dist/{index-501ITqhf.js → index--I0_vtNS.js} +1 -1
- package/dist/{index-DYpLfNDf.js → index-Ba3VR5ek.js} +1 -1
- package/dist/{index-BdWlvO95.js → index-BnAPDCZv.js} +1 -1
- package/dist/{index-CmBcHH7Q.js → index-CJUa_zHC.js} +2 -2
- package/dist/{index-Byl-Ry7x.js → index-DIZGmv4_.js} +1 -1
- package/dist/{index-CilQki4f.js → index-E3dm6KHn.js} +1 -1
- package/dist/{index-ABnhO8IP.js → index-OqVbzjLO.js} +1 -1
- package/dist/{index-BAcVaFtX.js → index-dnQtvH7M.js} +1 -1
- package/dist/{index-CpZ3sFhd.js → index-lNQ4Q5-W.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-C8T_waUk.js → index.vue_vue_type_script_setup_true_lang-Dof9cIZc.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-PIhlNLY6.js → payout-account-C_s7fod6.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/utils/permission.d.ts +1 -0
- package/dist/views/transaction/TransactionTable.vue.d.ts +2 -2
- package/package.json +1 -1
- package/dist/Transaction-uORSgDkc.js +0 -517
- package/dist/TransactionOld-Cp2Ekbkz.js +0 -314
- package/dist/app-PWkZtVm8.js +0 -8766
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hasAdminAccess: (sessionUser: any) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type PropType } from
|
|
2
|
-
import { type PortalPaymentTransaction } from
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import { type PortalPaymentTransaction } from "@/model/transaction";
|
|
3
3
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
4
|
data: {
|
|
5
5
|
type: PropType<PortalPaymentTransaction[]>;
|
package/package.json
CHANGED
|
@@ -1,517 +0,0 @@
|
|
|
1
|
-
import { defineComponent as G, ref as C, watch as V, onMounted as H, resolveComponent as h, unref as n, openBlock as P, createBlock as w, createElementBlock as O, createVNode as y, withCtx as B, createElementVNode as F, Fragment as W, renderList as X, createTextVNode as Z, toDisplayString as ee, onBeforeUnmount as te, isRef as D, h as x } from "vue";
|
|
2
|
-
import { t as U } from "./index-DYpLfNDf.js";
|
|
3
|
-
import { h as z } from "./moment-h96o7c8I.js";
|
|
4
|
-
import { useI18n as J, useCoreStore as Q } from "@feedmepos/mf-common";
|
|
5
|
-
import { _ as ae } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
-
import { t as ne, b as re, _ as oe } from "./assets-Dp4VQ9tU.js";
|
|
7
|
-
import { u as se } from "./index-CpZ3sFhd.js";
|
|
8
|
-
import { _ as le } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
9
|
-
import { _ as ie } from "./SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js";
|
|
10
|
-
import { _ as ce } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-BNVnvrVY.js";
|
|
11
|
-
import { p as ue } from "./index-Byl-Ry7x.js";
|
|
12
|
-
import { t as me } from "./index-ABnhO8IP.js";
|
|
13
|
-
import { u as de, p as R } from "./index-BdWlvO95.js";
|
|
14
|
-
import { useSnackbar as pe, useDialog as ye } from "@feedmepos/ui-library";
|
|
15
|
-
import { _ as fe, a as _e, b as ge } from "./Actions.vue_vue_type_script_setup_true_lang-C2stiK29.js";
|
|
16
|
-
import { g as ve } from "./grafana-GNemwie7.js";
|
|
17
|
-
import { w as j } from "./Modal-DB8M9o1T.js";
|
|
18
|
-
import { u as q } from "./error-K1CakhA9.js";
|
|
19
|
-
import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-C8T_waUk.js";
|
|
20
|
-
import { u as Te, a as he } from "./index-BwdnN4a2.js";
|
|
21
|
-
const Ae = {
|
|
22
|
-
key: 1,
|
|
23
|
-
class: "inline-flex"
|
|
24
|
-
}, Se = { class: "relative" }, Ne = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, Ee = /* @__PURE__ */ G({
|
|
25
|
-
__name: "SourceSelector",
|
|
26
|
-
props: {
|
|
27
|
-
id: {},
|
|
28
|
-
by: {},
|
|
29
|
-
excludePayoutAccount: { type: Boolean },
|
|
30
|
-
excludeOrderingPayoutAccount: { type: Boolean },
|
|
31
|
-
excludeMarketingPayoutAccount: { type: Boolean },
|
|
32
|
-
excludeRestaurant: { type: Boolean },
|
|
33
|
-
excludeDevice: { type: Boolean }
|
|
34
|
-
},
|
|
35
|
-
emits: ["update:id", "update:by"],
|
|
36
|
-
setup(M, { emit: f }) {
|
|
37
|
-
const g = M, m = f, { t: r } = J(), { currentBusiness: K, readRestaurants: b } = Q(), { isLoading: d, startAsyncCall: v } = de(!0), p = C([]), u = C(), _ = C(""), T = C([]);
|
|
38
|
-
let A;
|
|
39
|
-
V(_, async () => {
|
|
40
|
-
A && clearTimeout(A), A = setTimeout(() => {
|
|
41
|
-
var l = new RegExp(_.value, "i");
|
|
42
|
-
T.value = p.value.filter((o) => {
|
|
43
|
-
const a = JSON.stringify(o);
|
|
44
|
-
return l.test(a);
|
|
45
|
-
});
|
|
46
|
-
}, 700);
|
|
47
|
-
}), V(u, () => {
|
|
48
|
-
var l, o;
|
|
49
|
-
m("update:id", (l = u.value) == null ? void 0 : l.value), m("update:by", (o = u.value) == null ? void 0 : o.by);
|
|
50
|
-
});
|
|
51
|
-
async function L() {
|
|
52
|
-
return v(async () => {
|
|
53
|
-
try {
|
|
54
|
-
let l = await ue.readBusinessPayoutAccounts();
|
|
55
|
-
return l.length === 0 ? [] : l;
|
|
56
|
-
} catch {
|
|
57
|
-
return [];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
async function Y() {
|
|
62
|
-
return v(async () => {
|
|
63
|
-
try {
|
|
64
|
-
let l = await me.getBusinessTerminals();
|
|
65
|
-
return l.length === 0 ? [] : l;
|
|
66
|
-
} catch {
|
|
67
|
-
return [];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
async function k() {
|
|
72
|
-
d.value = !0;
|
|
73
|
-
const l = [];
|
|
74
|
-
if (!g.excludePayoutAccount) {
|
|
75
|
-
let o = await L();
|
|
76
|
-
g.excludeMarketingPayoutAccount && (o = o == null ? void 0 : o.filter((a) => a.store.event !== "MARKETING")), g.excludeOrderingPayoutAccount && (o = o == null ? void 0 : o.filter((a) => a.store.event !== "ORDERING")), l.push(
|
|
77
|
-
...(o || []).map((a) => {
|
|
78
|
-
var I, S, N, E;
|
|
79
|
-
return {
|
|
80
|
-
by: "PAYOUT_ACCOUNT",
|
|
81
|
-
value: a._id,
|
|
82
|
-
prefix: r("payment.components.payout_account"),
|
|
83
|
-
type: "Payout Account - " + a.store.event,
|
|
84
|
-
label: ((S = (I = a.ref) == null ? void 0 : I.profile) == null ? void 0 : S.name) ?? a.ref.name,
|
|
85
|
-
chipLabel: "Payout Account: " + (((E = (N = a.ref) == null ? void 0 : N.profile) == null ? void 0 : E.name) ?? a.ref.name)
|
|
86
|
-
};
|
|
87
|
-
})
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
if (!g.excludeRestaurant) {
|
|
91
|
-
const o = await b();
|
|
92
|
-
l.push(
|
|
93
|
-
...(o || []).map((a) => ({
|
|
94
|
-
by: "RESTAURANT",
|
|
95
|
-
value: a._id,
|
|
96
|
-
prefix: r("payment.components.restaurant"),
|
|
97
|
-
type: "Restaurant",
|
|
98
|
-
label: a.profile.name + " (" + (a.profile.code ?? "--") + ")",
|
|
99
|
-
chipLabel: "Restaurant: " + a.profile.name + " (" + (a.profile.code ?? "--") + ")"
|
|
100
|
-
}))
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
if (!g.excludeDevice) {
|
|
104
|
-
const o = await Y();
|
|
105
|
-
l.push(
|
|
106
|
-
...(o || []).map((a) => ({
|
|
107
|
-
by: "DEVICE",
|
|
108
|
-
value: a._id,
|
|
109
|
-
prefix: r("payment.components.device"),
|
|
110
|
-
type: "Device - " + a.deviceType,
|
|
111
|
-
label: a.deviceType === "TERMINAL" ? a.name : a.restaurant.profile.name,
|
|
112
|
-
chipLabel: a.deviceType + ": " + (a.deviceType === "TERMINAL" ? a.name : a.restaurant.profile.name)
|
|
113
|
-
}))
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
p.value = l, T.value = p.value, d.value = !1;
|
|
117
|
-
}
|
|
118
|
-
return H(k), V(K, k), (l, o) => {
|
|
119
|
-
const a = h("FmCircularProgress"), I = h("FmChip"), S = h("FmSearch"), N = h("FmMenuItem"), E = h("FmMenu");
|
|
120
|
-
return n(d) ? (P(), w(a, {
|
|
121
|
-
key: 0,
|
|
122
|
-
size: "md"
|
|
123
|
-
})) : (P(), O("div", Ae, [
|
|
124
|
-
y(E, { "close-on-click": !0 }, {
|
|
125
|
-
"menu-button": B(() => {
|
|
126
|
-
var e;
|
|
127
|
-
return [
|
|
128
|
-
y(I, {
|
|
129
|
-
icon: "account_box",
|
|
130
|
-
label: ((e = u.value) == null ? void 0 : e.chipLabel) ?? n(r)("payment.components.select"),
|
|
131
|
-
removable: !!u.value,
|
|
132
|
-
onChipClosed: o[0] || (o[0] = (t) => u.value = void 0)
|
|
133
|
-
}, null, 8, ["label", "removable"])
|
|
134
|
-
];
|
|
135
|
-
}),
|
|
136
|
-
default: B(() => [
|
|
137
|
-
F("div", Se, [
|
|
138
|
-
F("div", Ne, [
|
|
139
|
-
y(S, {
|
|
140
|
-
"model-value": _.value,
|
|
141
|
-
"onUpdate:modelValue": o[1] || (o[1] = (e) => _.value = e),
|
|
142
|
-
placeholder: n(r)("payment.components.select")
|
|
143
|
-
}, null, 8, ["model-value", "placeholder"])
|
|
144
|
-
]),
|
|
145
|
-
F("div", null, [
|
|
146
|
-
(P(!0), O(W, null, X(T.value, (e) => (P(), w(N, {
|
|
147
|
-
key: e.value,
|
|
148
|
-
label: e.label,
|
|
149
|
-
sublabel: e.type,
|
|
150
|
-
onClick: () => u.value = e
|
|
151
|
-
}, null, 8, ["label", "sublabel", "onClick"]))), 128))
|
|
152
|
-
])
|
|
153
|
-
])
|
|
154
|
-
]),
|
|
155
|
-
_: 1
|
|
156
|
-
})
|
|
157
|
-
]));
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
}), Fe = { class: "flex items-center gap-1" }, Ie = /* @__PURE__ */ G({
|
|
161
|
-
__name: "BillSeqNumber",
|
|
162
|
-
props: {
|
|
163
|
-
row: {},
|
|
164
|
-
data: {}
|
|
165
|
-
},
|
|
166
|
-
setup(M) {
|
|
167
|
-
return (f, g) => {
|
|
168
|
-
const m = h("FmIcon");
|
|
169
|
-
return P(), O("span", Fe, [
|
|
170
|
-
Z(ee(M.row.original.seqNumber) + " ", 1),
|
|
171
|
-
y(m, {
|
|
172
|
-
size: "md",
|
|
173
|
-
name: "check",
|
|
174
|
-
color: "#16a34a"
|
|
175
|
-
})
|
|
176
|
-
]);
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
}), De = { class: "flex justify-between mb-6 items-center" }, xe = { class: "flex space-x-8 items-start" }, Re = { class: "flex space-x-4 self-center" }, Ce = { class: "flex space-x-12 mb-6" }, Xe = /* @__PURE__ */ G({
|
|
180
|
-
__name: "Transaction",
|
|
181
|
-
setup(M) {
|
|
182
|
-
var N, E;
|
|
183
|
-
const f = pe(), g = ye(), { sessionUser: m } = Q(), { t: r } = J(), { getBillLink: K } = he(), b = C(), { dateRange: d, searchKey: v, status: p, id: u, by: _ } = se({
|
|
184
|
-
by: "",
|
|
185
|
-
id: "",
|
|
186
|
-
searchKey: "",
|
|
187
|
-
status: [R.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
|
188
|
-
dateRange: {
|
|
189
|
-
startDate: z().startOf("day").format("YYYY-MM-DD"),
|
|
190
|
-
endDate: z().endOf("day").format("YYYY-MM-DD")
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
let T;
|
|
194
|
-
const A = () => {
|
|
195
|
-
T && (clearTimeout(T), T = void 0);
|
|
196
|
-
}, {
|
|
197
|
-
promptSuggestion: L,
|
|
198
|
-
closeSuggestion: Y
|
|
199
|
-
} = Te({
|
|
200
|
-
searchKey: v,
|
|
201
|
-
dateRange: d,
|
|
202
|
-
onBeforeApply: A
|
|
203
|
-
});
|
|
204
|
-
V(v, () => {
|
|
205
|
-
A(), L(), T = setTimeout(() => {
|
|
206
|
-
var e;
|
|
207
|
-
return (e = b.value) == null ? void 0 : e.reset();
|
|
208
|
-
}, 700);
|
|
209
|
-
}), V([d, p, u, _], () => {
|
|
210
|
-
var e;
|
|
211
|
-
(e = b.value) == null || e.reset();
|
|
212
|
-
}), te(() => {
|
|
213
|
-
A(), Y();
|
|
214
|
-
});
|
|
215
|
-
const k = [
|
|
216
|
-
{
|
|
217
|
-
label: "Success",
|
|
218
|
-
value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
label: "Refunded",
|
|
222
|
-
value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
label: "Process",
|
|
226
|
-
value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
label: "Pending Settlement",
|
|
230
|
-
value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING_SETTLEMENT
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
label: "Failed",
|
|
234
|
-
value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
|
235
|
-
}
|
|
236
|
-
];
|
|
237
|
-
async function l(e, t) {
|
|
238
|
-
var s;
|
|
239
|
-
try {
|
|
240
|
-
const c = await U.refetchTransaction({
|
|
241
|
-
transactionId: e.id
|
|
242
|
-
});
|
|
243
|
-
(s = b.value) == null || s.replaceData(t, c), f.open({
|
|
244
|
-
type: "success",
|
|
245
|
-
title: "Transaction queried and updated successfully."
|
|
246
|
-
});
|
|
247
|
-
} catch (c) {
|
|
248
|
-
f.open({
|
|
249
|
-
type: "error",
|
|
250
|
-
title: "Fail to query transaction.",
|
|
251
|
-
message: q(c)
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
async function o(e, t) {
|
|
256
|
-
j(
|
|
257
|
-
g,
|
|
258
|
-
"Refund Transaction",
|
|
259
|
-
"Are you sure to refund transaction? This action cannot be revert!",
|
|
260
|
-
async () => {
|
|
261
|
-
var s;
|
|
262
|
-
try {
|
|
263
|
-
const c = await U.refundTransaction({
|
|
264
|
-
transactionId: e.id,
|
|
265
|
-
reason: "portal transaction refund",
|
|
266
|
-
amount: e.fdoAmount
|
|
267
|
-
});
|
|
268
|
-
(s = b.value) == null || s.replaceData(t, c), f.open({
|
|
269
|
-
type: "success",
|
|
270
|
-
title: "Transaction refund request initiated."
|
|
271
|
-
});
|
|
272
|
-
} catch (c) {
|
|
273
|
-
f.open({
|
|
274
|
-
type: "error",
|
|
275
|
-
title: "Fail to request refund transaction.",
|
|
276
|
-
message: q(c)
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
async function a(e, t) {
|
|
283
|
-
j(
|
|
284
|
-
g,
|
|
285
|
-
"Notify Transaction",
|
|
286
|
-
"Are you sure to perform notify transaction?",
|
|
287
|
-
async () => {
|
|
288
|
-
try {
|
|
289
|
-
await U.renotifyTransaction(e.id), f.open({
|
|
290
|
-
type: "success",
|
|
291
|
-
title: "Transaction notify successfully."
|
|
292
|
-
});
|
|
293
|
-
} catch (s) {
|
|
294
|
-
f.open({
|
|
295
|
-
type: "error",
|
|
296
|
-
title: "Fail to notify transaction.",
|
|
297
|
-
message: q(s)
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
);
|
|
302
|
-
}
|
|
303
|
-
async function I(e, t) {
|
|
304
|
-
const s = ve(
|
|
305
|
-
[
|
|
306
|
-
{
|
|
307
|
-
type: "span",
|
|
308
|
-
queryKey: "transaction.id",
|
|
309
|
-
queryValue: e.id
|
|
310
|
-
}
|
|
311
|
-
],
|
|
312
|
-
e.transactionAt
|
|
313
|
-
);
|
|
314
|
-
window.open(s, "_blank");
|
|
315
|
-
}
|
|
316
|
-
C("");
|
|
317
|
-
const S = [
|
|
318
|
-
{
|
|
319
|
-
header: () => r("payment.transactions.table.id"),
|
|
320
|
-
accessorKey: "id",
|
|
321
|
-
cell: ({ cell: e, row: t }) => {
|
|
322
|
-
var s, c;
|
|
323
|
-
return ((s = m.value) != null && s.role.isStaff || (c = m.value) != null && c.role.isAdmin) && t.original.transactionId ? t.original.id + `
|
|
324
|
-
ID: ` + t.original.transactionId : t.original.id;
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
header: () => r("payment.transactions.table.pay_id"),
|
|
329
|
-
accessorKey: "payId",
|
|
330
|
-
cell: ({ cell: e, row: t }) => {
|
|
331
|
-
const s = K(t.original);
|
|
332
|
-
return s ? x(
|
|
333
|
-
"a",
|
|
334
|
-
{
|
|
335
|
-
href: s,
|
|
336
|
-
class: "text-blue-600 underline"
|
|
337
|
-
},
|
|
338
|
-
e.getValue()
|
|
339
|
-
) : e.getValue();
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
header: () => r("payment.transactions.table.gateway_id"),
|
|
344
|
-
accessorKey: "gatewayTransactionId"
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
header: () => r("payment.transactions.table.bill_seq"),
|
|
348
|
-
accessorKey: "seqNumber",
|
|
349
|
-
cell: ({ cell: e, row: t }) => t.original.seqNumberBinded ? x(Ie, { row: t, data: e.getValue() }) : t.original.seqNumber
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
header: () => r("payment.transactions.table.gateway"),
|
|
353
|
-
accessorKey: "gateway",
|
|
354
|
-
meta: {
|
|
355
|
-
textAlign: "center"
|
|
356
|
-
},
|
|
357
|
-
cell: ({ cell: e, row: t }) => t.original.gateway ? x(fe, { row: t, data: e.getValue() }) : ""
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
header: () => r("payment.transactions.table.method"),
|
|
361
|
-
accessorKey: "method",
|
|
362
|
-
meta: {
|
|
363
|
-
textAlign: "center"
|
|
364
|
-
},
|
|
365
|
-
cell: ({ cell: e, row: t }) => t.original.method ? x(_e, { row: t, data: e.getValue() }) : ""
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
header: () => r("payment.transactions.table.type"),
|
|
369
|
-
accessorKey: "payFor",
|
|
370
|
-
meta: {
|
|
371
|
-
textAlign: "center"
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
header: () => r("payment.transactions.table.status"),
|
|
376
|
-
accessorKey: "status",
|
|
377
|
-
cell: ({ cell: e }) => x(oe, { data: e.getValue() })
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
header: () => r("payment.transactions.table.restaurant"),
|
|
381
|
-
accessorKey: "restaurantId"
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
header: () => r("payment.transactions.table.source"),
|
|
385
|
-
accessorKey: "source",
|
|
386
|
-
cell: ({ cell: e, row: t }) => `(${t.original.sourceType}) ${t.original.source}`
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
header: () => r("payment.transactions.table.transaction_at"),
|
|
390
|
-
accessorKey: "transactionAt",
|
|
391
|
-
meta: {
|
|
392
|
-
width: "180px"
|
|
393
|
-
},
|
|
394
|
-
cell: ({ cell: e, row: t }) => t.original.status === "REFUNDED" ? t.original.refundedAt : t.original.transactionAt
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
header: () => r("payment.transactions.table.sales_amount"),
|
|
398
|
-
accessorKey: "amount",
|
|
399
|
-
cell: ({ cell: e, row: t }) => {
|
|
400
|
-
var s, c;
|
|
401
|
-
return ((s = m.value) != null && s.role.isStaff || (c = m.value) != null && c.role.isAdmin) && t.original.flags.isDelivery ? t.original.amount + "( " + t.original.gatewayAmount + ")" : t.original.amount;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
];
|
|
405
|
-
return ((N = m.value) != null && N.role.isStaff || (E = m.value) != null && E.role.isAdmin) && S.push({
|
|
406
|
-
header: () => r("payment.transactions.table.actions"),
|
|
407
|
-
accessorKey: "actions",
|
|
408
|
-
cell: ({ row: e }) => x(ge, {
|
|
409
|
-
transaction: e.original,
|
|
410
|
-
onAction: (t) => {
|
|
411
|
-
var s;
|
|
412
|
-
switch (t) {
|
|
413
|
-
case "notify":
|
|
414
|
-
return a(e.original, e.index);
|
|
415
|
-
case "query":
|
|
416
|
-
return l(e.original, e.index);
|
|
417
|
-
case "refund":
|
|
418
|
-
return (s = m.value) != null && s.role.isStaff ? f.open({
|
|
419
|
-
type: "error",
|
|
420
|
-
title: "You are not allowed to refund transaction."
|
|
421
|
-
}) : o(e.original, e.index);
|
|
422
|
-
case "history":
|
|
423
|
-
return I(e.original, e.index);
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
})
|
|
427
|
-
}), (e, t) => {
|
|
428
|
-
const s = h("FmSearch"), c = h("FmSelect");
|
|
429
|
-
return P(), w(ae, {
|
|
430
|
-
title: n(r)("payment.transactions.title"),
|
|
431
|
-
description: n(r)("payment.transactions.description"),
|
|
432
|
-
loading: !1
|
|
433
|
-
}, {
|
|
434
|
-
default: B(() => [
|
|
435
|
-
F("div", De, [
|
|
436
|
-
F("div", xe, [
|
|
437
|
-
y(s, {
|
|
438
|
-
"model-value": n(v),
|
|
439
|
-
"onUpdate:modelValue": t[0] || (t[0] = (i) => D(v) ? v.value = i : null),
|
|
440
|
-
class: "mr-8",
|
|
441
|
-
label: n(r)("payment.transactions.search.title"),
|
|
442
|
-
placeholder: n(r)("payment.transactions.search.placeholder")
|
|
443
|
-
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
444
|
-
y(c, {
|
|
445
|
-
modelValue: n(p),
|
|
446
|
-
"onUpdate:modelValue": t[2] || (t[2] = (i) => D(p) ? p.value = i : null),
|
|
447
|
-
class: "mr-6 w-[300px]",
|
|
448
|
-
label: n(r)("payment.transactions.status"),
|
|
449
|
-
"label-mark": "required",
|
|
450
|
-
multiselect: "",
|
|
451
|
-
items: k
|
|
452
|
-
}, {
|
|
453
|
-
"prepend-menu": B(() => [
|
|
454
|
-
y(ie, {
|
|
455
|
-
modelValue: n(p),
|
|
456
|
-
"onUpdate:modelValue": t[1] || (t[1] = (i) => D(p) ? p.value = i : null),
|
|
457
|
-
items: k
|
|
458
|
-
}, null, 8, ["modelValue"])
|
|
459
|
-
]),
|
|
460
|
-
_: 1
|
|
461
|
-
}, 8, ["modelValue", "label"])
|
|
462
|
-
]),
|
|
463
|
-
F("div", Re, [
|
|
464
|
-
y(le, {
|
|
465
|
-
button: {
|
|
466
|
-
appendIcon: "file_download",
|
|
467
|
-
variant: "primary",
|
|
468
|
-
label: n(r)("payment.transactions.button.export")
|
|
469
|
-
},
|
|
470
|
-
handler: async () => {
|
|
471
|
-
var $;
|
|
472
|
-
const i = await (($ = b.value) == null ? void 0 : $.allData());
|
|
473
|
-
i != null && await n(U).downloadPortalTransactionReport(
|
|
474
|
-
n(d),
|
|
475
|
-
n(ne)(i)
|
|
476
|
-
);
|
|
477
|
-
}
|
|
478
|
-
}, null, 8, ["button", "handler"])
|
|
479
|
-
])
|
|
480
|
-
]),
|
|
481
|
-
F("div", Ce, [
|
|
482
|
-
y(Ee, {
|
|
483
|
-
id: n(u),
|
|
484
|
-
"onUpdate:id": t[3] || (t[3] = (i) => D(u) ? u.value = i : null),
|
|
485
|
-
by: n(_),
|
|
486
|
-
"onUpdate:by": t[4] || (t[4] = (i) => D(_) ? _.value = i : null)
|
|
487
|
-
}, null, 8, ["id", "by"]),
|
|
488
|
-
y(ce, {
|
|
489
|
-
modelValue: n(d),
|
|
490
|
-
"onUpdate:modelValue": t[5] || (t[5] = (i) => D(d) ? d.value = i : null)
|
|
491
|
-
}, null, 8, ["modelValue"])
|
|
492
|
-
]),
|
|
493
|
-
y(be, {
|
|
494
|
-
ref_key: "controller",
|
|
495
|
-
ref: b,
|
|
496
|
-
"column-defs": S,
|
|
497
|
-
"rows-defs": n(re),
|
|
498
|
-
paginate: (i, $) => n(U).readTransactionsV2({
|
|
499
|
-
limit: i,
|
|
500
|
-
cursor: $,
|
|
501
|
-
status: n(p),
|
|
502
|
-
by: n(_),
|
|
503
|
-
id: n(u),
|
|
504
|
-
search: n(v),
|
|
505
|
-
start: n(d).startDate,
|
|
506
|
-
end: n(d).endDate
|
|
507
|
-
})
|
|
508
|
-
}, null, 8, ["rows-defs", "paginate"])
|
|
509
|
-
]),
|
|
510
|
-
_: 1
|
|
511
|
-
}, 8, ["title", "description"]);
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
|
-
export {
|
|
516
|
-
Xe as default
|
|
517
|
-
};
|