@feedmepos/mf-payment 1.5.16-dev → 1.5.18-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/AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js +52 -0
- package/dist/{Chargeback-CN_5ffe0.js → Chargeback-tB9aRc32.js} +2 -2
- package/dist/{OnboardForm-DUgCDg0z.js → OnboardForm-CFjqDHUQ.js} +2 -2
- package/dist/{OnboardForm-DvYi9dVM.js → OnboardForm-lzWPdRnK.js} +2 -2
- package/dist/{OnboardSubmission-uKpGFwN-.js → OnboardSubmission-BF3Wq8xe.js} +1 -1
- package/dist/{OnboardSubmission-Dd_VhLYi.js → OnboardSubmission-JGk9_ODn.js} +1 -1
- package/dist/{PayoutAccount-C_CgRoWJ.js → PayoutAccount-C3dLv3vp.js} +1 -1
- package/dist/{PayoutAccount-Dmm8RQll.js → PayoutAccount-kUXbY4SV.js} +1 -1
- package/dist/{Restaurant-BjF1a029.js → Restaurant-BQUb95tS.js} +1 -1
- package/dist/{Settlement-BC3V4klw.js → Settlement-DnPXVtTO.js} +1 -1
- package/dist/{Settlement-ZBIhVddV.js → Settlement-zgU3INW2.js} +1 -1
- package/dist/{SettlementTransactions-NtqKVZ4y.js → SettlementTransactions-BeeHTBBa.js} +1 -1
- package/dist/{SettlementTransactions---x0z4Fg.js → SettlementTransactions-CgDzvPcF.js} +1 -1
- package/dist/{Transaction-JFDOKyml.js → Transaction-CwxShg0E.js} +1 -1
- package/dist/Transaction-DgrEw-tG.js +619 -0
- package/dist/{TransactionOld-CmRVIeU2.js → TransactionOld-DPF3VYZ7.js} +1 -1
- package/dist/api/transaction/index.d.ts +8 -0
- package/dist/{app-Be-8zsJx.js → app-Fj7JOZst.js} +15 -15
- package/dist/app.js +1 -1
- package/dist/{index-s7pe9sTx.js → index-COi73LGz.js} +41 -31
- package/dist/index-Ur-VjIjX.js +75 -0
- package/dist/package.json +1 -1
- package/dist/{payout-account-B_WG1TKC.js → payout-account-tKvh4Q7G.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/transaction/TextInputDialog.vue.d.ts +34 -0
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
- package/package.json +1 -1
- package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-I9eO197f.js +0 -47
- package/dist/Transaction-BiT6BRmx.js +0 -478
- package/dist/index-BcOHdPNx.js +0 -80
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
label: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
placeholder: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
schema: {
|
|
13
|
+
type: PropType<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
14
|
+
default: () => z.ZodString;
|
|
15
|
+
};
|
|
16
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
label: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
placeholder: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
schema: {
|
|
26
|
+
type: PropType<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
27
|
+
default: () => z.ZodString;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{}>, {
|
|
30
|
+
label: string;
|
|
31
|
+
placeholder: string;
|
|
32
|
+
schema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PortalPaymentTransaction } from '@/model/transaction';
|
|
2
|
-
export type emitAction = "query" | "refund" | "notify" | "history";
|
|
2
|
+
export type emitAction = "query" | "refund" | "notify" | "history" | "setPayId" | "setGatewayId";
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
onAction: (event: emitAction) => void;
|
|
5
5
|
transaction: PortalPaymentTransaction;
|
package/package.json
CHANGED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, computed as u, resolveComponent as C, openBlock as c, createElementBlock as s, createVNode as f, createElementVNode as x, toDisplayString as i, createCommentVNode as y } from "vue";
|
|
2
|
-
import { c as b } from "./clipboard-4jh1WteU.js";
|
|
3
|
-
import { useSnackbar as k } from "@feedmepos/ui-library";
|
|
4
|
-
const _ = { key: 0 }, I = /* @__PURE__ */ d({
|
|
5
|
-
__name: "AutoCopyCell",
|
|
6
|
-
props: {
|
|
7
|
-
data: {},
|
|
8
|
-
extra: {},
|
|
9
|
-
truncate: {}
|
|
10
|
-
},
|
|
11
|
-
setup(o) {
|
|
12
|
-
const t = o, r = k(), l = u(() => {
|
|
13
|
-
if (!t.truncate)
|
|
14
|
-
return t.data;
|
|
15
|
-
const n = t.truncate.startChars || 8, e = t.truncate.endChars || 8, a = n + e + 3;
|
|
16
|
-
return t.data.length <= a ? t.data : `${t.data.slice(0, n)}...${t.data.slice(-e)}`;
|
|
17
|
-
});
|
|
18
|
-
function p() {
|
|
19
|
-
try {
|
|
20
|
-
b(t.data), r.open({ title: "Text copied to clipboard." }, 1e3);
|
|
21
|
-
} catch {
|
|
22
|
-
r.open({ title: "Clipboard API incompatible." }, 1e3);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return (n, e) => {
|
|
26
|
-
const a = C("FmIcon");
|
|
27
|
-
return c(), s("div", {
|
|
28
|
-
class: "flex",
|
|
29
|
-
onClick: e[0] || (e[0] = (m) => {
|
|
30
|
-
m.stopPropagation(), p();
|
|
31
|
-
})
|
|
32
|
-
}, [
|
|
33
|
-
f(a, {
|
|
34
|
-
class: "mr-4 self-center",
|
|
35
|
-
name: "content_copy",
|
|
36
|
-
size: "sm",
|
|
37
|
-
outline: ""
|
|
38
|
-
}),
|
|
39
|
-
x("span", null, i(l.value), 1),
|
|
40
|
-
o.extra ? (c(), s("span", _, i(" " + o.extra), 1)) : y("", !0)
|
|
41
|
-
]);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
export {
|
|
46
|
-
I as _
|
|
47
|
-
};
|
|
@@ -1,478 +0,0 @@
|
|
|
1
|
-
import { defineComponent as b, resolveComponent as d, openBlock as m, createBlock as T, normalizeClass as C, withCtx as h, createElementVNode as g, toDisplayString as E, unref as p, createElementBlock as I, createVNode as y, Fragment as Y, renderList as O, createTextVNode as P, ref as B, watch as D, isRef as N, h as _ } from "vue";
|
|
2
|
-
import { t as w } from "./index-s7pe9sTx.js";
|
|
3
|
-
import { h as v } from "./moment-h96o7c8I.js";
|
|
4
|
-
import { g as U, a as G, t as L, b as q } from "./assets-lFgK3KQx.js";
|
|
5
|
-
import { u as z } from "./index-CHX0p0Dm.js";
|
|
6
|
-
import { _ as Q } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
7
|
-
import { _ as j } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
8
|
-
import { useSnackbar as H, useDialog as J } from "@feedmepos/ui-library";
|
|
9
|
-
import { w as k } from "./Modal-DB8M9o1T.js";
|
|
10
|
-
import { u as S } from "./error-K1CakhA9.js";
|
|
11
|
-
import { _ as W } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
|
|
12
|
-
import { g as X } from "./grafana-BRpcfaCo.js";
|
|
13
|
-
import { _ as Z } from "./index.vue_vue_type_script_setup_true_lang-QCvHWbIq.js";
|
|
14
|
-
import { e as A } from "./index-QTsd1BO1.js";
|
|
15
|
-
import { _ as ee } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-I9eO197f.js";
|
|
16
|
-
import { useCoreStore as te } from "@feedmepos/mf-common";
|
|
17
|
-
const ae = /* @__PURE__ */ b({
|
|
18
|
-
__name: "Status",
|
|
19
|
-
props: {
|
|
20
|
-
row: {},
|
|
21
|
-
data: {}
|
|
22
|
-
},
|
|
23
|
-
setup(o) {
|
|
24
|
-
const r = o;
|
|
25
|
-
function c() {
|
|
26
|
-
return r.data === A.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : r.data === A.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : r.data === A.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
|
27
|
-
}
|
|
28
|
-
return (s, f) => {
|
|
29
|
-
const i = d("FmBadge");
|
|
30
|
-
return m(), T(i, {
|
|
31
|
-
inline: "",
|
|
32
|
-
class: C(c())
|
|
33
|
-
}, {
|
|
34
|
-
default: h(() => [
|
|
35
|
-
g("div", null, E(o.data), 1)
|
|
36
|
-
]),
|
|
37
|
-
_: 1
|
|
38
|
-
}, 8, ["class"]);
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}), ne = ["src"], re = /* @__PURE__ */ b({
|
|
42
|
-
__name: "Gateway",
|
|
43
|
-
props: {
|
|
44
|
-
row: {},
|
|
45
|
-
data: {}
|
|
46
|
-
},
|
|
47
|
-
setup(o) {
|
|
48
|
-
return (r, c) => {
|
|
49
|
-
const s = d("FmTooltip");
|
|
50
|
-
return m(), T(s, {
|
|
51
|
-
variant: "plain",
|
|
52
|
-
placement: "top",
|
|
53
|
-
content: o.row.original.gateway,
|
|
54
|
-
"hide-arrow": !0
|
|
55
|
-
}, {
|
|
56
|
-
default: h(() => [
|
|
57
|
-
g("img", {
|
|
58
|
-
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
59
|
-
src: p(U)(o.row.original.gateway)
|
|
60
|
-
}, null, 8, ne)
|
|
61
|
-
]),
|
|
62
|
-
_: 1
|
|
63
|
-
}, 8, ["content"]);
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}), oe = ["src"], se = /* @__PURE__ */ b({
|
|
67
|
-
__name: "Method",
|
|
68
|
-
props: {
|
|
69
|
-
row: {},
|
|
70
|
-
data: {}
|
|
71
|
-
},
|
|
72
|
-
setup(o) {
|
|
73
|
-
return (r, c) => {
|
|
74
|
-
const s = d("FmTooltip");
|
|
75
|
-
return m(), T(s, {
|
|
76
|
-
variant: "plain",
|
|
77
|
-
placement: "top",
|
|
78
|
-
content: o.row.original.method.issuer,
|
|
79
|
-
"hide-arrow": !0
|
|
80
|
-
}, {
|
|
81
|
-
default: h(() => [
|
|
82
|
-
g("img", {
|
|
83
|
-
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
84
|
-
src: p(G)(o.row.original.method.issuer, o.row.original.method.variant)
|
|
85
|
-
}, null, 8, oe)
|
|
86
|
-
]),
|
|
87
|
-
_: 1
|
|
88
|
-
}, 8, ["content"]);
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
}), ie = /* @__PURE__ */ b({
|
|
92
|
-
__name: "Actions",
|
|
93
|
-
props: {
|
|
94
|
-
onAction: { type: Function },
|
|
95
|
-
transaction: {}
|
|
96
|
-
},
|
|
97
|
-
setup(o) {
|
|
98
|
-
const r = [
|
|
99
|
-
o.transaction.flags.query && {
|
|
100
|
-
label: "Query",
|
|
101
|
-
sublabel: "Perform transaction status inquriy",
|
|
102
|
-
icon: "question_answer",
|
|
103
|
-
action: "query"
|
|
104
|
-
},
|
|
105
|
-
o.transaction.flags.refund && {
|
|
106
|
-
label: "Refund",
|
|
107
|
-
sublabel: "Perform transaction refund request",
|
|
108
|
-
icon: "request_page",
|
|
109
|
-
action: "refund"
|
|
110
|
-
},
|
|
111
|
-
o.transaction.flags.notify && {
|
|
112
|
-
label: "Notify",
|
|
113
|
-
sublabel: "Perform webhook notification for transaction",
|
|
114
|
-
icon: "webhook",
|
|
115
|
-
action: "notify"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
label: "Log",
|
|
119
|
-
sublabel: "Inspect transaction historical actions, requests and responses.",
|
|
120
|
-
icon: "history",
|
|
121
|
-
action: "history"
|
|
122
|
-
}
|
|
123
|
-
];
|
|
124
|
-
return (c, s) => {
|
|
125
|
-
const f = d("FmIcon"), i = d("FmMenuItem"), x = d("FmMenu");
|
|
126
|
-
return m(), I("div", {
|
|
127
|
-
onClick: s[0] || (s[0] = (l) => {
|
|
128
|
-
l.stopPropagation();
|
|
129
|
-
})
|
|
130
|
-
}, [
|
|
131
|
-
y(x, null, {
|
|
132
|
-
"menu-button": h(() => [
|
|
133
|
-
y(f, { name: "settings" })
|
|
134
|
-
]),
|
|
135
|
-
default: h(() => [
|
|
136
|
-
(m(!0), I(Y, null, O(r.filter((l) => !!l), (l) => (m(), T(i, {
|
|
137
|
-
selectable: !0,
|
|
138
|
-
key: l.label,
|
|
139
|
-
sublabel: l.sublabel,
|
|
140
|
-
label: l.label,
|
|
141
|
-
icon: l.icon,
|
|
142
|
-
onclick: () => o.onAction(l.action)
|
|
143
|
-
}, null, 8, ["sublabel", "label", "icon", "onclick"]))), 128))
|
|
144
|
-
]),
|
|
145
|
-
_: 1
|
|
146
|
-
})
|
|
147
|
-
]);
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
}), ce = { class: "flex items-center gap-1" }, le = /* @__PURE__ */ b({
|
|
151
|
-
__name: "BillSeqNumber",
|
|
152
|
-
props: {
|
|
153
|
-
row: {},
|
|
154
|
-
data: {}
|
|
155
|
-
},
|
|
156
|
-
setup(o) {
|
|
157
|
-
return (r, c) => {
|
|
158
|
-
const s = d("FmIcon");
|
|
159
|
-
return m(), I("span", ce, [
|
|
160
|
-
P(E(o.row.original.seqNumber) + " ", 1),
|
|
161
|
-
y(s, {
|
|
162
|
-
size: "md",
|
|
163
|
-
name: "check",
|
|
164
|
-
color: "#16a34a"
|
|
165
|
-
})
|
|
166
|
-
]);
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
}), ue = { class: "flex justify-between mb-6 items-center" }, de = { class: "flex space-x-4" }, me = { class: "flex space-x-4 self-center" }, fe = { class: "mb-6" }, qe = /* @__PURE__ */ b({
|
|
170
|
-
__name: "Transaction",
|
|
171
|
-
setup(o) {
|
|
172
|
-
const r = B(), { dateRange: c, searchKey: s } = z({
|
|
173
|
-
searchKey: "",
|
|
174
|
-
dateRange: {
|
|
175
|
-
startDate: v().startOf("day").format("YYYY-MM-DD"),
|
|
176
|
-
endDate: v().endOf("day").format("YYYY-MM-DD")
|
|
177
|
-
}
|
|
178
|
-
}), { sessionUser: f } = te(), i = H(), x = J(), l = async (t, e) => {
|
|
179
|
-
let n = parseInt(e);
|
|
180
|
-
Number.isNaN(n) && (n = 1);
|
|
181
|
-
const a = await w.readTransactions({
|
|
182
|
-
start: v(c.value.startDate).startOf("day").toISOString(),
|
|
183
|
-
end: v(c.value.endDate).endOf("day").toISOString(),
|
|
184
|
-
limit: t,
|
|
185
|
-
skip: (n - 1) * t,
|
|
186
|
-
search: s.value
|
|
187
|
-
}), u = a.length == t;
|
|
188
|
-
return {
|
|
189
|
-
data: L(a),
|
|
190
|
-
meta: {
|
|
191
|
-
cursor: u ? (n + 1).toString() : ""
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
};
|
|
195
|
-
D(c, async () => {
|
|
196
|
-
var t;
|
|
197
|
-
(t = r.value) == null || t.reset();
|
|
198
|
-
});
|
|
199
|
-
let F;
|
|
200
|
-
D(s, async () => {
|
|
201
|
-
F && clearTimeout(F), F = setTimeout(() => {
|
|
202
|
-
var t;
|
|
203
|
-
(t = r.value) == null || t.reset();
|
|
204
|
-
}, 700);
|
|
205
|
-
});
|
|
206
|
-
async function $(t) {
|
|
207
|
-
var n, a;
|
|
208
|
-
const e = (n = r.value) == null ? void 0 : n.pageData().at(t);
|
|
209
|
-
if (!e) {
|
|
210
|
-
i.open({
|
|
211
|
-
type: "error",
|
|
212
|
-
title: "Something went wrong",
|
|
213
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
214
|
-
});
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
try {
|
|
218
|
-
const u = await w.refetchTransaction({ transactionId: e.id });
|
|
219
|
-
(a = r.value) == null || a.replaceData(t, q(u)), i.open({
|
|
220
|
-
type: "success",
|
|
221
|
-
title: "Transaction queried and updated successfully."
|
|
222
|
-
});
|
|
223
|
-
} catch (u) {
|
|
224
|
-
i.open({
|
|
225
|
-
type: "error",
|
|
226
|
-
title: "Fail to query transaction.",
|
|
227
|
-
message: S(u)
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
async function K(t) {
|
|
232
|
-
var n;
|
|
233
|
-
const e = (n = r.value) == null ? void 0 : n.pageData().at(t);
|
|
234
|
-
if (!e) {
|
|
235
|
-
i.open({
|
|
236
|
-
type: "error",
|
|
237
|
-
title: "Something went wrong",
|
|
238
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
239
|
-
});
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
k(
|
|
243
|
-
x,
|
|
244
|
-
"Refund Transaction",
|
|
245
|
-
"Are you sure to refund transaction? This action cannot be revert!",
|
|
246
|
-
async () => {
|
|
247
|
-
var a;
|
|
248
|
-
try {
|
|
249
|
-
const u = await w.refundTransaction({
|
|
250
|
-
transactionId: e.id,
|
|
251
|
-
reason: "portal transaction refund",
|
|
252
|
-
amount: e.fdoAmount
|
|
253
|
-
});
|
|
254
|
-
(a = r.value) == null || a.replaceData(t, q(u)), i.open({
|
|
255
|
-
type: "success",
|
|
256
|
-
title: "Transaction refund request initiated."
|
|
257
|
-
});
|
|
258
|
-
} catch (u) {
|
|
259
|
-
i.open({
|
|
260
|
-
type: "error",
|
|
261
|
-
title: "Fail to request refund transaction.",
|
|
262
|
-
message: S(u)
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
async function M(t) {
|
|
269
|
-
var n;
|
|
270
|
-
const e = (n = r.value) == null ? void 0 : n.pageData().at(t);
|
|
271
|
-
if (!e) {
|
|
272
|
-
i.open({
|
|
273
|
-
type: "error",
|
|
274
|
-
title: "Something went wrong",
|
|
275
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
276
|
-
});
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
k(
|
|
280
|
-
x,
|
|
281
|
-
"Notify Transaction",
|
|
282
|
-
"Are you sure to perform notify transaction?",
|
|
283
|
-
async () => {
|
|
284
|
-
try {
|
|
285
|
-
await w.renotifyTransaction(e.id), i.open({
|
|
286
|
-
type: "success",
|
|
287
|
-
title: "Transaction notify successfully."
|
|
288
|
-
});
|
|
289
|
-
} catch (a) {
|
|
290
|
-
i.open({
|
|
291
|
-
type: "error",
|
|
292
|
-
title: "Fail to notify transaction.",
|
|
293
|
-
message: S(a)
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
);
|
|
298
|
-
}
|
|
299
|
-
async function R(t) {
|
|
300
|
-
var a;
|
|
301
|
-
const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
|
|
302
|
-
if (!e) {
|
|
303
|
-
i.open({
|
|
304
|
-
type: "error",
|
|
305
|
-
title: "Something went wrong",
|
|
306
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
307
|
-
});
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
const n = X([
|
|
311
|
-
{
|
|
312
|
-
type: "span",
|
|
313
|
-
queryKey: "transaction.id",
|
|
314
|
-
queryValue: e.id
|
|
315
|
-
}
|
|
316
|
-
], e.transactionAt);
|
|
317
|
-
window.open(n, "_blank");
|
|
318
|
-
}
|
|
319
|
-
const V = [
|
|
320
|
-
{
|
|
321
|
-
header: () => "Transaction ID",
|
|
322
|
-
accessorKey: "id",
|
|
323
|
-
cell: ({ cell: t }) => {
|
|
324
|
-
var n, a;
|
|
325
|
-
let e = "";
|
|
326
|
-
return ((n = f.value) != null && n.role.isStaff || (a = f.value) != null && a.role.isAdmin) && t.row.original.transactionId && (e = `
|
|
327
|
-
ID: ${t.row.original.transactionId}`), _(ee, { data: t.getValue(), extra: e });
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
header: () => "Pay ID",
|
|
332
|
-
accessorKey: "payId"
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
header: () => "Bill",
|
|
336
|
-
accessorKey: "seqNumber",
|
|
337
|
-
cell: ({ cell: t, row: e }) => e.original.seqNumberBinded ? _(le, { row: e, data: t.getValue() }) : e.original.seqNumber
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
header: () => "Gateway",
|
|
341
|
-
accessorKey: "gateway",
|
|
342
|
-
meta: {
|
|
343
|
-
textAlign: "center"
|
|
344
|
-
},
|
|
345
|
-
cell: ({ cell: t, row: e }) => e.original.method ? _(re, { row: e, data: t.getValue() }) : ""
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
header: () => "Method",
|
|
349
|
-
accessorKey: "method",
|
|
350
|
-
meta: {
|
|
351
|
-
textAlign: "center"
|
|
352
|
-
},
|
|
353
|
-
cell: ({ cell: t, row: e }) => e.original.method ? _(se, { row: e, data: t.getValue() }) : ""
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
header: () => "Gateway ID",
|
|
357
|
-
accessorKey: "gatewayTransactionId",
|
|
358
|
-
cell: ({ cell: t, row: e }) => e.original.status === "REFUNDED" ? e.original.gatewayRefundId : e.original.gatewayTransactionId
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
header: () => "Type",
|
|
362
|
-
accessorKey: "payFor",
|
|
363
|
-
meta: {
|
|
364
|
-
textAlign: "center"
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
header: () => "Status",
|
|
369
|
-
accessorKey: "status",
|
|
370
|
-
cell: ({ cell: t, row: e }) => _(ae, { row: e, data: t.getValue() })
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
header: () => "Source",
|
|
374
|
-
accessorKey: "source",
|
|
375
|
-
cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
header: () => "Transaction At",
|
|
379
|
-
accessorKey: "transactionAt",
|
|
380
|
-
meta: {
|
|
381
|
-
width: "180px"
|
|
382
|
-
}
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
header: () => "Sales Amount",
|
|
386
|
-
accessorKey: "amount",
|
|
387
|
-
cell: ({ cell: t, row: e }) => {
|
|
388
|
-
var n, a;
|
|
389
|
-
return ((n = f.value) != null && n.role.isStaff || (a = f.value) != null && a.role.isAdmin) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
|
|
390
|
-
}
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
header: () => "Actions",
|
|
394
|
-
accessorKey: "actions",
|
|
395
|
-
cell: ({ row: t }) => {
|
|
396
|
-
var n;
|
|
397
|
-
const e = (n = r.value) == null ? void 0 : n.pageData().at(t.index);
|
|
398
|
-
if (!e) {
|
|
399
|
-
i.open({
|
|
400
|
-
type: "error",
|
|
401
|
-
title: "Something went wrong",
|
|
402
|
-
message: "Fail to find transactions from the displayed transactions."
|
|
403
|
-
});
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
return _(ie, {
|
|
407
|
-
transaction: e,
|
|
408
|
-
onAction: (a) => {
|
|
409
|
-
switch (a) {
|
|
410
|
-
case "notify":
|
|
411
|
-
return M(t.index);
|
|
412
|
-
case "query":
|
|
413
|
-
return $(t.index);
|
|
414
|
-
case "refund":
|
|
415
|
-
return K(t.index);
|
|
416
|
-
case "history":
|
|
417
|
-
return R(t.index);
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
];
|
|
424
|
-
return (t, e) => {
|
|
425
|
-
const n = d("FmSearch");
|
|
426
|
-
return m(), T(Q, {
|
|
427
|
-
title: "Transactions",
|
|
428
|
-
loading: !1
|
|
429
|
-
}, {
|
|
430
|
-
default: h(() => [
|
|
431
|
-
g("div", ue, [
|
|
432
|
-
g("div", de, [
|
|
433
|
-
y(n, {
|
|
434
|
-
"model-value": p(s),
|
|
435
|
-
"onUpdate:modelValue": e[0] || (e[0] = (a) => N(s) ? s.value = a : null),
|
|
436
|
-
class: "mr-8",
|
|
437
|
-
label: "Search",
|
|
438
|
-
placeholder: "Search Transactions ..."
|
|
439
|
-
}, null, 8, ["model-value"])
|
|
440
|
-
]),
|
|
441
|
-
g("div", me, [
|
|
442
|
-
y(j, {
|
|
443
|
-
button: {
|
|
444
|
-
appendIcon: "file_download",
|
|
445
|
-
variant: "primary",
|
|
446
|
-
label: "Export"
|
|
447
|
-
},
|
|
448
|
-
handler: async () => {
|
|
449
|
-
await p(w).downloadTransactionReport({
|
|
450
|
-
start: p(c).startDate,
|
|
451
|
-
end: p(c).endDate
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
}, null, 8, ["handler"])
|
|
455
|
-
])
|
|
456
|
-
]),
|
|
457
|
-
g("div", fe, [
|
|
458
|
-
y(W, {
|
|
459
|
-
modelValue: p(c),
|
|
460
|
-
"onUpdate:modelValue": e[1] || (e[1] = (a) => N(c) ? c.value = a : null)
|
|
461
|
-
}, null, 8, ["modelValue"])
|
|
462
|
-
]),
|
|
463
|
-
y(Z, {
|
|
464
|
-
ref_key: "controller",
|
|
465
|
-
ref: r,
|
|
466
|
-
"column-defs": V,
|
|
467
|
-
"rows-defs": (a) => a,
|
|
468
|
-
paginate: l
|
|
469
|
-
}, null, 8, ["rows-defs"])
|
|
470
|
-
]),
|
|
471
|
-
_: 1
|
|
472
|
-
});
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
});
|
|
476
|
-
export {
|
|
477
|
-
qe as default
|
|
478
|
-
};
|
package/dist/index-BcOHdPNx.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { g as e, b as t, o as u, d as p } from "./index-QTsd1BO1.js";
|
|
2
|
-
import { h as d } from "./moment-h96o7c8I.js";
|
|
3
|
-
import { d as c } from "./index-DTD9SWXp.js";
|
|
4
|
-
const $ = {
|
|
5
|
-
async read(s) {
|
|
6
|
-
return p(
|
|
7
|
-
await t().get("/payments/onboard-submissions", {
|
|
8
|
-
params: { ...s }
|
|
9
|
-
})
|
|
10
|
-
);
|
|
11
|
-
},
|
|
12
|
-
async readById(s) {
|
|
13
|
-
return e(
|
|
14
|
-
await t().get(`/payments/onboard-submissions/${s}`)
|
|
15
|
-
);
|
|
16
|
-
},
|
|
17
|
-
async previewDocument(s) {
|
|
18
|
-
const n = await t().get(
|
|
19
|
-
`payments/onboard-submissions/${s}/document`,
|
|
20
|
-
{ responseType: "blob" }
|
|
21
|
-
);
|
|
22
|
-
u(n.data);
|
|
23
|
-
},
|
|
24
|
-
async sendDocument(s) {
|
|
25
|
-
return e(
|
|
26
|
-
await t().post(
|
|
27
|
-
`payments/onboard-submissions/${s}/send`
|
|
28
|
-
)
|
|
29
|
-
);
|
|
30
|
-
},
|
|
31
|
-
async reviewById(s, n) {
|
|
32
|
-
return e(
|
|
33
|
-
await t().put(
|
|
34
|
-
`/payments/onboard-submissions/${s}`,
|
|
35
|
-
n
|
|
36
|
-
)
|
|
37
|
-
);
|
|
38
|
-
},
|
|
39
|
-
async getById(s, n) {
|
|
40
|
-
return e(
|
|
41
|
-
await t().get(
|
|
42
|
-
`restaurants/${n}/onboard-submissions/${s}`
|
|
43
|
-
)
|
|
44
|
-
);
|
|
45
|
-
},
|
|
46
|
-
async getByRestaurant(s) {
|
|
47
|
-
return e(
|
|
48
|
-
await t().get(
|
|
49
|
-
`restaurants/${s}/onboard-submissions`
|
|
50
|
-
)
|
|
51
|
-
);
|
|
52
|
-
},
|
|
53
|
-
async uploadDocument(s, n, a) {
|
|
54
|
-
const o = d().toISOString(), r = b(a);
|
|
55
|
-
return await c.upload(
|
|
56
|
-
`restaurant/${s}/documents/${n}/${o}.${r}`,
|
|
57
|
-
a,
|
|
58
|
-
s
|
|
59
|
-
);
|
|
60
|
-
},
|
|
61
|
-
async updateSubmission(s) {
|
|
62
|
-
return e(
|
|
63
|
-
await t().put(
|
|
64
|
-
`restaurants/${s.restaurantId}/onboard-submissions`,
|
|
65
|
-
s
|
|
66
|
-
)
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
}, b = (s) => {
|
|
70
|
-
var r, i, m;
|
|
71
|
-
const n = (r = s.name.toLowerCase().match(/\.([a-z0-9]+)$/)) == null ? void 0 : r[1], a = (m = (i = s.type.toLowerCase().split("/").pop()) == null ? void 0 : i.split("+")[0]) == null ? void 0 : m.replace(/[^a-z0-9]/g, ""), o = n || a;
|
|
72
|
-
if (!o)
|
|
73
|
-
throw new Error(
|
|
74
|
-
"Unable to determine file extension from name or MIME type"
|
|
75
|
-
);
|
|
76
|
-
return o;
|
|
77
|
-
};
|
|
78
|
-
export {
|
|
79
|
-
$ as o
|
|
80
|
-
};
|