@feedmepos/mf-payment 1.2.12 → 1.2.14
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-D-NM-_2s.js → PayoutAccount-B9sThTU6.js} +6 -6
- package/dist/{PayoutAccount-j4yHJfSr.js → PayoutAccount-C1-oQCFC.js} +5 -5
- package/dist/{PayoutAccountSetting-vzdkhXb8.js → PayoutAccountSetting-D3ffGE0d.js} +111 -114
- package/dist/{Restaurant-CPIy0SZJ.js → Restaurant-3FLRoz2Z.js} +5 -5
- package/dist/{RestaurantSetting-DK4GOY2d.js → RestaurantSetting-DnqiIepz.js} +3 -3
- package/dist/{Settlement-BeI2ksZ3.js → Settlement-Bdj2WaoM.js} +4 -4
- package/dist/{Settlement-B5kQfJuQ.js → Settlement-CC2B-e4f.js} +4 -4
- package/dist/SettlementTransactions-CwLzHWsb.js +323 -0
- package/dist/SettlementTransactions-DGCj9bAe.js +362 -0
- package/dist/{Terminal-Bf7VZ5Yo.js → Terminal-7c3OQF9g.js} +5 -5
- package/dist/{TerminalSetting-pnwFHRR8.js → TerminalSetting-B7xu6e4X.js} +3 -3
- package/dist/{Transaction-Cbiu540w.js → Transaction--t5VJdXQ.js} +125 -94
- package/dist/{Transaction-Cpbte6yS.js → Transaction-D1LWBBsZ.js} +7 -7
- package/dist/{TransactionOld-Dnnz541Y.js → TransactionOld-DHVZ5iSD.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-tMjd6_k7.js → TransactionTable.vue_vue_type_script_setup_true_lang-CRkXGtHQ.js} +111 -89
- package/dist/{app-C_At3NFn.js → app-D24UkS2o.js} +340 -340
- package/dist/app.js +1 -1
- package/dist/{assets-DjGZEHos.js → assets-B5NXw6Y4.js} +35 -33
- package/dist/components/AutoCopyCell.vue.d.ts +1 -0
- package/dist/{grafana-D99I428B.js → grafana-DaIIupgz.js} +1 -1
- package/dist/{index-CW2tMCo9.js → index-B2DvBis-.js} +2 -2
- package/dist/{index-DdE42RgX.js → index-BBYs-Llt.js} +1 -1
- package/dist/{index-CvPpUZR3.js → index-BFdB2HXN.js} +1 -1
- package/dist/{index-B3IOW-oD.js → index-Bboy-oty.js} +1 -1
- package/dist/{index-BI63pT6J.js → index-DNHpMza-.js} +5251 -5143
- package/dist/{index-DigkUnks.js → index-DvYpRRA_.js} +1 -1
- package/dist/{index-DXLkzCkb.js → index-Lio-k9My.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dx-Mg_Zx.js → index.vue_vue_type_script_setup_true_lang-B8G7gIcx.js} +1 -1
- package/dist/model/transaction.d.ts +1 -0
- package/dist/package.json +2 -2
- package/dist/{payout-account-D7Wzxyao.js → payout-account-MSqoi8mH.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +10 -10
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +10 -10
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +28 -34
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +28 -34
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +10 -10
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +10 -10
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +28 -34
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +6 -12
- 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/terminal/TerminalDialog.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +14 -14
- 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/payout-account/PayoutAccountTable.vue.d.ts +20 -20
- 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 +2 -2
- package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js +0 -39
- package/dist/SettlementTransactions-CHjwajgr.js +0 -297
- package/dist/SettlementTransactions-D7z5DaxO.js +0 -336
@@ -1,297 +0,0 @@
|
|
1
|
-
import { defineComponent as w, resolveComponent as y, openBlock as F, createBlock as M, normalizeClass as z, withCtx as m, createElementVNode as l, toDisplayString as n, createElementBlock as O, unref as a, ref as v, onMounted as G, watch as L, createVNode as o, createTextVNode as u, h as I } from "vue";
|
2
|
-
import { e as C, u as H } from "./index-BI63pT6J.js";
|
3
|
-
import "@feedmepos/ui-library";
|
4
|
-
import { d as E } from "./dinero-CIVmXLL-.js";
|
5
|
-
import { g as q, a as J, t as Q, b as W } from "./assets-DjGZEHos.js";
|
6
|
-
import { _ as X } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
7
|
-
import { useRouter as Z } from "vue-router";
|
8
|
-
import { s as ee } from "./index-DdE42RgX.js";
|
9
|
-
import { useI18n as te, useCoreStore as ae } from "@feedmepos/mf-common";
|
10
|
-
import { h as ne } from "./moment-h96o7c8I.js";
|
11
|
-
const le = /* @__PURE__ */ w({
|
12
|
-
__name: "Status",
|
13
|
-
props: {
|
14
|
-
row: {},
|
15
|
-
data: {}
|
16
|
-
},
|
17
|
-
setup(g) {
|
18
|
-
const e = g;
|
19
|
-
function p() {
|
20
|
-
return e.data === C.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : e.data === C.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : e.data === C.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
21
|
-
}
|
22
|
-
return (h, k) => {
|
23
|
-
const T = y("FmBadge");
|
24
|
-
return F(), M(T, {
|
25
|
-
inline: "",
|
26
|
-
class: z(p())
|
27
|
-
}, {
|
28
|
-
default: m(() => [
|
29
|
-
l("div", null, n(h.data), 1)
|
30
|
-
]),
|
31
|
-
_: 1
|
32
|
-
}, 8, ["class"]);
|
33
|
-
};
|
34
|
-
}
|
35
|
-
}), oe = ["src"], se = /* @__PURE__ */ w({
|
36
|
-
__name: "Gateway",
|
37
|
-
props: {
|
38
|
-
row: {},
|
39
|
-
data: {}
|
40
|
-
},
|
41
|
-
setup(g) {
|
42
|
-
return (e, p) => (F(), O("img", {
|
43
|
-
class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
|
44
|
-
src: a(q)(e.row.original.gateway)
|
45
|
-
}, null, 8, oe));
|
46
|
-
}
|
47
|
-
}), re = ["src"], ie = /* @__PURE__ */ w({
|
48
|
-
__name: "Method",
|
49
|
-
props: {
|
50
|
-
row: {},
|
51
|
-
data: {}
|
52
|
-
},
|
53
|
-
setup(g) {
|
54
|
-
return (e, p) => (F(), O("img", {
|
55
|
-
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
56
|
-
src: a(J)(e.row.original.method.issuer, e.row.original.method.variant)
|
57
|
-
}, null, 8, re));
|
58
|
-
}
|
59
|
-
}), me = { class: "flex mb-6" }, ue = { class: "my-6 w-[240px]" }, xe = /* @__PURE__ */ w({
|
60
|
-
__name: "SettlementTransactions",
|
61
|
-
props: {
|
62
|
-
settlementId: {
|
63
|
-
type: String,
|
64
|
-
required: !0
|
65
|
-
}
|
66
|
-
},
|
67
|
-
setup(g) {
|
68
|
-
const { t: e } = te(), p = g, { isLoading: h, startAsyncCall: k } = H(!0), { currentRestaurant: T } = ae(), D = Z(), i = v(), x = v([]), N = v([]);
|
69
|
-
async function Y(s = !1) {
|
70
|
-
k(async () => {
|
71
|
-
s || (i.value = await ee.readRestaurantSettlementById(p.settlementId));
|
72
|
-
const t = await Q.readRestaurantTransactionsBySettlementId(p.settlementId);
|
73
|
-
x.value = W(t), N.value = x.value;
|
74
|
-
});
|
75
|
-
}
|
76
|
-
function B() {
|
77
|
-
Y();
|
78
|
-
}
|
79
|
-
G(B), L(T, B);
|
80
|
-
const $ = v(""), P = [
|
81
|
-
{
|
82
|
-
header: () => e("payment.settlements.dialog.feedme.id"),
|
83
|
-
accessorKey: "id"
|
84
|
-
},
|
85
|
-
{
|
86
|
-
header: () => e("payment.settlements.dialog.feedme.pay_id"),
|
87
|
-
accessorKey: "payId"
|
88
|
-
},
|
89
|
-
{
|
90
|
-
header: () => e("payment.settlements.dialog.feedme.gateway"),
|
91
|
-
accessorKey: "gateway",
|
92
|
-
meta: {
|
93
|
-
textAlign: "center"
|
94
|
-
},
|
95
|
-
cell: ({ cell: s, row: t }) => t.original.method ? I(se, { row: t, data: s.getValue() }) : ""
|
96
|
-
},
|
97
|
-
{
|
98
|
-
header: () => e("payment.settlements.dialog.feedme.method"),
|
99
|
-
accessorKey: "method",
|
100
|
-
meta: {
|
101
|
-
textAlign: "center"
|
102
|
-
},
|
103
|
-
cell: ({ cell: s, row: t }) => t.original.method ? I(ie, { row: t, data: s.getValue() }) : ""
|
104
|
-
},
|
105
|
-
{
|
106
|
-
header: () => e("payment.settlements.dialog.feedme.payFor"),
|
107
|
-
accessorKey: "payFor"
|
108
|
-
},
|
109
|
-
{
|
110
|
-
header: () => e("payment.settlements.dialog.feedme.type"),
|
111
|
-
accessorKey: "type",
|
112
|
-
meta: {
|
113
|
-
textAlign: "center"
|
114
|
-
},
|
115
|
-
cell: ({ row: s }) => {
|
116
|
-
if (!s.original.method)
|
117
|
-
return "";
|
118
|
-
const t = s.original.method.variant;
|
119
|
-
return t.includes("_ONLINE") ? "ONLINE" : t.includes("_OFFLINE") ? "OFFLINE" : t;
|
120
|
-
}
|
121
|
-
},
|
122
|
-
{
|
123
|
-
header: () => e("payment.settlements.dialog.feedme.status"),
|
124
|
-
accessorKey: "status",
|
125
|
-
cell: ({ cell: s, row: t }) => I(le, { row: t, data: s.getValue() })
|
126
|
-
},
|
127
|
-
{
|
128
|
-
header: () => e("payment.settlements.dialog.feedme.transaction_at"),
|
129
|
-
accessorKey: "transactionAt",
|
130
|
-
meta: {
|
131
|
-
width: "180px"
|
132
|
-
}
|
133
|
-
},
|
134
|
-
{
|
135
|
-
header: () => e("payment.settlements.dialog.feedme.sales_amount"),
|
136
|
-
accessorKey: "amount"
|
137
|
-
},
|
138
|
-
{
|
139
|
-
header: () => e("payment.settlements.dialog.feedme.fee"),
|
140
|
-
accessorKey: "fee"
|
141
|
-
},
|
142
|
-
{
|
143
|
-
header: () => e("payment.settlements.dialog.feedme.settlement_amount"),
|
144
|
-
accessorKey: "payout"
|
145
|
-
}
|
146
|
-
], _ = v("");
|
147
|
-
let A;
|
148
|
-
return L(_, async () => {
|
149
|
-
A && clearTimeout(A), A = setTimeout(() => {
|
150
|
-
var s = new RegExp(_.value, "i");
|
151
|
-
N.value = x.value.filter((t) => {
|
152
|
-
const b = JSON.stringify(t);
|
153
|
-
return s.test(b);
|
154
|
-
});
|
155
|
-
}, 700);
|
156
|
-
}), (s, t) => {
|
157
|
-
var K, V;
|
158
|
-
const b = y("FmCardHeader"), f = y("FmCardSection"), S = y("FmCard"), U = y("FmSearch"), j = y("FmTable");
|
159
|
-
return F(), M(X, {
|
160
|
-
title: `${a(e)("payment.settlements.dialog.title")} (${(K = i.value) == null ? void 0 : K._id})`,
|
161
|
-
description: `${a(e)("payment.settlements.dialog.date")}: ${a(ne)((V = i.value) == null ? void 0 : V.createdAt).format("YYYY-MM-DD")}`,
|
162
|
-
loading: a(h),
|
163
|
-
onBack: a(D).back
|
164
|
-
}, {
|
165
|
-
default: m(() => [
|
166
|
-
l("div", me, [
|
167
|
-
o(S, {
|
168
|
-
horizontal: "",
|
169
|
-
class: "flex-1 p-6",
|
170
|
-
variant: "elevated"
|
171
|
-
}, {
|
172
|
-
default: m(() => [
|
173
|
-
o(f, { class: "flex flex-col gap-16 justify-between" }, {
|
174
|
-
default: m(() => [
|
175
|
-
o(b, {
|
176
|
-
class: "p-0",
|
177
|
-
title: a(e)("payment.settlements.dialog.info.transaction.title"),
|
178
|
-
subtitle: ""
|
179
|
-
}, null, 8, ["title"]),
|
180
|
-
o(f, { class: "p-0" }, {
|
181
|
-
default: m(() => {
|
182
|
-
var r, d, c, R;
|
183
|
-
return [
|
184
|
-
l("b", null, n(a(e)("payment.settlements.dialog.info.transaction.for")), 1),
|
185
|
-
u(": " + n((d = (r = i.value) == null ? void 0 : r.store) == null ? void 0 : d.event) + " ", 1),
|
186
|
-
t[2] || (t[2] = l("br", null, null, -1)),
|
187
|
-
l("b", null, n(a(e)("payment.settlements.dialog.info.transaction.reference")), 1),
|
188
|
-
u(": " + n((R = (c = i.value) == null ? void 0 : c.store) == null ? void 0 : R.id), 1),
|
189
|
-
t[3] || (t[3] = l("br", null, null, -1)),
|
190
|
-
l("b", null, n(a(e)("payment.settlements.dialog.info.transaction.count")), 1),
|
191
|
-
u(": " + n(x.value.length), 1)
|
192
|
-
];
|
193
|
-
}),
|
194
|
-
_: 1
|
195
|
-
})
|
196
|
-
]),
|
197
|
-
_: 1
|
198
|
-
})
|
199
|
-
]),
|
200
|
-
_: 1
|
201
|
-
}),
|
202
|
-
o(S, {
|
203
|
-
horizontal: "",
|
204
|
-
class: "flex-1 p-6 mx-6",
|
205
|
-
variant: "elevated"
|
206
|
-
}, {
|
207
|
-
default: m(() => [
|
208
|
-
o(f, { class: "flex flex-col gap-16 justify-between" }, {
|
209
|
-
default: m(() => [
|
210
|
-
o(b, {
|
211
|
-
class: "p-0",
|
212
|
-
title: a(e)("payment.settlements.dialog.info.bank.title"),
|
213
|
-
subtitle: ""
|
214
|
-
}, null, 8, ["title"]),
|
215
|
-
o(f, { class: "p-0" }, {
|
216
|
-
default: m(() => {
|
217
|
-
var r, d, c;
|
218
|
-
return [
|
219
|
-
l("b", null, n(a(e)("payment.settlements.dialog.info.bank.for")), 1),
|
220
|
-
u(": " + n((r = i.value) == null ? void 0 : r.beneficiaryBank.name), 1),
|
221
|
-
t[4] || (t[4] = l("br", null, null, -1)),
|
222
|
-
l("b", null, n(a(e)("payment.settlements.dialog.info.bank.name")), 1),
|
223
|
-
u(": " + n((d = i.value) == null ? void 0 : d.beneficiaryBank.holderName), 1),
|
224
|
-
t[5] || (t[5] = l("br", null, null, -1)),
|
225
|
-
l("b", null, n(a(e)("payment.settlements.dialog.info.bank.number")), 1),
|
226
|
-
u(": " + n((c = i.value) == null ? void 0 : c.beneficiaryBank.accountNumber), 1)
|
227
|
-
];
|
228
|
-
}),
|
229
|
-
_: 1
|
230
|
-
})
|
231
|
-
]),
|
232
|
-
_: 1
|
233
|
-
})
|
234
|
-
]),
|
235
|
-
_: 1
|
236
|
-
}),
|
237
|
-
o(S, {
|
238
|
-
horizontal: "",
|
239
|
-
class: "flex-1 p-6",
|
240
|
-
variant: "elevated"
|
241
|
-
}, {
|
242
|
-
default: m(() => [
|
243
|
-
o(f, { class: "flex flex-col gap-16 justify-between" }, {
|
244
|
-
default: m(() => [
|
245
|
-
o(b, {
|
246
|
-
class: "p-0",
|
247
|
-
title: a(e)("payment.settlements.dialog.info.payout.title"),
|
248
|
-
subtitle: ""
|
249
|
-
}, null, 8, ["title"]),
|
250
|
-
o(f, { class: "p-0" }, {
|
251
|
-
default: m(() => {
|
252
|
-
var r, d, c;
|
253
|
-
return [
|
254
|
-
l("b", null, n(a(e)("payment.settlements.dialog.info.payout.amount")), 1),
|
255
|
-
u(": " + n(a(E)((r = i.value) == null ? void 0 : r.totalAmount).toFormat("$0.00")), 1),
|
256
|
-
t[6] || (t[6] = l("br", null, null, -1)),
|
257
|
-
l("b", null, n(a(e)("payment.settlements.dialog.info.payout.fee")), 1),
|
258
|
-
u(": " + n(a(E)((d = i.value) == null ? void 0 : d.totalFee).toFormat("$0.00")), 1),
|
259
|
-
t[7] || (t[7] = l("br", null, null, -1)),
|
260
|
-
l("b", null, n(a(e)("payment.settlements.dialog.info.payout.payout")), 1),
|
261
|
-
u(": " + n(a(E)((c = i.value) == null ? void 0 : c.totalPayout).toFormat("$0.00")), 1)
|
262
|
-
];
|
263
|
-
}),
|
264
|
-
_: 1
|
265
|
-
})
|
266
|
-
]),
|
267
|
-
_: 1
|
268
|
-
})
|
269
|
-
]),
|
270
|
-
_: 1
|
271
|
-
})
|
272
|
-
]),
|
273
|
-
l("div", ue, [
|
274
|
-
o(U, {
|
275
|
-
modelValue: _.value,
|
276
|
-
"onUpdate:modelValue": t[0] || (t[0] = (r) => _.value = r),
|
277
|
-
placeholder: a(e)("payment.settlements.dialog.search")
|
278
|
-
}, null, 8, ["modelValue", "placeholder"])
|
279
|
-
]),
|
280
|
-
o(j, {
|
281
|
-
modelValue: $.value,
|
282
|
-
"onUpdate:modelValue": t[1] || (t[1] = (r) => $.value = r),
|
283
|
-
"shrink-at": !1,
|
284
|
-
"search-value": _.value,
|
285
|
-
"row-data": N.value,
|
286
|
-
"column-defs": P,
|
287
|
-
loading: a(h)
|
288
|
-
}, null, 8, ["modelValue", "search-value", "row-data", "loading"])
|
289
|
-
]),
|
290
|
-
_: 1
|
291
|
-
}, 8, ["title", "description", "loading", "onBack"]);
|
292
|
-
};
|
293
|
-
}
|
294
|
-
});
|
295
|
-
export {
|
296
|
-
xe as default
|
297
|
-
};
|
@@ -1,336 +0,0 @@
|
|
1
|
-
import { defineComponent as w, resolveComponent as g, openBlock as F, createBlock as B, normalizeClass as G, withCtx as s, createElementVNode as t, toDisplayString as i, createElementBlock as L, unref as m, ref as x, onMounted as H, watch as q, createVNode as n, createTextVNode as u, h as N } from "vue";
|
2
|
-
import { e as E, u as J } from "./index-BI63pT6J.js";
|
3
|
-
import { useDialog as Q, useSnackbar as W } from "@feedmepos/ui-library";
|
4
|
-
import { d as k } from "./dinero-CIVmXLL-.js";
|
5
|
-
import { g as X, a as Z, t as P, b as ee } from "./assets-DjGZEHos.js";
|
6
|
-
import { _ as te } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
7
|
-
import { useRouter as ae } from "vue-router";
|
8
|
-
import { s as ne } from "./index-DdE42RgX.js";
|
9
|
-
import { u as oe } from "./error-K1CakhA9.js";
|
10
|
-
import { w as re } from "./Modal-DB8M9o1T.js";
|
11
|
-
import { h as le } from "./moment-h96o7c8I.js";
|
12
|
-
const se = /* @__PURE__ */ w({
|
13
|
-
__name: "Status",
|
14
|
-
props: {
|
15
|
-
row: {},
|
16
|
-
data: {}
|
17
|
-
},
|
18
|
-
setup(y) {
|
19
|
-
const o = y;
|
20
|
-
function d() {
|
21
|
-
return o.data === E.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === E.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : o.data === E.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
22
|
-
}
|
23
|
-
return (A, _) => {
|
24
|
-
const b = g("FmBadge");
|
25
|
-
return F(), B(b, {
|
26
|
-
inline: "",
|
27
|
-
class: G(d())
|
28
|
-
}, {
|
29
|
-
default: s(() => [
|
30
|
-
t("div", null, i(A.data), 1)
|
31
|
-
]),
|
32
|
-
_: 1
|
33
|
-
}, 8, ["class"]);
|
34
|
-
};
|
35
|
-
}
|
36
|
-
}), ie = ["src"], ue = /* @__PURE__ */ w({
|
37
|
-
__name: "Gateway",
|
38
|
-
props: {
|
39
|
-
row: {},
|
40
|
-
data: {}
|
41
|
-
},
|
42
|
-
setup(y) {
|
43
|
-
return (o, d) => (F(), L("img", {
|
44
|
-
class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
|
45
|
-
src: m(X)(o.row.original.gateway)
|
46
|
-
}, null, 8, ie));
|
47
|
-
}
|
48
|
-
}), me = ["src"], de = /* @__PURE__ */ w({
|
49
|
-
__name: "Method",
|
50
|
-
props: {
|
51
|
-
row: {},
|
52
|
-
data: {}
|
53
|
-
},
|
54
|
-
setup(y) {
|
55
|
-
return (o, d) => (F(), L("img", {
|
56
|
-
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
57
|
-
src: m(Z)(o.row.original.method.issuer, o.row.original.method.variant)
|
58
|
-
}, null, 8, me));
|
59
|
-
}
|
60
|
-
}), ce = /* @__PURE__ */ w({
|
61
|
-
__name: "Actions",
|
62
|
-
props: {
|
63
|
-
row: {},
|
64
|
-
data: {}
|
65
|
-
},
|
66
|
-
emits: ["delete"],
|
67
|
-
setup(y, { emit: o }) {
|
68
|
-
const d = o;
|
69
|
-
return (A, _) => {
|
70
|
-
const b = g("FmButton");
|
71
|
-
return F(), B(b, {
|
72
|
-
variant: "plain",
|
73
|
-
"prepend-icon": "delete",
|
74
|
-
onClick: _[0] || (_[0] = () => d("delete"))
|
75
|
-
});
|
76
|
-
};
|
77
|
-
}
|
78
|
-
}), pe = { class: "flex mb-6" }, fe = { class: "my-6 w-[240px]" }, Ne = /* @__PURE__ */ w({
|
79
|
-
__name: "SettlementTransactions",
|
80
|
-
props: {
|
81
|
-
settlementId: {
|
82
|
-
type: String,
|
83
|
-
required: !0
|
84
|
-
}
|
85
|
-
},
|
86
|
-
setup(y) {
|
87
|
-
const o = y, { isLoading: d, startAsyncCall: A, startAsyncCallFn: _ } = J(!0), b = Q(), O = W(), R = ae(), l = x(), S = x([]), h = x([]);
|
88
|
-
async function V(a = !1) {
|
89
|
-
A(async () => {
|
90
|
-
a || (l.value = await ne.readById(o.settlementId));
|
91
|
-
const e = await P.readBySettlementId(o.settlementId);
|
92
|
-
S.value = ee(e), h.value = S.value;
|
93
|
-
});
|
94
|
-
}
|
95
|
-
function Y() {
|
96
|
-
V();
|
97
|
-
}
|
98
|
-
H(Y);
|
99
|
-
const D = x(""), U = [
|
100
|
-
{
|
101
|
-
header: () => "Transaction ID",
|
102
|
-
accessorKey: "id"
|
103
|
-
},
|
104
|
-
{
|
105
|
-
header: () => "Pay ID",
|
106
|
-
accessorKey: "payId"
|
107
|
-
},
|
108
|
-
{
|
109
|
-
header: () => "Gateway",
|
110
|
-
accessorKey: "gateway",
|
111
|
-
meta: {
|
112
|
-
textAlign: "center"
|
113
|
-
},
|
114
|
-
cell: ({ cell: a, row: e }) => e.original.method ? N(ue, { row: e, data: a.getValue() }) : ""
|
115
|
-
},
|
116
|
-
{
|
117
|
-
header: () => "Method",
|
118
|
-
accessorKey: "method",
|
119
|
-
meta: {
|
120
|
-
textAlign: "center"
|
121
|
-
},
|
122
|
-
cell: ({ cell: a, row: e }) => e.original.method ? N(de, { row: e, data: a.getValue() }) : ""
|
123
|
-
},
|
124
|
-
{
|
125
|
-
header: () => "Type",
|
126
|
-
accessorKey: "type",
|
127
|
-
meta: {
|
128
|
-
textAlign: "center"
|
129
|
-
},
|
130
|
-
cell: ({ row: a }) => {
|
131
|
-
if (!a.original.method)
|
132
|
-
return "";
|
133
|
-
const e = a.original.method.variant;
|
134
|
-
return e.includes("_ONLINE") ? "ONLINE" : e.includes("_OFFLINE") ? "OFFLINE" : e;
|
135
|
-
}
|
136
|
-
},
|
137
|
-
{
|
138
|
-
header: () => "Status",
|
139
|
-
accessorKey: "status",
|
140
|
-
cell: ({ cell: a, row: e }) => N(se, { row: e, data: a.getValue() })
|
141
|
-
},
|
142
|
-
{
|
143
|
-
header: () => "Transaction At",
|
144
|
-
accessorKey: "transactionAt",
|
145
|
-
meta: {
|
146
|
-
width: "180px"
|
147
|
-
}
|
148
|
-
},
|
149
|
-
{
|
150
|
-
header: () => "Sales Amount",
|
151
|
-
accessorKey: "amount"
|
152
|
-
},
|
153
|
-
{
|
154
|
-
header: () => "Fee",
|
155
|
-
accessorKey: "fee"
|
156
|
-
},
|
157
|
-
{
|
158
|
-
header: () => "Settlement Amount",
|
159
|
-
accessorKey: "payout"
|
160
|
-
},
|
161
|
-
{
|
162
|
-
header: () => "Actions",
|
163
|
-
accessorKey: "action",
|
164
|
-
cell: ({ cell: a, row: e }) => N(ce, {
|
165
|
-
row: e,
|
166
|
-
data: a.getValue(),
|
167
|
-
onDelete: () => re(
|
168
|
-
b,
|
169
|
-
"Remove transaction",
|
170
|
-
"Are you sure to remove transaction from settlement? This action cannot be revert !",
|
171
|
-
_(async () => {
|
172
|
-
try {
|
173
|
-
await P.removeTransactionFromSettlement(e.original.id), await V();
|
174
|
-
} catch (f) {
|
175
|
-
O.open({
|
176
|
-
type: "error",
|
177
|
-
title: "Error occurs when removing transaction",
|
178
|
-
message: oe(f)
|
179
|
-
});
|
180
|
-
}
|
181
|
-
})
|
182
|
-
)
|
183
|
-
})
|
184
|
-
}
|
185
|
-
], T = x("");
|
186
|
-
let I;
|
187
|
-
return q(T, async () => {
|
188
|
-
I && clearTimeout(I), I = setTimeout(() => {
|
189
|
-
var a = new RegExp(T.value, "i");
|
190
|
-
h.value = S.value.filter((e) => {
|
191
|
-
const f = JSON.stringify(e);
|
192
|
-
return a.test(f);
|
193
|
-
});
|
194
|
-
}, 700);
|
195
|
-
}), (a, e) => {
|
196
|
-
var K, $;
|
197
|
-
const f = g("FmCardHeader"), v = g("FmCardSection"), C = g("FmCard"), j = g("FmSearch"), z = g("FmTable");
|
198
|
-
return F(), B(te, {
|
199
|
-
title: `Settlement Transactions (${(K = l.value) == null ? void 0 : K._id})`,
|
200
|
-
description: `Date: ${m(le)(($ = l.value) == null ? void 0 : $.createdAt).format("YYYY-MM-DD")}`,
|
201
|
-
loading: m(d),
|
202
|
-
onBack: m(R).back
|
203
|
-
}, {
|
204
|
-
default: s(() => [
|
205
|
-
t("div", pe, [
|
206
|
-
n(C, {
|
207
|
-
horizontal: "",
|
208
|
-
class: "flex-1 p-6",
|
209
|
-
variant: "elevated"
|
210
|
-
}, {
|
211
|
-
default: s(() => [
|
212
|
-
n(v, { class: "flex flex-col gap-16 justify-between" }, {
|
213
|
-
default: s(() => [
|
214
|
-
n(f, {
|
215
|
-
class: "p-0",
|
216
|
-
title: "Transaction Info",
|
217
|
-
subtitle: ""
|
218
|
-
}),
|
219
|
-
n(v, { class: "p-0" }, {
|
220
|
-
default: s(() => {
|
221
|
-
var r, c, p, M;
|
222
|
-
return [
|
223
|
-
e[2] || (e[2] = t("b", null, "For", -1)),
|
224
|
-
u(": " + i((c = (r = l.value) == null ? void 0 : r.store) == null ? void 0 : c.event) + " ", 1),
|
225
|
-
e[3] || (e[3] = t("br", null, null, -1)),
|
226
|
-
e[4] || (e[4] = t("b", null, "Reference", -1)),
|
227
|
-
u(": " + i((M = (p = l.value) == null ? void 0 : p.store) == null ? void 0 : M.id), 1),
|
228
|
-
e[5] || (e[5] = t("br", null, null, -1)),
|
229
|
-
e[6] || (e[6] = t("b", null, "Transaction", -1)),
|
230
|
-
u(": " + i(S.value.length), 1)
|
231
|
-
];
|
232
|
-
}),
|
233
|
-
_: 1
|
234
|
-
})
|
235
|
-
]),
|
236
|
-
_: 1
|
237
|
-
})
|
238
|
-
]),
|
239
|
-
_: 1
|
240
|
-
}),
|
241
|
-
n(C, {
|
242
|
-
horizontal: "",
|
243
|
-
class: "flex-1 p-6 mx-6",
|
244
|
-
variant: "elevated"
|
245
|
-
}, {
|
246
|
-
default: s(() => [
|
247
|
-
n(v, { class: "flex flex-col gap-16 justify-between" }, {
|
248
|
-
default: s(() => [
|
249
|
-
n(f, {
|
250
|
-
class: "p-0",
|
251
|
-
title: "Bank Info",
|
252
|
-
subtitle: ""
|
253
|
-
}),
|
254
|
-
n(v, { class: "p-0" }, {
|
255
|
-
default: s(() => {
|
256
|
-
var r, c, p;
|
257
|
-
return [
|
258
|
-
e[7] || (e[7] = t("b", null, "Bank", -1)),
|
259
|
-
u(": " + i((r = l.value) == null ? void 0 : r.beneficiaryBank.name), 1),
|
260
|
-
e[8] || (e[8] = t("br", null, null, -1)),
|
261
|
-
e[9] || (e[9] = t("b", null, "Name", -1)),
|
262
|
-
u(": " + i((c = l.value) == null ? void 0 : c.beneficiaryBank.holderName), 1),
|
263
|
-
e[10] || (e[10] = t("br", null, null, -1)),
|
264
|
-
e[11] || (e[11] = t("b", null, "Number", -1)),
|
265
|
-
u(": " + i((p = l.value) == null ? void 0 : p.beneficiaryBank.accountNumber), 1)
|
266
|
-
];
|
267
|
-
}),
|
268
|
-
_: 1
|
269
|
-
})
|
270
|
-
]),
|
271
|
-
_: 1
|
272
|
-
})
|
273
|
-
]),
|
274
|
-
_: 1
|
275
|
-
}),
|
276
|
-
n(C, {
|
277
|
-
horizontal: "",
|
278
|
-
class: "flex-1 p-6",
|
279
|
-
variant: "elevated"
|
280
|
-
}, {
|
281
|
-
default: s(() => [
|
282
|
-
n(v, { class: "flex flex-col gap-16 justify-between" }, {
|
283
|
-
default: s(() => [
|
284
|
-
n(f, {
|
285
|
-
class: "p-0",
|
286
|
-
title: "Payout Info",
|
287
|
-
subtitle: ""
|
288
|
-
}),
|
289
|
-
n(v, { class: "p-0" }, {
|
290
|
-
default: s(() => {
|
291
|
-
var r, c, p;
|
292
|
-
return [
|
293
|
-
e[12] || (e[12] = t("b", null, "Amount", -1)),
|
294
|
-
u(": " + i(m(k)((r = l.value) == null ? void 0 : r.totalAmount).toFormat("$0.00")), 1),
|
295
|
-
e[13] || (e[13] = t("br", null, null, -1)),
|
296
|
-
e[14] || (e[14] = t("b", null, "Fee", -1)),
|
297
|
-
u(": " + i(m(k)((c = l.value) == null ? void 0 : c.totalFee).toFormat("$0.00")), 1),
|
298
|
-
e[15] || (e[15] = t("br", null, null, -1)),
|
299
|
-
e[16] || (e[16] = t("b", null, "Payout", -1)),
|
300
|
-
u(": " + i(m(k)((p = l.value) == null ? void 0 : p.totalPayout).toFormat("$0.00")), 1)
|
301
|
-
];
|
302
|
-
}),
|
303
|
-
_: 1
|
304
|
-
})
|
305
|
-
]),
|
306
|
-
_: 1
|
307
|
-
})
|
308
|
-
]),
|
309
|
-
_: 1
|
310
|
-
})
|
311
|
-
]),
|
312
|
-
t("div", fe, [
|
313
|
-
n(j, {
|
314
|
-
modelValue: T.value,
|
315
|
-
"onUpdate:modelValue": e[0] || (e[0] = (r) => T.value = r),
|
316
|
-
placeholder: "Search Transactions ..."
|
317
|
-
}, null, 8, ["modelValue"])
|
318
|
-
]),
|
319
|
-
n(z, {
|
320
|
-
modelValue: D.value,
|
321
|
-
"onUpdate:modelValue": e[1] || (e[1] = (r) => D.value = r),
|
322
|
-
"shrink-at": !1,
|
323
|
-
"search-value": T.value,
|
324
|
-
"row-data": h.value,
|
325
|
-
"column-defs": U,
|
326
|
-
loading: m(d)
|
327
|
-
}, null, 8, ["modelValue", "search-value", "row-data", "loading"])
|
328
|
-
]),
|
329
|
-
_: 1
|
330
|
-
}, 8, ["title", "description", "loading", "onBack"]);
|
331
|
-
};
|
332
|
-
}
|
333
|
-
});
|
334
|
-
export {
|
335
|
-
Ne as default
|
336
|
-
};
|