@feedmepos/mf-payment 1.2.8 → 1.2.9
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-3oqUAPya.js → PayoutAccount-6hKHVfxm.js} +5 -5
- package/dist/{PayoutAccount-BFd4ZkgD.js → PayoutAccount-WsuvGGev.js} +6 -6
- package/dist/{PayoutAccountSetting-CRRr0KtX.js → PayoutAccountSetting-kFtY4hnm.js} +3 -3
- package/dist/{Restaurant-RkwI3GUs.js → Restaurant-BF_jXqhL.js} +4 -4
- package/dist/{RestaurantSetting-hhg1zuef.js → RestaurantSetting-sMZOnkjW.js} +3 -3
- package/dist/{Settlement-qZtRxnVP.js → Settlement-BEwx2k_h.js} +3 -3
- package/dist/{Settlement-pYqYrtHG.js → Settlement-UYX8-U_n.js} +3 -3
- package/dist/{SettlementTransactions-4NCIvfQ5.js → SettlementTransactions-DONlto2W.js} +3 -3
- package/dist/{SettlementTransactions-BCwKrESr.js → SettlementTransactions-WxLHkiuw.js} +3 -3
- package/dist/{Terminal-yvHejCtx.js → Terminal-DDecseOO.js} +5 -5
- package/dist/{TerminalSetting-CL7ip769.js → TerminalSetting-B-Rlwf2-.js} +3 -3
- package/dist/{Transaction-iyjpVywA.js → Transaction-B2tEOXXd.js} +7 -7
- package/dist/{Transaction-DW8YObK7.js → Transaction-CNi-na7f.js} +5 -5
- package/dist/{TransactionOld-CcraFd4T.js → TransactionOld-C64e3hQJ.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-C9RzkJqY.js → TransactionTable.vue_vue_type_script_setup_true_lang-Cyljl6hU.js} +120 -112
- package/dist/{app-DbMeEwqM.js → app-gcoIGoMD.js} +217 -217
- package/dist/app.js +1 -1
- package/dist/{assets-B9vrS-eB.js → assets-CK0-Pj07.js} +2 -2
- package/dist/{grafana-Wua_krwL.js → grafana-coUWFWSV.js} +1 -1
- package/dist/{index-CK_oj7_Z.js → index-CJOPvwhx.js} +2 -2
- package/dist/{index-CRS1GaGe.js → index-CWIdEOSU.js} +1 -1
- package/dist/{index-DERDDTKs.js → index-CkVQi3Lk.js} +1 -1
- package/dist/{index-OI7B02F1.js → index-CuIq1ul_.js} +1 -1
- package/dist/{index-C7-Hhotq.js → index-D7qO1KG7.js} +955 -955
- package/dist/{index-Yi03mqle.js → index-x32ArWhF.js} +1 -1
- package/dist/{index-DZgB_6gq.js → index-z09M1hMv.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-yfTw0igA.js → index.vue_vue_type_script_setup_true_lang-Cnb3Y4z-.js} +27 -27
- package/dist/package.json +1 -1
- package/dist/{payout-account-CShensYL.js → payout-account-mZ8eNPNW.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- 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
|
5
|
-
import { g as
|
6
|
-
import { w as
|
7
|
-
import { u as
|
8
|
-
import { useCoreStore as
|
9
|
-
const
|
1
|
+
import { defineComponent as p, resolveComponent as m, openBlock as u, createBlock as b, normalizeClass as R, withCtx as _, createElementVNode as S, toDisplayString as V, createElementBlock as A, unref as K, createVNode as N, Fragment as U, renderList as B, ref as k, watch as $, h as g } from "vue";
|
2
|
+
import { useSnackbar as L, useDialog as G } from "@feedmepos/ui-library";
|
3
|
+
import { g as O, a as Y, t as h, c as x } from "./assets-CK0-Pj07.js";
|
4
|
+
import { e as T } from "./index-D7qO1KG7.js";
|
5
|
+
import { g as j } from "./grafana-coUWFWSV.js";
|
6
|
+
import { w as E } from "./Modal-DB8M9o1T.js";
|
7
|
+
import { u as w } from "./error-K1CakhA9.js";
|
8
|
+
import { useCoreStore as z, useI18n as Q } from "@feedmepos/mf-common";
|
9
|
+
const H = /* @__PURE__ */ p({
|
10
10
|
__name: "Status",
|
11
11
|
props: {
|
12
12
|
row: {},
|
13
13
|
data: {}
|
14
14
|
},
|
15
|
-
setup(
|
16
|
-
const
|
17
|
-
function
|
18
|
-
return
|
15
|
+
setup(c) {
|
16
|
+
const r = c;
|
17
|
+
function l() {
|
18
|
+
return r.data === T.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : r.data === T.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : r.data === T.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
|
22
|
-
return
|
20
|
+
return (a, y) => {
|
21
|
+
const s = m("FmBadge");
|
22
|
+
return u(), b(s, {
|
23
23
|
inline: "",
|
24
|
-
class:
|
24
|
+
class: R(l())
|
25
25
|
}, {
|
26
|
-
default:
|
27
|
-
|
26
|
+
default: _(() => [
|
27
|
+
S("div", null, V(a.data), 1)
|
28
28
|
]),
|
29
29
|
_: 1
|
30
30
|
}, 8, ["class"]);
|
31
31
|
};
|
32
32
|
}
|
33
|
-
}),
|
33
|
+
}), J = ["src"], W = /* @__PURE__ */ p({
|
34
34
|
__name: "Gateway",
|
35
35
|
props: {
|
36
36
|
row: {},
|
37
37
|
data: {}
|
38
38
|
},
|
39
|
-
setup(
|
40
|
-
return (
|
39
|
+
setup(c) {
|
40
|
+
return (r, l) => (u(), A("img", {
|
41
41
|
class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
|
42
|
-
src:
|
43
|
-
}, null, 8,
|
42
|
+
src: K(O)(r.row.original.gateway)
|
43
|
+
}, null, 8, J));
|
44
44
|
}
|
45
|
-
}),
|
45
|
+
}), X = ["src"], Z = /* @__PURE__ */ p({
|
46
46
|
__name: "Method",
|
47
47
|
props: {
|
48
48
|
row: {},
|
49
49
|
data: {}
|
50
50
|
},
|
51
|
-
setup(
|
52
|
-
return (
|
53
|
-
const
|
54
|
-
return
|
51
|
+
setup(c) {
|
52
|
+
return (r, l) => {
|
53
|
+
const a = m("FmTooltip");
|
54
|
+
return u(), b(a, {
|
55
55
|
variant: "plain",
|
56
56
|
placement: "top",
|
57
|
-
content:
|
57
|
+
content: r.row.original.method.issuer,
|
58
58
|
"hide-arrow": !0
|
59
59
|
}, {
|
60
|
-
default:
|
61
|
-
|
60
|
+
default: _(() => [
|
61
|
+
S("img", {
|
62
62
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
63
|
-
src:
|
64
|
-
}, null, 8,
|
63
|
+
src: K(Y)(r.row.original.method.issuer, r.row.original.method.variant)
|
64
|
+
}, null, 8, X)
|
65
65
|
]),
|
66
66
|
_: 1
|
67
67
|
}, 8, ["content"]);
|
68
68
|
};
|
69
69
|
}
|
70
|
-
}),
|
70
|
+
}), ee = /* @__PURE__ */ p({
|
71
71
|
__name: "Actions",
|
72
72
|
props: {
|
73
73
|
onAction: { type: Function },
|
74
74
|
transaction: {}
|
75
75
|
},
|
76
|
-
setup(
|
77
|
-
const
|
78
|
-
|
76
|
+
setup(c) {
|
77
|
+
const r = [
|
78
|
+
c.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
|
+
c.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
|
+
c.transaction.flags.notify && {
|
91
91
|
label: "Notify",
|
92
92
|
sublabel: "Perform webhook notification for transaction",
|
93
93
|
icon: "webhook",
|
@@ -100,25 +100,25 @@ const z = /* @__PURE__ */ y({
|
|
100
100
|
action: "history"
|
101
101
|
}
|
102
102
|
];
|
103
|
-
return (
|
104
|
-
const
|
105
|
-
return
|
106
|
-
onClick:
|
107
|
-
|
103
|
+
return (l, a) => {
|
104
|
+
const y = m("FmIcon"), s = m("FmMenuItem"), f = m("FmMenu");
|
105
|
+
return u(), A("div", {
|
106
|
+
onClick: a[0] || (a[0] = (n) => {
|
107
|
+
n.stopPropagation();
|
108
108
|
})
|
109
109
|
}, [
|
110
|
-
N(
|
111
|
-
"menu-button":
|
112
|
-
N(
|
110
|
+
N(f, null, {
|
111
|
+
"menu-button": _(() => [
|
112
|
+
N(y, { name: "settings" })
|
113
113
|
]),
|
114
|
-
default:
|
115
|
-
(
|
114
|
+
default: _(() => [
|
115
|
+
(u(!0), A(U, null, B(r.filter((n) => !!n), (n) => (u(), b(s, {
|
116
116
|
selectable: !0,
|
117
|
-
key:
|
118
|
-
sublabel:
|
119
|
-
label:
|
120
|
-
icon:
|
121
|
-
onclick: () =>
|
117
|
+
key: n.label,
|
118
|
+
sublabel: n.sublabel,
|
119
|
+
label: n.label,
|
120
|
+
icon: n.icon,
|
121
|
+
onclick: () => l.onAction(n.action)
|
122
122
|
}, null, 8, ["sublabel", "label", "icon", "onclick"]))), 128))
|
123
123
|
]),
|
124
124
|
_: 1
|
@@ -126,7 +126,7 @@ const z = /* @__PURE__ */ y({
|
|
126
126
|
]);
|
127
127
|
};
|
128
128
|
}
|
129
|
-
}),
|
129
|
+
}), le = /* @__PURE__ */ p({
|
130
130
|
__name: "TransactionTable",
|
131
131
|
props: {
|
132
132
|
data: {
|
@@ -139,73 +139,81 @@ const z = /* @__PURE__ */ y({
|
|
139
139
|
}
|
140
140
|
},
|
141
141
|
emits: ["row-click"],
|
142
|
-
setup(
|
142
|
+
setup(c, { emit: r }) {
|
143
143
|
var q, I;
|
144
|
-
const
|
145
|
-
|
144
|
+
const l = c, a = k([...l.data]);
|
145
|
+
$(
|
146
|
+
() => l.data,
|
147
|
+
(t) => {
|
148
|
+
a.value = [...t];
|
149
|
+
},
|
150
|
+
{ deep: !0, immediate: !0 }
|
151
|
+
);
|
152
|
+
const y = r, s = L(), f = G(), { sessionUser: n } = z(), { t: o } = Q();
|
153
|
+
async function C(t) {
|
146
154
|
try {
|
147
|
-
const e = await
|
148
|
-
|
155
|
+
const e = await h.refetchTransaction({ transactionId: t.id });
|
156
|
+
a.value = a.value.map((i) => i.id === e._id ? x(e) : i), s.open({
|
149
157
|
type: "success",
|
150
158
|
title: "Transaction queried and updated successfully."
|
151
159
|
});
|
152
160
|
} catch (e) {
|
153
|
-
|
161
|
+
s.open({
|
154
162
|
type: "error",
|
155
163
|
title: "Fail to query transaction.",
|
156
|
-
message:
|
164
|
+
message: w(e)
|
157
165
|
});
|
158
166
|
}
|
159
167
|
}
|
160
|
-
async function
|
161
|
-
|
162
|
-
|
168
|
+
async function M(t) {
|
169
|
+
E(
|
170
|
+
f,
|
163
171
|
"Refund Transaction",
|
164
172
|
"Are you sure to refund transaction? This action cannot be revert!",
|
165
173
|
async () => {
|
166
174
|
try {
|
167
|
-
const e = await
|
175
|
+
const e = await h.refundTransaction({
|
168
176
|
transactionId: t.id,
|
169
177
|
reason: "portal transaction refund",
|
170
178
|
amount: t.fdoAmount
|
171
179
|
});
|
172
|
-
|
180
|
+
a.value = a.value.map((i) => i.id === e._id ? x(e) : i), s.open({
|
173
181
|
type: "success",
|
174
182
|
title: "Transaction refund request initiated."
|
175
183
|
});
|
176
184
|
} catch (e) {
|
177
|
-
|
185
|
+
s.open({
|
178
186
|
type: "error",
|
179
187
|
title: "Fail to request refund transaction.",
|
180
|
-
message:
|
188
|
+
message: w(e)
|
181
189
|
});
|
182
190
|
}
|
183
191
|
}
|
184
192
|
);
|
185
193
|
}
|
186
|
-
async function
|
187
|
-
|
188
|
-
|
194
|
+
async function D(t) {
|
195
|
+
E(
|
196
|
+
f,
|
189
197
|
"Notify Transaction",
|
190
198
|
"Are you sure to perform notify transaction?",
|
191
199
|
async () => {
|
192
200
|
try {
|
193
|
-
await
|
201
|
+
await h.renotifyTransaction(t.id), s.open({
|
194
202
|
type: "success",
|
195
203
|
title: "Transaction notify successfully."
|
196
204
|
});
|
197
205
|
} catch (e) {
|
198
|
-
|
206
|
+
s.open({
|
199
207
|
type: "error",
|
200
208
|
title: "Fail to notify transaction.",
|
201
|
-
message:
|
209
|
+
message: w(e)
|
202
210
|
});
|
203
211
|
}
|
204
212
|
}
|
205
213
|
);
|
206
214
|
}
|
207
|
-
async function
|
208
|
-
const e =
|
215
|
+
async function P(t) {
|
216
|
+
const e = j([
|
209
217
|
{
|
210
218
|
type: "span",
|
211
219
|
queryKey: "transaction.id",
|
@@ -214,62 +222,62 @@ const z = /* @__PURE__ */ y({
|
|
214
222
|
], t.transactionAt);
|
215
223
|
window.open(e, "_blank");
|
216
224
|
}
|
217
|
-
const
|
225
|
+
const F = k(""), v = [
|
218
226
|
{
|
219
|
-
header: () =>
|
227
|
+
header: () => o("payment.transactions.table.id"),
|
220
228
|
accessorKey: "id"
|
221
229
|
},
|
222
230
|
{
|
223
|
-
header: () =>
|
231
|
+
header: () => o("payment.transactions.table.pay_id"),
|
224
232
|
accessorKey: "payId"
|
225
233
|
},
|
226
234
|
{
|
227
|
-
header: () =>
|
235
|
+
header: () => o("payment.transactions.table.gateway_id"),
|
228
236
|
accessorKey: "gatewayTransactionId"
|
229
237
|
},
|
230
238
|
{
|
231
|
-
header: () =>
|
239
|
+
header: () => o("payment.transactions.table.bill_seq"),
|
232
240
|
accessorKey: "seqNumber"
|
233
241
|
},
|
234
242
|
{
|
235
|
-
header: () =>
|
243
|
+
header: () => o("payment.transactions.table.gateway"),
|
236
244
|
accessorKey: "gateway",
|
237
245
|
meta: {
|
238
246
|
textAlign: "center"
|
239
247
|
},
|
240
|
-
cell: ({ cell: t, row: e }) => e.original.gateway ?
|
248
|
+
cell: ({ cell: t, row: e }) => e.original.gateway ? g(W, { row: e, data: t.getValue() }) : ""
|
241
249
|
},
|
242
250
|
{
|
243
|
-
header: () =>
|
251
|
+
header: () => o("payment.transactions.table.method"),
|
244
252
|
accessorKey: "method",
|
245
253
|
meta: {
|
246
254
|
textAlign: "center"
|
247
255
|
},
|
248
|
-
cell: ({ cell: t, row: e }) => e.original.method ?
|
256
|
+
cell: ({ cell: t, row: e }) => e.original.method ? g(Z, { row: e, data: t.getValue() }) : ""
|
249
257
|
},
|
250
258
|
{
|
251
|
-
header: () =>
|
259
|
+
header: () => o("payment.transactions.table.type"),
|
252
260
|
accessorKey: "payFor",
|
253
261
|
meta: {
|
254
262
|
textAlign: "center"
|
255
263
|
}
|
256
264
|
},
|
257
265
|
{
|
258
|
-
header: () =>
|
266
|
+
header: () => o("payment.transactions.table.status"),
|
259
267
|
accessorKey: "status",
|
260
|
-
cell: ({ cell: t, row: e }) =>
|
268
|
+
cell: ({ cell: t, row: e }) => g(H, { row: e, data: t.getValue() })
|
261
269
|
},
|
262
270
|
{
|
263
|
-
header: () =>
|
271
|
+
header: () => o("payment.transactions.table.restaurant"),
|
264
272
|
accessorKey: "restaurantId"
|
265
273
|
},
|
266
274
|
{
|
267
|
-
header: () =>
|
275
|
+
header: () => o("payment.transactions.table.source"),
|
268
276
|
accessorKey: "source",
|
269
277
|
cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
|
270
278
|
},
|
271
279
|
{
|
272
|
-
header: () =>
|
280
|
+
header: () => o("payment.transactions.table.transaction_at"),
|
273
281
|
accessorKey: "transactionAt",
|
274
282
|
meta: {
|
275
283
|
width: "180px"
|
@@ -277,45 +285,45 @@ const z = /* @__PURE__ */ y({
|
|
277
285
|
cell: ({ cell: t, row: e }) => e.original.status === "REFUNDED" ? e.original.refundedAt : e.original.transactionAt
|
278
286
|
},
|
279
287
|
{
|
280
|
-
header: () =>
|
288
|
+
header: () => o("payment.transactions.table.sales_amount"),
|
281
289
|
accessorKey: "amount",
|
282
290
|
cell: ({ cell: t, row: e }) => {
|
283
|
-
var
|
284
|
-
return ((
|
291
|
+
var i, d;
|
292
|
+
return ((i = n.value) != null && i.role.isStaff || (d = n.value) != null && d.role.isAdmin) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
|
285
293
|
}
|
286
294
|
}
|
287
295
|
];
|
288
|
-
return ((q =
|
289
|
-
header: () =>
|
296
|
+
return ((q = n.value) != null && q.role.isStaff || (I = n.value) != null && I.role.isAdmin) && v.push({
|
297
|
+
header: () => o("payment.transactions.table.actions"),
|
290
298
|
accessorKey: "actions",
|
291
|
-
cell: ({ row: t }) =>
|
299
|
+
cell: ({ row: t }) => g(ee, {
|
292
300
|
transaction: t.original,
|
293
301
|
onAction: (e) => {
|
294
302
|
switch (e) {
|
295
303
|
case "notify":
|
296
|
-
return
|
304
|
+
return D(t.original);
|
297
305
|
case "query":
|
298
|
-
return
|
306
|
+
return C(t.original);
|
299
307
|
case "refund":
|
300
|
-
return v(t.original);
|
301
|
-
case "history":
|
302
308
|
return M(t.original);
|
309
|
+
case "history":
|
310
|
+
return P(t.original);
|
303
311
|
}
|
304
312
|
}
|
305
313
|
})
|
306
314
|
}), (t, e) => {
|
307
|
-
const
|
308
|
-
return
|
309
|
-
modelValue:
|
310
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
311
|
-
"column-defs":
|
312
|
-
"row-data":
|
313
|
-
loading:
|
314
|
-
onRowClick: e[1] || (e[1] = (
|
315
|
+
const i = m("FmTable");
|
316
|
+
return u(), b(i, {
|
317
|
+
modelValue: F.value,
|
318
|
+
"onUpdate:modelValue": e[0] || (e[0] = (d) => F.value = d),
|
319
|
+
"column-defs": v,
|
320
|
+
"row-data": a.value,
|
321
|
+
loading: l.loading,
|
322
|
+
onRowClick: e[1] || (e[1] = (d) => y("row-click", a.value.at(d.index)))
|
315
323
|
}, null, 8, ["modelValue", "row-data", "loading"]);
|
316
324
|
};
|
317
325
|
}
|
318
326
|
});
|
319
327
|
export {
|
320
|
-
|
328
|
+
le as _
|
321
329
|
};
|