@feedmepos/mf-payment 1.4.1 → 1.4.2
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-B9x3HkUm.js → Actions.vue_vue_type_script_setup_true_lang-CqIt6ELp.js} +1 -1
- package/dist/{OnboardForm-CxRRT1rW.js → OnboardForm-BNyK_Vet.js} +2 -2
- package/dist/{OnboardForm-DMSxvjjH.js → OnboardForm-Cjrcx5AR.js} +2 -2
- package/dist/{OnboardSubmission-D7G55TdE.js → OnboardSubmission-BEy7c_d7.js} +1 -1
- package/dist/{OnboardSubmission-B0tK0WB5.js → OnboardSubmission-oe4t2AgG.js} +1 -1
- package/dist/{PayoutAccount-Dq_vnhiW.js → PayoutAccount-Bfw-iMZd.js} +1 -1
- package/dist/{PayoutAccount-Z2dgsREV.js → PayoutAccount-D0IOAymI.js} +3 -3
- package/dist/{SettlementTransactions-CQ0hG5oX.js → SettlementTransactions-BG1btImp.js} +1 -1
- package/dist/{SettlementTransactions-DAKnMkcC.js → SettlementTransactions-CXAt4toA.js} +1 -1
- package/dist/{Transaction-BamKY4nZ.js → Transaction-Cl6LzyIv.js} +1 -1
- package/dist/Transaction-LDOp9d9W.js +413 -0
- package/dist/{TransactionOld-7D5xC-0Y.js → TransactionOld-DqRQHymo.js} +2 -2
- package/dist/{app-Tr3kI1Wp.js → app-BBSHlMY3.js} +11 -11
- package/dist/app.js +1 -1
- package/dist/{assets-D5-bgB4H.js → assets-B67WKlO6.js} +1 -1
- package/dist/{index-DtJpO9_s.js → index-BvWJrSY2.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-DLPHO8by.js → payout-account-CgJxxXw9.js} +2 -2
- package/dist/{plugins-BdnYXXEh.js → plugins-BADrx0Dw.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/Transaction-BAI8L2Xw.js +0 -409
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as c, resolveComponent as a, openBlock as r, createBlock as l, normalizeClass as w, withCtx as i, createElementVNode as m, toDisplayString as h, unref as f, createElementBlock as d, createVNode as b, Fragment as F, renderList as T } from "vue";
|
|
2
2
|
import { e as p } from "./index-C4FfKmPS.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
|
-
import { g as y, a as A } from "./assets-
|
|
4
|
+
import { g as y, a as A } from "./assets-B67WKlO6.js";
|
|
5
5
|
const C = /* @__PURE__ */ c({
|
|
6
6
|
__name: "Status",
|
|
7
7
|
props: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as $, ref as P, computed as O, resolveComponent as f, openBlock as y, createElementBlock as q, createElementVNode as s, toDisplayString as I, Fragment as z, createBlock as j, withCtx as c, createVNode as o, createCommentVNode as B, unref as e, createTextVNode as D, onMounted as X, resolveDynamicComponent as Z } from "vue";
|
|
2
|
-
import { o as T } from "./index-
|
|
2
|
+
import { o as T } from "./index-BvWJrSY2.js";
|
|
3
3
|
import { u as M } from "./index-C4FfKmPS.js";
|
|
4
4
|
import { useRouter as h } from "vue-router";
|
|
5
5
|
import { z as u, a as d } from "./validator-D5jtpt9A.js";
|
|
6
|
-
import { P as ee } from "./payout-account-
|
|
6
|
+
import { P as ee } from "./payout-account-CgJxxXw9.js";
|
|
7
7
|
import { P as le } from "./PDFViewer-DlSCBBxr.js";
|
|
8
8
|
import { s as te } from "./vue-signature-pad.esm-IXPjf4fL.js";
|
|
9
9
|
import { _ as ae } from "./Status.vue_vue_type_script_setup_true_lang-B7a304Y6.js";
|
|
@@ -2,12 +2,12 @@ import { defineComponent as U, ref as D, computed as vf, resolveComponent as w,
|
|
|
2
2
|
import { z as d, a as s } from "./validator-D5jtpt9A.js";
|
|
3
3
|
import { P as jf, _ as bf } from "./PDFViewer-DlSCBBxr.js";
|
|
4
4
|
import { useCoreStore as xf } from "@feedmepos/mf-common";
|
|
5
|
-
import { o as F } from "./index-
|
|
5
|
+
import { o as F } from "./index-BvWJrSY2.js";
|
|
6
6
|
import { p as af } from "./index-BWjmOoX3.js";
|
|
7
7
|
import { useSnackbar as df } from "@feedmepos/ui-library";
|
|
8
8
|
import { u as Af } from "./index-C4FfKmPS.js";
|
|
9
9
|
import { s as sf } from "./vue-signature-pad.esm-IXPjf4fL.js";
|
|
10
|
-
import { P as Lf } from "./payout-account-
|
|
10
|
+
import { P as Lf } from "./payout-account-CgJxxXw9.js";
|
|
11
11
|
import { useRouter as yf } from "vue-router";
|
|
12
12
|
const uf = { class: "flex" }, pf = { class: "justify-self-center" }, Df = ["src"], o = /* @__PURE__ */ U({
|
|
13
13
|
__name: "UploadButton",
|
|
@@ -3,7 +3,7 @@ import { _ as q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js
|
|
|
3
3
|
import { u as G, p as J, e as L } from "./index-C4FfKmPS.js";
|
|
4
4
|
import { useI18n as K, useCoreStore as Q } from "@feedmepos/mf-common";
|
|
5
5
|
import { _ as X } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DyLnqQYe.js";
|
|
6
|
-
import { o as Z } from "./index-
|
|
6
|
+
import { o as Z } from "./index-BvWJrSY2.js";
|
|
7
7
|
import { useRouter as w } from "vue-router";
|
|
8
8
|
import { i as ss } from "./softspace-25X2bjBx.js";
|
|
9
9
|
const es = { class: "flex justify-left items-center mb-6" }, ts = { class: "grid grid-cols-3 gap-6" }, os = { class: "flex items-center" }, ns = ["src"], is = { class: "px-16 text-sm flex-grow" }, rs = { class: "list-disc pl-6" }, ms = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as A, ref as V, watch as v, computed as p, resolveComponent as x, openBlock as h, createBlock as w, withCtx as f, createElementVNode as S, createVNode as r, unref as l, isRef as n, h as k } from "vue";
|
|
2
|
-
import { o as K } from "./index-
|
|
2
|
+
import { o as K } from "./index-BvWJrSY2.js";
|
|
3
3
|
import { p as m } from "./index-C4FfKmPS.js";
|
|
4
4
|
import { _ as O } from "./index.vue_vue_type_script_setup_true_lang-v7o6C5Pg.js";
|
|
5
5
|
import { useRouter as F } from "vue-router";
|
|
@@ -2,7 +2,7 @@ import { defineComponent as y, resolveComponent as u, openBlock as h, createBloc
|
|
|
2
2
|
import { u as O } from "./index-ILoz50zh.js";
|
|
3
3
|
import { p as K } from "./index-C4FfKmPS.js";
|
|
4
4
|
import { _ as A } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
|
5
|
-
import { P as V } from "./payout-account-
|
|
5
|
+
import { P as V } from "./payout-account-CgJxxXw9.js";
|
|
6
6
|
import { p as D } from "./index-BWjmOoX3.js";
|
|
7
7
|
import "@feedmepos/ui-library";
|
|
8
8
|
import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-v7o6C5Pg.js";
|
|
@@ -3,12 +3,12 @@ import { p as K } from "./index-BWjmOoX3.js";
|
|
|
3
3
|
import { p as U, u as gA, e as lA } from "./index-C4FfKmPS.js";
|
|
4
4
|
import { defineStore as rA } from "pinia";
|
|
5
5
|
import { useI18n as R, useCoreStore as eA } from "@feedmepos/mf-common";
|
|
6
|
-
import { c as cA, a as _, P as J } from "./payout-account-
|
|
6
|
+
import { c as cA, a as _, P as J } from "./payout-account-CgJxxXw9.js";
|
|
7
7
|
import { useDialogChild as nA, useDialog as BA } from "@feedmepos/ui-library";
|
|
8
8
|
import { z as F, a as H } from "./validator-D5jtpt9A.js";
|
|
9
9
|
import { P as $ } from "./PDFViewer-DlSCBBxr.js";
|
|
10
|
-
import "./app-
|
|
11
|
-
import "./plugins-
|
|
10
|
+
import "./app-BBSHlMY3.js";
|
|
11
|
+
import "./plugins-BADrx0Dw.js";
|
|
12
12
|
import { _ as uA } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
|
13
13
|
function wA() {
|
|
14
14
|
return {
|
|
@@ -2,7 +2,7 @@ import { defineComponent as x, resolveComponent as d, openBlock as A, createBloc
|
|
|
2
2
|
import { e as k, u as q } from "./index-C4FfKmPS.js";
|
|
3
3
|
import { useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
|
|
4
4
|
import { d as B } from "./dinero-CIVmXLL-.js";
|
|
5
|
-
import { g as W, a as X, t as P, b as Z } from "./assets-
|
|
5
|
+
import { g as W, a as X, t as P, b as Z } from "./assets-B67WKlO6.js";
|
|
6
6
|
import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
|
7
7
|
import { useRouter as te } from "vue-router";
|
|
8
8
|
import { s as ae } from "./index-j0nww2Hf.js";
|
|
@@ -2,7 +2,7 @@ import { defineComponent as x, resolveComponent as f, openBlock as F, createBloc
|
|
|
2
2
|
import { e as E, u as G } from "./index-C4FfKmPS.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
4
|
import { d as k } from "./dinero-CIVmXLL-.js";
|
|
5
|
-
import { g as H, a as q, t as J, b as Q } from "./assets-
|
|
5
|
+
import { g as H, a as q, t as J, b as Q } from "./assets-B67WKlO6.js";
|
|
6
6
|
import { _ as W } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
|
7
7
|
import { useRouter as X } from "vue-router";
|
|
8
8
|
import { s as Z } from "./index-j0nww2Hf.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as T, resolveComponent as f, openBlock as y, createBlock as b, normalizeClass as C, withCtx as _, createElementVNode as p, toDisplayString as V, unref as m, createElementBlock as I, createVNode as g, Fragment as Y, renderList as O, ref as P, watch as x, isRef as N, h } from "vue";
|
|
2
|
-
import { g as U, a as B, t as w, b as G, c as k } from "./assets-
|
|
2
|
+
import { g as U, a as B, t as w, b as G, c as k } from "./assets-B67WKlO6.js";
|
|
3
3
|
import { h as A } from "./moment-h96o7c8I.js";
|
|
4
4
|
import { u as L } from "./index-ILoz50zh.js";
|
|
5
5
|
import { _ as Q } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import { defineComponent as B, ref as N, watch as M, onMounted as J, resolveComponent as g, openBlock as b, createElementBlock as $, Fragment as q, unref as r, createBlock as D, createCommentVNode as Y, withCtx as V, createVNode as f, renderList as Q, createElementVNode as U, isRef as S, h as I } from "vue";
|
|
2
|
+
import { t as C, c as w } from "./assets-B67WKlO6.js";
|
|
3
|
+
import { h as O } from "./moment-h96o7c8I.js";
|
|
4
|
+
import { useI18n as G, useCoreStore as j } from "@feedmepos/mf-common";
|
|
5
|
+
import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
|
6
|
+
import { u as W } from "./index-ILoz50zh.js";
|
|
7
|
+
import { _ as X } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
8
|
+
import { _ as Z } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
|
9
|
+
import { _ as ee } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
|
10
|
+
import { p as ae } from "./index-BWjmOoX3.js";
|
|
11
|
+
import { t as te } from "./index-C8G7ruiF.js";
|
|
12
|
+
import { u as ne, p as x } from "./index-C4FfKmPS.js";
|
|
13
|
+
import { useSnackbar as re, useDialog as se } from "@feedmepos/ui-library";
|
|
14
|
+
import { _ as oe, a as le, b as ie, c as ce } from "./Actions.vue_vue_type_script_setup_true_lang-CqIt6ELp.js";
|
|
15
|
+
import { g as ue } from "./grafana-BrdrOUM4.js";
|
|
16
|
+
import { w as L } from "./Modal-DB8M9o1T.js";
|
|
17
|
+
import { u as P } from "./error-K1CakhA9.js";
|
|
18
|
+
import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-v7o6C5Pg.js";
|
|
19
|
+
const de = /* @__PURE__ */ B({
|
|
20
|
+
__name: "SourceSelector",
|
|
21
|
+
props: {
|
|
22
|
+
id: {},
|
|
23
|
+
by: {}
|
|
24
|
+
},
|
|
25
|
+
emits: ["update:id", "update:by"],
|
|
26
|
+
setup(z, { emit: p }) {
|
|
27
|
+
const E = p, { t: c } = G(), { currentBusiness: s, readRestaurants: T } = j(), { isLoading: u, startAsyncCall: A } = ne(!0), m = N([]), l = N(), y = N(""), v = N([]);
|
|
28
|
+
let F;
|
|
29
|
+
M(y, async () => {
|
|
30
|
+
F && clearTimeout(F), F = setTimeout(() => {
|
|
31
|
+
var i = new RegExp(y.value, "i");
|
|
32
|
+
v.value = m.value.filter((d) => {
|
|
33
|
+
const _ = JSON.stringify(d);
|
|
34
|
+
return i.test(_);
|
|
35
|
+
});
|
|
36
|
+
}, 700);
|
|
37
|
+
}), M(l, () => {
|
|
38
|
+
l.value && (E("update:id", l.value.value), E("update:by", l.value.by));
|
|
39
|
+
});
|
|
40
|
+
async function k() {
|
|
41
|
+
return A(async () => {
|
|
42
|
+
let i = await ae.readBusinessPayoutAccounts();
|
|
43
|
+
if (i.length !== 0)
|
|
44
|
+
return i;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async function K() {
|
|
48
|
+
return A(async () => {
|
|
49
|
+
let i = await te.getBusinessTerminals();
|
|
50
|
+
if (i.length !== 0)
|
|
51
|
+
return i;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
async function R() {
|
|
55
|
+
u.value = !0;
|
|
56
|
+
const i = await k(), d = await T(), _ = await K();
|
|
57
|
+
m.value = [
|
|
58
|
+
...(d || []).map((a) => ({
|
|
59
|
+
by: "RESTAURANT",
|
|
60
|
+
prefix: c("payment.components.restaurant"),
|
|
61
|
+
label: "(RESTAURANT) " + a.profile.name,
|
|
62
|
+
value: a._id
|
|
63
|
+
})),
|
|
64
|
+
...(_ || []).map((a) => ({
|
|
65
|
+
by: "DEVICE",
|
|
66
|
+
prefix: c("payment.components.device"),
|
|
67
|
+
label: "(" + a.deviceType + ") " + (a.deviceType === "TERMINAL" ? a.name : a.restaurant.profile.name),
|
|
68
|
+
value: a._id
|
|
69
|
+
})),
|
|
70
|
+
...(i || []).map((a) => {
|
|
71
|
+
var e, t;
|
|
72
|
+
return {
|
|
73
|
+
by: "PAYOUT_ACCOUNT",
|
|
74
|
+
prefix: c("payment.components.payout_account"),
|
|
75
|
+
label: "(" + a.store.event + ") " + (((t = (e = a.ref) == null ? void 0 : e.profile) == null ? void 0 : t.name) ?? a.ref.name),
|
|
76
|
+
value: a._id
|
|
77
|
+
};
|
|
78
|
+
})
|
|
79
|
+
], v.value = m.value, u.value = !1;
|
|
80
|
+
}
|
|
81
|
+
return J(R), M(s, R), (i, d) => {
|
|
82
|
+
const _ = g("FmCircularProgress"), a = g("FmChip"), e = g("FmSearch"), t = g("FmMenuItem"), o = g("FmMenu");
|
|
83
|
+
return b(), $(q, null, [
|
|
84
|
+
r(u) ? (b(), D(_, {
|
|
85
|
+
key: 0,
|
|
86
|
+
size: "md"
|
|
87
|
+
})) : Y("", !0),
|
|
88
|
+
r(u) ? Y("", !0) : (b(), D(o, { key: 1 }, {
|
|
89
|
+
"menu-button": V(() => {
|
|
90
|
+
var n;
|
|
91
|
+
return [
|
|
92
|
+
f(a, {
|
|
93
|
+
icon: "account_box",
|
|
94
|
+
label: l.value ? l.value.prefix + " > " + ((n = l.value) == null ? void 0 : n.label) : r(c)("payment.components.select"),
|
|
95
|
+
removable: !!l.value,
|
|
96
|
+
onChipClosed: d[0] || (d[0] = (h) => l.value = void 0)
|
|
97
|
+
}, null, 8, ["label", "removable"])
|
|
98
|
+
];
|
|
99
|
+
}),
|
|
100
|
+
default: V(() => [
|
|
101
|
+
f(e, {
|
|
102
|
+
"model-value": y.value,
|
|
103
|
+
"onUpdate:modelValue": d[1] || (d[1] = (n) => y.value = n),
|
|
104
|
+
placeholder: "Search Restaurants/Devices/Payout Accounts"
|
|
105
|
+
}, null, 8, ["model-value"]),
|
|
106
|
+
v.value.length === 0 ? (b(), D(t, {
|
|
107
|
+
key: 0,
|
|
108
|
+
disabled: !0,
|
|
109
|
+
label: "No result"
|
|
110
|
+
})) : Y("", !0),
|
|
111
|
+
(b(!0), $(q, null, Q(v.value, (n) => (b(), D(t, {
|
|
112
|
+
onClick: (h) => l.value = n,
|
|
113
|
+
key: n.value,
|
|
114
|
+
label: n.label,
|
|
115
|
+
selectable: ""
|
|
116
|
+
}, null, 8, ["onClick", "label"]))), 128))
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}))
|
|
120
|
+
], 64);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}), pe = { class: "flex justify-between mb-6 items-center" }, ye = { class: "flex space-x-8 items-start" }, fe = { class: "flex space-x-4 self-center" }, _e = { class: "flex space-x-12 mb-6" }, Ke = /* @__PURE__ */ B({
|
|
124
|
+
__name: "Transaction",
|
|
125
|
+
setup(z) {
|
|
126
|
+
var d, _;
|
|
127
|
+
const p = re(), E = se(), { sessionUser: c } = j(), { t: s } = G(), T = N(), { dateRange: u, searchKey: A, status: m, id: l, by: y } = W({
|
|
128
|
+
by: "",
|
|
129
|
+
id: "",
|
|
130
|
+
searchKey: "",
|
|
131
|
+
status: [x.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
|
132
|
+
dateRange: {
|
|
133
|
+
startDate: O().startOf("day").format("YYYY-MM-DD"),
|
|
134
|
+
endDate: O().endOf("day").format("YYYY-MM-DD")
|
|
135
|
+
}
|
|
136
|
+
}), v = [
|
|
137
|
+
{
|
|
138
|
+
label: "Success",
|
|
139
|
+
value: x.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
label: "Refunded",
|
|
143
|
+
value: x.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
label: "Process",
|
|
147
|
+
value: x.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
label: "Failed",
|
|
151
|
+
value: x.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
|
152
|
+
}
|
|
153
|
+
];
|
|
154
|
+
async function F(a, e) {
|
|
155
|
+
var t;
|
|
156
|
+
try {
|
|
157
|
+
const o = await C.refetchTransaction({ transactionId: a.id });
|
|
158
|
+
(t = T.value) == null || t.replaceData(e, w(o)), p.open({
|
|
159
|
+
type: "success",
|
|
160
|
+
title: "Transaction queried and updated successfully."
|
|
161
|
+
});
|
|
162
|
+
} catch (o) {
|
|
163
|
+
p.open({
|
|
164
|
+
type: "error",
|
|
165
|
+
title: "Fail to query transaction.",
|
|
166
|
+
message: P(o)
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async function k(a, e) {
|
|
171
|
+
L(
|
|
172
|
+
E,
|
|
173
|
+
"Refund Transaction",
|
|
174
|
+
"Are you sure to refund transaction? This action cannot be revert!",
|
|
175
|
+
async () => {
|
|
176
|
+
var t;
|
|
177
|
+
try {
|
|
178
|
+
const o = await C.refundTransaction({
|
|
179
|
+
transactionId: a.id,
|
|
180
|
+
reason: "portal transaction refund",
|
|
181
|
+
amount: a.fdoAmount
|
|
182
|
+
});
|
|
183
|
+
(t = T.value) == null || t.replaceData(e, w(o)), p.open({
|
|
184
|
+
type: "success",
|
|
185
|
+
title: "Transaction refund request initiated."
|
|
186
|
+
});
|
|
187
|
+
} catch (o) {
|
|
188
|
+
p.open({
|
|
189
|
+
type: "error",
|
|
190
|
+
title: "Fail to request refund transaction.",
|
|
191
|
+
message: P(o)
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
async function K(a, e) {
|
|
198
|
+
L(
|
|
199
|
+
E,
|
|
200
|
+
"Notify Transaction",
|
|
201
|
+
"Are you sure to perform notify transaction?",
|
|
202
|
+
async () => {
|
|
203
|
+
try {
|
|
204
|
+
await C.renotifyTransaction(a.id), p.open({
|
|
205
|
+
type: "success",
|
|
206
|
+
title: "Transaction notify successfully."
|
|
207
|
+
});
|
|
208
|
+
} catch (t) {
|
|
209
|
+
p.open({
|
|
210
|
+
type: "error",
|
|
211
|
+
title: "Fail to notify transaction.",
|
|
212
|
+
message: P(t)
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
async function R(a, e) {
|
|
219
|
+
const t = ue([
|
|
220
|
+
{
|
|
221
|
+
type: "span",
|
|
222
|
+
queryKey: "transaction.id",
|
|
223
|
+
queryValue: a.id
|
|
224
|
+
}
|
|
225
|
+
], a.transactionAt);
|
|
226
|
+
window.open(t, "_blank");
|
|
227
|
+
}
|
|
228
|
+
N("");
|
|
229
|
+
const i = [
|
|
230
|
+
{
|
|
231
|
+
header: () => s("payment.transactions.table.id"),
|
|
232
|
+
accessorKey: "id",
|
|
233
|
+
cell: ({ cell: a, row: e }) => {
|
|
234
|
+
var t, o;
|
|
235
|
+
return ((t = c.value) != null && t.role.isStaff || (o = c.value) != null && o.role.isAdmin) && e.original.transactionId ? e.original.id + `
|
|
236
|
+
ID: ` + e.original.transactionId : e.original.id;
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
header: () => s("payment.transactions.table.pay_id"),
|
|
241
|
+
accessorKey: "payId"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
header: () => s("payment.transactions.table.gateway_id"),
|
|
245
|
+
accessorKey: "gatewayTransactionId"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
header: () => s("payment.transactions.table.bill_seq"),
|
|
249
|
+
accessorKey: "seqNumber"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
header: () => s("payment.transactions.table.gateway"),
|
|
253
|
+
accessorKey: "gateway",
|
|
254
|
+
meta: {
|
|
255
|
+
textAlign: "center"
|
|
256
|
+
},
|
|
257
|
+
cell: ({ cell: a, row: e }) => e.original.gateway ? I(oe, { row: e, data: a.getValue() }) : ""
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
header: () => s("payment.transactions.table.method"),
|
|
261
|
+
accessorKey: "method",
|
|
262
|
+
meta: {
|
|
263
|
+
textAlign: "center"
|
|
264
|
+
},
|
|
265
|
+
cell: ({ cell: a, row: e }) => e.original.method ? I(le, { row: e, data: a.getValue() }) : ""
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
header: () => s("payment.transactions.table.type"),
|
|
269
|
+
accessorKey: "payFor",
|
|
270
|
+
meta: {
|
|
271
|
+
textAlign: "center"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
header: () => s("payment.transactions.table.status"),
|
|
276
|
+
accessorKey: "status",
|
|
277
|
+
cell: ({ cell: a, row: e }) => I(ie, { row: e, data: a.getValue() })
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
header: () => s("payment.transactions.table.restaurant"),
|
|
281
|
+
accessorKey: "restaurantId"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
header: () => s("payment.transactions.table.source"),
|
|
285
|
+
accessorKey: "source",
|
|
286
|
+
cell: ({ cell: a, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
header: () => s("payment.transactions.table.transaction_at"),
|
|
290
|
+
accessorKey: "transactionAt",
|
|
291
|
+
meta: {
|
|
292
|
+
width: "180px"
|
|
293
|
+
},
|
|
294
|
+
cell: ({ cell: a, row: e }) => e.original.status === "REFUNDED" ? e.original.refundedAt : e.original.transactionAt
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
header: () => s("payment.transactions.table.sales_amount"),
|
|
298
|
+
accessorKey: "amount",
|
|
299
|
+
cell: ({ cell: a, row: e }) => {
|
|
300
|
+
var t, o;
|
|
301
|
+
return ((t = c.value) != null && t.role.isStaff || (o = c.value) != null && o.role.isAdmin) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
];
|
|
305
|
+
return ((d = c.value) != null && d.role.isStaff || (_ = c.value) != null && _.role.isAdmin) && i.push({
|
|
306
|
+
header: () => s("payment.transactions.table.actions"),
|
|
307
|
+
accessorKey: "actions",
|
|
308
|
+
cell: ({ row: a }) => I(ce, {
|
|
309
|
+
transaction: a.original,
|
|
310
|
+
onAction: (e) => {
|
|
311
|
+
var t;
|
|
312
|
+
switch (e) {
|
|
313
|
+
case "notify":
|
|
314
|
+
return K(a.original, a.index);
|
|
315
|
+
case "query":
|
|
316
|
+
return F(a.original, a.index);
|
|
317
|
+
case "refund":
|
|
318
|
+
return (t = c.value) != null && t.role.isStaff ? p.open({
|
|
319
|
+
type: "error",
|
|
320
|
+
title: "You are not allowed to refund transaction."
|
|
321
|
+
}) : k(a.original, a.index);
|
|
322
|
+
case "history":
|
|
323
|
+
return R(a.original, a.index);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
})
|
|
327
|
+
}), (a, e) => {
|
|
328
|
+
const t = g("FmSearch"), o = g("FmSelect");
|
|
329
|
+
return b(), D(H, {
|
|
330
|
+
title: r(s)("payment.transactions.title"),
|
|
331
|
+
description: r(s)("payment.transactions.description"),
|
|
332
|
+
loading: !1
|
|
333
|
+
}, {
|
|
334
|
+
default: V(() => [
|
|
335
|
+
U("div", pe, [
|
|
336
|
+
U("div", ye, [
|
|
337
|
+
f(t, {
|
|
338
|
+
"model-value": r(A),
|
|
339
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => S(A) ? A.value = n : null),
|
|
340
|
+
class: "mr-8",
|
|
341
|
+
label: r(s)("payment.transactions.search.title"),
|
|
342
|
+
placeholder: r(s)("payment.transactions.search.placeholder")
|
|
343
|
+
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
344
|
+
f(o, {
|
|
345
|
+
modelValue: r(m),
|
|
346
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => S(m) ? m.value = n : null),
|
|
347
|
+
class: "mr-6 w-[300px]",
|
|
348
|
+
label: r(s)("payment.transactions.status"),
|
|
349
|
+
"label-mark": "required",
|
|
350
|
+
multiselect: "",
|
|
351
|
+
items: v
|
|
352
|
+
}, {
|
|
353
|
+
"prepend-menu": V(() => [
|
|
354
|
+
f(Z, {
|
|
355
|
+
modelValue: r(m),
|
|
356
|
+
"onUpdate:modelValue": e[1] || (e[1] = (n) => S(m) ? m.value = n : null),
|
|
357
|
+
items: v
|
|
358
|
+
}, null, 8, ["modelValue"])
|
|
359
|
+
]),
|
|
360
|
+
_: 1
|
|
361
|
+
}, 8, ["modelValue", "label"])
|
|
362
|
+
]),
|
|
363
|
+
U("div", fe, [
|
|
364
|
+
f(X, {
|
|
365
|
+
button: {
|
|
366
|
+
appendIcon: "file_download",
|
|
367
|
+
variant: "primary",
|
|
368
|
+
label: r(s)("payment.transactions.button.export")
|
|
369
|
+
},
|
|
370
|
+
handler: async () => {
|
|
371
|
+
var h;
|
|
372
|
+
const n = await ((h = T.value) == null ? void 0 : h.allData());
|
|
373
|
+
n != null && await r(C).downloadPortalTransactionReport(r(u), n);
|
|
374
|
+
}
|
|
375
|
+
}, null, 8, ["button", "handler"])
|
|
376
|
+
])
|
|
377
|
+
]),
|
|
378
|
+
U("div", _e, [
|
|
379
|
+
f(de, {
|
|
380
|
+
id: r(l),
|
|
381
|
+
"onUpdate:id": e[3] || (e[3] = (n) => S(l) ? l.value = n : null),
|
|
382
|
+
by: r(y),
|
|
383
|
+
"onUpdate:by": e[4] || (e[4] = (n) => S(y) ? y.value = n : null)
|
|
384
|
+
}, null, 8, ["id", "by"]),
|
|
385
|
+
f(ee, {
|
|
386
|
+
modelValue: r(u),
|
|
387
|
+
"onUpdate:modelValue": e[5] || (e[5] = (n) => S(u) ? u.value = n : null)
|
|
388
|
+
}, null, 8, ["modelValue"])
|
|
389
|
+
]),
|
|
390
|
+
f(me, {
|
|
391
|
+
ref_key: "controller",
|
|
392
|
+
ref: T,
|
|
393
|
+
"column-defs": i,
|
|
394
|
+
"rows-defs": r(w),
|
|
395
|
+
paginate: (n, h) => r(C).readTransactionsV2({
|
|
396
|
+
limit: n,
|
|
397
|
+
cursor: h,
|
|
398
|
+
status: r(m),
|
|
399
|
+
by: r(y),
|
|
400
|
+
id: r(l),
|
|
401
|
+
start: r(u).startDate,
|
|
402
|
+
end: r(u).endDate
|
|
403
|
+
})
|
|
404
|
+
}, null, 8, ["rows-defs", "paginate"])
|
|
405
|
+
]),
|
|
406
|
+
_: 1
|
|
407
|
+
}, 8, ["title", "description"]);
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
export {
|
|
412
|
+
Ke as default
|
|
413
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
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, c as $, b as U } from "./assets-
|
|
2
|
+
import { t as v, c as $, b as U } from "./assets-B67WKlO6.js";
|
|
3
3
|
import { u as L } from "./index-C4FfKmPS.js";
|
|
4
4
|
import { useSnackbar as P, useDialog as B } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as J, a as j, b as G, c as Q } from "./Actions.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as J, a as j, b as G, c as Q } from "./Actions.vue_vue_type_script_setup_true_lang-CqIt6ELp.js";
|
|
6
6
|
import { g as z } from "./grafana-BrdrOUM4.js";
|
|
7
7
|
import { w as k } from "./Modal-DB8M9o1T.js";
|
|
8
8
|
import { u as V } from "./error-K1CakhA9.js";
|
|
@@ -383,7 +383,7 @@ const Gn = {
|
|
|
383
383
|
sidebarDisplay: "Payout Accounts",
|
|
384
384
|
section: "payment-gateway"
|
|
385
385
|
},
|
|
386
|
-
component: () => import("./PayoutAccount-
|
|
386
|
+
component: () => import("./PayoutAccount-Bfw-iMZd.js")
|
|
387
387
|
},
|
|
388
388
|
{
|
|
389
389
|
path: "/admin/payout-accounts/:accountId",
|
|
@@ -401,7 +401,7 @@ const Gn = {
|
|
|
401
401
|
sidebarDisplay: "Payment Onboarding",
|
|
402
402
|
section: "payment-gateway"
|
|
403
403
|
},
|
|
404
|
-
component: () => import("./OnboardSubmission-
|
|
404
|
+
component: () => import("./OnboardSubmission-oe4t2AgG.js")
|
|
405
405
|
},
|
|
406
406
|
{
|
|
407
407
|
path: "/admin/onboarding/:submissionId",
|
|
@@ -410,7 +410,7 @@ const Gn = {
|
|
|
410
410
|
meta: {
|
|
411
411
|
parent: "mf-payment-admin.onboard-submission"
|
|
412
412
|
},
|
|
413
|
-
component: () => import("./OnboardForm-
|
|
413
|
+
component: () => import("./OnboardForm-BNyK_Vet.js")
|
|
414
414
|
},
|
|
415
415
|
{
|
|
416
416
|
path: "/admin/terminal/pos",
|
|
@@ -481,7 +481,7 @@ const Gn = {
|
|
|
481
481
|
meta: {
|
|
482
482
|
sidebarDisplay: "Transactions"
|
|
483
483
|
},
|
|
484
|
-
component: () => import("./Transaction-
|
|
484
|
+
component: () => import("./Transaction-Cl6LzyIv.js")
|
|
485
485
|
},
|
|
486
486
|
{
|
|
487
487
|
path: "/admin/settlement",
|
|
@@ -498,7 +498,7 @@ const Gn = {
|
|
|
498
498
|
meta: {
|
|
499
499
|
parent: "mf-payment-admin.settlement"
|
|
500
500
|
},
|
|
501
|
-
component: () => import("./SettlementTransactions-
|
|
501
|
+
component: () => import("./SettlementTransactions-BG1btImp.js")
|
|
502
502
|
}
|
|
503
503
|
], We = [
|
|
504
504
|
{
|
|
@@ -508,7 +508,7 @@ const Gn = {
|
|
|
508
508
|
{
|
|
509
509
|
path: "/payout-account",
|
|
510
510
|
name: "mf-payment-payout-account",
|
|
511
|
-
component: () => import("./PayoutAccount-
|
|
511
|
+
component: () => import("./PayoutAccount-D0IOAymI.js"),
|
|
512
512
|
meta: {
|
|
513
513
|
sidebarDisplay: "i18n:payment.routes.payout_account"
|
|
514
514
|
}
|
|
@@ -516,7 +516,7 @@ const Gn = {
|
|
|
516
516
|
{
|
|
517
517
|
path: "/onboard-submission",
|
|
518
518
|
name: "mf-payment-onboard-submission",
|
|
519
|
-
component: () => import("./OnboardSubmission-
|
|
519
|
+
component: () => import("./OnboardSubmission-BEy7c_d7.js"),
|
|
520
520
|
meta: {
|
|
521
521
|
sidebarDisplay: "i18n:payment.routes.onboard_submission",
|
|
522
522
|
region: { MY: !0 }
|
|
@@ -526,7 +526,7 @@ const Gn = {
|
|
|
526
526
|
path: "/onboard-submission/:type/:submission?",
|
|
527
527
|
name: "mf-payment-onboard-submission-form",
|
|
528
528
|
props: !0,
|
|
529
|
-
component: () => import("./OnboardForm-
|
|
529
|
+
component: () => import("./OnboardForm-Cjrcx5AR.js"),
|
|
530
530
|
meta: {
|
|
531
531
|
parent: "mf-payment-onboard-submission"
|
|
532
532
|
}
|
|
@@ -534,7 +534,7 @@ const Gn = {
|
|
|
534
534
|
{
|
|
535
535
|
path: "/transaction-old",
|
|
536
536
|
name: "mf-payment-old-transaction",
|
|
537
|
-
component: () => import("./TransactionOld-
|
|
537
|
+
component: () => import("./TransactionOld-DqRQHymo.js"),
|
|
538
538
|
meta: {
|
|
539
539
|
sidebarDisplay: "i18n:payment.routes.transaction"
|
|
540
540
|
}
|
|
@@ -542,7 +542,7 @@ const Gn = {
|
|
|
542
542
|
{
|
|
543
543
|
path: "/transaction",
|
|
544
544
|
name: "mf-payment-transaction",
|
|
545
|
-
component: () => import("./Transaction-
|
|
545
|
+
component: () => import("./Transaction-LDOp9d9W.js"),
|
|
546
546
|
meta: {
|
|
547
547
|
sidebarDisplay: "i18n:payment.routes.transaction-new",
|
|
548
548
|
sidebarNew: !0
|
|
@@ -560,7 +560,7 @@ const Gn = {
|
|
|
560
560
|
path: "/settlement/:settlementId",
|
|
561
561
|
name: "mf-payment-settlement-transaction",
|
|
562
562
|
props: !0,
|
|
563
|
-
component: () => import("./SettlementTransactions-
|
|
563
|
+
component: () => import("./SettlementTransactions-CXAt4toA.js"),
|
|
564
564
|
meta: {
|
|
565
565
|
parent: "mf-payment-settlement"
|
|
566
566
|
}
|
package/dist/app.js
CHANGED
|
@@ -148,7 +148,7 @@ function z(A) {
|
|
|
148
148
|
"YYYY-MM-DD HH:mm:ss"
|
|
149
149
|
),
|
|
150
150
|
refundedAt: A.refundedAt ? C(A.refundedAt).format("YYYY-MM-DD HH:mm:ss") : "",
|
|
151
|
-
fdoAmount: A.
|
|
151
|
+
fdoAmount: A.amount,
|
|
152
152
|
amount: H(A.amount).toFormat("$0.00"),
|
|
153
153
|
gatewayAmount: H(A.gatewayAmount ?? {}).toFormat("$0.00"),
|
|
154
154
|
fee: H(A.fee).toFormat("$0.00"),
|