@feedmepos/mf-payment 1.0.0-beta.4 → 1.0.0-beta.6
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js +31 -0
- package/dist/PDFViewer-xrBtzrlR.js +22426 -0
- package/dist/{PayoutAccount-5-rCbHbF.js → PayoutAccount-CagbOYmv.js} +5 -5
- package/dist/{PayoutAccount-BJJ26W9b.js → PayoutAccount-CkDd9qfH.js} +4 -4
- package/dist/{PayoutAccountSetting-kUQLeAcb.js → PayoutAccountSetting-CmgVLhdp.js} +4 -4
- package/dist/{Settlement-CHwtH6hm.js → Settlement-B1-WmCwC.js} +41 -42
- package/dist/Settlement-BSOQRlp1.js +145 -0
- package/dist/{SettlementTransactions-C_4u7wU1.js → SettlementTransactions-Cqd2raea.js} +4 -4
- package/dist/{SettlementTransactions-B17SVmmg.js → SettlementTransactions-JTwD_Vuq.js} +4 -4
- package/dist/{Terminal-gxGnjFGc.js → Terminal-DvlTwA6V.js} +4 -4
- package/dist/{TerminalSetting--ZAJJ_Hf.js → TerminalSetting-7VBm1RRK.js} +3 -3
- package/dist/{TerminalTransaction-DdESjZJo.js → TerminalTransaction-C1egvX6I.js} +112 -110
- package/dist/{TerminalTransaction-CfCURihE.js → TerminalTransaction-CZCsCpEp.js} +77 -75
- package/dist/{Transaction-Cl5vz12a.js → Transaction-B3ZWKg6Q.js} +114 -115
- package/dist/Transaction-B_0nUmpf.js +238 -0
- package/dist/{app-z59f3ZZg.js → app-CLnEntGO.js} +206 -206
- package/dist/app.js +1 -1
- package/dist/{assets-NrCec-W0.js → assets-BCAivOTo.js} +1 -1
- package/dist/components/AdminLayout.vue.d.ts +8 -13
- package/dist/components/AutoCopyCell.vue.d.ts +3 -4
- package/dist/components/DateRangePicker.vue.d.ts +13 -0
- package/dist/components/Layout.vue.d.ts +8 -13
- package/dist/components/PDFViewer.vue.d.ts +1 -1
- package/dist/components/RouteCell.vue.d.ts +5 -6
- package/dist/components/SelectAll.vue.d.ts +2 -2
- package/dist/{index-CWaKb7bG.js → index-4meiCsRz.js} +1566 -1556
- package/dist/{index-BwcJZFsi.js → index-BFYq3eq8.js} +1 -1
- package/dist/{index-7KNaibcq.js → index-BwFHcZlm.js} +1 -1
- package/dist/{index-BWUtjGg7.js → index-CBa6eapm.js} +1 -1
- package/dist/{index-CojhNtuG.js → index-CETCXB6X.js} +1 -1
- package/dist/{index-DbJpbpSs.js → index-CbsnpMWl.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-JdAFa8vy.js → index.vue_vue_type_script_setup_true_lang-CKOlikHb.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-C4SX3RTt.js → payout-account-4O7cL-1_.js} +2 -2
- package/dist/{transaction-B8q7vuqN.js → transaction-COjHU7aN.js} +20 -17
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/cell/Bank.vue.d.ts +3 -5
- package/dist/views/admin/payout-account/cell/IsActive.vue.d.ts +3 -5
- package/dist/views/admin/payout-account/cell/PersonInCharge.vue.d.ts +3 -5
- package/dist/views/admin/payout-account/cell/RateInput.vue.d.ts +3 -5
- package/dist/views/admin/payout-account/cell/Status.vue.d.ts +3 -5
- package/dist/views/admin/payout-account/cell/TPlusInput.vue.d.ts +3 -5
- package/dist/views/admin/settlement/cell/Actions.vue.d.ts +4 -6
- package/dist/views/admin/settlement/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/admin/settlement/cell/Method.vue.d.ts +3 -5
- package/dist/views/admin/settlement/cell/Status.vue.d.ts +3 -5
- package/dist/views/admin/terminal/TerminalBindCodeDialog.vue.d.ts +1 -1
- package/dist/views/admin/terminal/cell/Actions.vue.d.ts +7 -79
- package/dist/views/admin/terminal/cell/ID.vue.d.ts +3 -5
- package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +3 -4
- package/dist/views/admin/terminal-transaction/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/admin/terminal-transaction/cell/Status.vue.d.ts +3 -5
- package/dist/views/admin/terminal-transaction/cell/Timestamp.vue.d.ts +3 -6
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +3 -4
- package/dist/views/admin/transaction/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/admin/transaction/cell/Method.vue.d.ts +3 -5
- package/dist/views/admin/transaction/cell/Status.vue.d.ts +3 -5
- package/dist/views/payout-account/cell/Bank.vue.d.ts +3 -5
- package/dist/views/payout-account/cell/IsActive.vue.d.ts +3 -5
- package/dist/views/payout-account/cell/PersonInCharge.vue.d.ts +3 -5
- package/dist/views/payout-account/cell/Status.vue.d.ts +3 -5
- package/dist/views/settlement/cell/Actions.vue.d.ts +4 -6
- package/dist/views/settlement/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/settlement/cell/Method.vue.d.ts +3 -5
- package/dist/views/settlement/cell/Status.vue.d.ts +3 -5
- package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/terminal-transaction/cell/Status.vue.d.ts +3 -5
- package/dist/views/transaction/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/transaction/cell/Method.vue.d.ts +3 -5
- package/dist/views/transaction/cell/Status.vue.d.ts +3 -5
- package/package.json +1 -1
- package/dist/PDFViewer-CjH_C1uT.js +0 -21792
- package/dist/Settlement-C49oMOGR.js +0 -149
- package/dist/Transaction-CP0EdPdb.js +0 -239
@@ -0,0 +1,238 @@
|
|
1
|
+
import { defineComponent as f, resolveComponent as N, openBlock as g, createBlock as S, normalizeClass as O, withCtx as D, createElementVNode as _, toDisplayString as V, createElementBlock as I, unref as o, ref as A, h as v, onMounted as C, watch as w, createVNode as p, isRef as E } from "vue";
|
2
|
+
import { t as b, b as M } from "./transaction-COjHU7aN.js";
|
3
|
+
import { e as x, u as Y } from "./index-4meiCsRz.js";
|
4
|
+
import "@feedmepos/ui-library";
|
5
|
+
import "./dinero-CIVmXLL-.js";
|
6
|
+
import { h as F } from "./moment-h96o7c8I.js";
|
7
|
+
import { g as $, a as k } from "./assets-BCAivOTo.js";
|
8
|
+
import { useCoreStore as L } from "@feedmepos/mf-common";
|
9
|
+
import { _ as P } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
10
|
+
import { u as B } from "./index-BwFHcZlm.js";
|
11
|
+
import { _ as U } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
12
|
+
import { _ as G } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
|
13
|
+
import { _ as q } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
14
|
+
const J = /* @__PURE__ */ f({
|
15
|
+
__name: "Status",
|
16
|
+
props: {
|
17
|
+
row: {},
|
18
|
+
data: {}
|
19
|
+
},
|
20
|
+
setup(s) {
|
21
|
+
const a = s;
|
22
|
+
function t() {
|
23
|
+
return a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
24
|
+
}
|
25
|
+
return (l, c) => {
|
26
|
+
const d = N("FmBadge");
|
27
|
+
return g(), S(d, {
|
28
|
+
inline: "",
|
29
|
+
class: O(t())
|
30
|
+
}, {
|
31
|
+
default: D(() => [
|
32
|
+
_("div", null, V(l.data), 1)
|
33
|
+
]),
|
34
|
+
_: 1
|
35
|
+
}, 8, ["class"]);
|
36
|
+
};
|
37
|
+
}
|
38
|
+
}), j = ["src"], z = /* @__PURE__ */ f({
|
39
|
+
__name: "Gateway",
|
40
|
+
props: {
|
41
|
+
row: {},
|
42
|
+
data: {}
|
43
|
+
},
|
44
|
+
setup(s) {
|
45
|
+
return (a, t) => (g(), I("img", {
|
46
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
47
|
+
src: o($)(a.row.original.gateway)
|
48
|
+
}, null, 8, j));
|
49
|
+
}
|
50
|
+
}), Q = ["src"], H = /* @__PURE__ */ f({
|
51
|
+
__name: "Method",
|
52
|
+
props: {
|
53
|
+
row: {},
|
54
|
+
data: {}
|
55
|
+
},
|
56
|
+
setup(s) {
|
57
|
+
return (a, t) => (g(), I("img", {
|
58
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
59
|
+
src: o(k)(a.row.original.method.issuer)
|
60
|
+
}, null, 8, Q));
|
61
|
+
}
|
62
|
+
}), W = /* @__PURE__ */ f({
|
63
|
+
__name: "TransactionTable",
|
64
|
+
props: {
|
65
|
+
data: {
|
66
|
+
type: Array,
|
67
|
+
required: !0
|
68
|
+
},
|
69
|
+
loading: {
|
70
|
+
type: Boolean,
|
71
|
+
required: !0
|
72
|
+
}
|
73
|
+
},
|
74
|
+
emits: ["row-click"],
|
75
|
+
setup(s, { emit: a }) {
|
76
|
+
const t = s, l = a, c = A(""), d = [
|
77
|
+
{
|
78
|
+
header: () => "Transaction ID",
|
79
|
+
accessorKey: "id"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
header: () => "Pay ID",
|
83
|
+
accessorKey: "payId"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
header: () => "Gateway",
|
87
|
+
accessorKey: "gateway",
|
88
|
+
meta: {
|
89
|
+
textAlign: "center"
|
90
|
+
},
|
91
|
+
cell: ({ cell: n, row: e }) => e.original.method ? v(z, { row: e, data: n.getValue() }) : ""
|
92
|
+
},
|
93
|
+
{
|
94
|
+
header: () => "Method",
|
95
|
+
accessorKey: "method",
|
96
|
+
meta: {
|
97
|
+
textAlign: "center"
|
98
|
+
},
|
99
|
+
cell: ({ cell: n, row: e }) => e.original.method ? v(H, { row: e, data: n.getValue() }) : ""
|
100
|
+
},
|
101
|
+
{
|
102
|
+
header: () => "Type",
|
103
|
+
accessorKey: "type",
|
104
|
+
meta: {
|
105
|
+
textAlign: "center"
|
106
|
+
},
|
107
|
+
cell: ({ row: n }) => {
|
108
|
+
if (!n.original.method)
|
109
|
+
return "";
|
110
|
+
const e = n.original.method.variant;
|
111
|
+
return e.includes("_ONLINE") ? "ONLINE" : e.includes("_OFFLINE") ? "OFFLINE" : e;
|
112
|
+
}
|
113
|
+
},
|
114
|
+
{
|
115
|
+
header: () => "Status",
|
116
|
+
accessorKey: "status",
|
117
|
+
cell: ({ cell: n, row: e }) => v(J, { row: e, data: n.getValue() })
|
118
|
+
},
|
119
|
+
{
|
120
|
+
header: () => "Transaction At",
|
121
|
+
accessorKey: "transactionAt",
|
122
|
+
meta: {
|
123
|
+
width: "180px"
|
124
|
+
}
|
125
|
+
},
|
126
|
+
{
|
127
|
+
header: () => "Sales Amount",
|
128
|
+
accessorKey: "amount"
|
129
|
+
},
|
130
|
+
{
|
131
|
+
header: () => "Fee",
|
132
|
+
accessorKey: "fee"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
header: () => "Settlement Amount",
|
136
|
+
accessorKey: "payout"
|
137
|
+
}
|
138
|
+
];
|
139
|
+
return (n, e) => {
|
140
|
+
const h = N("FmTable");
|
141
|
+
return g(), S(h, {
|
142
|
+
modelValue: c.value,
|
143
|
+
"onUpdate:modelValue": e[0] || (e[0] = (i) => c.value = i),
|
144
|
+
"column-defs": d,
|
145
|
+
"row-data": t.data,
|
146
|
+
loading: t.loading,
|
147
|
+
onRowClick: e[1] || (e[1] = (i) => l("row-click", t.data.at(i.index)))
|
148
|
+
}, null, 8, ["modelValue", "row-data", "loading"]);
|
149
|
+
};
|
150
|
+
}
|
151
|
+
}), X = { class: "flex justify-between mb-6 items-center" }, Z = { class: "flex space-x-8" }, ee = { class: "flex space-x-4 self-center" }, ae = { class: "mb-6" }, fe = /* @__PURE__ */ f({
|
152
|
+
__name: "Transaction",
|
153
|
+
setup(s) {
|
154
|
+
const { dateRange: a, searchKey: t } = B({
|
155
|
+
searchKey: "",
|
156
|
+
dateRange: {
|
157
|
+
startDate: F().startOf("day").format("YYYY-MM-DD"),
|
158
|
+
endDate: F().endOf("day").format("YYYY-MM-DD")
|
159
|
+
}
|
160
|
+
}), { isLoading: l, startAsyncCall: c } = Y(!0), { currentRestaurant: d } = L(), n = A([]), e = A([]);
|
161
|
+
async function h() {
|
162
|
+
await c(async () => {
|
163
|
+
const { startDate: y, endDate: r } = a.value, u = await b.readRestaurantTransactions({
|
164
|
+
start: y,
|
165
|
+
end: r
|
166
|
+
});
|
167
|
+
if (n.value = M(u), e.value = n.value, t.value > "") {
|
168
|
+
var m = new RegExp(t.value, "i");
|
169
|
+
e.value = n.value.filter((R) => {
|
170
|
+
const K = JSON.stringify(R);
|
171
|
+
return m.test(K);
|
172
|
+
});
|
173
|
+
}
|
174
|
+
});
|
175
|
+
}
|
176
|
+
function i() {
|
177
|
+
h();
|
178
|
+
}
|
179
|
+
C(i), w(d, i), w(a, h);
|
180
|
+
let T;
|
181
|
+
return w(t, async () => {
|
182
|
+
T && clearTimeout(T), T = setTimeout(() => {
|
183
|
+
var y = new RegExp(t.value, "i");
|
184
|
+
e.value = n.value.filter((r) => {
|
185
|
+
const u = JSON.stringify(r);
|
186
|
+
return y.test(u);
|
187
|
+
});
|
188
|
+
}, 700);
|
189
|
+
}), (y, r) => {
|
190
|
+
const u = N("FmSearch");
|
191
|
+
return g(), S(P, {
|
192
|
+
title: "Online Transactions",
|
193
|
+
description: "Transactions are purchases or payments made over the internet using electronic methods like cards or digital wallets.",
|
194
|
+
loading: o(l)
|
195
|
+
}, {
|
196
|
+
default: D(() => [
|
197
|
+
_("div", X, [
|
198
|
+
_("div", Z, [
|
199
|
+
p(G),
|
200
|
+
p(u, {
|
201
|
+
"model-value": o(t),
|
202
|
+
"onUpdate:modelValue": r[0] || (r[0] = (m) => E(t) ? t.value = m : null),
|
203
|
+
label: "Search",
|
204
|
+
placeholder: "Search Transactions ..."
|
205
|
+
}, null, 8, ["model-value"])
|
206
|
+
]),
|
207
|
+
_("div", ee, [
|
208
|
+
p(U, {
|
209
|
+
button: {
|
210
|
+
appendIcon: "file_download",
|
211
|
+
variant: "primary",
|
212
|
+
label: "Export"
|
213
|
+
},
|
214
|
+
handler: async () => {
|
215
|
+
await o(b).downloadRestaurantTransactionReport(n.value);
|
216
|
+
}
|
217
|
+
}, null, 8, ["handler"])
|
218
|
+
])
|
219
|
+
]),
|
220
|
+
_("div", ae, [
|
221
|
+
p(q, {
|
222
|
+
modelValue: o(a),
|
223
|
+
"onUpdate:modelValue": r[1] || (r[1] = (m) => E(a) ? a.value = m : null)
|
224
|
+
}, null, 8, ["modelValue"])
|
225
|
+
]),
|
226
|
+
p(W, {
|
227
|
+
loading: o(l),
|
228
|
+
data: e.value
|
229
|
+
}, null, 8, ["loading", "data"])
|
230
|
+
]),
|
231
|
+
_: 1
|
232
|
+
}, 8, ["loading"]);
|
233
|
+
};
|
234
|
+
}
|
235
|
+
});
|
236
|
+
export {
|
237
|
+
fe as default
|
238
|
+
};
|