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