@feedmepos/mf-payment 1.2.11 → 1.2.13
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/AutoCopyCell.vue_vue_type_script_setup_true_lang-XC4V0tsX.js +40 -0
- package/dist/{PayoutAccount-BPD8f21N.js → PayoutAccount-BallFJB0.js} +5 -5
- package/dist/{PayoutAccount-DLhT0cgm.js → PayoutAccount-d7sLsB5J.js} +6 -6
- package/dist/{PayoutAccountSetting-Cc2XkDvW.js → PayoutAccountSetting-wKE68NqB.js} +3 -3
- package/dist/{Restaurant-QmZ5m6aX.js → Restaurant-CA3nbrzh.js} +5 -5
- package/dist/{RestaurantSetting-D0GFUJAg.js → RestaurantSetting-CJdlyxX7.js} +3 -3
- package/dist/{Settlement-MJFzi4Zt.js → Settlement-BEXf60UK.js} +4 -4
- package/dist/{Settlement-BIk63DvT.js → Settlement-Cnbk9m6D.js} +4 -4
- package/dist/SettlementTransactions-D-lWN15V.js +362 -0
- package/dist/SettlementTransactions-Pto6c_3v.js +323 -0
- package/dist/{Terminal-DYkp1mv0.js → Terminal-B3S_wOTA.js} +5 -5
- package/dist/{TerminalSetting-DmPRtCsa.js → TerminalSetting-tSDETEOb.js} +3 -3
- package/dist/{Transaction-CimYTaB8.js → Transaction-BY4EF2Z2.js} +125 -94
- package/dist/{Transaction-Bh_Psoae.js → Transaction-DsYgbjyl.js} +7 -7
- package/dist/{TransactionOld-CiWIwxJ7.js → TransactionOld-BY_4OAOA.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-2FzzyKdR.js → TransactionTable.vue_vue_type_script_setup_true_lang-C02jC4yj.js} +115 -93
- package/dist/{app-ByopJolk.js → app-BiKLWpiD.js} +347 -347
- package/dist/app.js +1 -1
- package/dist/{assets-DfdrUzgm.js → assets-C4cUIo0F.js} +3 -2
- package/dist/components/AutoCopyCell.vue.d.ts +1 -0
- package/dist/{grafana-ey8F5lgL.js → grafana-DRHro6WQ.js} +1 -1
- package/dist/{index-GqLxFyy5.js → index-0_vl4Euu.js} +1 -1
- package/dist/{index-tX_6kqCz.js → index-4QkP1zBY.js} +1 -1
- package/dist/{index-9HYkBEVP.js → index-BTIQHrH_.js} +1 -1
- package/dist/{index-D1HPnn1H.js → index-BWaS2Ice.js} +982 -982
- package/dist/{index-CxUSH_LL.js → index-Bohmvrj5.js} +1 -1
- package/dist/{index-DLoPHbRf.js → index-DJlXGssK.js} +1 -1
- package/dist/{index-C9mXyA-9.js → index-DeoktQzV.js} +2 -2
- package/dist/{index.vue_vue_type_script_setup_true_lang-xEGnd1Sr.js → index.vue_vue_type_script_setup_true_lang-wZFI0CDi.js} +1 -1
- package/dist/model/transaction.d.ts +1 -0
- package/dist/package.json +1 -1
- package/dist/{payout-account-B7N8ePXF.js → payout-account-CtfOQFPT.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/settlement/cell/Gateway.vue.d.ts +1 -1
- package/dist/views/admin/settlement/cell/Method.vue.d.ts +1 -1
- package/dist/views/admin/transaction/cell/Gateway.vue.d.ts +1 -1
- package/dist/views/admin/transaction/cell/Method.vue.d.ts +1 -1
- package/dist/views/settlement/cell/Gateway.vue.d.ts +1 -1
- package/dist/views/settlement/cell/Method.vue.d.ts +1 -1
- package/dist/views/transaction/cell/Gateway.vue.d.ts +1 -1
- package/package.json +1 -1
- package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js +0 -39
- package/dist/SettlementTransactions-Diz_eig2.js +0 -336
- package/dist/SettlementTransactions-MBqrZMZx.js +0 -297
@@ -1,80 +1,93 @@
|
|
1
|
-
import { defineComponent as
|
1
|
+
import { defineComponent as y, resolveComponent as d, openBlock as m, createBlock as f, normalizeClass as R, withCtx as p, createElementVNode as w, toDisplayString as V, unref as K, createElementBlock as N, createVNode as k, Fragment as U, renderList as B, ref as S, watch as $, h as b } from "vue";
|
2
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-
|
4
|
-
import { e as T } from "./index-
|
5
|
-
import { g as
|
3
|
+
import { g as O, a as Y, t as h, c as x } from "./assets-C4cUIo0F.js";
|
4
|
+
import { e as T } from "./index-BWaS2Ice.js";
|
5
|
+
import { g as z } from "./grafana-DRHro6WQ.js";
|
6
6
|
import { w as E } from "./Modal-DB8M9o1T.js";
|
7
|
-
import { u as
|
8
|
-
import { useCoreStore as
|
9
|
-
const H = /* @__PURE__ */
|
7
|
+
import { u as A } from "./error-K1CakhA9.js";
|
8
|
+
import { useCoreStore as Q, useI18n as j } from "@feedmepos/mf-common";
|
9
|
+
const H = /* @__PURE__ */ y({
|
10
10
|
__name: "Status",
|
11
11
|
props: {
|
12
12
|
row: {},
|
13
13
|
data: {}
|
14
14
|
},
|
15
15
|
setup(c) {
|
16
|
-
const
|
16
|
+
const o = c;
|
17
17
|
function l() {
|
18
|
-
return
|
18
|
+
return o.data === T.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === T.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : o.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 (n, g) => {
|
21
|
+
const i = d("FmBadge");
|
22
|
+
return m(), f(i, {
|
23
23
|
inline: "",
|
24
24
|
class: R(l())
|
25
25
|
}, {
|
26
|
-
default:
|
27
|
-
|
26
|
+
default: p(() => [
|
27
|
+
w("div", null, V(n.data), 1)
|
28
28
|
]),
|
29
29
|
_: 1
|
30
30
|
}, 8, ["class"]);
|
31
31
|
};
|
32
32
|
}
|
33
|
-
}), J = ["src"], W = /* @__PURE__ */
|
33
|
+
}), J = ["src"], W = /* @__PURE__ */ y({
|
34
34
|
__name: "Gateway",
|
35
35
|
props: {
|
36
36
|
row: {},
|
37
37
|
data: {}
|
38
38
|
},
|
39
39
|
setup(c) {
|
40
|
-
return (
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
return (o, l) => {
|
41
|
+
const n = d("FmTooltip");
|
42
|
+
return m(), f(n, {
|
43
|
+
variant: "plain",
|
44
|
+
placement: "top",
|
45
|
+
content: o.row.original.gateway,
|
46
|
+
"hide-arrow": !0
|
47
|
+
}, {
|
48
|
+
default: p(() => [
|
49
|
+
w("img", {
|
50
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
51
|
+
src: K(O)(o.row.original.gateway)
|
52
|
+
}, null, 8, J)
|
53
|
+
]),
|
54
|
+
_: 1
|
55
|
+
}, 8, ["content"]);
|
56
|
+
};
|
44
57
|
}
|
45
|
-
}), X = ["src"], Z = /* @__PURE__ */
|
58
|
+
}), X = ["src"], Z = /* @__PURE__ */ y({
|
46
59
|
__name: "Method",
|
47
60
|
props: {
|
48
61
|
row: {},
|
49
62
|
data: {}
|
50
63
|
},
|
51
64
|
setup(c) {
|
52
|
-
return (
|
53
|
-
const
|
54
|
-
return
|
65
|
+
return (o, l) => {
|
66
|
+
const n = d("FmTooltip");
|
67
|
+
return m(), f(n, {
|
55
68
|
variant: "plain",
|
56
69
|
placement: "top",
|
57
|
-
content:
|
70
|
+
content: o.row.original.method.issuer,
|
58
71
|
"hide-arrow": !0
|
59
72
|
}, {
|
60
|
-
default:
|
61
|
-
|
73
|
+
default: p(() => [
|
74
|
+
w("img", {
|
62
75
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
63
|
-
src: K(Y)(
|
76
|
+
src: K(Y)(o.row.original.method.issuer, o.row.original.method.variant)
|
64
77
|
}, null, 8, X)
|
65
78
|
]),
|
66
79
|
_: 1
|
67
80
|
}, 8, ["content"]);
|
68
81
|
};
|
69
82
|
}
|
70
|
-
}), ee = /* @__PURE__ */
|
83
|
+
}), ee = /* @__PURE__ */ y({
|
71
84
|
__name: "Actions",
|
72
85
|
props: {
|
73
86
|
onAction: { type: Function },
|
74
87
|
transaction: {}
|
75
88
|
},
|
76
89
|
setup(c) {
|
77
|
-
const
|
90
|
+
const o = [
|
78
91
|
c.transaction.flags.query && {
|
79
92
|
label: "Query",
|
80
93
|
sublabel: "Perform transaction status inquriy",
|
@@ -100,25 +113,25 @@ const H = /* @__PURE__ */ p({
|
|
100
113
|
action: "history"
|
101
114
|
}
|
102
115
|
];
|
103
|
-
return (l,
|
104
|
-
const
|
105
|
-
return
|
106
|
-
onClick:
|
107
|
-
|
116
|
+
return (l, n) => {
|
117
|
+
const g = d("FmIcon"), i = d("FmMenuItem"), _ = d("FmMenu");
|
118
|
+
return m(), N("div", {
|
119
|
+
onClick: n[0] || (n[0] = (a) => {
|
120
|
+
a.stopPropagation();
|
108
121
|
})
|
109
122
|
}, [
|
110
|
-
|
111
|
-
"menu-button":
|
112
|
-
|
123
|
+
k(_, null, {
|
124
|
+
"menu-button": p(() => [
|
125
|
+
k(g, { name: "settings" })
|
113
126
|
]),
|
114
|
-
default:
|
115
|
-
(
|
127
|
+
default: p(() => [
|
128
|
+
(m(!0), N(U, null, B(o.filter((a) => !!a), (a) => (m(), f(i, {
|
116
129
|
selectable: !0,
|
117
|
-
key:
|
118
|
-
sublabel:
|
119
|
-
label:
|
120
|
-
icon:
|
121
|
-
onclick: () => l.onAction(
|
130
|
+
key: a.label,
|
131
|
+
sublabel: a.sublabel,
|
132
|
+
label: a.label,
|
133
|
+
icon: a.icon,
|
134
|
+
onclick: () => l.onAction(a.action)
|
122
135
|
}, null, 8, ["sublabel", "label", "icon", "onclick"]))), 128))
|
123
136
|
]),
|
124
137
|
_: 1
|
@@ -126,7 +139,7 @@ const H = /* @__PURE__ */ p({
|
|
126
139
|
]);
|
127
140
|
};
|
128
141
|
}
|
129
|
-
}), le = /* @__PURE__ */
|
142
|
+
}), le = /* @__PURE__ */ y({
|
130
143
|
__name: "TransactionTable",
|
131
144
|
props: {
|
132
145
|
data: {
|
@@ -139,35 +152,35 @@ const H = /* @__PURE__ */ p({
|
|
139
152
|
}
|
140
153
|
},
|
141
154
|
emits: ["row-click"],
|
142
|
-
setup(c, { emit:
|
143
|
-
var
|
144
|
-
const l = c,
|
155
|
+
setup(c, { emit: o }) {
|
156
|
+
var I, q;
|
157
|
+
const l = c, n = S([...l.data]);
|
145
158
|
$(
|
146
159
|
() => l.data,
|
147
160
|
(t) => {
|
148
|
-
|
161
|
+
n.value = [...t];
|
149
162
|
},
|
150
163
|
{ deep: !0, immediate: !0 }
|
151
164
|
);
|
152
|
-
const
|
165
|
+
const g = o, i = L(), _ = G(), { sessionUser: a } = Q(), { t: s } = j();
|
153
166
|
async function C(t) {
|
154
167
|
try {
|
155
168
|
const e = await h.refetchTransaction({ transactionId: t.id });
|
156
|
-
|
169
|
+
n.value = n.value.map((r) => r.id === e._id ? x(e) : r), i.open({
|
157
170
|
type: "success",
|
158
171
|
title: "Transaction queried and updated successfully."
|
159
172
|
});
|
160
173
|
} catch (e) {
|
161
|
-
|
174
|
+
i.open({
|
162
175
|
type: "error",
|
163
176
|
title: "Fail to query transaction.",
|
164
|
-
message:
|
177
|
+
message: A(e)
|
165
178
|
});
|
166
179
|
}
|
167
180
|
}
|
168
|
-
async function
|
181
|
+
async function D(t) {
|
169
182
|
E(
|
170
|
-
|
183
|
+
_,
|
171
184
|
"Refund Transaction",
|
172
185
|
"Are you sure to refund transaction? This action cannot be revert!",
|
173
186
|
async () => {
|
@@ -177,43 +190,43 @@ const H = /* @__PURE__ */ p({
|
|
177
190
|
reason: "portal transaction refund",
|
178
191
|
amount: t.fdoAmount
|
179
192
|
});
|
180
|
-
|
193
|
+
n.value = n.value.map((r) => r.id === e._id ? x(e) : r), i.open({
|
181
194
|
type: "success",
|
182
195
|
title: "Transaction refund request initiated."
|
183
196
|
});
|
184
197
|
} catch (e) {
|
185
|
-
|
198
|
+
i.open({
|
186
199
|
type: "error",
|
187
200
|
title: "Fail to request refund transaction.",
|
188
|
-
message:
|
201
|
+
message: A(e)
|
189
202
|
});
|
190
203
|
}
|
191
204
|
}
|
192
205
|
);
|
193
206
|
}
|
194
|
-
async function
|
207
|
+
async function M(t) {
|
195
208
|
E(
|
196
|
-
|
209
|
+
_,
|
197
210
|
"Notify Transaction",
|
198
211
|
"Are you sure to perform notify transaction?",
|
199
212
|
async () => {
|
200
213
|
try {
|
201
|
-
await h.renotifyTransaction(t.id),
|
214
|
+
await h.renotifyTransaction(t.id), i.open({
|
202
215
|
type: "success",
|
203
216
|
title: "Transaction notify successfully."
|
204
217
|
});
|
205
218
|
} catch (e) {
|
206
|
-
|
219
|
+
i.open({
|
207
220
|
type: "error",
|
208
221
|
title: "Fail to notify transaction.",
|
209
|
-
message:
|
222
|
+
message: A(e)
|
210
223
|
});
|
211
224
|
}
|
212
225
|
}
|
213
226
|
);
|
214
227
|
}
|
215
228
|
async function P(t) {
|
216
|
-
const e =
|
229
|
+
const e = z([
|
217
230
|
{
|
218
231
|
type: "span",
|
219
232
|
queryKey: "transaction.id",
|
@@ -222,62 +235,67 @@ const H = /* @__PURE__ */ p({
|
|
222
235
|
], t.transactionAt);
|
223
236
|
window.open(e, "_blank");
|
224
237
|
}
|
225
|
-
const F =
|
238
|
+
const F = S(""), v = [
|
226
239
|
{
|
227
|
-
header: () =>
|
228
|
-
accessorKey: "id"
|
240
|
+
header: () => s("payment.transactions.table.id"),
|
241
|
+
accessorKey: "id",
|
242
|
+
cell: ({ cell: t, row: e }) => {
|
243
|
+
var r, u;
|
244
|
+
return ((r = a.value) != null && r.role.isStaff || (u = a.value) != null && u.role.isAdmin) && e.original.id !== e.original.transactionId ? e.original.id + `
|
245
|
+
ID: ` + e.original.transactionId : e.original.id;
|
246
|
+
}
|
229
247
|
},
|
230
248
|
{
|
231
|
-
header: () =>
|
249
|
+
header: () => s("payment.transactions.table.pay_id"),
|
232
250
|
accessorKey: "payId"
|
233
251
|
},
|
234
252
|
{
|
235
|
-
header: () =>
|
253
|
+
header: () => s("payment.transactions.table.gateway_id"),
|
236
254
|
accessorKey: "gatewayTransactionId"
|
237
255
|
},
|
238
256
|
{
|
239
|
-
header: () =>
|
257
|
+
header: () => s("payment.transactions.table.bill_seq"),
|
240
258
|
accessorKey: "seqNumber"
|
241
259
|
},
|
242
260
|
{
|
243
|
-
header: () =>
|
261
|
+
header: () => s("payment.transactions.table.gateway"),
|
244
262
|
accessorKey: "gateway",
|
245
263
|
meta: {
|
246
264
|
textAlign: "center"
|
247
265
|
},
|
248
|
-
cell: ({ cell: t, row: e }) => e.original.gateway ?
|
266
|
+
cell: ({ cell: t, row: e }) => e.original.gateway ? b(W, { row: e, data: t.getValue() }) : ""
|
249
267
|
},
|
250
268
|
{
|
251
|
-
header: () =>
|
269
|
+
header: () => s("payment.transactions.table.method"),
|
252
270
|
accessorKey: "method",
|
253
271
|
meta: {
|
254
272
|
textAlign: "center"
|
255
273
|
},
|
256
|
-
cell: ({ cell: t, row: e }) => e.original.method ?
|
274
|
+
cell: ({ cell: t, row: e }) => e.original.method ? b(Z, { row: e, data: t.getValue() }) : ""
|
257
275
|
},
|
258
276
|
{
|
259
|
-
header: () =>
|
277
|
+
header: () => s("payment.transactions.table.type"),
|
260
278
|
accessorKey: "payFor",
|
261
279
|
meta: {
|
262
280
|
textAlign: "center"
|
263
281
|
}
|
264
282
|
},
|
265
283
|
{
|
266
|
-
header: () =>
|
284
|
+
header: () => s("payment.transactions.table.status"),
|
267
285
|
accessorKey: "status",
|
268
|
-
cell: ({ cell: t, row: e }) =>
|
286
|
+
cell: ({ cell: t, row: e }) => b(H, { row: e, data: t.getValue() })
|
269
287
|
},
|
270
288
|
{
|
271
|
-
header: () =>
|
289
|
+
header: () => s("payment.transactions.table.restaurant"),
|
272
290
|
accessorKey: "restaurantId"
|
273
291
|
},
|
274
292
|
{
|
275
|
-
header: () =>
|
293
|
+
header: () => s("payment.transactions.table.source"),
|
276
294
|
accessorKey: "source",
|
277
295
|
cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
|
278
296
|
},
|
279
297
|
{
|
280
|
-
header: () =>
|
298
|
+
header: () => s("payment.transactions.table.transaction_at"),
|
281
299
|
accessorKey: "transactionAt",
|
282
300
|
meta: {
|
283
301
|
width: "180px"
|
@@ -285,41 +303,45 @@ const H = /* @__PURE__ */ p({
|
|
285
303
|
cell: ({ cell: t, row: e }) => e.original.status === "REFUNDED" ? e.original.refundedAt : e.original.transactionAt
|
286
304
|
},
|
287
305
|
{
|
288
|
-
header: () =>
|
306
|
+
header: () => s("payment.transactions.table.sales_amount"),
|
289
307
|
accessorKey: "amount",
|
290
308
|
cell: ({ cell: t, row: e }) => {
|
291
|
-
var
|
292
|
-
return ((
|
309
|
+
var r, u;
|
310
|
+
return ((r = a.value) != null && r.role.isStaff || (u = a.value) != null && u.role.isAdmin) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
|
293
311
|
}
|
294
312
|
}
|
295
313
|
];
|
296
|
-
return ((
|
297
|
-
header: () =>
|
314
|
+
return ((I = a.value) != null && I.role.isStaff || (q = a.value) != null && q.role.isAdmin) && v.push({
|
315
|
+
header: () => s("payment.transactions.table.actions"),
|
298
316
|
accessorKey: "actions",
|
299
|
-
cell: ({ row: t }) =>
|
317
|
+
cell: ({ row: t }) => b(ee, {
|
300
318
|
transaction: t.original,
|
301
319
|
onAction: (e) => {
|
320
|
+
var r;
|
302
321
|
switch (e) {
|
303
322
|
case "notify":
|
304
|
-
return
|
323
|
+
return M(t.original);
|
305
324
|
case "query":
|
306
325
|
return C(t.original);
|
307
326
|
case "refund":
|
308
|
-
return
|
327
|
+
return (r = a.value) != null && r.role.isStaff ? i.open({
|
328
|
+
type: "error",
|
329
|
+
title: "You are not allowed to refund transaction."
|
330
|
+
}) : D(t.original);
|
309
331
|
case "history":
|
310
332
|
return P(t.original);
|
311
333
|
}
|
312
334
|
}
|
313
335
|
})
|
314
336
|
}), (t, e) => {
|
315
|
-
const
|
316
|
-
return
|
337
|
+
const r = d("FmTable");
|
338
|
+
return m(), f(r, {
|
317
339
|
modelValue: F.value,
|
318
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
340
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => F.value = u),
|
319
341
|
"column-defs": v,
|
320
|
-
"row-data":
|
342
|
+
"row-data": n.value,
|
321
343
|
loading: l.loading,
|
322
|
-
onRowClick: e[1] || (e[1] = (
|
344
|
+
onRowClick: e[1] || (e[1] = (u) => g("row-click", n.value.at(u.index)))
|
323
345
|
}, null, 8, ["modelValue", "row-data", "loading"]);
|
324
346
|
};
|
325
347
|
}
|