@feedmepos/mf-payment 1.0.28 → 1.1.0-beta.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/{PDFViewer-xrBtzrlR.js → PDFViewer-BQfgFexr.js} +2 -1
- package/dist/{PayoutAccount-QybE7meK.js → PayoutAccount-BpMu58oE.js} +5 -5
- package/dist/{PayoutAccount-C53rv89t.js → PayoutAccount-z-gdodfR.js} +361 -360
- package/dist/PayoutAccountSetting-jZJu4WWL.js +723 -0
- package/dist/{Restaurant-B1ed_oVp.js → Restaurant-DfBX5uPS.js} +56 -54
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-hJAJYKmE.js +33 -0
- package/dist/{RestaurantSetting-CKG5jn2J.js → RestaurantSetting-KPtRoif-.js} +3 -3
- package/dist/{Settlement-Fh86ozFD.js → Settlement-DbMQAA0_.js} +9 -8
- package/dist/Settlement-smC2PDKA.js +445 -0
- package/dist/{SettlementTransactions-BSF2Jw-L.js → SettlementTransactions-Bs8Il-GO.js} +14 -14
- package/dist/SettlementTransactions-Cw9DnODr.js +291 -0
- package/dist/{Terminal-BUBkiYYw.js → Terminal-HLOGtr0x.js} +323 -342
- package/dist/{TerminalSetting-CfCa-6pK.js → TerminalSetting-DraCszpQ.js} +27 -27
- package/dist/Transaction-B8cHQbbP.js +250 -0
- package/dist/{Transaction-DWzZ31qR.js → Transaction-_CB4VTT9.js} +123 -105
- package/dist/TransactionOld-BhzUSu5h.js +99 -0
- package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-UcnQKwQ5.js +304 -0
- package/dist/api/payout/index.d.ts +5 -1
- package/dist/api/terminal/index.d.ts +6 -10
- package/dist/api/transaction/index.d.ts +12 -11
- package/dist/{app-DC4HbItX.js → app-DWRPKvx2.js} +1115 -780
- package/dist/app.d.ts +278 -0
- package/dist/app.js +4 -3
- package/dist/{assets-BySnqkmr.js → assets-BImh8bhR.js} +208 -56
- package/dist/components/SourceSelector.vue.d.ts +12 -0
- package/dist/{grafana-b2ht7XmY.js → grafana-CPOGSE20.js} +2 -2
- package/dist/{index-d3nubgyT.js → index-8eCaI4jI.js} +1 -1
- package/dist/{index-iiG_kivD.js → index-CNZFZxie.js} +8163 -8081
- package/dist/{index-DXV5GQaF.js → index-D5DlMaeB.js} +1 -1
- package/dist/index-DtT3I2PI.js +45 -0
- package/dist/index-DuSw-EaU.js +66 -0
- package/dist/{index-CvJ2nft4.js → index-eznEOmAe.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Du3twb8U.js → index.vue_vue_type_script_setup_true_lang-DNXWZt8k.js} +8 -7
- package/dist/model/payout-account.d.ts +1 -1
- package/dist/model/transaction.d.ts +13 -5
- package/dist/package.json +9 -8
- package/dist/{payout-account-DPdwKVTr.js → payout-account-CjDkY3wf.js} +2 -2
- package/dist/router/index.d.ts +1 -0
- package/dist/stores/payoutAccount.d.ts +4 -4
- 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/PaymentChannel.vue.d.ts +133 -0
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +133 -0
- 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/cell/Actions.vue.d.ts +8 -0
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +10 -23
- package/dist/views/admin/{terminal-transaction/TerminalTransaction.vue.d.ts → payout-account/tabs/gateway/MacauPassGateway.vue.d.ts} +1 -1
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/Terminal.vue.d.ts +4 -1
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +2 -2
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +2 -0
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +16 -16
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +8 -8
- package/dist/views/{admin/terminal-transaction → transaction}/cell/Actions.vue.d.ts +3 -3
- package/package.json +9 -8
- package/dist/PayoutAccountSetting-Zhkm_GN8.js +0 -426
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-p4qddIbp.js +0 -33
- package/dist/Settlement-SeGVEdZj.js +0 -444
- package/dist/SettlementTransactions-CHRsIcoh.js +0 -291
- package/dist/TerminalTransaction-DIM7WO_C.js +0 -589
- package/dist/TerminalTransaction-DQZnx7dy.js +0 -333
- package/dist/Transaction-DRYwBnHK.js +0 -247
- package/dist/TransactionOld-Pj412ujb.js +0 -99
- package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-B3FGhKjA.js +0 -159
- package/dist/components/PayoutAccountSelector.vue.d.ts +0 -23
- package/dist/index-BJpE0YhF.js +0 -52
- package/dist/index-BqzuW2qa.js +0 -40
- package/dist/index-Dwv1hbHU.js +0 -77
- package/dist/transaction-CzLoSCVe.js +0 -136
- package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +0 -50
- package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +0 -52
- package/dist/views/admin/terminal-transaction/cell/Gateway.vue.d.ts +0 -7
- package/dist/views/admin/terminal-transaction/cell/Method.vue.d.ts +0 -7
- package/dist/views/admin/terminal-transaction/cell/Status.vue.d.ts +0 -7
- package/dist/views/terminal-transaction/TerminalTransaction.vue.d.ts +0 -2
- package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +0 -7
- package/dist/views/terminal-transaction/cell/Method.vue.d.ts +0 -7
- package/dist/views/terminal-transaction/cell/Status.vue.d.ts +0 -7
@@ -1,17 +1,16 @@
|
|
1
|
-
import { defineComponent as b, resolveComponent as h, openBlock as
|
2
|
-
import {
|
1
|
+
import { defineComponent as b, resolveComponent as h, openBlock as m, createBlock as F, normalizeClass as V, withCtx as T, createElementVNode as _, toDisplayString as Y, createElementBlock as A, unref as d, createVNode as f, Fragment as $, renderList as C, ref as O, watch as v, isRef as I, h as y } from "vue";
|
2
|
+
import { g as P, a as U, t as g, b as B, c as N } from "./assets-BImh8bhR.js";
|
3
3
|
import { h as w } from "./moment-h96o7c8I.js";
|
4
|
-
import { u as
|
5
|
-
import { _ as
|
6
|
-
import { _ as
|
7
|
-
import { useSnackbar as
|
8
|
-
import { w as
|
9
|
-
import { u as
|
10
|
-
import { _ as
|
11
|
-
import { g as
|
12
|
-
import { _ as
|
13
|
-
import { e as
|
14
|
-
import { g as J, a as W } from "./assets-BySnqkmr.js";
|
4
|
+
import { u as G } from "./index-8eCaI4jI.js";
|
5
|
+
import { _ as L } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
6
|
+
import { _ as j } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
7
|
+
import { useSnackbar as Q, useDialog as z } from "@feedmepos/ui-library";
|
8
|
+
import { w as k } from "./Modal-DB8M9o1T.js";
|
9
|
+
import { u as D } from "./error-K1CakhA9.js";
|
10
|
+
import { _ as H } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
11
|
+
import { g as J } from "./grafana-CPOGSE20.js";
|
12
|
+
import { _ as W } from "./index.vue_vue_type_script_setup_true_lang-DNXWZt8k.js";
|
13
|
+
import { e as S } from "./index-CNZFZxie.js";
|
15
14
|
import { _ as X } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
16
15
|
const Z = /* @__PURE__ */ b({
|
17
16
|
__name: "Status",
|
@@ -19,19 +18,19 @@ const Z = /* @__PURE__ */ b({
|
|
19
18
|
row: {},
|
20
19
|
data: {}
|
21
20
|
},
|
22
|
-
setup(
|
23
|
-
const a =
|
21
|
+
setup(u) {
|
22
|
+
const a = u;
|
24
23
|
function o() {
|
25
|
-
return a.data ===
|
24
|
+
return a.data === S.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === S.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : a.data === S.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
26
25
|
}
|
27
|
-
return (
|
28
|
-
const
|
29
|
-
return
|
26
|
+
return (c, s) => {
|
27
|
+
const p = h("FmBadge");
|
28
|
+
return m(), F(p, {
|
30
29
|
inline: "",
|
31
|
-
class:
|
30
|
+
class: V(o())
|
32
31
|
}, {
|
33
32
|
default: T(() => [
|
34
|
-
|
33
|
+
_("div", null, Y(c.data), 1)
|
35
34
|
]),
|
36
35
|
_: 1
|
37
36
|
}, 8, ["class"]);
|
@@ -43,10 +42,10 @@ const Z = /* @__PURE__ */ b({
|
|
43
42
|
row: {},
|
44
43
|
data: {}
|
45
44
|
},
|
46
|
-
setup(
|
47
|
-
return (a, o) => (
|
45
|
+
setup(u) {
|
46
|
+
return (a, o) => (m(), A("img", {
|
48
47
|
class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
|
49
|
-
src:
|
48
|
+
src: d(P)(a.row.original.gateway)
|
50
49
|
}, null, 8, ee));
|
51
50
|
}
|
52
51
|
}), ae = ["src"], ne = /* @__PURE__ */ b({
|
@@ -55,32 +54,33 @@ const Z = /* @__PURE__ */ b({
|
|
55
54
|
row: {},
|
56
55
|
data: {}
|
57
56
|
},
|
58
|
-
setup(
|
59
|
-
return (a, o) => (
|
57
|
+
setup(u) {
|
58
|
+
return (a, o) => (m(), A("img", {
|
60
59
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
61
|
-
src:
|
60
|
+
src: d(U)(a.row.original.method.issuer, a.row.original.method.variant)
|
62
61
|
}, null, 8, ae));
|
63
62
|
}
|
64
63
|
}), re = /* @__PURE__ */ b({
|
65
64
|
__name: "Actions",
|
66
65
|
props: {
|
67
|
-
onAction: { type: Function }
|
66
|
+
onAction: { type: Function },
|
67
|
+
transaction: {}
|
68
68
|
},
|
69
|
-
setup(
|
69
|
+
setup(u) {
|
70
70
|
const a = [
|
71
|
-
{
|
71
|
+
u.transaction.flags.query && {
|
72
72
|
label: "Query",
|
73
73
|
sublabel: "Perform transaction status inquriy",
|
74
74
|
icon: "question_answer",
|
75
75
|
action: "query"
|
76
76
|
},
|
77
|
-
{
|
77
|
+
u.transaction.flags.refund && {
|
78
78
|
label: "Refund",
|
79
79
|
sublabel: "Perform transaction refund request",
|
80
80
|
icon: "request_page",
|
81
81
|
action: "refund"
|
82
82
|
},
|
83
|
-
{
|
83
|
+
u.transaction.flags.notify && {
|
84
84
|
label: "Notify",
|
85
85
|
sublabel: "Perform webhook notification for transaction",
|
86
86
|
icon: "webhook",
|
@@ -93,65 +93,65 @@ const Z = /* @__PURE__ */ b({
|
|
93
93
|
action: "history"
|
94
94
|
}
|
95
95
|
];
|
96
|
-
return (o,
|
97
|
-
const s = h("FmIcon"),
|
98
|
-
return
|
99
|
-
onClick:
|
100
|
-
|
96
|
+
return (o, c) => {
|
97
|
+
const s = h("FmIcon"), p = h("FmMenuItem"), x = h("FmMenu");
|
98
|
+
return m(), A("div", {
|
99
|
+
onClick: c[0] || (c[0] = (i) => {
|
100
|
+
i.stopPropagation();
|
101
101
|
})
|
102
102
|
}, [
|
103
|
-
|
103
|
+
f(x, null, {
|
104
104
|
"menu-button": T(() => [
|
105
|
-
|
105
|
+
f(s, { name: "settings" })
|
106
106
|
]),
|
107
107
|
default: T(() => [
|
108
|
-
(
|
108
|
+
(m(!0), A($, null, C(a.filter((i) => !!i), (i) => (m(), F(p, {
|
109
109
|
selectable: !0,
|
110
|
-
key:
|
111
|
-
sublabel:
|
112
|
-
label:
|
113
|
-
icon:
|
114
|
-
onclick: () => o.onAction(
|
115
|
-
}, null, 8, ["sublabel", "label", "icon", "onclick"])),
|
110
|
+
key: i.label,
|
111
|
+
sublabel: i.sublabel,
|
112
|
+
label: i.label,
|
113
|
+
icon: i.icon,
|
114
|
+
onclick: () => o.onAction(i.action)
|
115
|
+
}, null, 8, ["sublabel", "label", "icon", "onclick"]))), 128))
|
116
116
|
]),
|
117
117
|
_: 1
|
118
118
|
})
|
119
119
|
]);
|
120
120
|
};
|
121
121
|
}
|
122
|
-
}), oe = { class: "flex justify-between mb-6 items-center" }, se = { class: "flex space-x-4" },
|
122
|
+
}), oe = { class: "flex justify-between mb-6 items-center" }, se = { class: "flex space-x-4" }, ie = { class: "flex space-x-4 self-center" }, ce = { class: "mb-6" }, xe = /* @__PURE__ */ b({
|
123
123
|
__name: "Transaction",
|
124
|
-
setup(
|
125
|
-
const a =
|
124
|
+
setup(u) {
|
125
|
+
const a = O(), { dateRange: o, searchKey: c } = G({
|
126
126
|
searchKey: "",
|
127
127
|
dateRange: {
|
128
128
|
startDate: w().startOf("day").format("YYYY-MM-DD"),
|
129
129
|
endDate: w().endOf("day").format("YYYY-MM-DD")
|
130
130
|
}
|
131
|
-
}), s =
|
131
|
+
}), s = Q(), p = z(), x = async (e, t) => {
|
132
132
|
let r = parseInt(t);
|
133
133
|
Number.isNaN(r) && (r = 1);
|
134
|
-
const n = await
|
134
|
+
const n = await g.readTransactions({
|
135
135
|
start: w(o.value.startDate).startOf("day").toISOString(),
|
136
136
|
end: w(o.value.endDate).endOf("day").toISOString(),
|
137
137
|
limit: e,
|
138
138
|
skip: (r - 1) * e,
|
139
|
-
search:
|
139
|
+
search: c.value
|
140
140
|
}), l = n.length == e;
|
141
141
|
return {
|
142
|
-
data:
|
142
|
+
data: B(n),
|
143
143
|
meta: {
|
144
144
|
cursor: l ? (r + 1).toString() : ""
|
145
145
|
}
|
146
146
|
};
|
147
147
|
};
|
148
|
-
|
148
|
+
v(o, async () => {
|
149
149
|
var e;
|
150
150
|
(e = a.value) == null || e.reset();
|
151
151
|
});
|
152
|
-
let
|
153
|
-
|
154
|
-
|
152
|
+
let i;
|
153
|
+
v(c, async () => {
|
154
|
+
i && clearTimeout(i), i = setTimeout(() => {
|
155
155
|
var e;
|
156
156
|
(e = a.value) == null || e.reset();
|
157
157
|
}, 700);
|
@@ -168,8 +168,8 @@ const Z = /* @__PURE__ */ b({
|
|
168
168
|
return;
|
169
169
|
}
|
170
170
|
try {
|
171
|
-
const l = await
|
172
|
-
(n = a.value) == null || n.replaceData(e,
|
171
|
+
const l = await g.refetchTransaction({ transactionId: t.id });
|
172
|
+
(n = a.value) == null || n.replaceData(e, N(l)), s.open({
|
173
173
|
type: "success",
|
174
174
|
title: "Transaction queried and updated successfully."
|
175
175
|
});
|
@@ -177,11 +177,11 @@ const Z = /* @__PURE__ */ b({
|
|
177
177
|
s.open({
|
178
178
|
type: "error",
|
179
179
|
title: "Fail to query transaction.",
|
180
|
-
message:
|
180
|
+
message: D(l)
|
181
181
|
});
|
182
182
|
}
|
183
183
|
}
|
184
|
-
async function
|
184
|
+
async function E(e) {
|
185
185
|
var r;
|
186
186
|
const t = (r = a.value) == null ? void 0 : r.pageData().at(e);
|
187
187
|
if (!t) {
|
@@ -192,19 +192,19 @@ const Z = /* @__PURE__ */ b({
|
|
192
192
|
});
|
193
193
|
return;
|
194
194
|
}
|
195
|
-
|
196
|
-
|
195
|
+
k(
|
196
|
+
p,
|
197
197
|
"Refund Transaction",
|
198
198
|
"Are you sure to refund transaction? This action cannot be revert!",
|
199
199
|
async () => {
|
200
200
|
var n;
|
201
201
|
try {
|
202
|
-
const l = await
|
202
|
+
const l = await g.refundTransaction({
|
203
203
|
transactionId: t.id,
|
204
204
|
reason: "portal transaction refund",
|
205
205
|
amount: t.fdoAmount
|
206
206
|
});
|
207
|
-
(n = a.value) == null || n.replaceData(e,
|
207
|
+
(n = a.value) == null || n.replaceData(e, N(l)), s.open({
|
208
208
|
type: "success",
|
209
209
|
title: "Transaction refund request initiated."
|
210
210
|
});
|
@@ -212,13 +212,13 @@ const Z = /* @__PURE__ */ b({
|
|
212
212
|
s.open({
|
213
213
|
type: "error",
|
214
214
|
title: "Fail to request refund transaction.",
|
215
|
-
message:
|
215
|
+
message: D(l)
|
216
216
|
});
|
217
217
|
}
|
218
218
|
}
|
219
219
|
);
|
220
220
|
}
|
221
|
-
async function
|
221
|
+
async function M(e) {
|
222
222
|
var r;
|
223
223
|
const t = (r = a.value) == null ? void 0 : r.pageData().at(e);
|
224
224
|
if (!t) {
|
@@ -229,13 +229,13 @@ const Z = /* @__PURE__ */ b({
|
|
229
229
|
});
|
230
230
|
return;
|
231
231
|
}
|
232
|
-
|
233
|
-
|
232
|
+
k(
|
233
|
+
p,
|
234
234
|
"Notify Transaction",
|
235
235
|
"Are you sure to perform notify transaction?",
|
236
236
|
async () => {
|
237
237
|
try {
|
238
|
-
await
|
238
|
+
await g.renotifyTransaction(t.id), s.open({
|
239
239
|
type: "success",
|
240
240
|
title: "Transaction notify successfully."
|
241
241
|
});
|
@@ -243,7 +243,7 @@ const Z = /* @__PURE__ */ b({
|
|
243
243
|
s.open({
|
244
244
|
type: "error",
|
245
245
|
title: "Fail to notify transaction.",
|
246
|
-
message:
|
246
|
+
message: D(n)
|
247
247
|
});
|
248
248
|
}
|
249
249
|
}
|
@@ -260,7 +260,7 @@ const Z = /* @__PURE__ */ b({
|
|
260
260
|
});
|
261
261
|
return;
|
262
262
|
}
|
263
|
-
const r =
|
263
|
+
const r = J([
|
264
264
|
{
|
265
265
|
type: "span",
|
266
266
|
queryKey: "transaction.id",
|
@@ -269,7 +269,7 @@ const Z = /* @__PURE__ */ b({
|
|
269
269
|
], t.transactionAt);
|
270
270
|
window.open(r, "_blank");
|
271
271
|
}
|
272
|
-
const
|
272
|
+
const R = [
|
273
273
|
{
|
274
274
|
header: () => "Transaction ID",
|
275
275
|
accessorKey: "id",
|
@@ -299,6 +299,11 @@ const Z = /* @__PURE__ */ b({
|
|
299
299
|
},
|
300
300
|
cell: ({ cell: e, row: t }) => t.original.method ? y(ne, { row: t, data: e.getValue() }) : ""
|
301
301
|
},
|
302
|
+
{
|
303
|
+
header: () => "Gateway ID",
|
304
|
+
accessorKey: "gatewayTransactionId",
|
305
|
+
cell: ({ cell: e, row: t }) => t.original.status === "REFUNDED" ? t.original.gatewayRefundId : t.original.gatewayTransactionId
|
306
|
+
},
|
302
307
|
{
|
303
308
|
header: () => "Type",
|
304
309
|
accessorKey: "payFor",
|
@@ -325,65 +330,78 @@ const Z = /* @__PURE__ */ b({
|
|
325
330
|
{
|
326
331
|
header: () => "Actions",
|
327
332
|
accessorKey: "actions",
|
328
|
-
cell: ({ row: e }) =>
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
return K(e.index);
|
339
|
-
}
|
333
|
+
cell: ({ row: e }) => {
|
334
|
+
var r;
|
335
|
+
const t = (r = a.value) == null ? void 0 : r.pageData().at(e.index);
|
336
|
+
if (!t) {
|
337
|
+
s.open({
|
338
|
+
type: "error",
|
339
|
+
title: "Something went wrong",
|
340
|
+
message: "Fail to find transactions from the displayed transactions."
|
341
|
+
});
|
342
|
+
return;
|
340
343
|
}
|
341
|
-
|
344
|
+
return y(re, {
|
345
|
+
transaction: t,
|
346
|
+
onAction: (n) => {
|
347
|
+
switch (n) {
|
348
|
+
case "notify":
|
349
|
+
return M(e.index);
|
350
|
+
case "query":
|
351
|
+
return q(e.index);
|
352
|
+
case "refund":
|
353
|
+
return E(e.index);
|
354
|
+
case "history":
|
355
|
+
return K(e.index);
|
356
|
+
}
|
357
|
+
}
|
358
|
+
});
|
359
|
+
}
|
342
360
|
}
|
343
361
|
];
|
344
362
|
return (e, t) => {
|
345
363
|
const r = h("FmSearch");
|
346
|
-
return
|
347
|
-
title: "
|
364
|
+
return m(), F(L, {
|
365
|
+
title: "Transactions",
|
348
366
|
loading: !1
|
349
367
|
}, {
|
350
368
|
default: T(() => [
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
"model-value":
|
355
|
-
"onUpdate:modelValue": t[0] || (t[0] = (n) =>
|
369
|
+
_("div", oe, [
|
370
|
+
_("div", se, [
|
371
|
+
f(r, {
|
372
|
+
"model-value": d(c),
|
373
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => I(c) ? c.value = n : null),
|
356
374
|
class: "mr-8",
|
357
375
|
label: "Search",
|
358
376
|
placeholder: "Search Transactions ..."
|
359
377
|
}, null, 8, ["model-value"])
|
360
378
|
]),
|
361
|
-
|
362
|
-
|
379
|
+
_("div", ie, [
|
380
|
+
f(j, {
|
363
381
|
button: {
|
364
382
|
appendIcon: "file_download",
|
365
383
|
variant: "primary",
|
366
384
|
label: "Export"
|
367
385
|
},
|
368
386
|
handler: async () => {
|
369
|
-
await
|
370
|
-
start:
|
371
|
-
end:
|
387
|
+
await d(g).downloadTransactionReport({
|
388
|
+
start: d(o).startDate,
|
389
|
+
end: d(o).endDate
|
372
390
|
});
|
373
391
|
}
|
374
392
|
}, null, 8, ["handler"])
|
375
393
|
])
|
376
394
|
]),
|
377
|
-
|
378
|
-
|
379
|
-
modelValue:
|
380
|
-
"onUpdate:modelValue": t[1] || (t[1] = (n) =>
|
395
|
+
_("div", ce, [
|
396
|
+
f(H, {
|
397
|
+
modelValue: d(o),
|
398
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => I(o) ? o.value = n : null)
|
381
399
|
}, null, 8, ["modelValue"])
|
382
400
|
]),
|
383
|
-
|
401
|
+
f(W, {
|
384
402
|
ref_key: "controller",
|
385
403
|
ref: a,
|
386
|
-
"column-defs":
|
404
|
+
"column-defs": R,
|
387
405
|
"rows-defs": (n) => n,
|
388
406
|
paginate: x
|
389
407
|
}, null, 8, ["rows-defs"])
|
@@ -394,5 +412,5 @@ const Z = /* @__PURE__ */ b({
|
|
394
412
|
}
|
395
413
|
});
|
396
414
|
export {
|
397
|
-
|
415
|
+
xe as default
|
398
416
|
};
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import { defineComponent as T, ref as h, onMounted as Y, watch as f, resolveComponent as V, openBlock as C, createBlock as M, unref as t, withCtx as O, createElementVNode as u, createVNode as i, isRef as y } from "vue";
|
2
|
+
import { t as g, b as S } from "./assets-BImh8bhR.js";
|
3
|
+
import { u as $ } from "./index-CNZFZxie.js";
|
4
|
+
import { _ as N } from "./TransactionTable.vue_vue_type_script_setup_true_lang-UcnQKwQ5.js";
|
5
|
+
import { h as x } from "./moment-h96o7c8I.js";
|
6
|
+
import { useCoreStore as k, useI18n as E } from "@feedmepos/mf-common";
|
7
|
+
import { _ as L } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
8
|
+
import { u as P } from "./index-8eCaI4jI.js";
|
9
|
+
import { _ as A } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
10
|
+
import { _ as B } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-hJAJYKmE.js";
|
11
|
+
import { _ as F } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
12
|
+
const I = { class: "flex justify-between mb-6 items-center" }, J = { class: "flex space-x-8" }, K = { class: "flex space-x-4 self-center" }, U = { class: "mb-6" }, nt = /* @__PURE__ */ T({
|
13
|
+
__name: "TransactionOld",
|
14
|
+
setup(j) {
|
15
|
+
const { dateRange: n, searchKey: a } = P({
|
16
|
+
searchKey: "",
|
17
|
+
dateRange: {
|
18
|
+
startDate: x().startOf("day").format("YYYY-MM-DD"),
|
19
|
+
endDate: x().endOf("day").format("YYYY-MM-DD")
|
20
|
+
}
|
21
|
+
}), { isLoading: p, startAsyncCall: b } = $(!0), { currentRestaurant: w } = k(), { t: o } = E(), s = h([]), c = h([]);
|
22
|
+
async function _() {
|
23
|
+
await b(async () => {
|
24
|
+
const { startDate: d, endDate: e } = n.value, r = await g.readRestaurantTransactions({
|
25
|
+
start: d,
|
26
|
+
end: e
|
27
|
+
});
|
28
|
+
if (s.value = S(r), c.value = s.value, a.value > "") {
|
29
|
+
var l = new RegExp(a.value, "i");
|
30
|
+
c.value = s.value.filter((D) => {
|
31
|
+
const R = JSON.stringify(D);
|
32
|
+
return l.test(R);
|
33
|
+
});
|
34
|
+
}
|
35
|
+
});
|
36
|
+
}
|
37
|
+
function v() {
|
38
|
+
_();
|
39
|
+
}
|
40
|
+
Y(v), f(w, v), f(n, _);
|
41
|
+
let m;
|
42
|
+
return f(a, async () => {
|
43
|
+
m && clearTimeout(m), m = setTimeout(() => {
|
44
|
+
var d = new RegExp(a.value, "i");
|
45
|
+
c.value = s.value.filter((e) => {
|
46
|
+
const r = JSON.stringify(e);
|
47
|
+
return d.test(r);
|
48
|
+
});
|
49
|
+
}, 700);
|
50
|
+
}), (d, e) => {
|
51
|
+
const r = V("FmSearch");
|
52
|
+
return C(), M(L, {
|
53
|
+
title: t(o)("transactions.title"),
|
54
|
+
description: t(o)("transactions.description"),
|
55
|
+
loading: t(p)
|
56
|
+
}, {
|
57
|
+
default: O(() => [
|
58
|
+
u("div", I, [
|
59
|
+
u("div", J, [
|
60
|
+
i(B),
|
61
|
+
i(r, {
|
62
|
+
"model-value": t(a),
|
63
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => y(a) ? a.value = l : null),
|
64
|
+
label: t(o)("transactions.search.title"),
|
65
|
+
placeholder: t(o)("transactions.search.placeholder")
|
66
|
+
}, null, 8, ["model-value", "label", "placeholder"])
|
67
|
+
]),
|
68
|
+
u("div", K, [
|
69
|
+
i(A, {
|
70
|
+
button: {
|
71
|
+
appendIcon: "file_download",
|
72
|
+
variant: "primary",
|
73
|
+
label: t(o)("transactions.button.export")
|
74
|
+
},
|
75
|
+
handler: async () => {
|
76
|
+
await t(g).downloadPortalTransactionReport(t(n), s.value);
|
77
|
+
}
|
78
|
+
}, null, 8, ["button", "handler"])
|
79
|
+
])
|
80
|
+
]),
|
81
|
+
u("div", U, [
|
82
|
+
i(F, {
|
83
|
+
modelValue: t(n),
|
84
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => y(n) ? n.value = l : null)
|
85
|
+
}, null, 8, ["modelValue"])
|
86
|
+
]),
|
87
|
+
i(N, {
|
88
|
+
loading: t(p),
|
89
|
+
data: c.value
|
90
|
+
}, null, 8, ["loading", "data"])
|
91
|
+
]),
|
92
|
+
_: 1
|
93
|
+
}, 8, ["title", "description", "loading"]);
|
94
|
+
};
|
95
|
+
}
|
96
|
+
});
|
97
|
+
export {
|
98
|
+
nt as default
|
99
|
+
};
|