@feedmepos/mf-payment 1.1.20 → 1.2.0
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/Forbidden-Dqw0MqyC.js +37 -0
- package/dist/{PayoutAccount-B50mbpXa.js → PayoutAccount-BvU23xuM.js} +126 -126
- package/dist/{PayoutAccount-ChnMSqoz.js → PayoutAccount-CLJp9Jyn.js} +6 -6
- package/dist/{PayoutAccountSetting-CYflBcUv.js → PayoutAccountSetting-DjrQRJDm.js} +3 -3
- package/dist/{Restaurant-Ddo7QfJv.js → Restaurant-C962cqyn.js} +4 -4
- package/dist/{RestaurantSetting-C_5OjEo4.js → RestaurantSetting-C2zHT9N3.js} +3 -3
- package/dist/{Settlement-DDZ6ll4r.js → Settlement-BHHc5YoF.js} +3 -3
- package/dist/{Settlement-DxMP0Iu2.js → Settlement-BZuKvRaG.js} +3 -3
- package/dist/{SettlementTransactions-4Z1eNypN.js → SettlementTransactions-T_NueCUi.js} +3 -3
- package/dist/{SettlementTransactions-VinJ6fUK.js → SettlementTransactions-zqQOlNmL.js} +3 -3
- package/dist/{Terminal-msh6w52E.js → Terminal-DEndcR6q.js} +94 -94
- package/dist/{TerminalSetting-B56NaLJG.js → TerminalSetting-Y11VutPg.js} +3 -3
- package/dist/{Transaction-BFEc8CE5.js → Transaction-BMh7HeF-.js} +143 -143
- package/dist/{Transaction-CJ6tkVm7.js → Transaction-CKHYz4EJ.js} +7 -7
- package/dist/{TransactionOld-CQCjIj-y.js → TransactionOld-CBu3JNau.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-Be5X-POy.js → TransactionTable.vue_vue_type_script_setup_true_lang-Bm6pV5Ps.js} +75 -71
- package/dist/{app-BMjpPKrE.js → app-BpdRZpkd.js} +213 -195
- package/dist/app.js +1 -1
- package/dist/{assets-uU5K-t3w.js → assets-CiNHrDU0.js} +25 -22
- package/dist/{grafana-jZIQEb-4.js → grafana-D4sIBgS0.js} +8 -8
- package/dist/{index-CeqaPQxS.js → index-B9Q6VJh7.js} +10 -7
- package/dist/{index-Ci5Z345g.js → index-C2ZxjTVN.js} +1 -1
- package/dist/{index-CWuISLUP.js → index-CJL2mrrn.js} +2 -2
- package/dist/{index-Db8vOED3.js → index-CtGB8IE0.js} +1 -1
- package/dist/{index-4jxBEYP_.js → index-CtH76apJ.js} +1 -1
- package/dist/{index-C2icSInW.js → index-CuBlZneL.js} +1 -1
- package/dist/{index-sQgEmNx9.js → index-D7YmrmZF.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-D8jBmVoN.js → index.vue_vue_type_script_setup_true_lang-C5YwGnbl.js} +19 -19
- package/dist/model/transaction.d.ts +2 -0
- package/dist/package.json +1 -1
- package/dist/{payout-account-CQou3k40.js → payout-account-DoiqVkOg.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/Forbidden.vue.d.ts +2 -0
- package/package.json +1 -1
@@ -1,93 +1,93 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { useSnackbar as
|
3
|
-
import { g as
|
4
|
-
import { e as h } from "./index-
|
5
|
-
import { g as
|
6
|
-
import { w as
|
1
|
+
import { defineComponent as y, resolveComponent as p, openBlock as l, createBlock as _, normalizeClass as D, withCtx as g, createElementVNode as E, toDisplayString as P, createElementBlock as A, unref as S, createVNode as N, Fragment as R, renderList as V, ref as U, h as f } from "vue";
|
2
|
+
import { useSnackbar as B, useDialog as $ } from "@feedmepos/ui-library";
|
3
|
+
import { g as L, a as G, t as b, c as k } from "./assets-CiNHrDU0.js";
|
4
|
+
import { e as h } from "./index-B9Q6VJh7.js";
|
5
|
+
import { g as O } from "./grafana-D4sIBgS0.js";
|
6
|
+
import { w as x } from "./Modal-DB8M9o1T.js";
|
7
7
|
import { u as T } from "./error-K1CakhA9.js";
|
8
|
-
import { useCoreStore as
|
9
|
-
const
|
8
|
+
import { useCoreStore as Y, useI18n as j } from "@feedmepos/mf-common";
|
9
|
+
const z = /* @__PURE__ */ y({
|
10
10
|
__name: "Status",
|
11
11
|
props: {
|
12
12
|
row: {},
|
13
13
|
data: {}
|
14
14
|
},
|
15
|
-
setup(
|
16
|
-
const n =
|
15
|
+
setup(s) {
|
16
|
+
const n = s;
|
17
17
|
function r() {
|
18
18
|
return n.data === h.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : n.data === h.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : n.data === h.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
19
19
|
}
|
20
|
-
return (
|
21
|
-
const u =
|
22
|
-
return l(),
|
20
|
+
return (c, i) => {
|
21
|
+
const u = p("FmBadge");
|
22
|
+
return l(), _(u, {
|
23
23
|
inline: "",
|
24
|
-
class:
|
24
|
+
class: D(r())
|
25
25
|
}, {
|
26
|
-
default:
|
27
|
-
|
26
|
+
default: g(() => [
|
27
|
+
E("div", null, P(c.data), 1)
|
28
28
|
]),
|
29
29
|
_: 1
|
30
30
|
}, 8, ["class"]);
|
31
31
|
};
|
32
32
|
}
|
33
|
-
}),
|
33
|
+
}), Q = ["src"], H = /* @__PURE__ */ y({
|
34
34
|
__name: "Gateway",
|
35
35
|
props: {
|
36
36
|
row: {},
|
37
37
|
data: {}
|
38
38
|
},
|
39
|
-
setup(
|
40
|
-
return (n, r) => (l(),
|
39
|
+
setup(s) {
|
40
|
+
return (n, r) => (l(), A("img", {
|
41
41
|
class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
|
42
|
-
src:
|
43
|
-
}, null, 8,
|
42
|
+
src: S(L)(n.row.original.gateway)
|
43
|
+
}, null, 8, Q));
|
44
44
|
}
|
45
|
-
}),
|
45
|
+
}), J = ["src"], W = /* @__PURE__ */ y({
|
46
46
|
__name: "Method",
|
47
47
|
props: {
|
48
48
|
row: {},
|
49
49
|
data: {}
|
50
50
|
},
|
51
|
-
setup(
|
51
|
+
setup(s) {
|
52
52
|
return (n, r) => {
|
53
|
-
const
|
54
|
-
return l(),
|
53
|
+
const c = p("FmTooltip");
|
54
|
+
return l(), _(c, {
|
55
55
|
variant: "plain",
|
56
56
|
placement: "top",
|
57
57
|
content: n.row.original.method.issuer,
|
58
58
|
"hide-arrow": !0
|
59
59
|
}, {
|
60
|
-
default:
|
61
|
-
|
60
|
+
default: g(() => [
|
61
|
+
E("img", {
|
62
62
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
63
|
-
src:
|
64
|
-
}, null, 8,
|
63
|
+
src: S(G)(n.row.original.method.issuer, n.row.original.method.variant)
|
64
|
+
}, null, 8, J)
|
65
65
|
]),
|
66
66
|
_: 1
|
67
67
|
}, 8, ["content"]);
|
68
68
|
};
|
69
69
|
}
|
70
|
-
}),
|
70
|
+
}), X = /* @__PURE__ */ y({
|
71
71
|
__name: "Actions",
|
72
72
|
props: {
|
73
73
|
onAction: { type: Function },
|
74
74
|
transaction: {}
|
75
75
|
},
|
76
|
-
setup(
|
76
|
+
setup(s) {
|
77
77
|
const n = [
|
78
|
-
|
78
|
+
s.transaction.flags.query && {
|
79
79
|
label: "Query",
|
80
80
|
sublabel: "Perform transaction status inquriy",
|
81
81
|
icon: "question_answer",
|
82
82
|
action: "query"
|
83
83
|
},
|
84
|
-
|
84
|
+
s.transaction.flags.refund && {
|
85
85
|
label: "Refund",
|
86
86
|
sublabel: "Perform transaction refund request",
|
87
87
|
icon: "request_page",
|
88
88
|
action: "refund"
|
89
89
|
},
|
90
|
-
|
90
|
+
s.transaction.flags.notify && {
|
91
91
|
label: "Notify",
|
92
92
|
sublabel: "Perform webhook notification for transaction",
|
93
93
|
icon: "webhook",
|
@@ -100,19 +100,19 @@ const j = /* @__PURE__ */ m({
|
|
100
100
|
action: "history"
|
101
101
|
}
|
102
102
|
];
|
103
|
-
return (r,
|
104
|
-
const
|
105
|
-
return l(),
|
106
|
-
onClick:
|
103
|
+
return (r, c) => {
|
104
|
+
const i = p("FmIcon"), u = p("FmMenuItem"), d = p("FmMenu");
|
105
|
+
return l(), A("div", {
|
106
|
+
onClick: c[0] || (c[0] = (a) => {
|
107
107
|
a.stopPropagation();
|
108
108
|
})
|
109
109
|
}, [
|
110
|
-
|
111
|
-
"menu-button":
|
112
|
-
|
110
|
+
N(d, null, {
|
111
|
+
"menu-button": g(() => [
|
112
|
+
N(i, { name: "settings" })
|
113
113
|
]),
|
114
|
-
default:
|
115
|
-
(l(!0),
|
114
|
+
default: g(() => [
|
115
|
+
(l(!0), A(R, null, V(n.filter((a) => !!a), (a) => (l(), _(u, {
|
116
116
|
selectable: !0,
|
117
117
|
key: a.label,
|
118
118
|
sublabel: a.sublabel,
|
@@ -126,7 +126,7 @@ const j = /* @__PURE__ */ m({
|
|
126
126
|
]);
|
127
127
|
};
|
128
128
|
}
|
129
|
-
}),
|
129
|
+
}), ie = /* @__PURE__ */ y({
|
130
130
|
__name: "TransactionTable",
|
131
131
|
props: {
|
132
132
|
data: {
|
@@ -139,26 +139,26 @@ const j = /* @__PURE__ */ m({
|
|
139
139
|
}
|
140
140
|
},
|
141
141
|
emits: ["row-click"],
|
142
|
-
setup(
|
143
|
-
var I;
|
144
|
-
const r =
|
142
|
+
setup(s, { emit: n }) {
|
143
|
+
var q, I;
|
144
|
+
const r = s, c = n, i = B(), u = $(), { sessionUser: d } = Y(), { t: a } = j();
|
145
145
|
async function K(t) {
|
146
146
|
try {
|
147
147
|
const e = await b.refetchTransaction({ transactionId: t.id });
|
148
|
-
r.data.map((
|
148
|
+
r.data.map((o) => o.id === e._id ? k(e) : o), i.open({
|
149
149
|
type: "success",
|
150
150
|
title: "Transaction queried and updated successfully."
|
151
151
|
});
|
152
152
|
} catch (e) {
|
153
|
-
|
153
|
+
i.open({
|
154
154
|
type: "error",
|
155
155
|
title: "Fail to query transaction.",
|
156
156
|
message: T(e)
|
157
157
|
});
|
158
158
|
}
|
159
159
|
}
|
160
|
-
async function
|
161
|
-
|
160
|
+
async function v(t) {
|
161
|
+
x(
|
162
162
|
u,
|
163
163
|
"Refund Transaction",
|
164
164
|
"Are you sure to refund transaction? This action cannot be revert!",
|
@@ -169,12 +169,12 @@ const j = /* @__PURE__ */ m({
|
|
169
169
|
reason: "portal transaction refund",
|
170
170
|
amount: t.fdoAmount
|
171
171
|
});
|
172
|
-
r.data.map((
|
172
|
+
r.data.map((o) => o.id === e._id ? k(e) : o), i.open({
|
173
173
|
type: "success",
|
174
174
|
title: "Transaction refund request initiated."
|
175
175
|
});
|
176
176
|
} catch (e) {
|
177
|
-
|
177
|
+
i.open({
|
178
178
|
type: "error",
|
179
179
|
title: "Fail to request refund transaction.",
|
180
180
|
message: T(e)
|
@@ -184,18 +184,18 @@ const j = /* @__PURE__ */ m({
|
|
184
184
|
);
|
185
185
|
}
|
186
186
|
async function C(t) {
|
187
|
-
|
187
|
+
x(
|
188
188
|
u,
|
189
189
|
"Notify Transaction",
|
190
190
|
"Are you sure to perform notify transaction?",
|
191
191
|
async () => {
|
192
192
|
try {
|
193
|
-
await b.renotifyTransaction(t.id),
|
193
|
+
await b.renotifyTransaction(t.id), i.open({
|
194
194
|
type: "success",
|
195
195
|
title: "Transaction notify successfully."
|
196
196
|
});
|
197
197
|
} catch (e) {
|
198
|
-
|
198
|
+
i.open({
|
199
199
|
type: "error",
|
200
200
|
title: "Fail to notify transaction.",
|
201
201
|
message: T(e)
|
@@ -205,7 +205,7 @@ const j = /* @__PURE__ */ m({
|
|
205
205
|
);
|
206
206
|
}
|
207
207
|
async function M(t) {
|
208
|
-
const e =
|
208
|
+
const e = O([
|
209
209
|
{
|
210
210
|
type: "span",
|
211
211
|
queryKey: "transaction.id",
|
@@ -214,7 +214,7 @@ const j = /* @__PURE__ */ m({
|
|
214
214
|
], t.transactionAt);
|
215
215
|
window.open(e, "_blank");
|
216
216
|
}
|
217
|
-
const
|
217
|
+
const w = U(""), F = [
|
218
218
|
{
|
219
219
|
header: () => a("payment.transactions.table.id"),
|
220
220
|
accessorKey: "id"
|
@@ -237,7 +237,7 @@ const j = /* @__PURE__ */ m({
|
|
237
237
|
meta: {
|
238
238
|
textAlign: "center"
|
239
239
|
},
|
240
|
-
cell: ({ cell: t, row: e }) => e.original.gateway ?
|
240
|
+
cell: ({ cell: t, row: e }) => e.original.gateway ? f(H, { row: e, data: t.getValue() }) : ""
|
241
241
|
},
|
242
242
|
{
|
243
243
|
header: () => a("payment.transactions.table.method"),
|
@@ -245,7 +245,7 @@ const j = /* @__PURE__ */ m({
|
|
245
245
|
meta: {
|
246
246
|
textAlign: "center"
|
247
247
|
},
|
248
|
-
cell: ({ cell: t, row: e }) => e.original.method ?
|
248
|
+
cell: ({ cell: t, row: e }) => e.original.method ? f(W, { row: e, data: t.getValue() }) : ""
|
249
249
|
},
|
250
250
|
{
|
251
251
|
header: () => a("payment.transactions.table.type"),
|
@@ -257,7 +257,7 @@ const j = /* @__PURE__ */ m({
|
|
257
257
|
{
|
258
258
|
header: () => a("payment.transactions.table.status"),
|
259
259
|
accessorKey: "status",
|
260
|
-
cell: ({ cell: t, row: e }) =>
|
260
|
+
cell: ({ cell: t, row: e }) => f(z, { row: e, data: t.getValue() })
|
261
261
|
},
|
262
262
|
{
|
263
263
|
header: () => a("payment.transactions.table.restaurant"),
|
@@ -278,13 +278,17 @@ const j = /* @__PURE__ */ m({
|
|
278
278
|
},
|
279
279
|
{
|
280
280
|
header: () => a("payment.transactions.table.sales_amount"),
|
281
|
-
accessorKey: "amount"
|
281
|
+
accessorKey: "amount",
|
282
|
+
cell: ({ cell: t, row: e }) => {
|
283
|
+
var o, m;
|
284
|
+
return ((o = d.value) != null && o.role.isStaff || (m = d.value) != null && m.role.isAdmin) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
|
285
|
+
}
|
282
286
|
}
|
283
287
|
];
|
284
|
-
return (I =
|
288
|
+
return ((q = d.value) != null && q.role.isStaff || (I = d.value) != null && I.role.isAdmin) && F.push({
|
285
289
|
header: () => a("payment.transactions.table.actions"),
|
286
290
|
accessorKey: "actions",
|
287
|
-
cell: ({ row: t }) =>
|
291
|
+
cell: ({ row: t }) => f(X, {
|
288
292
|
transaction: t.original,
|
289
293
|
onAction: (e) => {
|
290
294
|
switch (e) {
|
@@ -293,25 +297,25 @@ const j = /* @__PURE__ */ m({
|
|
293
297
|
case "query":
|
294
298
|
return K(t.original);
|
295
299
|
case "refund":
|
296
|
-
return
|
300
|
+
return v(t.original);
|
297
301
|
case "history":
|
298
302
|
return M(t.original);
|
299
303
|
}
|
300
304
|
}
|
301
305
|
})
|
302
306
|
}), (t, e) => {
|
303
|
-
const
|
304
|
-
return l(),
|
305
|
-
modelValue:
|
306
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
307
|
+
const o = p("FmTable");
|
308
|
+
return l(), _(o, {
|
309
|
+
modelValue: w.value,
|
310
|
+
"onUpdate:modelValue": e[0] || (e[0] = (m) => w.value = m),
|
307
311
|
"column-defs": F,
|
308
312
|
"row-data": r.data,
|
309
313
|
loading: r.loading,
|
310
|
-
onRowClick: e[1] || (e[1] = (
|
314
|
+
onRowClick: e[1] || (e[1] = (m) => c("row-click", r.data.at(m.index)))
|
311
315
|
}, null, 8, ["modelValue", "row-data", "loading"]);
|
312
316
|
};
|
313
317
|
}
|
314
318
|
});
|
315
319
|
export {
|
316
|
-
|
320
|
+
ie as _
|
317
321
|
};
|