@feedmepos/mf-payment 1.5.72-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-CUFmPuuD.js → Actions.vue_vue_type_script_setup_true_lang-BJupTyqX.js} +1 -1
- package/dist/{Chargeback-D3ycV0dO.js → Chargeback-WYytp2pg.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-B3PfVFMF.js → DocumentViewer.vue_vue_type_script_setup_true_lang-BBnhnIeC.js} +1 -1
- package/dist/{OnboardForm-BVgHtaOF.js → OnboardForm-BCRC8dK2.js} +5 -5
- package/dist/{OnboardForm-Cl_9wg9A.js → OnboardForm-D3ShNAyH.js} +5 -5
- package/dist/{OnboardSubmission-syEkMsnl.js → OnboardSubmission-CEpJu58Y.js} +2 -2
- package/dist/{OnboardSubmission-4DKhhcgO.js → OnboardSubmission-wkUEgwE7.js} +5 -5
- package/dist/{PayoutAccount-Ba036aA3.js → PayoutAccount-C-WF0dpN.js} +5 -5
- package/dist/{PayoutAccount-_--Cy3p1.js → PayoutAccount-CYJ3oHcE.js} +130 -130
- package/dist/{PayoutAccountSetting-BXuwIdUh.js → PayoutAccountSetting-DbpY6GnD.js} +4 -4
- package/dist/{Restaurant-9qoIhpAm.js → Restaurant-BlnPSy25.js} +4 -4
- package/dist/{RestaurantSetting-DhxCwmlV.js → RestaurantSetting-CaX_Clgi.js} +3 -3
- package/dist/{Settlement-CbD6kM0Y.js → Settlement-BnHlR6gI.js} +4 -4
- package/dist/{Settlement-BarxYu6s.js → Settlement-DYW7ySXJ.js} +3 -3
- package/dist/{SettlementTransactions-MTe6S-Uy.js → SettlementTransactions-D5P8KZrh.js} +4 -4
- package/dist/{SettlementTransactions-DLflVs3c.js → SettlementTransactions-DvFL6Rkr.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-lIGLD62m.js → Status.vue_vue_type_script_setup_true_lang-DVnG6pdr.js} +1 -1
- package/dist/{Terminal-DR42JQp3.js → Terminal-wudV6UoA.js} +5 -5
- package/dist/{TerminalSetting-f7KCbdPX.js → TerminalSetting-Cz0W7cpS.js} +4 -4
- package/dist/{Transaction-DNYIVkap.js → Transaction-D1Z4lBz2.js} +98 -101
- package/dist/Transaction-Dwy9_GrM.js +507 -0
- package/dist/TransactionOld-DnxCKSaY.js +313 -0
- package/dist/{app-CZ7PgHN3.js → app-CP0wL5ns.js} +737 -732
- package/dist/app.js +1 -1
- package/dist/{assets-BtDGiTj3.js → assets-JQoSuSEA.js} +1 -1
- package/dist/{grafana-CUJ3wZ0Q.js → grafana-6o8_cFtS.js} +1 -1
- package/dist/{index-QYK2Hpl8.js → index--I0_vtNS.js} +1 -1
- package/dist/{index-C6NNeQJv.js → index-Ba3VR5ek.js} +1 -1
- package/dist/{index-BwUcOJGN.js → index-BnAPDCZv.js} +1 -1
- package/dist/{index-D8x_gCxD.js → index-CJUa_zHC.js} +2 -2
- package/dist/{index-Df9CuqAR.js → index-DIZGmv4_.js} +1 -1
- package/dist/{index-BX8Q4nIm.js → index-E3dm6KHn.js} +1 -1
- package/dist/{index-Cz1ptim0.js → index-OqVbzjLO.js} +1 -1
- package/dist/{index-Bj4_RvUb.js → index-dnQtvH7M.js} +1 -1
- package/dist/{index-BmkdfHiJ.js → index-lNQ4Q5-W.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang--xO2jUEf.js → index.vue_vue_type_script_setup_true_lang-Dof9cIZc.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-BPkE-Ua4.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-VNG3CUqX.js +0 -517
- package/dist/TransactionOld-gyEQgFOk.js +0 -314
|
@@ -1,314 +0,0 @@
|
|
|
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-C6NNeQJv.js";
|
|
3
|
-
import { u as U } from "./index-BwUcOJGN.js";
|
|
4
|
-
import { useSnackbar as L, useDialog as P } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as B, b as $, t as J } from "./assets-BtDGiTj3.js";
|
|
6
|
-
import { _ as j, a as G, b as Q } from "./Actions.vue_vue_type_script_setup_true_lang-CUFmPuuD.js";
|
|
7
|
-
import { g as z } from "./grafana-CUJ3wZ0Q.js";
|
|
8
|
-
import { w as k } from "./Modal-DB8M9o1T.js";
|
|
9
|
-
import { u as V } from "./error-K1CakhA9.js";
|
|
10
|
-
import { useCoreStore as N, useI18n as E } from "@feedmepos/mf-common";
|
|
11
|
-
import { h as I } from "./moment-h96o7c8I.js";
|
|
12
|
-
import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
13
|
-
import { u as W } from "./index-BmkdfHiJ.js";
|
|
14
|
-
import { _ as X } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
15
|
-
import { _ as Z } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DG3iyjkK.js";
|
|
16
|
-
import { _ as aa } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-BNVnvrVY.js";
|
|
17
|
-
const ea = /* @__PURE__ */ S({
|
|
18
|
-
__name: "TransactionTable",
|
|
19
|
-
props: {
|
|
20
|
-
data: {
|
|
21
|
-
type: Array,
|
|
22
|
-
required: !0
|
|
23
|
-
},
|
|
24
|
-
loading: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
required: !0
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
emits: ["row-click"],
|
|
30
|
-
setup(q, { emit: d }) {
|
|
31
|
-
var f, T;
|
|
32
|
-
const o = q, l = K([...o.data]);
|
|
33
|
-
x(
|
|
34
|
-
() => o.data,
|
|
35
|
-
(e) => {
|
|
36
|
-
l.value = [...e];
|
|
37
|
-
},
|
|
38
|
-
{ deep: !0, immediate: !0 }
|
|
39
|
-
);
|
|
40
|
-
const D = d, c = L(), m = P(), { sessionUser: r } = N(), { t } = E();
|
|
41
|
-
async function h(e) {
|
|
42
|
-
try {
|
|
43
|
-
const a = await v.refetchTransaction({ transactionId: e.id });
|
|
44
|
-
l.value = l.value.map((n) => n.id === a._id ? $(a) : n), c.open({
|
|
45
|
-
type: "success",
|
|
46
|
-
title: "Transaction queried and updated successfully."
|
|
47
|
-
});
|
|
48
|
-
} catch (a) {
|
|
49
|
-
c.open({
|
|
50
|
-
type: "error",
|
|
51
|
-
title: "Fail to query transaction.",
|
|
52
|
-
message: V(a)
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
async function b(e) {
|
|
57
|
-
k(
|
|
58
|
-
m,
|
|
59
|
-
"Refund Transaction",
|
|
60
|
-
"Are you sure to refund transaction? This action cannot be revert!",
|
|
61
|
-
async () => {
|
|
62
|
-
try {
|
|
63
|
-
const a = await v.refundTransaction({
|
|
64
|
-
transactionId: e.id,
|
|
65
|
-
reason: "portal transaction refund",
|
|
66
|
-
amount: e.fdoAmount
|
|
67
|
-
});
|
|
68
|
-
l.value = l.value.map((n) => n.id === a._id ? $(a) : n), c.open({
|
|
69
|
-
type: "success",
|
|
70
|
-
title: "Transaction refund request initiated."
|
|
71
|
-
});
|
|
72
|
-
} catch (a) {
|
|
73
|
-
c.open({
|
|
74
|
-
type: "error",
|
|
75
|
-
title: "Fail to request refund transaction.",
|
|
76
|
-
message: V(a)
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
async function g(e) {
|
|
83
|
-
k(
|
|
84
|
-
m,
|
|
85
|
-
"Notify Transaction",
|
|
86
|
-
"Are you sure to perform notify transaction?",
|
|
87
|
-
async () => {
|
|
88
|
-
try {
|
|
89
|
-
await v.renotifyTransaction(e.id), c.open({
|
|
90
|
-
type: "success",
|
|
91
|
-
title: "Transaction notify successfully."
|
|
92
|
-
});
|
|
93
|
-
} catch (a) {
|
|
94
|
-
c.open({
|
|
95
|
-
type: "error",
|
|
96
|
-
title: "Fail to notify transaction.",
|
|
97
|
-
message: V(a)
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
async function y(e) {
|
|
104
|
-
const a = z([
|
|
105
|
-
{
|
|
106
|
-
type: "span",
|
|
107
|
-
queryKey: "transaction.id",
|
|
108
|
-
queryValue: e.id
|
|
109
|
-
}
|
|
110
|
-
], e.transactionAt);
|
|
111
|
-
window.open(a, "_blank");
|
|
112
|
-
}
|
|
113
|
-
const s = K(""), p = [
|
|
114
|
-
{
|
|
115
|
-
header: () => t("payment.transactions.table.id"),
|
|
116
|
-
accessorKey: "id",
|
|
117
|
-
cell: ({ cell: e, row: a }) => {
|
|
118
|
-
var n, u;
|
|
119
|
-
return ((n = r.value) != null && n.role.isStaff || (u = r.value) != null && u.role.isAdmin) && a.original.transactionId ? a.original.id + `
|
|
120
|
-
ID: ` + a.original.transactionId : a.original.id;
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
header: () => t("payment.transactions.table.pay_id"),
|
|
125
|
-
accessorKey: "payId"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
header: () => t("payment.transactions.table.gateway_id"),
|
|
129
|
-
accessorKey: "gatewayTransactionId"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
header: () => t("payment.transactions.table.bill_seq"),
|
|
133
|
-
accessorKey: "seqNumber"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
header: () => t("payment.transactions.table.gateway"),
|
|
137
|
-
accessorKey: "gateway",
|
|
138
|
-
meta: {
|
|
139
|
-
textAlign: "center"
|
|
140
|
-
},
|
|
141
|
-
cell: ({ cell: e, row: a }) => a.original.gateway ? A(j, { row: a, data: e.getValue() }) : ""
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
header: () => t("payment.transactions.table.method"),
|
|
145
|
-
accessorKey: "method",
|
|
146
|
-
meta: {
|
|
147
|
-
textAlign: "center"
|
|
148
|
-
},
|
|
149
|
-
cell: ({ cell: e, row: a }) => a.original.method ? A(G, { row: a, data: e.getValue() }) : ""
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
header: () => t("payment.transactions.table.type"),
|
|
153
|
-
accessorKey: "payFor",
|
|
154
|
-
meta: {
|
|
155
|
-
textAlign: "center"
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
header: () => t("payment.transactions.table.status"),
|
|
160
|
-
accessorKey: "status",
|
|
161
|
-
cell: ({ cell: e }) => A(B, { data: e.getValue() })
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
header: () => t("payment.transactions.table.restaurant"),
|
|
165
|
-
accessorKey: "restaurantId"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
header: () => t("payment.transactions.table.source"),
|
|
169
|
-
accessorKey: "source",
|
|
170
|
-
cell: ({ cell: e, row: a }) => `(${a.original.sourceType}) ${a.original.source}`
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
header: () => t("payment.transactions.table.transaction_at"),
|
|
174
|
-
accessorKey: "transactionAt",
|
|
175
|
-
meta: {
|
|
176
|
-
width: "180px"
|
|
177
|
-
},
|
|
178
|
-
cell: ({ cell: e, row: a }) => a.original.status === "REFUNDED" ? a.original.refundedAt : a.original.transactionAt
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
header: () => t("payment.transactions.table.sales_amount"),
|
|
182
|
-
accessorKey: "amount",
|
|
183
|
-
cell: ({ cell: e, row: a }) => {
|
|
184
|
-
var n, u;
|
|
185
|
-
return ((n = r.value) != null && n.role.isStaff || (u = r.value) != null && u.role.isAdmin) && a.original.flags.isDelivery ? a.original.amount + "( " + a.original.gatewayAmount + ")" : a.original.amount;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
];
|
|
189
|
-
return ((f = r.value) != null && f.role.isStaff || (T = r.value) != null && T.role.isAdmin) && p.push({
|
|
190
|
-
header: () => t("payment.transactions.table.actions"),
|
|
191
|
-
accessorKey: "actions",
|
|
192
|
-
cell: ({ row: e }) => A(Q, {
|
|
193
|
-
transaction: e.original,
|
|
194
|
-
onAction: (a) => {
|
|
195
|
-
var n;
|
|
196
|
-
switch (a) {
|
|
197
|
-
case "notify":
|
|
198
|
-
return g(e.original);
|
|
199
|
-
case "query":
|
|
200
|
-
return h(e.original);
|
|
201
|
-
case "refund":
|
|
202
|
-
return (n = r.value) != null && n.role.isStaff ? c.open({
|
|
203
|
-
type: "error",
|
|
204
|
-
title: "You are not allowed to refund transaction."
|
|
205
|
-
}) : b(e.original);
|
|
206
|
-
case "history":
|
|
207
|
-
return y(e.original);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
})
|
|
211
|
-
}), (e, a) => {
|
|
212
|
-
const n = F("FmTable");
|
|
213
|
-
return Y(), C(n, {
|
|
214
|
-
modelValue: s.value,
|
|
215
|
-
"onUpdate:modelValue": a[0] || (a[0] = (u) => s.value = u),
|
|
216
|
-
"column-defs": p,
|
|
217
|
-
"row-data": l.value,
|
|
218
|
-
loading: o.loading,
|
|
219
|
-
onRowClick: a[1] || (a[1] = (u) => D("row-click", l.value.at(u.index)))
|
|
220
|
-
}, null, 8, ["modelValue", "row-data", "loading"]);
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
}), ta = { class: "flex justify-between mb-6 items-center" }, na = { class: "flex space-x-8" }, ra = { class: "flex space-x-4 self-center" }, oa = { class: "flex gap-8 mb-6" }, Aa = /* @__PURE__ */ S({
|
|
224
|
-
__name: "TransactionOld",
|
|
225
|
-
setup(q) {
|
|
226
|
-
const { dateRange: d, searchKey: o } = W({
|
|
227
|
-
searchKey: "",
|
|
228
|
-
dateRange: {
|
|
229
|
-
startDate: I().startOf("day").format("YYYY-MM-DD"),
|
|
230
|
-
endDate: I().endOf("day").format("YYYY-MM-DD")
|
|
231
|
-
}
|
|
232
|
-
}), { isLoading: l, startAsyncCall: D } = U(!0), { currentRestaurant: c } = N(), { t: m } = E(), r = K([]), t = K([]);
|
|
233
|
-
async function h() {
|
|
234
|
-
await D(async () => {
|
|
235
|
-
const { startDate: y, endDate: s } = d.value, p = await v.readRestaurantTransactions({
|
|
236
|
-
start: y,
|
|
237
|
-
end: s
|
|
238
|
-
});
|
|
239
|
-
if (r.value = J(p), t.value = r.value, o.value > "") {
|
|
240
|
-
var f = new RegExp(o.value, "i");
|
|
241
|
-
t.value = r.value.filter((T) => {
|
|
242
|
-
const e = JSON.stringify(T);
|
|
243
|
-
return f.test(e);
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
function b() {
|
|
249
|
-
h();
|
|
250
|
-
}
|
|
251
|
-
M(b), x(c, b), x(d, h);
|
|
252
|
-
let g;
|
|
253
|
-
return x(o, async () => {
|
|
254
|
-
g && clearTimeout(g), g = setTimeout(() => {
|
|
255
|
-
var y = new RegExp(o.value, "i");
|
|
256
|
-
t.value = r.value.filter((s) => {
|
|
257
|
-
const p = JSON.stringify(s);
|
|
258
|
-
return y.test(p);
|
|
259
|
-
});
|
|
260
|
-
}, 700);
|
|
261
|
-
}), (y, s) => {
|
|
262
|
-
const p = F("FmSearch");
|
|
263
|
-
return Y(), C(H, {
|
|
264
|
-
title: i(m)("payment.transactions.title"),
|
|
265
|
-
description: i(m)("payment.transactions.description"),
|
|
266
|
-
loading: i(l)
|
|
267
|
-
}, {
|
|
268
|
-
default: O(() => [
|
|
269
|
-
w("div", ta, [
|
|
270
|
-
w("div", na, [
|
|
271
|
-
_(p, {
|
|
272
|
-
"model-value": i(o),
|
|
273
|
-
"onUpdate:modelValue": s[0] || (s[0] = (f) => R(o) ? o.value = f : null),
|
|
274
|
-
label: i(m)("payment.transactions.search.title"),
|
|
275
|
-
placeholder: i(m)("payment.transactions.search.placeholder")
|
|
276
|
-
}, null, 8, ["model-value", "label", "placeholder"])
|
|
277
|
-
]),
|
|
278
|
-
w("div", ra, [
|
|
279
|
-
_(X, {
|
|
280
|
-
button: {
|
|
281
|
-
appendIcon: "file_download",
|
|
282
|
-
variant: "primary",
|
|
283
|
-
label: i(m)("payment.transactions.button.export")
|
|
284
|
-
},
|
|
285
|
-
handler: async () => {
|
|
286
|
-
await i(v).downloadPortalTransactionReport(
|
|
287
|
-
i(d),
|
|
288
|
-
r.value,
|
|
289
|
-
!0
|
|
290
|
-
);
|
|
291
|
-
}
|
|
292
|
-
}, null, 8, ["button", "handler"])
|
|
293
|
-
])
|
|
294
|
-
]),
|
|
295
|
-
w("div", oa, [
|
|
296
|
-
_(Z),
|
|
297
|
-
_(aa, {
|
|
298
|
-
modelValue: i(d),
|
|
299
|
-
"onUpdate:modelValue": s[1] || (s[1] = (f) => R(d) ? d.value = f : null)
|
|
300
|
-
}, null, 8, ["modelValue"])
|
|
301
|
-
]),
|
|
302
|
-
_(ea, {
|
|
303
|
-
loading: i(l),
|
|
304
|
-
data: t.value
|
|
305
|
-
}, null, 8, ["loading", "data"])
|
|
306
|
-
]),
|
|
307
|
-
_: 1
|
|
308
|
-
}, 8, ["title", "description", "loading"]);
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
export {
|
|
313
|
-
Aa as default
|
|
314
|
-
};
|