@feedmepos/mf-payment 1.4.0 → 1.4.1
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 +144 -0
- package/dist/{OnboardForm-BUITPCLG.js → OnboardForm-CxRRT1rW.js} +2 -2
- package/dist/{OnboardForm-B3Ej-hV_.js → OnboardForm-DMSxvjjH.js} +2 -2
- package/dist/{OnboardSubmission-C0yZsQjU.js → OnboardSubmission-B0tK0WB5.js} +1 -1
- package/dist/{OnboardSubmission-BoMaHHzE.js → OnboardSubmission-D7G55TdE.js} +1 -1
- package/dist/{PayoutAccount-D55CjZse.js → PayoutAccount-Dq_vnhiW.js} +1 -1
- package/dist/{PayoutAccount-Bz_X_FDJ.js → PayoutAccount-Z2dgsREV.js} +3 -3
- package/dist/{Settlement-L8ukHWPs.js → Settlement-DW_ElmEK.js} +1 -2
- package/dist/{SettlementTransactions-C8o5Atmc.js → SettlementTransactions-CQ0hG5oX.js} +1 -1
- package/dist/{SettlementTransactions-DG9nJuLQ.js → SettlementTransactions-DAKnMkcC.js} +1 -1
- package/dist/Transaction-BAI8L2Xw.js +409 -0
- package/dist/{Transaction-CfC0yN9P.js → Transaction-BamKY4nZ.js} +1 -1
- package/dist/TransactionOld-7D5xC-0Y.js +309 -0
- package/dist/api/transaction/index.d.ts +4 -2
- package/dist/{app-CwgKwO4j.js → app-Tr3kI1Wp.js} +13 -13
- package/dist/app.js +1 -1
- package/dist/{assets-D4ayW3GC.js → assets-D5-bgB4H.js} +61 -59
- package/dist/{index-BM7OisOh.js → index-DtJpO9_s.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-BNS0PTHj.js → payout-account-DLPHO8by.js} +2 -2
- package/dist/{plugins-DEpfQnZI.js → plugins-BdnYXXEh.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/Transaction-fhDUanwr.js +0 -250
- package/dist/TransactionOld-CObh3uJa.js +0 -99
- package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-DPRIp0wx.js +0 -351
|
@@ -0,0 +1,144 @@
|
|
|
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
|
+
import { e as p } from "./index-C4FfKmPS.js";
|
|
3
|
+
import "@feedmepos/ui-library";
|
|
4
|
+
import { g as y, a as A } from "./assets-D5-bgB4H.js";
|
|
5
|
+
const C = /* @__PURE__ */ c({
|
|
6
|
+
__name: "Status",
|
|
7
|
+
props: {
|
|
8
|
+
row: {},
|
|
9
|
+
data: {}
|
|
10
|
+
},
|
|
11
|
+
setup(o) {
|
|
12
|
+
const n = o;
|
|
13
|
+
function s() {
|
|
14
|
+
return n.data === p.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : n.data === p.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : n.data === p.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
|
15
|
+
}
|
|
16
|
+
return (e, _) => {
|
|
17
|
+
const u = a("FmBadge");
|
|
18
|
+
return r(), l(u, {
|
|
19
|
+
inline: "",
|
|
20
|
+
class: w(s())
|
|
21
|
+
}, {
|
|
22
|
+
default: i(() => [
|
|
23
|
+
m("div", null, h(e.data), 1)
|
|
24
|
+
]),
|
|
25
|
+
_: 1
|
|
26
|
+
}, 8, ["class"]);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}), N = ["src"], M = /* @__PURE__ */ c({
|
|
30
|
+
__name: "Gateway",
|
|
31
|
+
props: {
|
|
32
|
+
row: {},
|
|
33
|
+
data: {}
|
|
34
|
+
},
|
|
35
|
+
setup(o) {
|
|
36
|
+
return (n, s) => {
|
|
37
|
+
const e = a("FmTooltip");
|
|
38
|
+
return r(), l(e, {
|
|
39
|
+
variant: "plain",
|
|
40
|
+
placement: "top",
|
|
41
|
+
content: n.row.original.gateway,
|
|
42
|
+
"hide-arrow": !0
|
|
43
|
+
}, {
|
|
44
|
+
default: i(() => [
|
|
45
|
+
m("img", {
|
|
46
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
47
|
+
src: f(y)(n.row.original.gateway)
|
|
48
|
+
}, null, 8, N)
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
}, 8, ["content"]);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}), I = ["src"], P = /* @__PURE__ */ c({
|
|
55
|
+
__name: "Method",
|
|
56
|
+
props: {
|
|
57
|
+
row: {},
|
|
58
|
+
data: {}
|
|
59
|
+
},
|
|
60
|
+
setup(o) {
|
|
61
|
+
return (n, s) => {
|
|
62
|
+
const e = a("FmTooltip");
|
|
63
|
+
return r(), l(e, {
|
|
64
|
+
variant: "plain",
|
|
65
|
+
placement: "top",
|
|
66
|
+
content: n.row.original.method.issuer,
|
|
67
|
+
"hide-arrow": !0
|
|
68
|
+
}, {
|
|
69
|
+
default: i(() => [
|
|
70
|
+
m("img", {
|
|
71
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
72
|
+
src: f(A)(n.row.original.method.issuer, n.row.original.method.variant)
|
|
73
|
+
}, null, 8, I)
|
|
74
|
+
]),
|
|
75
|
+
_: 1
|
|
76
|
+
}, 8, ["content"]);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}), q = /* @__PURE__ */ c({
|
|
80
|
+
__name: "Actions",
|
|
81
|
+
props: {
|
|
82
|
+
onAction: { type: Function },
|
|
83
|
+
transaction: {}
|
|
84
|
+
},
|
|
85
|
+
setup(o) {
|
|
86
|
+
const n = [
|
|
87
|
+
o.transaction.flags.query && {
|
|
88
|
+
label: "Query",
|
|
89
|
+
sublabel: "Perform transaction status inquriy",
|
|
90
|
+
icon: "question_answer",
|
|
91
|
+
action: "query"
|
|
92
|
+
},
|
|
93
|
+
o.transaction.flags.refund && {
|
|
94
|
+
label: "Refund",
|
|
95
|
+
sublabel: "Perform transaction refund request",
|
|
96
|
+
icon: "request_page",
|
|
97
|
+
action: "refund"
|
|
98
|
+
},
|
|
99
|
+
o.transaction.flags.notify && {
|
|
100
|
+
label: "Notify",
|
|
101
|
+
sublabel: "Perform webhook notification for transaction",
|
|
102
|
+
icon: "webhook",
|
|
103
|
+
action: "notify"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: "Log",
|
|
107
|
+
sublabel: "Inspect transaction historical actions, requests and responses.",
|
|
108
|
+
icon: "history",
|
|
109
|
+
action: "history"
|
|
110
|
+
}
|
|
111
|
+
];
|
|
112
|
+
return (s, e) => {
|
|
113
|
+
const _ = a("FmIcon"), u = a("FmMenuItem"), g = a("FmMenu");
|
|
114
|
+
return r(), d("div", {
|
|
115
|
+
onClick: e[0] || (e[0] = (t) => {
|
|
116
|
+
t.stopPropagation();
|
|
117
|
+
})
|
|
118
|
+
}, [
|
|
119
|
+
b(g, null, {
|
|
120
|
+
"menu-button": i(() => [
|
|
121
|
+
b(_, { name: "settings" })
|
|
122
|
+
]),
|
|
123
|
+
default: i(() => [
|
|
124
|
+
(r(!0), d(F, null, T(n.filter((t) => !!t), (t) => (r(), l(u, {
|
|
125
|
+
selectable: !0,
|
|
126
|
+
key: t.label,
|
|
127
|
+
sublabel: t.sublabel,
|
|
128
|
+
label: t.label,
|
|
129
|
+
icon: t.icon,
|
|
130
|
+
onclick: () => s.onAction(t.action)
|
|
131
|
+
}, null, 8, ["sublabel", "label", "icon", "onclick"]))), 128))
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
})
|
|
135
|
+
]);
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
export {
|
|
140
|
+
M as _,
|
|
141
|
+
P as a,
|
|
142
|
+
C as b,
|
|
143
|
+
q as c
|
|
144
|
+
};
|
|
@@ -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-DtJpO9_s.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-DLPHO8by.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-DtJpO9_s.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-DLPHO8by.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",
|
|
@@ -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-DtJpO9_s.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";
|
|
@@ -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-DtJpO9_s.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 = {
|
|
@@ -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-DLPHO8by.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-DLPHO8by.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-Tr3kI1Wp.js";
|
|
11
|
+
import "./plugins-BdnYXXEh.js";
|
|
12
12
|
import { _ as uA } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
|
13
13
|
function wA() {
|
|
14
14
|
return {
|
|
@@ -322,10 +322,9 @@ const X = /* @__PURE__ */ C({
|
|
|
322
322
|
modelValue: y.value,
|
|
323
323
|
"onUpdate:modelValue": o[1] || (o[1] = (p) => y.value = p),
|
|
324
324
|
"shrink-at": !1,
|
|
325
|
-
"search-value": b.value,
|
|
326
325
|
"row-data": f.value,
|
|
327
326
|
"column-defs": h
|
|
328
|
-
}, null, 8, ["modelValue", "
|
|
327
|
+
}, null, 8, ["modelValue", "row-data"])
|
|
329
328
|
], 64);
|
|
330
329
|
};
|
|
331
330
|
}
|
|
@@ -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-D5-bgB4H.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-D5-bgB4H.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";
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import { defineComponent as j, ref as D, watch as P, computed as q, onMounted as J, resolveComponent as h, openBlock as g, createElementBlock as k, Fragment as Y, unref as n, createBlock as x, createCommentVNode as L, withCtx as S, createVNode as p, renderList as O, createElementVNode as I, isRef as A, h as U } from "vue";
|
|
2
|
+
import { t as E, c as w } from "./assets-D5-bgB4H.js";
|
|
3
|
+
import { h as B } from "./moment-h96o7c8I.js";
|
|
4
|
+
import { useI18n as z, useCoreStore as Q } from "@feedmepos/mf-common";
|
|
5
|
+
import { _ as W } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
|
6
|
+
import { u as X } from "./index-ILoz50zh.js";
|
|
7
|
+
import { _ as Z } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
8
|
+
import { _ as ee } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
|
9
|
+
import { _ as ae } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
|
10
|
+
import { p as te } from "./index-BWjmOoX3.js";
|
|
11
|
+
import { t as ne } from "./index-C8G7ruiF.js";
|
|
12
|
+
import { u as re, p as F } from "./index-C4FfKmPS.js";
|
|
13
|
+
import { useSnackbar as se, useDialog as oe } from "@feedmepos/ui-library";
|
|
14
|
+
import { _ as le, a as ie, b as ce, c as ue } from "./Actions.vue_vue_type_script_setup_true_lang-B9x3HkUm.js";
|
|
15
|
+
import { g as me } from "./grafana-BrdrOUM4.js";
|
|
16
|
+
import { w as G } from "./Modal-DB8M9o1T.js";
|
|
17
|
+
import { u as $ } from "./error-K1CakhA9.js";
|
|
18
|
+
import { _ as de } from "./index.vue_vue_type_script_setup_true_lang-v7o6C5Pg.js";
|
|
19
|
+
const pe = /* @__PURE__ */ j({
|
|
20
|
+
__name: "SourceSelector",
|
|
21
|
+
props: {
|
|
22
|
+
id: {},
|
|
23
|
+
by: {}
|
|
24
|
+
},
|
|
25
|
+
emits: ["update:id", "update:by"],
|
|
26
|
+
setup(H, { emit: m }) {
|
|
27
|
+
const C = m, { t: i } = z(), { restaurants: s, currentBusiness: T, readRestaurants: y } = Q(), { isLoading: f, startAsyncCall: u } = re(!0), _ = D([]), v = D([]), c = D();
|
|
28
|
+
P(c, () => {
|
|
29
|
+
c.value && (C("update:id", c.value.value), C("update:by", c.value.by));
|
|
30
|
+
});
|
|
31
|
+
const V = q(() => [
|
|
32
|
+
s.value.length > 0 && "payment.components.restaurant",
|
|
33
|
+
v.value.length > 0 && "payment.components.device",
|
|
34
|
+
_.value.length > 0 && "payment.components.payout_account"
|
|
35
|
+
].filter((t) => !!t)), R = q(() => ({
|
|
36
|
+
"payment.components.restaurant": s.value.filter((t) => t.managable).map((t) => ({
|
|
37
|
+
by: "RESTAURANT",
|
|
38
|
+
prefix: i("payment.components.restaurant"),
|
|
39
|
+
label: t.profile.name,
|
|
40
|
+
value: t._id
|
|
41
|
+
})),
|
|
42
|
+
"payment.components.device": v.value.filter((t) => t.deviceType).map((t) => ({
|
|
43
|
+
by: "DEVICE",
|
|
44
|
+
prefix: i("payment.components.device"),
|
|
45
|
+
label: t.deviceType + " | " + (t.deviceType === "TERMINAL" ? t.name : t.restaurant.profile.name),
|
|
46
|
+
value: t._id
|
|
47
|
+
})),
|
|
48
|
+
"payment.components.payout_account": _.value.filter((t) => t.store.event).map((t) => {
|
|
49
|
+
var b, a;
|
|
50
|
+
return {
|
|
51
|
+
by: "PAYOUT_ACCOUNT",
|
|
52
|
+
prefix: i("payment.components.payout_account"),
|
|
53
|
+
label: t.store.event + " | " + (((a = (b = t.ref) == null ? void 0 : b.profile) == null ? void 0 : a.name) ?? t.ref.name),
|
|
54
|
+
value: t._id
|
|
55
|
+
};
|
|
56
|
+
})
|
|
57
|
+
}));
|
|
58
|
+
async function K() {
|
|
59
|
+
return u(async () => {
|
|
60
|
+
let t = await te.readBusinessPayoutAccounts();
|
|
61
|
+
t.length !== 0 && (_.value = t);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
async function M() {
|
|
65
|
+
return u(async () => {
|
|
66
|
+
let t = await ne.getBusinessTerminals();
|
|
67
|
+
t.length !== 0 && (v.value = t);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async function N() {
|
|
71
|
+
f.value = !0, await K(), await y(), await M(), f.value = !1;
|
|
72
|
+
}
|
|
73
|
+
return J(N), P(T, N), (t, b) => {
|
|
74
|
+
const a = h("FmCircularProgress"), e = h("FmChip"), r = h("FmMenuItem"), l = h("FmMenu");
|
|
75
|
+
return g(), k(Y, null, [
|
|
76
|
+
n(f) ? (g(), x(a, {
|
|
77
|
+
key: 0,
|
|
78
|
+
size: "md"
|
|
79
|
+
})) : L("", !0),
|
|
80
|
+
n(f) ? L("", !0) : (g(), x(l, { key: 1 }, {
|
|
81
|
+
"menu-button": S(() => {
|
|
82
|
+
var o;
|
|
83
|
+
return [
|
|
84
|
+
p(e, {
|
|
85
|
+
icon: "account_box",
|
|
86
|
+
label: c.value ? c.value.prefix + " > " + ((o = c.value) == null ? void 0 : o.label) : n(i)("payment.components.select"),
|
|
87
|
+
removable: !!c.value,
|
|
88
|
+
onChipClosed: b[0] || (b[0] = (d) => c.value = void 0)
|
|
89
|
+
}, null, 8, ["label", "removable"])
|
|
90
|
+
];
|
|
91
|
+
}),
|
|
92
|
+
default: S(() => [
|
|
93
|
+
(g(!0), k(Y, null, O(V.value, (o) => (g(), x(l, {
|
|
94
|
+
placement: "right-start",
|
|
95
|
+
width: 200
|
|
96
|
+
}, {
|
|
97
|
+
"menu-button": S(() => [
|
|
98
|
+
p(r, {
|
|
99
|
+
label: n(i)(o),
|
|
100
|
+
expandable: ""
|
|
101
|
+
}, null, 8, ["label"])
|
|
102
|
+
]),
|
|
103
|
+
default: S(() => [
|
|
104
|
+
(g(!0), k(Y, null, O(R.value[o], (d) => (g(), x(r, {
|
|
105
|
+
onClick: (be) => c.value = d,
|
|
106
|
+
key: d.value,
|
|
107
|
+
label: d.label,
|
|
108
|
+
selectable: ""
|
|
109
|
+
}, null, 8, ["onClick", "label"]))), 128))
|
|
110
|
+
]),
|
|
111
|
+
_: 2
|
|
112
|
+
}, 1024))), 256))
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
}))
|
|
116
|
+
], 64);
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}), ye = { class: "flex justify-between mb-6 items-center" }, fe = { class: "flex space-x-8 items-start" }, _e = { class: "flex space-x-4 self-center" }, ve = { class: "flex space-x-12 mb-6" }, Ye = /* @__PURE__ */ j({
|
|
120
|
+
__name: "Transaction",
|
|
121
|
+
setup(H) {
|
|
122
|
+
var t, b;
|
|
123
|
+
const m = se(), C = oe(), { sessionUser: i } = Q(), { t: s } = z(), T = D(), { dateRange: y, searchKey: f, status: u, id: _, by: v } = X({
|
|
124
|
+
by: "",
|
|
125
|
+
id: "",
|
|
126
|
+
searchKey: "",
|
|
127
|
+
status: [F.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
|
128
|
+
dateRange: {
|
|
129
|
+
startDate: B().startOf("day").format("YYYY-MM-DD"),
|
|
130
|
+
endDate: B().endOf("day").format("YYYY-MM-DD")
|
|
131
|
+
}
|
|
132
|
+
}), c = [
|
|
133
|
+
{
|
|
134
|
+
label: "Success",
|
|
135
|
+
value: F.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
label: "Refunded",
|
|
139
|
+
value: F.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
label: "Process",
|
|
143
|
+
value: F.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
label: "Failed",
|
|
147
|
+
value: F.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
|
148
|
+
}
|
|
149
|
+
];
|
|
150
|
+
async function V(a, e) {
|
|
151
|
+
var r;
|
|
152
|
+
try {
|
|
153
|
+
const l = await E.refetchTransaction({ transactionId: a.id });
|
|
154
|
+
(r = T.value) == null || r.replaceData(e, w(l)), m.open({
|
|
155
|
+
type: "success",
|
|
156
|
+
title: "Transaction queried and updated successfully."
|
|
157
|
+
});
|
|
158
|
+
} catch (l) {
|
|
159
|
+
m.open({
|
|
160
|
+
type: "error",
|
|
161
|
+
title: "Fail to query transaction.",
|
|
162
|
+
message: $(l)
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
async function R(a, e) {
|
|
167
|
+
G(
|
|
168
|
+
C,
|
|
169
|
+
"Refund Transaction",
|
|
170
|
+
"Are you sure to refund transaction? This action cannot be revert!",
|
|
171
|
+
async () => {
|
|
172
|
+
var r;
|
|
173
|
+
try {
|
|
174
|
+
const l = await E.refundTransaction({
|
|
175
|
+
transactionId: a.id,
|
|
176
|
+
reason: "portal transaction refund",
|
|
177
|
+
amount: a.fdoAmount
|
|
178
|
+
});
|
|
179
|
+
(r = T.value) == null || r.replaceData(e, w(l)), m.open({
|
|
180
|
+
type: "success",
|
|
181
|
+
title: "Transaction refund request initiated."
|
|
182
|
+
});
|
|
183
|
+
} catch (l) {
|
|
184
|
+
m.open({
|
|
185
|
+
type: "error",
|
|
186
|
+
title: "Fail to request refund transaction.",
|
|
187
|
+
message: $(l)
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
async function K(a, e) {
|
|
194
|
+
G(
|
|
195
|
+
C,
|
|
196
|
+
"Notify Transaction",
|
|
197
|
+
"Are you sure to perform notify transaction?",
|
|
198
|
+
async () => {
|
|
199
|
+
try {
|
|
200
|
+
await E.renotifyTransaction(a.id), m.open({
|
|
201
|
+
type: "success",
|
|
202
|
+
title: "Transaction notify successfully."
|
|
203
|
+
});
|
|
204
|
+
} catch (r) {
|
|
205
|
+
m.open({
|
|
206
|
+
type: "error",
|
|
207
|
+
title: "Fail to notify transaction.",
|
|
208
|
+
message: $(r)
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
async function M(a, e) {
|
|
215
|
+
const r = me([
|
|
216
|
+
{
|
|
217
|
+
type: "span",
|
|
218
|
+
queryKey: "transaction.id",
|
|
219
|
+
queryValue: a.id
|
|
220
|
+
}
|
|
221
|
+
], a.transactionAt);
|
|
222
|
+
window.open(r, "_blank");
|
|
223
|
+
}
|
|
224
|
+
D("");
|
|
225
|
+
const N = [
|
|
226
|
+
{
|
|
227
|
+
header: () => s("payment.transactions.table.id"),
|
|
228
|
+
accessorKey: "id",
|
|
229
|
+
cell: ({ cell: a, row: e }) => {
|
|
230
|
+
var r, l;
|
|
231
|
+
return ((r = i.value) != null && r.role.isStaff || (l = i.value) != null && l.role.isAdmin) && e.original.transactionId ? e.original.id + `
|
|
232
|
+
ID: ` + e.original.transactionId : e.original.id;
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
header: () => s("payment.transactions.table.pay_id"),
|
|
237
|
+
accessorKey: "payId"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
header: () => s("payment.transactions.table.gateway_id"),
|
|
241
|
+
accessorKey: "gatewayTransactionId"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
header: () => s("payment.transactions.table.bill_seq"),
|
|
245
|
+
accessorKey: "seqNumber"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
header: () => s("payment.transactions.table.gateway"),
|
|
249
|
+
accessorKey: "gateway",
|
|
250
|
+
meta: {
|
|
251
|
+
textAlign: "center"
|
|
252
|
+
},
|
|
253
|
+
cell: ({ cell: a, row: e }) => e.original.gateway ? U(le, { row: e, data: a.getValue() }) : ""
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
header: () => s("payment.transactions.table.method"),
|
|
257
|
+
accessorKey: "method",
|
|
258
|
+
meta: {
|
|
259
|
+
textAlign: "center"
|
|
260
|
+
},
|
|
261
|
+
cell: ({ cell: a, row: e }) => e.original.method ? U(ie, { row: e, data: a.getValue() }) : ""
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
header: () => s("payment.transactions.table.type"),
|
|
265
|
+
accessorKey: "payFor",
|
|
266
|
+
meta: {
|
|
267
|
+
textAlign: "center"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
header: () => s("payment.transactions.table.status"),
|
|
272
|
+
accessorKey: "status",
|
|
273
|
+
cell: ({ cell: a, row: e }) => U(ce, { row: e, data: a.getValue() })
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
header: () => s("payment.transactions.table.restaurant"),
|
|
277
|
+
accessorKey: "restaurantId"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
header: () => s("payment.transactions.table.source"),
|
|
281
|
+
accessorKey: "source",
|
|
282
|
+
cell: ({ cell: a, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
header: () => s("payment.transactions.table.transaction_at"),
|
|
286
|
+
accessorKey: "transactionAt",
|
|
287
|
+
meta: {
|
|
288
|
+
width: "180px"
|
|
289
|
+
},
|
|
290
|
+
cell: ({ cell: a, row: e }) => e.original.status === "REFUNDED" ? e.original.refundedAt : e.original.transactionAt
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
header: () => s("payment.transactions.table.sales_amount"),
|
|
294
|
+
accessorKey: "amount",
|
|
295
|
+
cell: ({ cell: a, row: e }) => {
|
|
296
|
+
var r, l;
|
|
297
|
+
return ((r = i.value) != null && r.role.isStaff || (l = i.value) != null && l.role.isAdmin) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
];
|
|
301
|
+
return ((t = i.value) != null && t.role.isStaff || (b = i.value) != null && b.role.isAdmin) && N.push({
|
|
302
|
+
header: () => s("payment.transactions.table.actions"),
|
|
303
|
+
accessorKey: "actions",
|
|
304
|
+
cell: ({ row: a }) => U(ue, {
|
|
305
|
+
transaction: a.original,
|
|
306
|
+
onAction: (e) => {
|
|
307
|
+
var r;
|
|
308
|
+
switch (e) {
|
|
309
|
+
case "notify":
|
|
310
|
+
return K(a.original, a.index);
|
|
311
|
+
case "query":
|
|
312
|
+
return V(a.original, a.index);
|
|
313
|
+
case "refund":
|
|
314
|
+
return (r = i.value) != null && r.role.isStaff ? m.open({
|
|
315
|
+
type: "error",
|
|
316
|
+
title: "You are not allowed to refund transaction."
|
|
317
|
+
}) : R(a.original, a.index);
|
|
318
|
+
case "history":
|
|
319
|
+
return M(a.original, a.index);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
})
|
|
323
|
+
}), (a, e) => {
|
|
324
|
+
const r = h("FmSearch"), l = h("FmSelect");
|
|
325
|
+
return g(), x(W, {
|
|
326
|
+
title: n(s)("payment.transactions.title"),
|
|
327
|
+
description: n(s)("payment.transactions.description"),
|
|
328
|
+
loading: !1
|
|
329
|
+
}, {
|
|
330
|
+
default: S(() => [
|
|
331
|
+
I("div", ye, [
|
|
332
|
+
I("div", fe, [
|
|
333
|
+
p(r, {
|
|
334
|
+
"model-value": n(f),
|
|
335
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => A(f) ? f.value = o : null),
|
|
336
|
+
class: "mr-8",
|
|
337
|
+
label: n(s)("payment.transactions.search.title"),
|
|
338
|
+
placeholder: n(s)("payment.transactions.search.placeholder")
|
|
339
|
+
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
340
|
+
p(l, {
|
|
341
|
+
modelValue: n(u),
|
|
342
|
+
"onUpdate:modelValue": e[2] || (e[2] = (o) => A(u) ? u.value = o : null),
|
|
343
|
+
class: "mr-6 w-[300px]",
|
|
344
|
+
label: n(s)("payment.transactions.status"),
|
|
345
|
+
"label-mark": "required",
|
|
346
|
+
multiselect: "",
|
|
347
|
+
items: c
|
|
348
|
+
}, {
|
|
349
|
+
"prepend-menu": S(() => [
|
|
350
|
+
p(ee, {
|
|
351
|
+
modelValue: n(u),
|
|
352
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => A(u) ? u.value = o : null),
|
|
353
|
+
items: c
|
|
354
|
+
}, null, 8, ["modelValue"])
|
|
355
|
+
]),
|
|
356
|
+
_: 1
|
|
357
|
+
}, 8, ["modelValue", "label"])
|
|
358
|
+
]),
|
|
359
|
+
I("div", _e, [
|
|
360
|
+
p(Z, {
|
|
361
|
+
button: {
|
|
362
|
+
appendIcon: "file_download",
|
|
363
|
+
variant: "primary",
|
|
364
|
+
label: n(s)("payment.transactions.button.export")
|
|
365
|
+
},
|
|
366
|
+
handler: async () => {
|
|
367
|
+
var d;
|
|
368
|
+
const o = await ((d = T.value) == null ? void 0 : d.allData());
|
|
369
|
+
o != null && await n(E).downloadPortalTransactionReport(n(y), o);
|
|
370
|
+
}
|
|
371
|
+
}, null, 8, ["button", "handler"])
|
|
372
|
+
])
|
|
373
|
+
]),
|
|
374
|
+
I("div", ve, [
|
|
375
|
+
p(pe, {
|
|
376
|
+
id: n(_),
|
|
377
|
+
"onUpdate:id": e[3] || (e[3] = (o) => A(_) ? _.value = o : null),
|
|
378
|
+
by: n(v),
|
|
379
|
+
"onUpdate:by": e[4] || (e[4] = (o) => A(v) ? v.value = o : null)
|
|
380
|
+
}, null, 8, ["id", "by"]),
|
|
381
|
+
p(ae, {
|
|
382
|
+
modelValue: n(y),
|
|
383
|
+
"onUpdate:modelValue": e[5] || (e[5] = (o) => A(y) ? y.value = o : null)
|
|
384
|
+
}, null, 8, ["modelValue"])
|
|
385
|
+
]),
|
|
386
|
+
p(de, {
|
|
387
|
+
ref_key: "controller",
|
|
388
|
+
ref: T,
|
|
389
|
+
"column-defs": N,
|
|
390
|
+
"rows-defs": n(w),
|
|
391
|
+
paginate: (o, d) => n(E).readTransactionsV2({
|
|
392
|
+
limit: o,
|
|
393
|
+
cursor: d,
|
|
394
|
+
status: n(u),
|
|
395
|
+
by: n(v),
|
|
396
|
+
id: n(_),
|
|
397
|
+
start: n(y).startDate,
|
|
398
|
+
end: n(y).endDate
|
|
399
|
+
})
|
|
400
|
+
}, null, 8, ["rows-defs", "paginate"])
|
|
401
|
+
]),
|
|
402
|
+
_: 1
|
|
403
|
+
}, 8, ["title", "description"]);
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
export {
|
|
408
|
+
Ye as default
|
|
409
|
+
};
|
|
@@ -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-D5-bgB4H.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";
|