@feedmepos/mf-payment 1.5.33-dev → 1.5.33
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-CWl5TjGX.js → Actions.vue_vue_type_script_setup_true_lang-BMLg-uol.js} +1 -1
- package/dist/{Chargeback-BGXLNd-w.js → Chargeback-BkVFinyh.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-DVL3Tlwu.js → DocumentViewer.vue_vue_type_script_setup_true_lang-3pmwclcO.js} +1 -1
- package/dist/{OnboardForm-2C1LeXFJ.js → OnboardForm-Dlq2AiT4.js} +238 -242
- package/dist/{OnboardForm-BYfjLNbu.js → OnboardForm-Dnjh1Nk_.js} +5 -5
- package/dist/{OnboardSubmission-ChwyUxSB.js → OnboardSubmission-BE5FWMKX.js} +114 -104
- package/dist/{OnboardSubmission-CuK2dw8O.js → OnboardSubmission-O5wr2kLB.js} +5 -5
- package/dist/{PayoutAccount-C4DGIORU.js → PayoutAccount-DmKO3q2L.js} +5 -5
- package/dist/{PayoutAccount-BFLTTf65.js → PayoutAccount-DrTvpBy9.js} +4 -4
- package/dist/{PayoutAccountSetting-B2xwRNVI.js → PayoutAccountSetting-BJljfdwp.js} +4 -4
- package/dist/{Restaurant-uaKyfVHa.js → Restaurant-DN2_DdKR.js} +4 -4
- package/dist/{RestaurantSetting-u3gPnAi3.js → RestaurantSetting-f0T5REdJ.js} +3 -3
- package/dist/{Settlement-8aKO0XlN.js → Settlement-DJ6ETp2U.js} +3 -3
- package/dist/Settlement-SoOQIN8y.js +490 -0
- package/dist/{SettlementTransactions-CgLmSBeK.js → SettlementTransactions-DF2ybUos.js} +4 -4
- package/dist/{SettlementTransactions-Dy_c3e55.js → SettlementTransactions-cYUYH2RJ.js} +19 -23
- package/dist/{Status.vue_vue_type_script_setup_true_lang-91BuHsLC.js → Status.vue_vue_type_script_setup_true_lang-B41rO8q8.js} +1 -1
- package/dist/{Terminal-C9XlK0gi.js → Terminal-DuGHgfMp.js} +5 -5
- package/dist/{TerminalSetting-CPMJTKR8.js → TerminalSetting-iXqUzSSo.js} +3 -3
- package/dist/{Transaction-YZryhRiu.js → Transaction-A-sOT2PE.js} +75 -60
- package/dist/Transaction-CbZRbUDH.js +482 -0
- package/dist/{TransactionOld-DRA-jAKQ.js → TransactionOld-DttRuS3v.js} +6 -6
- package/dist/api/settlement/index.d.ts +4 -10
- package/dist/api/transaction/index.d.ts +1 -1
- package/dist/{app-wX6XYVw4.js → app-CEHONMRw.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/{assets-im1V-t7Q.js → assets-gWQvONT9.js} +1 -1
- package/dist/components/SourceSelector.vue.d.ts +0 -2
- package/dist/{grafana-DxtD1PVA.js → grafana-VY3mqepx.js} +1 -1
- package/dist/{index-cnWXAOZL.js → index-BGIv1us6.js} +1 -1
- package/dist/{index-DyHgJMgm.js → index-BRhAeH7J.js} +7 -13
- package/dist/{index-1hOLckXe.js → index-BcmesiC4.js} +19 -21
- package/dist/{index-Dqz_cMKc.js → index-CscYwjzM.js} +1 -1
- package/dist/{index-CCD_GxfC.js → index-DGqWjywh.js} +1 -1
- package/dist/{index-C7qDYSTa.js → index-DhYZ6Ghe.js} +2 -2
- package/dist/{index-sVmXR_uy.js → index-Dq4IAN2N.js} +1 -1
- package/dist/{index-BAR0oK1p.js → index-Q0ELb0wB.js} +1 -1
- package/dist/{index-CV3NoDGL.js → index-T2CVm7-_.js} +5437 -5445
- package/dist/{index.vue_vue_type_script_setup_true_lang-BLlCp9H7.js → index.vue_vue_type_script_setup_true_lang-CkzD8rQP.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-B5umMzLY.js → payout-account-CbxRdhNQ.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/Settlement-DYMTw2xR.js +0 -610
- package/dist/Transaction-J4EbMhb-.js +0 -482
- package/dist/components/SettlementSelector.vue.d.ts +0 -12
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
import { defineComponent as w, ref as x, watch as U, onMounted as z, resolveComponent as g, unref as n, openBlock as F, createBlock as Y, createElementBlock as q, createVNode as p, withCtx as k, createElementVNode as A, Fragment as j, renderList as J, createTextVNode as Q, toDisplayString as H, isRef as N, h as I } from "vue";
|
|
2
|
+
import { t as R } from "./index-BRhAeH7J.js";
|
|
3
|
+
import { h as O } from "./moment-h96o7c8I.js";
|
|
4
|
+
import { useI18n as L, useCoreStore as G } from "@feedmepos/mf-common";
|
|
5
|
+
import { _ as W } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
+
import { t as X, b as Z, _ as ee } from "./assets-gWQvONT9.js";
|
|
7
|
+
import { u as te } from "./index-Q0ELb0wB.js";
|
|
8
|
+
import { _ as ae } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
9
|
+
import { _ as ne } from "./SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js";
|
|
10
|
+
import { _ as se } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
|
|
11
|
+
import { p as re } from "./index-Dq4IAN2N.js";
|
|
12
|
+
import { t as oe } from "./index-DGqWjywh.js";
|
|
13
|
+
import { u as le, p as E } from "./index-T2CVm7-_.js";
|
|
14
|
+
import { useSnackbar as ie, useDialog as ce } from "@feedmepos/ui-library";
|
|
15
|
+
import { _ as ue, a as me, b as de } from "./Actions.vue_vue_type_script_setup_true_lang-BMLg-uol.js";
|
|
16
|
+
import { g as pe } from "./grafana-VY3mqepx.js";
|
|
17
|
+
import { w as B } from "./Modal-DB8M9o1T.js";
|
|
18
|
+
import { u as K } from "./error-K1CakhA9.js";
|
|
19
|
+
import { _ as ye } from "./index.vue_vue_type_script_setup_true_lang-CkzD8rQP.js";
|
|
20
|
+
const fe = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "inline-flex"
|
|
23
|
+
}, _e = { class: "relative" }, ve = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, be = /* @__PURE__ */ w({
|
|
24
|
+
__name: "SourceSelector",
|
|
25
|
+
props: {
|
|
26
|
+
id: {},
|
|
27
|
+
by: {},
|
|
28
|
+
excludePayoutAccount: { type: Boolean },
|
|
29
|
+
excludeRestaurant: { type: Boolean },
|
|
30
|
+
excludeDevice: { type: Boolean }
|
|
31
|
+
},
|
|
32
|
+
emits: ["update:id", "update:by"],
|
|
33
|
+
setup(V, { emit: y }) {
|
|
34
|
+
const h = V, m = y, { t: s } = L(), { currentBusiness: b, readRestaurants: f } = G(), { isLoading: _, startAsyncCall: d } = le(!0), v = x([]), u = x(), T = x(""), S = x([]);
|
|
35
|
+
let C;
|
|
36
|
+
U(T, async () => {
|
|
37
|
+
C && clearTimeout(C), C = setTimeout(() => {
|
|
38
|
+
var l = new RegExp(T.value, "i");
|
|
39
|
+
S.value = v.value.filter((i) => {
|
|
40
|
+
const o = JSON.stringify(i);
|
|
41
|
+
return l.test(o);
|
|
42
|
+
});
|
|
43
|
+
}, 700);
|
|
44
|
+
}), U(u, () => {
|
|
45
|
+
var l, i;
|
|
46
|
+
m("update:id", (l = u.value) == null ? void 0 : l.value), m("update:by", (i = u.value) == null ? void 0 : i.by);
|
|
47
|
+
});
|
|
48
|
+
async function M() {
|
|
49
|
+
return d(async () => {
|
|
50
|
+
let l = await re.readBusinessPayoutAccounts();
|
|
51
|
+
if (l.length !== 0)
|
|
52
|
+
return l;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async function $() {
|
|
56
|
+
return d(async () => {
|
|
57
|
+
let l = await oe.getBusinessTerminals();
|
|
58
|
+
if (l.length !== 0)
|
|
59
|
+
return l;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
async function P() {
|
|
63
|
+
_.value = !0;
|
|
64
|
+
const l = [];
|
|
65
|
+
if (!h.excludePayoutAccount) {
|
|
66
|
+
const i = await M();
|
|
67
|
+
l.push(
|
|
68
|
+
...(i || []).map((o) => {
|
|
69
|
+
var t, e;
|
|
70
|
+
return {
|
|
71
|
+
by: "PAYOUT_ACCOUNT",
|
|
72
|
+
value: o._id,
|
|
73
|
+
prefix: s("payment.components.payout_account"),
|
|
74
|
+
type: "Payout Account - " + o.store.event,
|
|
75
|
+
label: ((e = (t = o.ref) == null ? void 0 : t.profile) == null ? void 0 : e.name) ?? o.ref.name
|
|
76
|
+
};
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
if (!h.excludeRestaurant) {
|
|
81
|
+
const i = await f();
|
|
82
|
+
l.push(
|
|
83
|
+
...(i || []).map((o) => ({
|
|
84
|
+
by: "RESTAURANT",
|
|
85
|
+
value: o._id,
|
|
86
|
+
prefix: s("payment.components.restaurant"),
|
|
87
|
+
type: "Restaurant",
|
|
88
|
+
label: o.profile.name + " (" + (o.profile.code ?? "--") + ")"
|
|
89
|
+
}))
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
if (!h.excludeDevice) {
|
|
93
|
+
const i = await $();
|
|
94
|
+
l.push(
|
|
95
|
+
...(i || []).map((o) => ({
|
|
96
|
+
by: "DEVICE",
|
|
97
|
+
value: o._id,
|
|
98
|
+
prefix: s("payment.components.device"),
|
|
99
|
+
type: "Device - " + o.deviceType,
|
|
100
|
+
label: o.deviceType === "TERMINAL" ? o.name : o.restaurant.profile.name
|
|
101
|
+
}))
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
v.value = l, S.value = v.value, _.value = !1;
|
|
105
|
+
}
|
|
106
|
+
return z(P), U(b, P), (l, i) => {
|
|
107
|
+
const o = g("FmCircularProgress"), t = g("FmChip"), e = g("FmSearch"), r = g("FmMenuItem"), c = g("FmMenu");
|
|
108
|
+
return n(_) ? (F(), Y(o, {
|
|
109
|
+
key: 0,
|
|
110
|
+
size: "md"
|
|
111
|
+
})) : (F(), q("div", fe, [
|
|
112
|
+
p(c, { "close-on-click": !0 }, {
|
|
113
|
+
"menu-button": k(() => {
|
|
114
|
+
var a;
|
|
115
|
+
return [
|
|
116
|
+
p(t, {
|
|
117
|
+
icon: "account_box",
|
|
118
|
+
label: ((a = u.value) == null ? void 0 : a.label) ?? n(s)("payment.components.select"),
|
|
119
|
+
removable: !!u.value,
|
|
120
|
+
onChipClosed: i[0] || (i[0] = (D) => u.value = void 0)
|
|
121
|
+
}, null, 8, ["label", "removable"])
|
|
122
|
+
];
|
|
123
|
+
}),
|
|
124
|
+
default: k(() => [
|
|
125
|
+
A("div", _e, [
|
|
126
|
+
A("div", ve, [
|
|
127
|
+
p(e, {
|
|
128
|
+
"model-value": T.value,
|
|
129
|
+
"onUpdate:modelValue": i[1] || (i[1] = (a) => T.value = a),
|
|
130
|
+
placeholder: n(s)("payment.components.select")
|
|
131
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
132
|
+
]),
|
|
133
|
+
A("div", null, [
|
|
134
|
+
(F(!0), q(j, null, J(S.value, (a) => (F(), Y(r, {
|
|
135
|
+
key: a.value,
|
|
136
|
+
label: a.label,
|
|
137
|
+
sublabel: a.type,
|
|
138
|
+
onClick: () => u.value = a
|
|
139
|
+
}, null, 8, ["label", "sublabel", "onClick"]))), 128))
|
|
140
|
+
])
|
|
141
|
+
])
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
})
|
|
145
|
+
]));
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
}), Te = { class: "flex items-center gap-1" }, ge = /* @__PURE__ */ w({
|
|
149
|
+
__name: "BillSeqNumber",
|
|
150
|
+
props: {
|
|
151
|
+
row: {},
|
|
152
|
+
data: {}
|
|
153
|
+
},
|
|
154
|
+
setup(V) {
|
|
155
|
+
return (y, h) => {
|
|
156
|
+
const m = g("FmIcon");
|
|
157
|
+
return F(), q("span", Te, [
|
|
158
|
+
Q(H(V.row.original.seqNumber) + " ", 1),
|
|
159
|
+
p(m, {
|
|
160
|
+
size: "md",
|
|
161
|
+
name: "check",
|
|
162
|
+
color: "#16a34a"
|
|
163
|
+
})
|
|
164
|
+
]);
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}), he = { class: "flex justify-between mb-6 items-center" }, Ae = { class: "flex space-x-8 items-start" }, Se = { class: "flex space-x-4 self-center" }, Ne = { class: "flex space-x-12 mb-6" }, Le = /* @__PURE__ */ w({
|
|
168
|
+
__name: "Transaction",
|
|
169
|
+
setup(V) {
|
|
170
|
+
var i, o;
|
|
171
|
+
const y = ie(), h = ce(), { sessionUser: m } = G(), { t: s } = L(), b = x(), { dateRange: f, searchKey: _, status: d, id: v, by: u } = te({
|
|
172
|
+
by: "",
|
|
173
|
+
id: "",
|
|
174
|
+
searchKey: "",
|
|
175
|
+
status: [E.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
|
176
|
+
dateRange: {
|
|
177
|
+
startDate: O().startOf("day").format("YYYY-MM-DD"),
|
|
178
|
+
endDate: O().endOf("day").format("YYYY-MM-DD")
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
let T;
|
|
182
|
+
U(_, async () => {
|
|
183
|
+
T && clearTimeout(T), T = setTimeout(() => {
|
|
184
|
+
var t;
|
|
185
|
+
return (t = b.value) == null ? void 0 : t.reset();
|
|
186
|
+
}, 700);
|
|
187
|
+
}), U([f, d, v, u], () => {
|
|
188
|
+
var t;
|
|
189
|
+
(t = b.value) == null || t.reset();
|
|
190
|
+
});
|
|
191
|
+
const S = [
|
|
192
|
+
{
|
|
193
|
+
label: "Success",
|
|
194
|
+
value: E.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
label: "Refunded",
|
|
198
|
+
value: E.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
label: "Process",
|
|
202
|
+
value: E.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
label: "Pending Settlement",
|
|
206
|
+
value: E.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING_SETTLEMENT
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
label: "Failed",
|
|
210
|
+
value: E.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
|
211
|
+
}
|
|
212
|
+
];
|
|
213
|
+
async function C(t, e) {
|
|
214
|
+
var r;
|
|
215
|
+
try {
|
|
216
|
+
const c = await R.refetchTransaction({
|
|
217
|
+
transactionId: t.id
|
|
218
|
+
});
|
|
219
|
+
(r = b.value) == null || r.replaceData(e, c), y.open({
|
|
220
|
+
type: "success",
|
|
221
|
+
title: "Transaction queried and updated successfully."
|
|
222
|
+
});
|
|
223
|
+
} catch (c) {
|
|
224
|
+
y.open({
|
|
225
|
+
type: "error",
|
|
226
|
+
title: "Fail to query transaction.",
|
|
227
|
+
message: K(c)
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
async function M(t, e) {
|
|
232
|
+
B(
|
|
233
|
+
h,
|
|
234
|
+
"Refund Transaction",
|
|
235
|
+
"Are you sure to refund transaction? This action cannot be revert!",
|
|
236
|
+
async () => {
|
|
237
|
+
var r;
|
|
238
|
+
try {
|
|
239
|
+
const c = await R.refundTransaction({
|
|
240
|
+
transactionId: t.id,
|
|
241
|
+
reason: "portal transaction refund",
|
|
242
|
+
amount: t.fdoAmount
|
|
243
|
+
});
|
|
244
|
+
(r = b.value) == null || r.replaceData(e, c), y.open({
|
|
245
|
+
type: "success",
|
|
246
|
+
title: "Transaction refund request initiated."
|
|
247
|
+
});
|
|
248
|
+
} catch (c) {
|
|
249
|
+
y.open({
|
|
250
|
+
type: "error",
|
|
251
|
+
title: "Fail to request refund transaction.",
|
|
252
|
+
message: K(c)
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
async function $(t, e) {
|
|
259
|
+
B(
|
|
260
|
+
h,
|
|
261
|
+
"Notify Transaction",
|
|
262
|
+
"Are you sure to perform notify transaction?",
|
|
263
|
+
async () => {
|
|
264
|
+
try {
|
|
265
|
+
await R.renotifyTransaction(t.id), y.open({
|
|
266
|
+
type: "success",
|
|
267
|
+
title: "Transaction notify successfully."
|
|
268
|
+
});
|
|
269
|
+
} catch (r) {
|
|
270
|
+
y.open({
|
|
271
|
+
type: "error",
|
|
272
|
+
title: "Fail to notify transaction.",
|
|
273
|
+
message: K(r)
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
async function P(t, e) {
|
|
280
|
+
const r = pe(
|
|
281
|
+
[
|
|
282
|
+
{
|
|
283
|
+
type: "span",
|
|
284
|
+
queryKey: "transaction.id",
|
|
285
|
+
queryValue: t.id
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
t.transactionAt
|
|
289
|
+
);
|
|
290
|
+
window.open(r, "_blank");
|
|
291
|
+
}
|
|
292
|
+
x("");
|
|
293
|
+
const l = [
|
|
294
|
+
{
|
|
295
|
+
header: () => s("payment.transactions.table.id"),
|
|
296
|
+
accessorKey: "id",
|
|
297
|
+
cell: ({ cell: t, row: e }) => {
|
|
298
|
+
var r, c;
|
|
299
|
+
return ((r = m.value) != null && r.role.isStaff || (c = m.value) != null && c.role.isAdmin) && e.original.transactionId ? e.original.id + `
|
|
300
|
+
ID: ` + e.original.transactionId : e.original.id;
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
header: () => s("payment.transactions.table.pay_id"),
|
|
305
|
+
accessorKey: "payId"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
header: () => s("payment.transactions.table.gateway_id"),
|
|
309
|
+
accessorKey: "gatewayTransactionId"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
header: () => s("payment.transactions.table.bill_seq"),
|
|
313
|
+
accessorKey: "seqNumber",
|
|
314
|
+
cell: ({ cell: t, row: e }) => e.original.seqNumberBinded ? I(ge, { row: e, data: t.getValue() }) : e.original.seqNumber
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
header: () => s("payment.transactions.table.gateway"),
|
|
318
|
+
accessorKey: "gateway",
|
|
319
|
+
meta: {
|
|
320
|
+
textAlign: "center"
|
|
321
|
+
},
|
|
322
|
+
cell: ({ cell: t, row: e }) => e.original.gateway ? I(ue, { row: e, data: t.getValue() }) : ""
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
header: () => s("payment.transactions.table.method"),
|
|
326
|
+
accessorKey: "method",
|
|
327
|
+
meta: {
|
|
328
|
+
textAlign: "center"
|
|
329
|
+
},
|
|
330
|
+
cell: ({ cell: t, row: e }) => e.original.method ? I(me, { row: e, data: t.getValue() }) : ""
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
header: () => s("payment.transactions.table.type"),
|
|
334
|
+
accessorKey: "payFor",
|
|
335
|
+
meta: {
|
|
336
|
+
textAlign: "center"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
header: () => s("payment.transactions.table.status"),
|
|
341
|
+
accessorKey: "status",
|
|
342
|
+
cell: ({ cell: t }) => I(ee, { data: t.getValue() })
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
header: () => s("payment.transactions.table.restaurant"),
|
|
346
|
+
accessorKey: "restaurantId"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
header: () => s("payment.transactions.table.source"),
|
|
350
|
+
accessorKey: "source",
|
|
351
|
+
cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
header: () => s("payment.transactions.table.transaction_at"),
|
|
355
|
+
accessorKey: "transactionAt",
|
|
356
|
+
meta: {
|
|
357
|
+
width: "180px"
|
|
358
|
+
},
|
|
359
|
+
cell: ({ cell: t, row: e }) => e.original.status === "REFUNDED" ? e.original.refundedAt : e.original.transactionAt
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
header: () => s("payment.transactions.table.sales_amount"),
|
|
363
|
+
accessorKey: "amount",
|
|
364
|
+
cell: ({ cell: t, row: e }) => {
|
|
365
|
+
var r, c;
|
|
366
|
+
return ((r = m.value) != null && r.role.isStaff || (c = m.value) != null && c.role.isAdmin) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
];
|
|
370
|
+
return ((i = m.value) != null && i.role.isStaff || (o = m.value) != null && o.role.isAdmin) && l.push({
|
|
371
|
+
header: () => s("payment.transactions.table.actions"),
|
|
372
|
+
accessorKey: "actions",
|
|
373
|
+
cell: ({ row: t }) => I(de, {
|
|
374
|
+
transaction: t.original,
|
|
375
|
+
onAction: (e) => {
|
|
376
|
+
var r;
|
|
377
|
+
switch (e) {
|
|
378
|
+
case "notify":
|
|
379
|
+
return $(t.original, t.index);
|
|
380
|
+
case "query":
|
|
381
|
+
return C(t.original, t.index);
|
|
382
|
+
case "refund":
|
|
383
|
+
return (r = m.value) != null && r.role.isStaff ? y.open({
|
|
384
|
+
type: "error",
|
|
385
|
+
title: "You are not allowed to refund transaction."
|
|
386
|
+
}) : M(t.original, t.index);
|
|
387
|
+
case "history":
|
|
388
|
+
return P(t.original, t.index);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
})
|
|
392
|
+
}), (t, e) => {
|
|
393
|
+
const r = g("FmSearch"), c = g("FmSelect");
|
|
394
|
+
return F(), Y(W, {
|
|
395
|
+
title: n(s)("payment.transactions.title"),
|
|
396
|
+
description: n(s)("payment.transactions.description"),
|
|
397
|
+
loading: !1
|
|
398
|
+
}, {
|
|
399
|
+
default: k(() => [
|
|
400
|
+
A("div", he, [
|
|
401
|
+
A("div", Ae, [
|
|
402
|
+
p(r, {
|
|
403
|
+
"model-value": n(_),
|
|
404
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => N(_) ? _.value = a : null),
|
|
405
|
+
class: "mr-8",
|
|
406
|
+
label: n(s)("payment.transactions.search.title"),
|
|
407
|
+
placeholder: n(s)("payment.transactions.search.placeholder")
|
|
408
|
+
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
409
|
+
p(c, {
|
|
410
|
+
modelValue: n(d),
|
|
411
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => N(d) ? d.value = a : null),
|
|
412
|
+
class: "mr-6 w-[300px]",
|
|
413
|
+
label: n(s)("payment.transactions.status"),
|
|
414
|
+
"label-mark": "required",
|
|
415
|
+
multiselect: "",
|
|
416
|
+
items: S
|
|
417
|
+
}, {
|
|
418
|
+
"prepend-menu": k(() => [
|
|
419
|
+
p(ne, {
|
|
420
|
+
modelValue: n(d),
|
|
421
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => N(d) ? d.value = a : null),
|
|
422
|
+
items: S
|
|
423
|
+
}, null, 8, ["modelValue"])
|
|
424
|
+
]),
|
|
425
|
+
_: 1
|
|
426
|
+
}, 8, ["modelValue", "label"])
|
|
427
|
+
]),
|
|
428
|
+
A("div", Se, [
|
|
429
|
+
p(ae, {
|
|
430
|
+
button: {
|
|
431
|
+
appendIcon: "file_download",
|
|
432
|
+
variant: "primary",
|
|
433
|
+
label: n(s)("payment.transactions.button.export")
|
|
434
|
+
},
|
|
435
|
+
handler: async () => {
|
|
436
|
+
var D;
|
|
437
|
+
const a = await ((D = b.value) == null ? void 0 : D.allData());
|
|
438
|
+
a != null && await n(R).downloadPortalTransactionReport(
|
|
439
|
+
n(f),
|
|
440
|
+
n(X)(a)
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
}, null, 8, ["button", "handler"])
|
|
444
|
+
])
|
|
445
|
+
]),
|
|
446
|
+
A("div", Ne, [
|
|
447
|
+
p(be, {
|
|
448
|
+
id: n(v),
|
|
449
|
+
"onUpdate:id": e[3] || (e[3] = (a) => N(v) ? v.value = a : null),
|
|
450
|
+
by: n(u),
|
|
451
|
+
"onUpdate:by": e[4] || (e[4] = (a) => N(u) ? u.value = a : null)
|
|
452
|
+
}, null, 8, ["id", "by"]),
|
|
453
|
+
p(se, {
|
|
454
|
+
modelValue: n(f),
|
|
455
|
+
"onUpdate:modelValue": e[5] || (e[5] = (a) => N(f) ? f.value = a : null)
|
|
456
|
+
}, null, 8, ["modelValue"])
|
|
457
|
+
]),
|
|
458
|
+
p(ye, {
|
|
459
|
+
ref_key: "controller",
|
|
460
|
+
ref: b,
|
|
461
|
+
"column-defs": l,
|
|
462
|
+
"rows-defs": n(Z),
|
|
463
|
+
paginate: (a, D) => n(R).readTransactionsV2({
|
|
464
|
+
limit: a,
|
|
465
|
+
cursor: D,
|
|
466
|
+
status: n(d),
|
|
467
|
+
by: n(u),
|
|
468
|
+
id: n(v),
|
|
469
|
+
search: n(_),
|
|
470
|
+
start: n(f).startDate,
|
|
471
|
+
end: n(f).endDate
|
|
472
|
+
})
|
|
473
|
+
}, null, 8, ["rows-defs", "paginate"])
|
|
474
|
+
]),
|
|
475
|
+
_: 1
|
|
476
|
+
}, 8, ["title", "description"]);
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
export {
|
|
481
|
+
Le as default
|
|
482
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as S, ref as K, watch as x, resolveComponent as F, openBlock as Y, createBlock as C, h as A, onMounted as M, unref as i, withCtx as O, createElementVNode as w, createVNode as _, isRef as R } from "vue";
|
|
2
|
-
import { t as v } from "./index-
|
|
3
|
-
import { u as U } from "./index-
|
|
2
|
+
import { t as v } from "./index-BRhAeH7J.js";
|
|
3
|
+
import { u as U } from "./index-T2CVm7-_.js";
|
|
4
4
|
import { useSnackbar as L, useDialog as P } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as B, b as $, t as J } from "./assets-
|
|
6
|
-
import { _ as j, a as G, b as Q } from "./Actions.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { g as z } from "./grafana-
|
|
5
|
+
import { _ as B, b as $, t as J } from "./assets-gWQvONT9.js";
|
|
6
|
+
import { _ as j, a as G, b as Q } from "./Actions.vue_vue_type_script_setup_true_lang-BMLg-uol.js";
|
|
7
|
+
import { g as z } from "./grafana-VY3mqepx.js";
|
|
8
8
|
import { w as k } from "./Modal-DB8M9o1T.js";
|
|
9
9
|
import { u as V } from "./error-K1CakhA9.js";
|
|
10
10
|
import { useCoreStore as N, useI18n as E } from "@feedmepos/mf-common";
|
|
11
11
|
import { h as I } from "./moment-h96o7c8I.js";
|
|
12
12
|
import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
13
|
-
import { u as W } from "./index-
|
|
13
|
+
import { u as W } from "./index-Q0ELb0wB.js";
|
|
14
14
|
import { _ as X } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
15
15
|
import { _ as Z } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DG3iyjkK.js";
|
|
16
16
|
import { _ as aa } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
|
|
@@ -17,24 +17,18 @@ export declare const settlementApi: {
|
|
|
17
17
|
start: string;
|
|
18
18
|
end: string;
|
|
19
19
|
}): Promise<void>;
|
|
20
|
-
|
|
20
|
+
downloadRestaurantSettlementReport(date: {
|
|
21
21
|
start: string;
|
|
22
22
|
end: string;
|
|
23
|
-
event: string;
|
|
24
|
-
id: string;
|
|
25
23
|
}): Promise<void>;
|
|
26
24
|
readById(settlementId: string): Promise<SettlementDtoOutput>;
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
readRestaurantSettlementById(settlementId: string): Promise<SettlementDtoOutput>;
|
|
26
|
+
readRestaurantSettlements(dateRange: {
|
|
29
27
|
start: string;
|
|
30
28
|
end: string;
|
|
31
|
-
event: string;
|
|
32
|
-
id: string;
|
|
33
29
|
}): Promise<SettlementDtoOutput[]>;
|
|
34
|
-
|
|
30
|
+
readRestaurantRMSSettlements(dateRange: {
|
|
35
31
|
start: string;
|
|
36
32
|
end: string;
|
|
37
|
-
event: string;
|
|
38
|
-
id: string;
|
|
39
33
|
}): Promise<RMSSettlementDto[]>;
|
|
40
34
|
};
|
|
@@ -38,7 +38,7 @@ export declare const transactionApi: {
|
|
|
38
38
|
cursor: string;
|
|
39
39
|
search: string;
|
|
40
40
|
}): Promise<PaginatedResult<FdoPaymentTransactionV2Output>>;
|
|
41
|
-
|
|
41
|
+
readRestaurantTransactionsBySettlementId(settlementId: string): Promise<FdoPaymentTransactionV2Output[]>;
|
|
42
42
|
downloadPortalTransactionReport(dateRange: {
|
|
43
43
|
startDate: string;
|
|
44
44
|
endDate: string;
|