@feedmepos/mf-payment 1.0.5 → 1.0.7-beta.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/{PayoutAccount-BwBgS41r.js → PayoutAccount-BWu1OEyp.js} +5 -5
- package/dist/{PayoutAccount-B6kGeSLY.js → PayoutAccount-BxdMH0pl.js} +3 -3
- package/dist/PayoutAccountSelector.vue_vue_type_script_setup_true_lang-BiUxmjU6.js +110 -0
- package/dist/{PayoutAccountSetting-C1yeSNv8.js → PayoutAccountSetting-Zah_ik81.js} +4 -4
- package/dist/Restaurant-DJ01O5GW.js +305 -0
- package/dist/{RestaurantSetting-CWZAKz1A.js → RestaurantSetting-BD_aUt1i.js} +4 -4
- package/dist/{Settlement-BKwie9R8.js → Settlement-CTLIBeZ3.js} +3 -3
- package/dist/{Settlement-ByPXBNx1.js → Settlement-GGdPYvXy.js} +3 -3
- package/dist/{SettlementTransactions-BGGqKJgP.js → SettlementTransactions-C5j-0Qbw.js} +4 -4
- package/dist/{SettlementTransactions-BPEh0mSi.js → SettlementTransactions-D35tIT61.js} +4 -4
- package/dist/Terminal-Cwj4vJ6A.js +404 -0
- package/dist/{TerminalSetting-qklmRz3H.js → TerminalSetting-CACWRHic.js} +3 -3
- package/dist/TerminalTransaction-B15ICpAD.js +819 -0
- package/dist/{TerminalTransaction-YXcGJ2ne.js → TerminalTransaction-BTHSxX6X.js} +184 -154
- package/dist/Transaction-BZqqi5qu.js +145 -0
- package/dist/{Transaction-IDcY01Oi.js → Transaction-tcV33ufA.js} +81 -48
- package/dist/TransactionOld-CgJdUs7l.js +99 -0
- package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-qZA8uWSK.js +151 -0
- package/dist/api/terminal-transaction/index.d.ts +2 -1
- package/dist/api/transaction/index.d.ts +8 -1
- package/dist/{app-CjbTCCDJ.js → app-DdZ90tIN.js} +504 -491
- package/dist/app.js +1 -1
- package/dist/{assets-DjRoCcqv.js → assets-D-ueIWdy.js} +1 -1
- package/dist/components/PayoutAccountSelector.vue.d.ts +23 -0
- package/dist/grafana-BRDqWauv.js +49 -0
- package/dist/helpers/grafana.d.ts +7 -0
- package/dist/{index-DFePh4ct.js → index-BhsQ9z_N.js} +1 -1
- package/dist/{index-BWFqxSU3.js → index-Bm9-P-jw.js} +1 -1
- package/dist/{index-BEFlDEyV.js → index-CJe9qD5G.js} +1 -1
- package/dist/{index-CWGSYCJG.js → index-CUCDe-b5.js} +1 -1
- package/dist/{index-Bp_58SiC.js → index-DNxicJBc.js} +1 -1
- package/dist/{index-Dj_LwPBy.js → index-DQsvadHF.js} +8489 -8321
- package/dist/{index-BerQZMQW.js → index-NnxZlW-g.js} +1 -1
- package/dist/{index-CKyh0nlu.js → index-ocpyheIn.js} +13 -9
- package/dist/{index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js → index.vue_vue_type_script_setup_true_lang-CoiUD4O5.js} +1 -1
- package/dist/model/transaction.d.ts +2 -0
- package/dist/package.json +3 -3
- package/dist/{payout-account-ByuqS-Ea.js → payout-account-DwUA_Nmx.js} +2 -2
- package/dist/router/index.d.ts +1 -0
- package/dist/stores/payoutAccount.d.ts +4 -4
- package/dist/transaction-D4S3PvuQ.js +118 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/cell/LogButton.vue.d.ts +5 -0
- package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +3 -1
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
- package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
- package/dist/views/transaction/TransactionOld.vue.d.ts +2 -0
- package/package.json +3 -3
- package/dist/Restaurant-B02jty0J.js +0 -262
- package/dist/Terminal-DX8v8WpM.js +0 -386
- package/dist/TerminalTransaction-64Bn6vh0.js +0 -261
- package/dist/Transaction-DMw2p-Wq.js +0 -238
- package/dist/transaction-Cyw84Cks.js +0 -101
@@ -0,0 +1,145 @@
|
|
1
|
+
import { defineComponent as Y, ref as E, onMounted as b, watch as T, resolveComponent as y, openBlock as w, createBlock as D, withCtx as x, createElementVNode as _, createVNode as n, unref as o, isRef as m } from "vue";
|
2
|
+
import { t as V, a as F } from "./transaction-D4S3PvuQ.js";
|
3
|
+
import { _ as d, u as I } from "./index-DQsvadHF.js";
|
4
|
+
import { _ as M } from "./TransactionTable.vue_vue_type_script_setup_true_lang-qZA8uWSK.js";
|
5
|
+
import { h as g } from "./moment-h96o7c8I.js";
|
6
|
+
import { useCoreStore as O } from "@feedmepos/mf-common";
|
7
|
+
import { _ as P } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
8
|
+
import { u as $ } from "./index-NnxZlW-g.js";
|
9
|
+
import { _ as k } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
10
|
+
import { _ as L } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
11
|
+
import { _ as B } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
12
|
+
import { _ as J } from "./PayoutAccountSelector.vue_vue_type_script_setup_true_lang-BiUxmjU6.js";
|
13
|
+
const K = { class: "flex justify-between mb-6 items-center" }, j = { class: "flex space-x-8 items-start" }, q = { class: "flex space-x-4 self-center" }, G = { class: "flex space-x-12 mb-6" }, re = /* @__PURE__ */ Y({
|
14
|
+
__name: "Transaction",
|
15
|
+
setup(Q) {
|
16
|
+
const { dateRange: r, searchKey: l, accountId: s, status: t } = $({
|
17
|
+
accountId: "",
|
18
|
+
searchKey: "",
|
19
|
+
status: [d.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
20
|
+
dateRange: {
|
21
|
+
startDate: g().startOf("day").format("YYYY-MM-DD"),
|
22
|
+
endDate: g().endOf("day").format("YYYY-MM-DD")
|
23
|
+
}
|
24
|
+
}), { isLoading: C, startAsyncCall: h } = I(!0), { currentBusiness: R } = O(), u = E([]), c = E([]);
|
25
|
+
async function S() {
|
26
|
+
s.value && await h(async () => {
|
27
|
+
const { startDate: f, endDate: e } = r.value, i = await V.readAccountTransactions({
|
28
|
+
status: t.value,
|
29
|
+
accountId: s.value,
|
30
|
+
start: f,
|
31
|
+
end: e
|
32
|
+
});
|
33
|
+
if (u.value = F(i), c.value = u.value, l.value > "") {
|
34
|
+
var v = new RegExp(l.value, "i");
|
35
|
+
c.value = u.value.filter((a) => {
|
36
|
+
const U = JSON.stringify(a);
|
37
|
+
return v.test(U);
|
38
|
+
});
|
39
|
+
}
|
40
|
+
});
|
41
|
+
}
|
42
|
+
function A() {
|
43
|
+
S();
|
44
|
+
}
|
45
|
+
b(A), T(R, A), T([s, r, t], S);
|
46
|
+
let p;
|
47
|
+
T(l, async () => {
|
48
|
+
p && clearTimeout(p), p = setTimeout(() => {
|
49
|
+
var f = new RegExp(l.value, "i");
|
50
|
+
c.value = u.value.filter((e) => {
|
51
|
+
const i = JSON.stringify(e);
|
52
|
+
return f.test(i);
|
53
|
+
});
|
54
|
+
}, 700);
|
55
|
+
});
|
56
|
+
const N = [
|
57
|
+
{
|
58
|
+
label: "Success",
|
59
|
+
value: d.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
60
|
+
},
|
61
|
+
{
|
62
|
+
label: "Refunded",
|
63
|
+
value: d.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
64
|
+
},
|
65
|
+
{
|
66
|
+
label: "Process",
|
67
|
+
value: d.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
68
|
+
},
|
69
|
+
{
|
70
|
+
label: "Failed",
|
71
|
+
value: d.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
72
|
+
}
|
73
|
+
];
|
74
|
+
return (f, e) => {
|
75
|
+
const i = y("FmSearch"), v = y("FmSelect");
|
76
|
+
return w(), D(P, {
|
77
|
+
title: "Online Transactions",
|
78
|
+
description: "Transactions are purchases or payments made over the internet using electronic methods like cards or digital wallets.",
|
79
|
+
loading: !1
|
80
|
+
}, {
|
81
|
+
default: x(() => [
|
82
|
+
_("div", K, [
|
83
|
+
_("div", j, [
|
84
|
+
n(i, {
|
85
|
+
"model-value": o(l),
|
86
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => m(l) ? l.value = a : null),
|
87
|
+
class: "mr-8",
|
88
|
+
label: "Search",
|
89
|
+
placeholder: "Search Transactions ..."
|
90
|
+
}, null, 8, ["model-value"]),
|
91
|
+
n(v, {
|
92
|
+
modelValue: o(t),
|
93
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => m(t) ? t.value = a : null),
|
94
|
+
class: "mr-6 w-[300px]",
|
95
|
+
label: "Status",
|
96
|
+
"label-mark": "required",
|
97
|
+
multiselect: "",
|
98
|
+
items: N
|
99
|
+
}, {
|
100
|
+
"prepend-menu": x(() => [
|
101
|
+
n(L, {
|
102
|
+
modelValue: o(t),
|
103
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => m(t) ? t.value = a : null),
|
104
|
+
items: N
|
105
|
+
}, null, 8, ["modelValue"])
|
106
|
+
]),
|
107
|
+
_: 1
|
108
|
+
}, 8, ["modelValue"])
|
109
|
+
]),
|
110
|
+
_("div", q, [
|
111
|
+
n(k, {
|
112
|
+
button: {
|
113
|
+
appendIcon: "file_download",
|
114
|
+
variant: "primary",
|
115
|
+
label: "Export"
|
116
|
+
},
|
117
|
+
handler: async () => {
|
118
|
+
await o(V).downloadPortalTransactionReport(u.value);
|
119
|
+
}
|
120
|
+
}, null, 8, ["handler"])
|
121
|
+
])
|
122
|
+
]),
|
123
|
+
_("div", G, [
|
124
|
+
n(J, {
|
125
|
+
modelValue: o(s),
|
126
|
+
"onUpdate:modelValue": e[3] || (e[3] = (a) => m(s) ? s.value = a : null)
|
127
|
+
}, null, 8, ["modelValue"]),
|
128
|
+
n(B, {
|
129
|
+
modelValue: o(r),
|
130
|
+
"onUpdate:modelValue": e[4] || (e[4] = (a) => m(r) ? r.value = a : null)
|
131
|
+
}, null, 8, ["modelValue"])
|
132
|
+
]),
|
133
|
+
n(M, {
|
134
|
+
loading: o(C),
|
135
|
+
data: c.value
|
136
|
+
}, null, 8, ["loading", "data"])
|
137
|
+
]),
|
138
|
+
_: 1
|
139
|
+
});
|
140
|
+
};
|
141
|
+
}
|
142
|
+
});
|
143
|
+
export {
|
144
|
+
re as default
|
145
|
+
};
|
@@ -1,18 +1,19 @@
|
|
1
|
-
import { defineComponent as b, resolveComponent as g, openBlock as p, createBlock as E, normalizeClass as
|
2
|
-
import { t as
|
1
|
+
import { defineComponent as b, resolveComponent as g, openBlock as p, createBlock as E, normalizeClass as R, withCtx as w, createElementVNode as h, toDisplayString as V, createElementBlock as A, unref as u, createVNode as d, Fragment as Y, renderList as $, ref as C, watch as N, isRef as v, h as y } from "vue";
|
2
|
+
import { t as _, a as P, b as I } from "./transaction-D4S3PvuQ.js";
|
3
3
|
import { h as T } from "./moment-h96o7c8I.js";
|
4
|
-
import { u as
|
4
|
+
import { u as L } from "./index-NnxZlW-g.js";
|
5
5
|
import { _ as B } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
6
|
-
import { _ as
|
7
|
-
import { useSnackbar as
|
6
|
+
import { _ as U } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
7
|
+
import { useSnackbar as G, useDialog as j } from "@feedmepos/ui-library";
|
8
8
|
import { w as D } from "./Modal-DB8M9o1T.js";
|
9
9
|
import { u as x } from "./error-K1CakhA9.js";
|
10
|
-
import { _ as
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
import {
|
15
|
-
|
10
|
+
import { _ as Q } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
11
|
+
import { g as z } from "./grafana-BRDqWauv.js";
|
12
|
+
import { _ as H } from "./index.vue_vue_type_script_setup_true_lang-CoiUD4O5.js";
|
13
|
+
import { e as S } from "./index-DQsvadHF.js";
|
14
|
+
import { g as J, a as W } from "./assets-D-ueIWdy.js";
|
15
|
+
import { _ as X } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
16
|
+
const Z = /* @__PURE__ */ b({
|
16
17
|
__name: "Status",
|
17
18
|
props: {
|
18
19
|
row: {},
|
@@ -27,16 +28,16 @@ const W = /* @__PURE__ */ b({
|
|
27
28
|
const m = g("FmBadge");
|
28
29
|
return p(), E(m, {
|
29
30
|
inline: "",
|
30
|
-
class:
|
31
|
+
class: R(o())
|
31
32
|
}, {
|
32
33
|
default: w(() => [
|
33
|
-
h("div", null,
|
34
|
+
h("div", null, V(i.data), 1)
|
34
35
|
]),
|
35
36
|
_: 1
|
36
37
|
}, 8, ["class"]);
|
37
38
|
};
|
38
39
|
}
|
39
|
-
}),
|
40
|
+
}), ee = ["src"], te = /* @__PURE__ */ b({
|
40
41
|
__name: "Gateway",
|
41
42
|
props: {
|
42
43
|
row: {},
|
@@ -45,10 +46,10 @@ const W = /* @__PURE__ */ b({
|
|
45
46
|
setup(f) {
|
46
47
|
return (a, o) => (p(), A("img", {
|
47
48
|
class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
|
48
|
-
src: u(
|
49
|
-
}, null, 8,
|
49
|
+
src: u(J)(a.row.original.gateway)
|
50
|
+
}, null, 8, ee));
|
50
51
|
}
|
51
|
-
}),
|
52
|
+
}), ae = ["src"], ne = /* @__PURE__ */ b({
|
52
53
|
__name: "Method",
|
53
54
|
props: {
|
54
55
|
row: {},
|
@@ -57,10 +58,10 @@ const W = /* @__PURE__ */ b({
|
|
57
58
|
setup(f) {
|
58
59
|
return (a, o) => (p(), A("img", {
|
59
60
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
60
|
-
src: u(
|
61
|
-
}, null, 8,
|
61
|
+
src: u(W)(a.row.original.method.issuer)
|
62
|
+
}, null, 8, ae));
|
62
63
|
}
|
63
|
-
}),
|
64
|
+
}), re = /* @__PURE__ */ b({
|
64
65
|
__name: "Actions",
|
65
66
|
props: {
|
66
67
|
onAction: { type: Function }
|
@@ -84,6 +85,12 @@ const W = /* @__PURE__ */ b({
|
|
84
85
|
sublabel: "Perform webhook notification for transaction",
|
85
86
|
icon: "webhook",
|
86
87
|
action: "notify"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
label: "Log",
|
91
|
+
sublabel: "Inspect transaction historical actions, requests and responses.",
|
92
|
+
icon: "history",
|
93
|
+
action: "history"
|
87
94
|
}
|
88
95
|
];
|
89
96
|
return (o, i) => {
|
@@ -98,7 +105,7 @@ const W = /* @__PURE__ */ b({
|
|
98
105
|
d(s, { name: "settings" })
|
99
106
|
]),
|
100
107
|
default: w(() => [
|
101
|
-
(p(), A(
|
108
|
+
(p(), A(Y, null, $(a, (c) => d(m, {
|
102
109
|
selectable: !0,
|
103
110
|
key: c.label,
|
104
111
|
sublabel: c.sublabel,
|
@@ -112,19 +119,19 @@ const W = /* @__PURE__ */ b({
|
|
112
119
|
]);
|
113
120
|
};
|
114
121
|
}
|
115
|
-
}),
|
122
|
+
}), oe = { class: "flex justify-between mb-6 items-center" }, se = { class: "flex space-x-4" }, ce = { class: "flex space-x-4 self-center" }, ie = { class: "mb-6" }, xe = /* @__PURE__ */ b({
|
116
123
|
__name: "Transaction",
|
117
124
|
setup(f) {
|
118
|
-
const a =
|
125
|
+
const a = C(), { dateRange: o, searchKey: i } = L({
|
119
126
|
searchKey: "",
|
120
127
|
dateRange: {
|
121
128
|
startDate: T().startOf("day").format("YYYY-MM-DD"),
|
122
129
|
endDate: T().endOf("day").format("YYYY-MM-DD")
|
123
130
|
}
|
124
|
-
}), s =
|
131
|
+
}), s = G(), m = j(), F = async (e, t) => {
|
125
132
|
let r = parseInt(t);
|
126
133
|
Number.isNaN(r) && (r = 1);
|
127
|
-
const n = await
|
134
|
+
const n = await _.readTransactions({
|
128
135
|
start: T(o.value.startDate).startOf("day").toISOString(),
|
129
136
|
end: T(o.value.endDate).endOf("day").toISOString(),
|
130
137
|
limit: e,
|
@@ -132,7 +139,7 @@ const W = /* @__PURE__ */ b({
|
|
132
139
|
search: i.value
|
133
140
|
}), l = n.length == e;
|
134
141
|
return {
|
135
|
-
data:
|
142
|
+
data: P(n),
|
136
143
|
meta: {
|
137
144
|
cursor: l ? (r + 1).toString() : ""
|
138
145
|
}
|
@@ -161,7 +168,7 @@ const W = /* @__PURE__ */ b({
|
|
161
168
|
return;
|
162
169
|
}
|
163
170
|
try {
|
164
|
-
const l = await
|
171
|
+
const l = await _.refetchTransaction({ transactionId: t.id });
|
165
172
|
(n = a.value) == null || n.replaceData(e, I(l)), s.open({
|
166
173
|
type: "success",
|
167
174
|
title: "Transaction queried and updated successfully."
|
@@ -174,7 +181,7 @@ const W = /* @__PURE__ */ b({
|
|
174
181
|
});
|
175
182
|
}
|
176
183
|
}
|
177
|
-
async function
|
184
|
+
async function q(e) {
|
178
185
|
var r;
|
179
186
|
const t = (r = a.value) == null ? void 0 : r.pageData().at(e);
|
180
187
|
if (!t) {
|
@@ -192,7 +199,7 @@ const W = /* @__PURE__ */ b({
|
|
192
199
|
async () => {
|
193
200
|
var n;
|
194
201
|
try {
|
195
|
-
const l = await
|
202
|
+
const l = await _.refundTransaction({
|
196
203
|
transactionId: t.id,
|
197
204
|
reason: "portal transaction refund",
|
198
205
|
amount: t.fdoAmount
|
@@ -211,7 +218,7 @@ const W = /* @__PURE__ */ b({
|
|
211
218
|
}
|
212
219
|
);
|
213
220
|
}
|
214
|
-
async function
|
221
|
+
async function K(e) {
|
215
222
|
var r;
|
216
223
|
const t = (r = a.value) == null ? void 0 : r.pageData().at(e);
|
217
224
|
if (!t) {
|
@@ -228,7 +235,7 @@ const W = /* @__PURE__ */ b({
|
|
228
235
|
"Are you sure to perform notify transaction?",
|
229
236
|
async () => {
|
230
237
|
try {
|
231
|
-
await
|
238
|
+
await _.renotifyTransaction(t.id), s.open({
|
232
239
|
type: "success",
|
233
240
|
title: "Transaction notify successfully."
|
234
241
|
});
|
@@ -242,23 +249,47 @@ const W = /* @__PURE__ */ b({
|
|
242
249
|
}
|
243
250
|
);
|
244
251
|
}
|
245
|
-
|
252
|
+
async function M(e) {
|
253
|
+
var n;
|
254
|
+
const t = (n = a.value) == null ? void 0 : n.pageData().at(e);
|
255
|
+
if (!t) {
|
256
|
+
s.open({
|
257
|
+
type: "error",
|
258
|
+
title: "Something went wrong",
|
259
|
+
message: "Fail to find transactions from the displayed transactions."
|
260
|
+
});
|
261
|
+
return;
|
262
|
+
}
|
263
|
+
const r = z([
|
264
|
+
{
|
265
|
+
type: "span",
|
266
|
+
queryKey: "transaction.id",
|
267
|
+
queryValue: t.id
|
268
|
+
}
|
269
|
+
], t.createdAt);
|
270
|
+
window.open(r, "_blank");
|
271
|
+
}
|
272
|
+
const O = [
|
246
273
|
{
|
247
274
|
header: () => "Transaction ID",
|
248
275
|
accessorKey: "id",
|
249
|
-
cell: ({ cell: e }) =>
|
276
|
+
cell: ({ cell: e }) => y(X, { data: e.getValue() })
|
250
277
|
},
|
251
278
|
{
|
252
279
|
header: () => "Pay ID",
|
253
280
|
accessorKey: "payId"
|
254
281
|
},
|
282
|
+
{
|
283
|
+
header: () => "Bill",
|
284
|
+
accessorKey: "seqNumber"
|
285
|
+
},
|
255
286
|
{
|
256
287
|
header: () => "Gateway",
|
257
288
|
accessorKey: "gateway",
|
258
289
|
meta: {
|
259
290
|
textAlign: "center"
|
260
291
|
},
|
261
|
-
cell: ({ cell: e, row: t }) => t.original.method ?
|
292
|
+
cell: ({ cell: e, row: t }) => t.original.method ? y(te, { row: t, data: e.getValue() }) : ""
|
262
293
|
},
|
263
294
|
{
|
264
295
|
header: () => "Method",
|
@@ -266,7 +297,7 @@ const W = /* @__PURE__ */ b({
|
|
266
297
|
meta: {
|
267
298
|
textAlign: "center"
|
268
299
|
},
|
269
|
-
cell: ({ cell: e, row: t }) => t.original.method ?
|
300
|
+
cell: ({ cell: e, row: t }) => t.original.method ? y(ne, { row: t, data: e.getValue() }) : ""
|
270
301
|
},
|
271
302
|
{
|
272
303
|
header: () => "Type",
|
@@ -284,7 +315,7 @@ const W = /* @__PURE__ */ b({
|
|
284
315
|
{
|
285
316
|
header: () => "Status",
|
286
317
|
accessorKey: "status",
|
287
|
-
cell: ({ cell: e, row: t }) =>
|
318
|
+
cell: ({ cell: e, row: t }) => y(Z, { row: t, data: e.getValue() })
|
288
319
|
},
|
289
320
|
{
|
290
321
|
header: () => "Transaction At",
|
@@ -308,14 +339,16 @@ const W = /* @__PURE__ */ b({
|
|
308
339
|
{
|
309
340
|
header: () => "Actions",
|
310
341
|
accessorKey: "actions",
|
311
|
-
cell: ({ row: e }) =>
|
342
|
+
cell: ({ row: e }) => y(re, {
|
312
343
|
onAction: (t) => {
|
313
344
|
switch (t) {
|
314
345
|
case "notify":
|
315
|
-
return
|
346
|
+
return K(e.index);
|
316
347
|
case "query":
|
317
348
|
return k(e.index);
|
318
349
|
case "refund":
|
350
|
+
return q(e.index);
|
351
|
+
case "history":
|
319
352
|
return M(e.index);
|
320
353
|
}
|
321
354
|
}
|
@@ -329,8 +362,8 @@ const W = /* @__PURE__ */ b({
|
|
329
362
|
loading: !1
|
330
363
|
}, {
|
331
364
|
default: w(() => [
|
332
|
-
h("div",
|
333
|
-
h("div",
|
365
|
+
h("div", oe, [
|
366
|
+
h("div", se, [
|
334
367
|
d(r, {
|
335
368
|
"model-value": u(i),
|
336
369
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => v(i) ? i.value = n : null),
|
@@ -339,15 +372,15 @@ const W = /* @__PURE__ */ b({
|
|
339
372
|
placeholder: "Search Transactions ..."
|
340
373
|
}, null, 8, ["model-value"])
|
341
374
|
]),
|
342
|
-
h("div",
|
343
|
-
d(
|
375
|
+
h("div", ce, [
|
376
|
+
d(U, {
|
344
377
|
button: {
|
345
378
|
appendIcon: "file_download",
|
346
379
|
variant: "primary",
|
347
380
|
label: "Export"
|
348
381
|
},
|
349
382
|
handler: async () => {
|
350
|
-
await u(
|
383
|
+
await u(_).downloadTransactionReport({
|
351
384
|
start: u(o).startDate,
|
352
385
|
end: u(o).endDate
|
353
386
|
});
|
@@ -355,16 +388,16 @@ const W = /* @__PURE__ */ b({
|
|
355
388
|
}, null, 8, ["handler"])
|
356
389
|
])
|
357
390
|
]),
|
358
|
-
h("div",
|
359
|
-
d(
|
391
|
+
h("div", ie, [
|
392
|
+
d(Q, {
|
360
393
|
modelValue: u(o),
|
361
394
|
"onUpdate:modelValue": t[1] || (t[1] = (n) => v(o) ? o.value = n : null)
|
362
395
|
}, null, 8, ["modelValue"])
|
363
396
|
]),
|
364
|
-
d(
|
397
|
+
d(H, {
|
365
398
|
ref_key: "controller",
|
366
399
|
ref: a,
|
367
|
-
"column-defs":
|
400
|
+
"column-defs": O,
|
368
401
|
"rows-defs": (n) => n,
|
369
402
|
paginate: F
|
370
403
|
}, null, 8, ["rows-defs"])
|
@@ -375,5 +408,5 @@ const W = /* @__PURE__ */ b({
|
|
375
408
|
}
|
376
409
|
});
|
377
410
|
export {
|
378
|
-
|
411
|
+
xe as default
|
379
412
|
};
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import { defineComponent as R, ref as v, onMounted as Y, watch as m, resolveComponent as S, openBlock as b, createBlock as V, unref as r, withCtx as C, createElementVNode as d, createVNode as l, isRef as h } from "vue";
|
2
|
+
import { t as y, a as M } from "./transaction-D4S3PvuQ.js";
|
3
|
+
import { u as O } from "./index-DQsvadHF.js";
|
4
|
+
import { _ as $ } from "./TransactionTable.vue_vue_type_script_setup_true_lang-qZA8uWSK.js";
|
5
|
+
import { h as g } from "./moment-h96o7c8I.js";
|
6
|
+
import { useCoreStore as k } from "@feedmepos/mf-common";
|
7
|
+
import { _ as E } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
8
|
+
import { u as N } from "./index-NnxZlW-g.js";
|
9
|
+
import { _ as L } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
10
|
+
import { _ as P } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
|
11
|
+
import { _ as A } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
12
|
+
const B = { class: "flex justify-between mb-6 items-center" }, F = { class: "flex space-x-8" }, J = { class: "flex space-x-4 self-center" }, K = { class: "mb-6" }, ae = /* @__PURE__ */ R({
|
13
|
+
__name: "TransactionOld",
|
14
|
+
setup(U) {
|
15
|
+
const { dateRange: t, searchKey: a } = N({
|
16
|
+
searchKey: "",
|
17
|
+
dateRange: {
|
18
|
+
startDate: g().startOf("day").format("YYYY-MM-DD"),
|
19
|
+
endDate: g().endOf("day").format("YYYY-MM-DD")
|
20
|
+
}
|
21
|
+
}), { isLoading: f, startAsyncCall: x } = O(!0), { currentRestaurant: w } = k(), n = v([]), i = v([]);
|
22
|
+
async function p() {
|
23
|
+
await x(async () => {
|
24
|
+
const { startDate: c, endDate: e } = t.value, o = await y.readRestaurantTransactions({
|
25
|
+
start: c,
|
26
|
+
end: e
|
27
|
+
});
|
28
|
+
if (n.value = M(o), i.value = n.value, a.value > "") {
|
29
|
+
var s = new RegExp(a.value, "i");
|
30
|
+
i.value = n.value.filter((T) => {
|
31
|
+
const D = JSON.stringify(T);
|
32
|
+
return s.test(D);
|
33
|
+
});
|
34
|
+
}
|
35
|
+
});
|
36
|
+
}
|
37
|
+
function _() {
|
38
|
+
p();
|
39
|
+
}
|
40
|
+
Y(_), m(w, _), m(t, p);
|
41
|
+
let u;
|
42
|
+
return m(a, async () => {
|
43
|
+
u && clearTimeout(u), u = setTimeout(() => {
|
44
|
+
var c = new RegExp(a.value, "i");
|
45
|
+
i.value = n.value.filter((e) => {
|
46
|
+
const o = JSON.stringify(e);
|
47
|
+
return c.test(o);
|
48
|
+
});
|
49
|
+
}, 700);
|
50
|
+
}), (c, e) => {
|
51
|
+
const o = S("FmSearch");
|
52
|
+
return b(), V(E, {
|
53
|
+
title: "Transactions",
|
54
|
+
description: "Transactions are purchases or payments made over the internet using electronic methods like cards or digital wallets.",
|
55
|
+
loading: r(f)
|
56
|
+
}, {
|
57
|
+
default: C(() => [
|
58
|
+
d("div", B, [
|
59
|
+
d("div", F, [
|
60
|
+
l(P),
|
61
|
+
l(o, {
|
62
|
+
"model-value": r(a),
|
63
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => h(a) ? a.value = s : null),
|
64
|
+
label: "Search",
|
65
|
+
placeholder: "Search Transactions ..."
|
66
|
+
}, null, 8, ["model-value"])
|
67
|
+
]),
|
68
|
+
d("div", J, [
|
69
|
+
l(L, {
|
70
|
+
button: {
|
71
|
+
appendIcon: "file_download",
|
72
|
+
variant: "primary",
|
73
|
+
label: "Export"
|
74
|
+
},
|
75
|
+
handler: async () => {
|
76
|
+
await r(y).downloadPortalTransactionReport(n.value);
|
77
|
+
}
|
78
|
+
}, null, 8, ["handler"])
|
79
|
+
])
|
80
|
+
]),
|
81
|
+
d("div", K, [
|
82
|
+
l(A, {
|
83
|
+
modelValue: r(t),
|
84
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => h(t) ? t.value = s : null)
|
85
|
+
}, null, 8, ["modelValue"])
|
86
|
+
]),
|
87
|
+
l($, {
|
88
|
+
loading: r(f),
|
89
|
+
data: i.value
|
90
|
+
}, null, 8, ["loading", "data"])
|
91
|
+
]),
|
92
|
+
_: 1
|
93
|
+
}, 8, ["loading"]);
|
94
|
+
};
|
95
|
+
}
|
96
|
+
});
|
97
|
+
export {
|
98
|
+
ae as default
|
99
|
+
};
|