@feedmepos/mf-payment 1.2.0 → 1.2.1
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-BvU23xuM.js → PayoutAccount-CajKtGCP.js} +5 -5
- package/dist/{PayoutAccount-CLJp9Jyn.js → PayoutAccount-D8R2kieb.js} +6 -6
- package/dist/PayoutAccountSetting-DQqH71Pj.js +890 -0
- package/dist/{Restaurant-C962cqyn.js → Restaurant-Dbp_UTNd.js} +4 -4
- package/dist/{RestaurantSetting-C2zHT9N3.js → RestaurantSetting-dem9GccJ.js} +3 -3
- package/dist/{Settlement-BHHc5YoF.js → Settlement-CIl7p5BM.js} +3 -3
- package/dist/{Settlement-BZuKvRaG.js → Settlement-D47q_Wmh.js} +3 -3
- package/dist/{SettlementTransactions-zqQOlNmL.js → SettlementTransactions-BSN_bqJ2.js} +3 -3
- package/dist/{SettlementTransactions-T_NueCUi.js → SettlementTransactions-VhSpt9Ya.js} +3 -3
- package/dist/{Terminal-DEndcR6q.js → Terminal-DhDp8CZP.js} +5 -5
- package/dist/{TerminalSetting-Y11VutPg.js → TerminalSetting-Z4Yf71s4.js} +3 -3
- package/dist/{Transaction-BMh7HeF-.js → Transaction-DfqdJTc4.js} +5 -5
- package/dist/{Transaction-CKHYz4EJ.js → Transaction-DodA1Rsr.js} +7 -7
- package/dist/{TransactionOld-CBu3JNau.js → TransactionOld-BVC2EZES.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-Bm6pV5Ps.js → TransactionTable.vue_vue_type_script_setup_true_lang-BSQyjy9r.js} +3 -3
- package/dist/api/payout/index.d.ts +2 -1
- package/dist/{app-BpdRZpkd.js → app-DO-yUYMX.js} +385 -385
- package/dist/app.js +1 -1
- package/dist/{assets-CiNHrDU0.js → assets-Afjskent.js} +2 -2
- package/dist/{grafana-D4sIBgS0.js → grafana-Bx1CNAeG.js} +1 -1
- package/dist/{index-C2ZxjTVN.js → index-9ImIPLpT.js} +1 -1
- package/dist/index-BG-pqgpq.js +73 -0
- package/dist/{index-CtH76apJ.js → index-CWjhBRl-.js} +1 -1
- package/dist/{index-CuBlZneL.js → index-DJFB47Iu.js} +1 -1
- package/dist/{index-B9Q6VJh7.js → index-DcA8mNkW.js} +6527 -6473
- package/dist/{index-CtGB8IE0.js → index-DjMmMfFw.js} +1 -1
- package/dist/{index-D7YmrmZF.js → index-eVDNyUp0.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-C5YwGnbl.js → index.vue_vue_type_script_setup_true_lang-Pj1GGD11.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-DoiqVkOg.js → payout-account-1UTg_py3.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +6 -6
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +6 -6
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +36 -14
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +36 -14
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +6 -6
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +6 -6
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +155 -0
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +49 -0
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +12 -12
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +24 -24
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +12 -12
- package/package.json +2 -2
- package/dist/PayoutAccountSetting-DjrQRJDm.js +0 -728
- package/dist/index-CJL2mrrn.js +0 -67
@@ -1,728 +0,0 @@
|
|
1
|
-
import { defineComponent as k, resolveComponent as y, openBlock as b, createElementBlock as A, Fragment as $, createElementVNode as l, createVNode as s, withCtx as F, createTextVNode as _, toDisplayString as h, createCommentVNode as S, createBlock as C, ref as V, watch as L, computed as G, unref as v, isRef as M, h as B, onMounted as H, resolveDynamicComponent as Y, normalizeProps as Q, mergeProps as W } from "vue";
|
2
|
-
import { p as P } from "./index-CJL2mrrn.js";
|
3
|
-
import { u as K, e as N } from "./index-B9Q6VJh7.js";
|
4
|
-
import { _ as J } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
5
|
-
import { useRouter as X } from "vue-router";
|
6
|
-
import { u as D } from "./index-C2ZxjTVN.js";
|
7
|
-
import { P as z, _ as ee } from "./PDFViewer-BQfgFexr.js";
|
8
|
-
import { useSnackbar as j, components as te } from "@feedmepos/ui-library";
|
9
|
-
import { u as I } from "./error-K1CakhA9.js";
|
10
|
-
import { z as R, a as E } from "./validator-D5jtpt9A.js";
|
11
|
-
import { useCoreStore as ne } from "@feedmepos/mf-common";
|
12
|
-
const ae = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
13
|
-
__name: "Information",
|
14
|
-
props: {
|
15
|
-
payoutAccount: {
|
16
|
-
type: Object,
|
17
|
-
required: !0
|
18
|
-
}
|
19
|
-
},
|
20
|
-
setup(n) {
|
21
|
-
return (r, e) => {
|
22
|
-
const p = y("FmCardHeader"), c = y("FmCardSection"), o = y("FmCard");
|
23
|
-
return b(), A($, null, [
|
24
|
-
l("div", ae, [
|
25
|
-
s(o, {
|
26
|
-
horizontal: "",
|
27
|
-
class: "flex-1 p-6",
|
28
|
-
variant: "elevated"
|
29
|
-
}, {
|
30
|
-
default: F(() => [
|
31
|
-
s(c, { class: "flex flex-col gap-16 justify-between" }, {
|
32
|
-
default: F(() => [
|
33
|
-
s(p, {
|
34
|
-
class: "p-0",
|
35
|
-
title: "Account Info",
|
36
|
-
subtitle: ""
|
37
|
-
}),
|
38
|
-
s(c, { class: "p-0" }, {
|
39
|
-
default: F(() => {
|
40
|
-
var u, f, d, a, t;
|
41
|
-
return [
|
42
|
-
e[0] || (e[0] = l("b", null, "For", -1)),
|
43
|
-
_(": " + h((f = (u = n.payoutAccount) == null ? void 0 : u.store) == null ? void 0 : f.event) + " ", 1),
|
44
|
-
e[1] || (e[1] = l("br", null, null, -1)),
|
45
|
-
e[2] || (e[2] = l("b", null, "Reference", -1)),
|
46
|
-
_(": " + h((a = (d = n.payoutAccount) == null ? void 0 : d.store) == null ? void 0 : a.id), 1),
|
47
|
-
e[3] || (e[3] = l("br", null, null, -1)),
|
48
|
-
e[4] || (e[4] = l("b", null, "Business", -1)),
|
49
|
-
_(": " + h((t = n.payoutAccount) == null ? void 0 : t.businessId), 1),
|
50
|
-
e[5] || (e[5] = l("br", null, null, -1))
|
51
|
-
];
|
52
|
-
}),
|
53
|
-
_: 1
|
54
|
-
})
|
55
|
-
]),
|
56
|
-
_: 1
|
57
|
-
})
|
58
|
-
]),
|
59
|
-
_: 1
|
60
|
-
}),
|
61
|
-
s(o, {
|
62
|
-
horizontal: "",
|
63
|
-
class: "flex-1 p-6",
|
64
|
-
variant: "elevated"
|
65
|
-
}, {
|
66
|
-
default: F(() => [
|
67
|
-
s(c, { class: "flex flex-col gap-16 justify-between" }, {
|
68
|
-
default: F(() => [
|
69
|
-
s(p, {
|
70
|
-
class: "p-0",
|
71
|
-
title: "Key Person",
|
72
|
-
subtitle: ""
|
73
|
-
}),
|
74
|
-
s(c, { class: "p-0" }, {
|
75
|
-
default: F(() => {
|
76
|
-
var u, f, d, a, t, i, m, w;
|
77
|
-
return [
|
78
|
-
e[6] || (e[6] = l("b", null, "Email", -1)),
|
79
|
-
_(": " + h((d = (f = (u = n.payoutAccount) == null ? void 0 : u.store) == null ? void 0 : f.keyPerson) == null ? void 0 : d.email) + " ", 1),
|
80
|
-
e[7] || (e[7] = l("br", null, null, -1)),
|
81
|
-
e[8] || (e[8] = l("b", null, "Name", -1)),
|
82
|
-
_(": " + h((i = (t = (a = n.payoutAccount) == null ? void 0 : a.store) == null ? void 0 : t.keyPerson) == null ? void 0 : i.name), 1),
|
83
|
-
e[9] || (e[9] = l("br", null, null, -1)),
|
84
|
-
e[10] || (e[10] = l("b", null, "Phone", -1)),
|
85
|
-
_(": " + h((w = (m = n.payoutAccount) == null ? void 0 : m.store.keyPerson) == null ? void 0 : w.phone), 1),
|
86
|
-
e[11] || (e[11] = l("br", null, null, -1))
|
87
|
-
];
|
88
|
-
}),
|
89
|
-
_: 1
|
90
|
-
})
|
91
|
-
]),
|
92
|
-
_: 1
|
93
|
-
})
|
94
|
-
]),
|
95
|
-
_: 1
|
96
|
-
})
|
97
|
-
]),
|
98
|
-
e[12] || (e[12] = l("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Exterior Photo", -1)),
|
99
|
-
n.payoutAccount.store.exteriorPhoto ? (b(), A("img", {
|
100
|
-
key: 0,
|
101
|
-
src: n.payoutAccount.store.exteriorPhoto
|
102
|
-
}, null, 8, oe)) : S("", !0)
|
103
|
-
], 64);
|
104
|
-
};
|
105
|
-
}
|
106
|
-
}), ue = { class: "flex gap-16" }, se = { class: "flex-1" }, re = { class: "flex-1" }, ce = /* @__PURE__ */ k({
|
107
|
-
__name: "Settlement",
|
108
|
-
props: {
|
109
|
-
payoutAccount: {
|
110
|
-
type: Object,
|
111
|
-
required: !0
|
112
|
-
}
|
113
|
-
},
|
114
|
-
setup(n) {
|
115
|
-
return (r, e) => {
|
116
|
-
const p = y("FmCardHeader"), c = y("FmCardSection"), o = y("FmCard");
|
117
|
-
return b(), A($, null, [
|
118
|
-
s(o, {
|
119
|
-
horizontal: "",
|
120
|
-
class: "flex-1 p-6 mx-6 mb-6",
|
121
|
-
variant: "elevated"
|
122
|
-
}, {
|
123
|
-
default: F(() => [
|
124
|
-
s(c, { class: "flex flex-col gap-16 justify-between" }, {
|
125
|
-
default: F(() => [
|
126
|
-
s(p, {
|
127
|
-
class: "p-0",
|
128
|
-
title: "Bank Info",
|
129
|
-
subtitle: ""
|
130
|
-
}),
|
131
|
-
s(c, { class: "p-0" }, {
|
132
|
-
default: F(() => {
|
133
|
-
var u, f, d, a, t, i;
|
134
|
-
return [
|
135
|
-
e[0] || (e[0] = l("b", null, "Bank", -1)),
|
136
|
-
_(": " + h((f = (u = n.payoutAccount) == null ? void 0 : u.store.bank) == null ? void 0 : f.name), 1),
|
137
|
-
e[1] || (e[1] = l("br", null, null, -1)),
|
138
|
-
e[2] || (e[2] = l("b", null, "Name", -1)),
|
139
|
-
_(": " + h((a = (d = n.payoutAccount) == null ? void 0 : d.store.bank) == null ? void 0 : a.holderName), 1),
|
140
|
-
e[3] || (e[3] = l("br", null, null, -1)),
|
141
|
-
e[4] || (e[4] = l("b", null, "Number", -1)),
|
142
|
-
_(": " + h((i = (t = n.payoutAccount) == null ? void 0 : t.store.bank) == null ? void 0 : i.accountNumber), 1)
|
143
|
-
];
|
144
|
-
}),
|
145
|
-
_: 1
|
146
|
-
})
|
147
|
-
]),
|
148
|
-
_: 1
|
149
|
-
})
|
150
|
-
]),
|
151
|
-
_: 1
|
152
|
-
}),
|
153
|
-
l("div", ue, [
|
154
|
-
l("div", se, [
|
155
|
-
e[5] || (e[5] = l("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
|
156
|
-
n.payoutAccount.store.ssm ? (b(), C(z, {
|
157
|
-
key: 0,
|
158
|
-
pdf: n.payoutAccount.store.ssm,
|
159
|
-
"disable-text-layer": !0,
|
160
|
-
"disable-annotation-layer": !0
|
161
|
-
}, null, 8, ["pdf"])) : S("", !0)
|
162
|
-
]),
|
163
|
-
l("div", re, [
|
164
|
-
e[6] || (e[6] = l("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
|
165
|
-
n.payoutAccount.store.bankStatement ? (b(), C(z, {
|
166
|
-
key: 0,
|
167
|
-
pdf: n.payoutAccount.store.bankStatement,
|
168
|
-
"disable-text-layer": !0,
|
169
|
-
"disable-annotation-layer": !0
|
170
|
-
}, null, 8, ["pdf"])) : S("", !0)
|
171
|
-
])
|
172
|
-
])
|
173
|
-
], 64);
|
174
|
-
};
|
175
|
-
}
|
176
|
-
}), ie = /* @__PURE__ */ k({
|
177
|
-
__name: "RateInput",
|
178
|
-
props: {
|
179
|
-
data: {},
|
180
|
-
onChange: { type: Function }
|
181
|
-
},
|
182
|
-
setup(n) {
|
183
|
-
const r = n, e = V(r.data.toString());
|
184
|
-
return L(e, (p) => {
|
185
|
-
r.onChange(parseFloat(p));
|
186
|
-
}), (p, c) => {
|
187
|
-
const o = y("FmTextField");
|
188
|
-
return b(), C(o, {
|
189
|
-
inputmode: "decimal",
|
190
|
-
modelValue: e.value,
|
191
|
-
"onUpdate:modelValue": c[0] || (c[0] = (u) => e.value = u)
|
192
|
-
}, {
|
193
|
-
append: F(() => c[1] || (c[1] = [
|
194
|
-
_("%")
|
195
|
-
])),
|
196
|
-
_: 1
|
197
|
-
}, 8, ["modelValue"]);
|
198
|
-
};
|
199
|
-
}
|
200
|
-
}), de = /* @__PURE__ */ k({
|
201
|
-
__name: "TPlusInput",
|
202
|
-
props: {
|
203
|
-
data: {},
|
204
|
-
onChange: { type: Function }
|
205
|
-
},
|
206
|
-
setup(n) {
|
207
|
-
const r = n, e = V(r.data.toString());
|
208
|
-
return L(e, (p) => {
|
209
|
-
r.onChange(parseInt(p));
|
210
|
-
}), (p, c) => {
|
211
|
-
const o = y("FmTextField");
|
212
|
-
return b(), C(o, {
|
213
|
-
inputmode: "numeric",
|
214
|
-
modelValue: e.value,
|
215
|
-
"onUpdate:modelValue": c[0] || (c[0] = (u) => e.value = u)
|
216
|
-
}, null, 8, ["modelValue"]);
|
217
|
-
};
|
218
|
-
}
|
219
|
-
}), me = { class: "flex gap-16 mt-6" }, pe = { class: "flex-1" }, ye = { class: "flex-1" }, fe = { class: "my-6 w-full flex justify-end" }, be = { class: "w-[320px]" }, ve = /* @__PURE__ */ k({
|
220
|
-
__name: "PaymentStatus",
|
221
|
-
props: {
|
222
|
-
onUpdate: {
|
223
|
-
type: Function,
|
224
|
-
required: !0
|
225
|
-
},
|
226
|
-
payoutAccount: {
|
227
|
-
type: Object,
|
228
|
-
required: !0
|
229
|
-
}
|
230
|
-
},
|
231
|
-
setup(n) {
|
232
|
-
const r = n, e = V(!1), p = j(), c = async (a) => {
|
233
|
-
try {
|
234
|
-
e.value = !0, await r.onUpdate(a), p.open({
|
235
|
-
type: "success",
|
236
|
-
title: "Payout account update succesfully"
|
237
|
-
});
|
238
|
-
} catch (t) {
|
239
|
-
p.open({
|
240
|
-
type: "error",
|
241
|
-
title: "Error occurs when updating payout account",
|
242
|
-
message: I(t)
|
243
|
-
});
|
244
|
-
} finally {
|
245
|
-
e.value = !1;
|
246
|
-
}
|
247
|
-
}, { search: o } = D({
|
248
|
-
search: ""
|
249
|
-
}), u = G(() => {
|
250
|
-
const { ssm: a, bank: t, bankStatement: i } = r.payoutAccount.store;
|
251
|
-
return a && t && t.name && t.accountNumber && t.holderName && i;
|
252
|
-
}), f = V(""), d = [
|
253
|
-
{
|
254
|
-
header: () => "Payment Method",
|
255
|
-
accessorKey: "issuer",
|
256
|
-
cell: (a) => `${a.row.original.issuer} (${a.row.original.variant})`
|
257
|
-
},
|
258
|
-
{
|
259
|
-
header: () => "Rate",
|
260
|
-
accessorKey: "rate",
|
261
|
-
cell: ({ row: a }) => {
|
262
|
-
let t = 0;
|
263
|
-
return a.original.rate && (t = a.original.rate.amount / Math.pow(10, a.original.rate.precision)), B(ie, {
|
264
|
-
data: t,
|
265
|
-
onChange: (i) => {
|
266
|
-
const m = r.payoutAccount.methods.at(a.index);
|
267
|
-
m.rate || (m.rate = {
|
268
|
-
amount: 0,
|
269
|
-
precision: 4
|
270
|
-
}), m.rate.amount = i * Math.pow(10, m.rate.precision);
|
271
|
-
}
|
272
|
-
});
|
273
|
-
}
|
274
|
-
},
|
275
|
-
{
|
276
|
-
header: () => "T plus",
|
277
|
-
accessorKey: "tPlus",
|
278
|
-
cell: ({ row: a }) => B(de, {
|
279
|
-
data: a.original.tPlus ?? 0,
|
280
|
-
onChange: (t) => {
|
281
|
-
const i = r.payoutAccount.methods.at(a.index);
|
282
|
-
i.tPlus = t;
|
283
|
-
}
|
284
|
-
})
|
285
|
-
}
|
286
|
-
];
|
287
|
-
return (a, t) => {
|
288
|
-
const i = y("FmRadio"), m = y("FmRadioGroup"), w = y("FmSwitch"), T = y("FmSearch"), U = y("FmTable"), x = y("FmButton");
|
289
|
-
return b(), A($, null, [
|
290
|
-
l("div", me, [
|
291
|
-
l("div", pe, [
|
292
|
-
s(m, {
|
293
|
-
modelValue: n.payoutAccount.status,
|
294
|
-
"onUpdate:modelValue": t[0] || (t[0] = (g) => n.payoutAccount.status = g),
|
295
|
-
label: "Account Status"
|
296
|
-
}, {
|
297
|
-
default: F(() => [
|
298
|
-
s(i, {
|
299
|
-
value: "NEW",
|
300
|
-
label: "New"
|
301
|
-
}),
|
302
|
-
s(i, {
|
303
|
-
value: "PENDING",
|
304
|
-
label: "Pending"
|
305
|
-
}),
|
306
|
-
s(i, {
|
307
|
-
value: "APPROVED",
|
308
|
-
label: "Approved"
|
309
|
-
})
|
310
|
-
]),
|
311
|
-
_: 1
|
312
|
-
}, 8, ["modelValue"])
|
313
|
-
]),
|
314
|
-
l("div", ye, [
|
315
|
-
s(w, {
|
316
|
-
modelValue: n.payoutAccount.enable,
|
317
|
-
"onUpdate:modelValue": t[1] || (t[1] = (g) => n.payoutAccount.enable = g),
|
318
|
-
disabled: !u.value,
|
319
|
-
label: "Enabled",
|
320
|
-
sublabel: "Merchant can use online features such as e-payment, settlement"
|
321
|
-
}, null, 8, ["modelValue", "disabled"])
|
322
|
-
])
|
323
|
-
]),
|
324
|
-
n.payoutAccount.enable ? (b(), A($, { key: 0 }, [
|
325
|
-
l("div", fe, [
|
326
|
-
l("div", be, [
|
327
|
-
s(T, {
|
328
|
-
modelValue: v(o),
|
329
|
-
"onUpdate:modelValue": t[2] || (t[2] = (g) => M(o) ? o.value = g : null),
|
330
|
-
placeholder: "Search Method ..."
|
331
|
-
}, null, 8, ["modelValue"])
|
332
|
-
])
|
333
|
-
]),
|
334
|
-
s(U, {
|
335
|
-
class: "mt-6",
|
336
|
-
modelValue: f.value,
|
337
|
-
"onUpdate:modelValue": t[3] || (t[3] = (g) => f.value = g),
|
338
|
-
"shrink-at": !1,
|
339
|
-
"search-value": v(o),
|
340
|
-
"row-data": n.payoutAccount.methods,
|
341
|
-
"column-defs": d
|
342
|
-
}, null, 8, ["modelValue", "search-value", "row-data"])
|
343
|
-
], 64)) : S("", !0),
|
344
|
-
s(x, {
|
345
|
-
class: "w-full mt-6",
|
346
|
-
variant: "primary",
|
347
|
-
label: "Save",
|
348
|
-
loading: e.value,
|
349
|
-
onclick: () => c(n.payoutAccount)
|
350
|
-
}, null, 8, ["loading", "onclick"])
|
351
|
-
], 64);
|
352
|
-
};
|
353
|
-
}
|
354
|
-
}), ge = { class: "flex" }, Fe = /* @__PURE__ */ k({
|
355
|
-
__name: "Actions",
|
356
|
-
emits: ["edit", "delete"],
|
357
|
-
setup(n, { emit: r }) {
|
358
|
-
const e = r;
|
359
|
-
return (p, c) => {
|
360
|
-
const o = y("FmButton");
|
361
|
-
return b(), A("div", ge, [
|
362
|
-
s(o, {
|
363
|
-
variant: "plain",
|
364
|
-
"prepend-icon": "delete",
|
365
|
-
onClick: c[0] || (c[0] = (u) => {
|
366
|
-
u.stopPropagation(), e("delete");
|
367
|
-
})
|
368
|
-
})
|
369
|
-
]);
|
370
|
-
};
|
371
|
-
}
|
372
|
-
}), xe = { class: "flex justify-end px-6 pb-6" }, _e = /* @__PURE__ */ k({
|
373
|
-
__name: "PaymentChannel",
|
374
|
-
props: {
|
375
|
-
payoutAccount: {
|
376
|
-
type: Object,
|
377
|
-
required: !0
|
378
|
-
}
|
379
|
-
},
|
380
|
-
setup(n) {
|
381
|
-
const r = j(), e = n, { isLoading: p, startAsyncCall: c } = K(), o = V([]);
|
382
|
-
function u() {
|
383
|
-
c(async () => {
|
384
|
-
o.value = await P.getChannels(e.payoutAccount._id);
|
385
|
-
});
|
386
|
-
}
|
387
|
-
H(u);
|
388
|
-
function f() {
|
389
|
-
c(async () => {
|
390
|
-
try {
|
391
|
-
await P.updateChannels(e.payoutAccount._id, o.value), r.open({
|
392
|
-
type: "success",
|
393
|
-
title: "Payout account channels update succesfully"
|
394
|
-
});
|
395
|
-
} catch (t) {
|
396
|
-
r.open({
|
397
|
-
type: "error",
|
398
|
-
title: "Error occurs when updating payout account channels",
|
399
|
-
message: I(t)
|
400
|
-
});
|
401
|
-
}
|
402
|
-
});
|
403
|
-
}
|
404
|
-
function d() {
|
405
|
-
c(async () => {
|
406
|
-
try {
|
407
|
-
await P.resetChannels(e.payoutAccount._id), o.value = await P.getChannels(e.payoutAccount._id), r.open({
|
408
|
-
type: "success",
|
409
|
-
title: "Payout account channels reset succesfully"
|
410
|
-
});
|
411
|
-
} catch (t) {
|
412
|
-
r.open({
|
413
|
-
type: "error",
|
414
|
-
title: "Error occurs when reset payout account channels",
|
415
|
-
message: I(t)
|
416
|
-
});
|
417
|
-
}
|
418
|
-
});
|
419
|
-
}
|
420
|
-
const a = [
|
421
|
-
{
|
422
|
-
header: () => "Gateway",
|
423
|
-
accessorKey: "gateway"
|
424
|
-
},
|
425
|
-
{
|
426
|
-
header: () => "Payment Type",
|
427
|
-
accessorKey: "type"
|
428
|
-
},
|
429
|
-
{
|
430
|
-
header: () => "Display",
|
431
|
-
accessorKey: "icon",
|
432
|
-
cell: ({ row: t }) => B("img", { src: t.original.icon, width: 32, height: 32 })
|
433
|
-
},
|
434
|
-
{
|
435
|
-
header: () => "Label",
|
436
|
-
accessorKey: "label",
|
437
|
-
cell: ({ row: t }) => B(te.FmTextField, {
|
438
|
-
modelValue: t.original.label,
|
439
|
-
"onUpdate:modelValue": (i) => t.original.label = i
|
440
|
-
})
|
441
|
-
},
|
442
|
-
{
|
443
|
-
id: "actions",
|
444
|
-
header: () => "Actions",
|
445
|
-
cell: ({ row: t }) => B(Fe, {
|
446
|
-
onDelete: () => o.value.splice(t.index, 1)
|
447
|
-
})
|
448
|
-
}
|
449
|
-
];
|
450
|
-
return (t, i) => {
|
451
|
-
const m = y("FmButton"), w = y("FmTable");
|
452
|
-
return b(), A($, null, [
|
453
|
-
l("div", xe, [
|
454
|
-
s(m, {
|
455
|
-
class: "mx-4",
|
456
|
-
variant: "destructive",
|
457
|
-
size: "md",
|
458
|
-
icon: "history",
|
459
|
-
label: "Reset",
|
460
|
-
onClick: d
|
461
|
-
}),
|
462
|
-
s(m, {
|
463
|
-
variant: "primary",
|
464
|
-
size: "md",
|
465
|
-
icon: "save",
|
466
|
-
label: "Save",
|
467
|
-
onClick: f
|
468
|
-
})
|
469
|
-
]),
|
470
|
-
s(w, {
|
471
|
-
loading: v(p),
|
472
|
-
"row-data": o.value,
|
473
|
-
"column-defs": a,
|
474
|
-
"shrink-at": !1
|
475
|
-
}, null, 8, ["loading", "row-data"])
|
476
|
-
], 64);
|
477
|
-
};
|
478
|
-
}
|
479
|
-
}), we = { class: "flex mt-6 space-x-6" }, Ae = /* @__PURE__ */ k({
|
480
|
-
__name: "FiuuGateway",
|
481
|
-
props: {
|
482
|
-
gateway: {
|
483
|
-
type: Object,
|
484
|
-
required: !0
|
485
|
-
},
|
486
|
-
onUpdate: {
|
487
|
-
type: Function,
|
488
|
-
required: !0
|
489
|
-
},
|
490
|
-
onDelete: {
|
491
|
-
type: Function,
|
492
|
-
required: !0
|
493
|
-
}
|
494
|
-
},
|
495
|
-
setup(n) {
|
496
|
-
var p;
|
497
|
-
const e = V(((p = n.gateway) == null ? void 0 : p.config) || {
|
498
|
-
merchantId: "",
|
499
|
-
verifyKey: "",
|
500
|
-
secretKey: ""
|
501
|
-
});
|
502
|
-
return (c, o) => {
|
503
|
-
const u = y("FmTextField"), f = y("FmButton"), d = y("FmForm");
|
504
|
-
return b(), C(d, {
|
505
|
-
ref: "form",
|
506
|
-
class: "flex flex-col gap-16",
|
507
|
-
onValidationSuccess: o[3] || (o[3] = () => n.onUpdate(e.value))
|
508
|
-
}, {
|
509
|
-
default: F(() => [
|
510
|
-
s(u, {
|
511
|
-
modelValue: e.value.merchantId,
|
512
|
-
"onUpdate:modelValue": o[0] || (o[0] = (a) => e.value.merchantId = a),
|
513
|
-
label: "Merchant ID",
|
514
|
-
rules: v(R)(v(E).string())
|
515
|
-
}, null, 8, ["modelValue", "rules"]),
|
516
|
-
s(u, {
|
517
|
-
modelValue: e.value.verifyKey,
|
518
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => e.value.verifyKey = a),
|
519
|
-
label: "Verify Key",
|
520
|
-
rules: v(R)(v(E).string())
|
521
|
-
}, null, 8, ["modelValue", "rules"]),
|
522
|
-
s(u, {
|
523
|
-
modelValue: e.value.secretKey,
|
524
|
-
"onUpdate:modelValue": o[2] || (o[2] = (a) => e.value.secretKey = a),
|
525
|
-
label: "Secret Key",
|
526
|
-
rules: v(R)(v(E).string())
|
527
|
-
}, null, 8, ["modelValue", "rules"]),
|
528
|
-
l("div", we, [
|
529
|
-
n.gateway ? (b(), C(f, {
|
530
|
-
key: 0,
|
531
|
-
class: "flex-1",
|
532
|
-
variant: "secondary",
|
533
|
-
label: "Delete",
|
534
|
-
onclick: () => n.onDelete()
|
535
|
-
}, null, 8, ["onclick"])) : S("", !0),
|
536
|
-
s(f, {
|
537
|
-
type: "submit",
|
538
|
-
class: "flex-1",
|
539
|
-
variant: "primary",
|
540
|
-
label: "Save"
|
541
|
-
})
|
542
|
-
])
|
543
|
-
]),
|
544
|
-
_: 1
|
545
|
-
}, 512);
|
546
|
-
};
|
547
|
-
}
|
548
|
-
}), Ce = {}, ke = { class: "flex items-center justify-center h-screen" };
|
549
|
-
function he(n, r) {
|
550
|
-
return b(), A("div", ke, r[0] || (r[0] = [
|
551
|
-
l("h1", { class: "text-4xl font-bold text-gray-800" }, "Coming Soon", -1)
|
552
|
-
]));
|
553
|
-
}
|
554
|
-
const Pe = /* @__PURE__ */ ee(Ce, [["render", he]]), Ve = {
|
555
|
-
key: 0,
|
556
|
-
class: "flex items-center justify-center min-h-[80vh]"
|
557
|
-
}, Se = /* @__PURE__ */ k({
|
558
|
-
__name: "PaymentGateway",
|
559
|
-
props: {
|
560
|
-
payoutAccount: {
|
561
|
-
type: Object,
|
562
|
-
required: !0
|
563
|
-
}
|
564
|
-
},
|
565
|
-
setup(n) {
|
566
|
-
const r = ne().currentCountry, e = j(), { isLoading: p, startAsyncCall: c } = K(), { gatewayTab: o } = D({
|
567
|
-
gatewayTab: ""
|
568
|
-
}), u = n, f = [
|
569
|
-
{
|
570
|
-
label: "Fiuu",
|
571
|
-
value: "RAZER_MERCHANT_SERVICE",
|
572
|
-
render: Ae,
|
573
|
-
region: [N.F_COUNTRY.enum.SG]
|
574
|
-
},
|
575
|
-
{
|
576
|
-
label: "Macau Pass",
|
577
|
-
value: "MACAU_PASS",
|
578
|
-
render: Pe,
|
579
|
-
region: [N.F_COUNTRY.enum.MO]
|
580
|
-
}
|
581
|
-
], d = V(u.payoutAccount.gateways ?? []), a = G(() => f.find((i) => i.value === o.value));
|
582
|
-
async function t(i) {
|
583
|
-
await c(async () => {
|
584
|
-
try {
|
585
|
-
await P.updateGateway(u.payoutAccount._id, i), e.open({
|
586
|
-
type: "success",
|
587
|
-
title: "Payout account gateways update succesfully"
|
588
|
-
});
|
589
|
-
} catch (m) {
|
590
|
-
e.open({
|
591
|
-
type: "error",
|
592
|
-
title: "Error occurs when updating payout account gateways",
|
593
|
-
message: I(m)
|
594
|
-
});
|
595
|
-
}
|
596
|
-
});
|
597
|
-
}
|
598
|
-
return (i, m) => {
|
599
|
-
var U;
|
600
|
-
const w = y("FmCircularProgress"), T = y("FmTabs");
|
601
|
-
return b(), A($, null, [
|
602
|
-
m[1] || (m[1] = l("p", { className: "mt-1 my-6 text-gray-600" }, [
|
603
|
-
l("b", null, "Note: "),
|
604
|
-
_(" There's no setup required for Malaysia Payment Gateway, once Payout Account is ready you will able to configure the payment channels. ")
|
605
|
-
], -1)),
|
606
|
-
v(p) ? (b(), A("div", Ve, [
|
607
|
-
s(w, { size: "xxl" })
|
608
|
-
])) : (b(), C(T, {
|
609
|
-
key: 1,
|
610
|
-
"model-value": v(o),
|
611
|
-
"onUpdate:modelValue": m[0] || (m[0] = (x) => M(o) ? o.value = x : null),
|
612
|
-
class: "mb-6",
|
613
|
-
items: f.filter((x) => x.region.includes(v(r) ?? v(N.F_COUNTRY).enum.MY))
|
614
|
-
}, null, 8, ["model-value", "items"])),
|
615
|
-
v(o) ? (b(), C(Y((U = a.value) == null ? void 0 : U.render), Q(W({ key: 2 }, {
|
616
|
-
gateway: d.value.find((x) => {
|
617
|
-
var g;
|
618
|
-
return x.paymentGateway === ((g = a.value) == null ? void 0 : g.value);
|
619
|
-
}),
|
620
|
-
onDelete: async () => {
|
621
|
-
d.value = d.value.filter((x) => {
|
622
|
-
var g;
|
623
|
-
return x.paymentGateway !== ((g = a.value) == null ? void 0 : g.value);
|
624
|
-
}), t(d.value);
|
625
|
-
},
|
626
|
-
onUpdate: (x) => {
|
627
|
-
var O;
|
628
|
-
let g = d.value.find((Z) => {
|
629
|
-
var q;
|
630
|
-
return Z.paymentGateway === ((q = a.value) == null ? void 0 : q.value);
|
631
|
-
});
|
632
|
-
g ? g.config = x : d.value.push({
|
633
|
-
paymentGateway: (O = a.value) == null ? void 0 : O.value,
|
634
|
-
config: x
|
635
|
-
}), t(d.value);
|
636
|
-
}
|
637
|
-
})), null, 16)) : S("", !0)
|
638
|
-
], 64);
|
639
|
-
};
|
640
|
-
}
|
641
|
-
}), De = /* @__PURE__ */ k({
|
642
|
-
__name: "PayoutAccountSetting",
|
643
|
-
props: {
|
644
|
-
accountId: {
|
645
|
-
type: String,
|
646
|
-
required: !0
|
647
|
-
}
|
648
|
-
},
|
649
|
-
setup(n) {
|
650
|
-
const r = n, { tab: e } = D({
|
651
|
-
tab: "information"
|
652
|
-
}), { isLoading: p, startAsyncCall: c } = K(!0), o = X(), u = V();
|
653
|
-
async function f(i) {
|
654
|
-
await P.updateById(
|
655
|
-
r.accountId,
|
656
|
-
i
|
657
|
-
), u.value = await P.readById(r.accountId);
|
658
|
-
}
|
659
|
-
const d = [
|
660
|
-
{
|
661
|
-
label: "Information",
|
662
|
-
value: "information",
|
663
|
-
icon: "overview",
|
664
|
-
render: le
|
665
|
-
},
|
666
|
-
{
|
667
|
-
label: "Settlement",
|
668
|
-
value: "settlement",
|
669
|
-
icon: "payments",
|
670
|
-
render: ce
|
671
|
-
},
|
672
|
-
{
|
673
|
-
label: "MDR Status",
|
674
|
-
value: "payment",
|
675
|
-
icon: "account_box",
|
676
|
-
render: ve
|
677
|
-
},
|
678
|
-
{
|
679
|
-
label: "Online Gateways",
|
680
|
-
value: "gateways",
|
681
|
-
icon: "account_balance",
|
682
|
-
render: Se
|
683
|
-
},
|
684
|
-
{
|
685
|
-
label: "Online Channels",
|
686
|
-
value: "channels",
|
687
|
-
icon: "assured_workload",
|
688
|
-
render: _e
|
689
|
-
}
|
690
|
-
];
|
691
|
-
function a() {
|
692
|
-
c(async () => {
|
693
|
-
u.value = await P.readById(r.accountId);
|
694
|
-
});
|
695
|
-
}
|
696
|
-
H(a);
|
697
|
-
const t = G(() => {
|
698
|
-
var i;
|
699
|
-
return (i = d.find((m) => m.value === e.value)) == null ? void 0 : i.render;
|
700
|
-
});
|
701
|
-
return (i, m) => {
|
702
|
-
var T;
|
703
|
-
const w = y("FmTabs");
|
704
|
-
return b(), C(J, {
|
705
|
-
title: `Payout Account (${(T = u.value) == null ? void 0 : T._id})`,
|
706
|
-
loading: v(p),
|
707
|
-
onBack: v(o).back
|
708
|
-
}, {
|
709
|
-
default: F(() => [
|
710
|
-
s(w, {
|
711
|
-
"model-value": v(e),
|
712
|
-
"onUpdate:modelValue": m[0] || (m[0] = (U) => M(e) ? e.value = U : null),
|
713
|
-
class: "mb-6",
|
714
|
-
items: d
|
715
|
-
}, null, 8, ["model-value"]),
|
716
|
-
v(e) ? (b(), C(Y(t.value), Q(W({ key: 0 }, {
|
717
|
-
payoutAccount: u.value,
|
718
|
-
onUpdate: f
|
719
|
-
})), null, 16)) : S("", !0)
|
720
|
-
]),
|
721
|
-
_: 1
|
722
|
-
}, 8, ["title", "loading", "onBack"]);
|
723
|
-
};
|
724
|
-
}
|
725
|
-
});
|
726
|
-
export {
|
727
|
-
De as default
|
728
|
-
};
|