@feedmepos/mf-payment 1.5.5 → 1.5.7-dev
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/{Actions.vue_vue_type_script_setup_true_lang-BLXnOuCw.js → Actions.vue_vue_type_script_setup_true_lang-Cwt13ALm.js} +2 -2
- package/dist/{Chargeback-19afdT_4.js → Chargeback-BdT_s3at.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-C-5XOuTl.js → DocumentViewer.vue_vue_type_script_setup_true_lang-CTA026mA.js} +1 -1
- package/dist/{OnboardForm-BJSHk-cq.js → OnboardForm-6LLulbsZ.js} +5 -5
- package/dist/{OnboardForm-BK2DIdR7.js → OnboardForm-nxAX33US.js} +5 -5
- package/dist/{OnboardSubmission-Dj8AGb69.js → OnboardSubmission-DcFt464S.js} +5 -5
- package/dist/{OnboardSubmission-B-leoVPo.js → OnboardSubmission-DrWzegfK.js} +2 -2
- package/dist/{PayoutAccount-SfVNXkci.js → PayoutAccount-Bfzuby3c.js} +4 -4
- package/dist/{PayoutAccount-DoTiFzIL.js → PayoutAccount-H6N30yNO.js} +5 -5
- package/dist/PayoutAccountSetting-BqpRTFyn.js +1359 -0
- package/dist/{Restaurant-ZiTHtFZJ.js → Restaurant-DCycaRR7.js} +4 -4
- package/dist/{RestaurantSetting-M1jYaGwx.js → RestaurantSetting-D6s1uPMz.js} +3 -3
- package/dist/{Settlement-D_nmqYEC.js → Settlement-DHebMBfs.js} +3 -3
- package/dist/{Settlement-Cj2W8VfH.js → Settlement-DlplAJW2.js} +3 -3
- package/dist/{SettlementTransactions-DvO6XMC4.js → SettlementTransactions-BB3jFvdP.js} +4 -4
- package/dist/{SettlementTransactions-DQZUsieX.js → SettlementTransactions-D1FZ4SvU.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-BP5m6Vic.js → Status.vue_vue_type_script_setup_true_lang-BsbxaRKL.js} +1 -1
- package/dist/{Terminal-CoPPPePw.js → Terminal-DOf20nIw.js} +5 -5
- package/dist/{TerminalSetting-PWs1fyFe.js → TerminalSetting-fwdOkBMF.js} +3 -3
- package/dist/{Transaction-C6CtVbqB.js → Transaction-BojSMumb.js} +6 -6
- package/dist/{Transaction-DHTahbbJ.js → Transaction-DRc7VdWm.js} +9 -9
- package/dist/{TransactionOld-Cvqw-Osm.js → TransactionOld-CVid_gM_.js} +6 -6
- package/dist/{app-C3eKGkJf.js → app-BLwmgjLV.js} +526 -518
- package/dist/app.js +5 -4
- package/dist/{assets-V6CPweA9.js → assets-BnwoyNOf.js} +1 -1
- package/dist/{grafana-fZyobMgN.js → grafana-Bz7xSfdW.js} +1 -1
- package/dist/{index-_u7l8cO3.js → index-6TNmNay6.js} +1 -1
- package/dist/{index-CMN40t8e.js → index-BGliGchf.js} +1 -1
- package/dist/{index-C-YBwRQp.js → index-BcpQUz2-.js} +1 -1
- package/dist/{index-CtkwL_6R.js → index-Bi2r6bNV.js} +1 -1
- package/dist/{index-CbONxZz2.js → index-D68osbqj.js} +2 -2
- package/dist/{index-D69RnDa7.js → index-DaMy_lQ6.js} +1 -1
- package/dist/{index-eLZ3BErV.js → index-DqW_m_SE.js} +1 -1
- package/dist/{index-BJNCcdvT.js → index-Dqk3bGgi.js} +5503 -5504
- package/dist/{index--K2ipr4H.js → index-DyEaoZ8f.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-zxkA_YTt.js → index.vue_vue_type_script_setup_true_lang-D6hndvwu.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-D4xWK_RQ.js → payout-account-ppiDcfDV.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +30 -22
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/cell/MinimumFeeInput.vue.d.ts +6 -0
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +30 -22
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +30 -22
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +30 -22
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +32 -24
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +30 -22
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +30 -22
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +8 -8
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +60 -44
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +52 -52
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +26 -26
- package/package.json +2 -2
- package/dist/PayoutAccountSetting-DzkmUdgK.js +0 -1318
|
@@ -0,0 +1,1359 @@
|
|
|
1
|
+
import { defineComponent as _, resolveComponent as c, openBlock as f, createElementBlock as P, Fragment as $, createElementVNode as m, createVNode as o, withCtx as x, createTextVNode as S, toDisplayString as M, ref as U, watch as Z, createBlock as F, computed as K, isRef as q, unref as r, createCommentVNode as T, h as O, onMounted as ae, resolveDynamicComponent as Q, normalizeProps as W, mergeProps as J } from "vue";
|
|
2
|
+
import { p as R } from "./index-DaMy_lQ6.js";
|
|
3
|
+
import { u as Y, e as I } from "./index-Dqk3bGgi.js";
|
|
4
|
+
import { _ as oe } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
5
|
+
import { useRouter as ue } from "vue-router";
|
|
6
|
+
import { u as j } from "./index-Bi2r6bNV.js";
|
|
7
|
+
import { _ as L } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-CTA026mA.js";
|
|
8
|
+
import { P as te } from "./PDFViewer-CIPPbzWD.js";
|
|
9
|
+
import { useSnackbar as z, components as re } from "@feedmepos/ui-library";
|
|
10
|
+
import { u as E } from "./error-K1CakhA9.js";
|
|
11
|
+
import { z as V, a as w } from "./validator-DzjyJnvv.js";
|
|
12
|
+
import { useCoreStore as ne } from "@feedmepos/mf-common";
|
|
13
|
+
const se = { class: "flex gap-16 mb-6" }, ie = /* @__PURE__ */ _({
|
|
14
|
+
__name: "Information",
|
|
15
|
+
props: {
|
|
16
|
+
payoutAccount: {
|
|
17
|
+
type: Object,
|
|
18
|
+
required: !0
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(n) {
|
|
22
|
+
return (p, e) => {
|
|
23
|
+
var u, v;
|
|
24
|
+
const d = c("FmCardHeader"), s = c("FmCardSection"), t = c("FmCard");
|
|
25
|
+
return f(), P($, null, [
|
|
26
|
+
m("div", se, [
|
|
27
|
+
o(t, {
|
|
28
|
+
horizontal: "",
|
|
29
|
+
class: "flex-1 p-6",
|
|
30
|
+
variant: "elevated"
|
|
31
|
+
}, {
|
|
32
|
+
default: x(() => [
|
|
33
|
+
o(s, { class: "flex flex-col gap-16 justify-between" }, {
|
|
34
|
+
default: x(() => [
|
|
35
|
+
o(d, {
|
|
36
|
+
class: "p-0",
|
|
37
|
+
title: "Account Info",
|
|
38
|
+
subtitle: ""
|
|
39
|
+
}),
|
|
40
|
+
o(s, { class: "p-0" }, {
|
|
41
|
+
default: x(() => {
|
|
42
|
+
var i, a, l, g, y;
|
|
43
|
+
return [
|
|
44
|
+
e[0] || (e[0] = m("b", null, "For", -1)),
|
|
45
|
+
S(": " + M((a = (i = n.payoutAccount) == null ? void 0 : i.store) == null ? void 0 : a.event) + " ", 1),
|
|
46
|
+
e[1] || (e[1] = m("br", null, null, -1)),
|
|
47
|
+
e[2] || (e[2] = m("b", null, "Reference", -1)),
|
|
48
|
+
S(": " + M((g = (l = n.payoutAccount) == null ? void 0 : l.store) == null ? void 0 : g.id), 1),
|
|
49
|
+
e[3] || (e[3] = m("br", null, null, -1)),
|
|
50
|
+
e[4] || (e[4] = m("b", null, "Business", -1)),
|
|
51
|
+
S(": " + M((y = n.payoutAccount) == null ? void 0 : y.businessId), 1),
|
|
52
|
+
e[5] || (e[5] = m("br", null, null, -1))
|
|
53
|
+
];
|
|
54
|
+
}),
|
|
55
|
+
_: 1
|
|
56
|
+
})
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
})
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
}),
|
|
63
|
+
o(t, {
|
|
64
|
+
horizontal: "",
|
|
65
|
+
class: "flex-1 p-6",
|
|
66
|
+
variant: "elevated"
|
|
67
|
+
}, {
|
|
68
|
+
default: x(() => [
|
|
69
|
+
o(s, { class: "flex flex-col gap-16 justify-between" }, {
|
|
70
|
+
default: x(() => [
|
|
71
|
+
o(d, {
|
|
72
|
+
class: "p-0",
|
|
73
|
+
title: "Key Person",
|
|
74
|
+
subtitle: ""
|
|
75
|
+
}),
|
|
76
|
+
o(s, { class: "p-0" }, {
|
|
77
|
+
default: x(() => {
|
|
78
|
+
var i, a, l, g, y, b, C, A;
|
|
79
|
+
return [
|
|
80
|
+
e[6] || (e[6] = m("b", null, "Email", -1)),
|
|
81
|
+
S(": " + M((l = (a = (i = n.payoutAccount) == null ? void 0 : i.store) == null ? void 0 : a.keyPerson) == null ? void 0 : l.email) + " ", 1),
|
|
82
|
+
e[7] || (e[7] = m("br", null, null, -1)),
|
|
83
|
+
e[8] || (e[8] = m("b", null, "Name", -1)),
|
|
84
|
+
S(": " + M((b = (y = (g = n.payoutAccount) == null ? void 0 : g.store) == null ? void 0 : y.keyPerson) == null ? void 0 : b.name), 1),
|
|
85
|
+
e[9] || (e[9] = m("br", null, null, -1)),
|
|
86
|
+
e[10] || (e[10] = m("b", null, "Phone", -1)),
|
|
87
|
+
S(": " + M((A = (C = n.payoutAccount) == null ? void 0 : C.store.keyPerson) == null ? void 0 : A.phone), 1),
|
|
88
|
+
e[11] || (e[11] = m("br", null, null, -1))
|
|
89
|
+
];
|
|
90
|
+
}),
|
|
91
|
+
_: 1
|
|
92
|
+
})
|
|
93
|
+
]),
|
|
94
|
+
_: 1
|
|
95
|
+
})
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
})
|
|
99
|
+
]),
|
|
100
|
+
e[12] || (e[12] = m("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Exterior Photo", -1)),
|
|
101
|
+
o(L, {
|
|
102
|
+
document: n.payoutAccount.store.exteriorPhoto,
|
|
103
|
+
"restaurant-id": ((v = (u = n.payoutAccount) == null ? void 0 : u.store) == null ? void 0 : v.event) === "ORDERING" ? n.payoutAccount.store.id : void 0
|
|
104
|
+
}, null, 8, ["document", "restaurant-id"])
|
|
105
|
+
], 64);
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}), ce = { class: "flex gap-16" }, me = { class: "flex-1" }, de = { class: "flex-1" }, pe = /* @__PURE__ */ _({
|
|
109
|
+
__name: "Settlement",
|
|
110
|
+
props: {
|
|
111
|
+
payoutAccount: {
|
|
112
|
+
type: Object,
|
|
113
|
+
required: !0
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
setup(n) {
|
|
117
|
+
return (p, e) => {
|
|
118
|
+
var u, v, i, a;
|
|
119
|
+
const d = c("FmCardHeader"), s = c("FmCardSection"), t = c("FmCard");
|
|
120
|
+
return f(), P($, null, [
|
|
121
|
+
o(t, {
|
|
122
|
+
horizontal: "",
|
|
123
|
+
class: "flex-1 p-6 mx-6 mb-6",
|
|
124
|
+
variant: "elevated"
|
|
125
|
+
}, {
|
|
126
|
+
default: x(() => [
|
|
127
|
+
o(s, { class: "flex flex-col gap-16 justify-between" }, {
|
|
128
|
+
default: x(() => [
|
|
129
|
+
o(d, {
|
|
130
|
+
class: "p-0",
|
|
131
|
+
title: "Bank Info",
|
|
132
|
+
subtitle: ""
|
|
133
|
+
}),
|
|
134
|
+
o(s, { class: "p-0" }, {
|
|
135
|
+
default: x(() => {
|
|
136
|
+
var l, g, y, b, C, A;
|
|
137
|
+
return [
|
|
138
|
+
e[0] || (e[0] = m("b", null, "Bank", -1)),
|
|
139
|
+
S(": " + M((g = (l = n.payoutAccount) == null ? void 0 : l.store.bank) == null ? void 0 : g.name), 1),
|
|
140
|
+
e[1] || (e[1] = m("br", null, null, -1)),
|
|
141
|
+
e[2] || (e[2] = m("b", null, "Name", -1)),
|
|
142
|
+
S(": " + M((b = (y = n.payoutAccount) == null ? void 0 : y.store.bank) == null ? void 0 : b.holderName), 1),
|
|
143
|
+
e[3] || (e[3] = m("br", null, null, -1)),
|
|
144
|
+
e[4] || (e[4] = m("b", null, "Number", -1)),
|
|
145
|
+
S(": " + M((A = (C = n.payoutAccount) == null ? void 0 : C.store.bank) == null ? void 0 : A.accountNumber), 1)
|
|
146
|
+
];
|
|
147
|
+
}),
|
|
148
|
+
_: 1
|
|
149
|
+
})
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
})
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
}),
|
|
156
|
+
m("div", ce, [
|
|
157
|
+
m("div", me, [
|
|
158
|
+
e[5] || (e[5] = m("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
|
|
159
|
+
o(L, {
|
|
160
|
+
"restaurant-id": ((v = (u = n.payoutAccount) == null ? void 0 : u.store) == null ? void 0 : v.event) === "ORDERING" ? n.payoutAccount.store.id : void 0,
|
|
161
|
+
document: n.payoutAccount.store.ssm
|
|
162
|
+
}, {
|
|
163
|
+
default: x(({ src: l }) => [
|
|
164
|
+
o(te, {
|
|
165
|
+
pdf: l,
|
|
166
|
+
"disable-text-layer": !0,
|
|
167
|
+
"disable-annotation-layer": !0
|
|
168
|
+
}, null, 8, ["pdf"])
|
|
169
|
+
]),
|
|
170
|
+
_: 1
|
|
171
|
+
}, 8, ["restaurant-id", "document"])
|
|
172
|
+
]),
|
|
173
|
+
m("div", de, [
|
|
174
|
+
e[6] || (e[6] = m("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
|
|
175
|
+
o(L, {
|
|
176
|
+
"restaurant-id": ((a = (i = n.payoutAccount) == null ? void 0 : i.store) == null ? void 0 : a.event) === "ORDERING" ? n.payoutAccount.store.id : void 0,
|
|
177
|
+
document: n.payoutAccount.store.bankStatement
|
|
178
|
+
}, {
|
|
179
|
+
default: x(({ src: l }) => [
|
|
180
|
+
o(te, {
|
|
181
|
+
pdf: l,
|
|
182
|
+
"disable-text-layer": !0,
|
|
183
|
+
"disable-annotation-layer": !0
|
|
184
|
+
}, null, 8, ["pdf"])
|
|
185
|
+
]),
|
|
186
|
+
_: 1
|
|
187
|
+
}, 8, ["restaurant-id", "document"])
|
|
188
|
+
])
|
|
189
|
+
])
|
|
190
|
+
], 64);
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
}), ye = /* @__PURE__ */ _({
|
|
194
|
+
__name: "RateInput",
|
|
195
|
+
props: {
|
|
196
|
+
data: {},
|
|
197
|
+
onChange: { type: Function }
|
|
198
|
+
},
|
|
199
|
+
setup(n) {
|
|
200
|
+
const p = n, e = U(p.data.toString());
|
|
201
|
+
return Z(e, (d) => {
|
|
202
|
+
p.onChange(parseFloat(d));
|
|
203
|
+
}), (d, s) => {
|
|
204
|
+
const t = c("FmTextField");
|
|
205
|
+
return f(), F(t, {
|
|
206
|
+
inputmode: "decimal",
|
|
207
|
+
modelValue: e.value,
|
|
208
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => e.value = u)
|
|
209
|
+
}, {
|
|
210
|
+
append: x(() => [...s[1] || (s[1] = [
|
|
211
|
+
S("%", -1)
|
|
212
|
+
])]),
|
|
213
|
+
_: 1
|
|
214
|
+
}, 8, ["modelValue"]);
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
}), ve = /* @__PURE__ */ _({
|
|
218
|
+
__name: "TPlusInput",
|
|
219
|
+
props: {
|
|
220
|
+
data: {},
|
|
221
|
+
onChange: { type: Function }
|
|
222
|
+
},
|
|
223
|
+
setup(n) {
|
|
224
|
+
const p = n, e = U(p.data.toString());
|
|
225
|
+
return Z(e, (d) => {
|
|
226
|
+
p.onChange(parseInt(d));
|
|
227
|
+
}), (d, s) => {
|
|
228
|
+
const t = c("FmTextField");
|
|
229
|
+
return f(), F(t, {
|
|
230
|
+
inputmode: "numeric",
|
|
231
|
+
modelValue: e.value,
|
|
232
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => e.value = u)
|
|
233
|
+
}, null, 8, ["modelValue"]);
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
}), fe = /* @__PURE__ */ _({
|
|
237
|
+
__name: "MinimumFeeInput",
|
|
238
|
+
props: {
|
|
239
|
+
data: {},
|
|
240
|
+
onChange: { type: Function }
|
|
241
|
+
},
|
|
242
|
+
setup(n) {
|
|
243
|
+
const p = n, e = U(p.data.toString());
|
|
244
|
+
return Z(e, (d) => {
|
|
245
|
+
p.onChange(parseFloat(d));
|
|
246
|
+
}), (d, s) => {
|
|
247
|
+
const t = c("FmTextField");
|
|
248
|
+
return f(), F(t, {
|
|
249
|
+
inputmode: "numeric",
|
|
250
|
+
modelValue: e.value,
|
|
251
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => e.value = u)
|
|
252
|
+
}, {
|
|
253
|
+
prepend: x(() => [...s[1] || (s[1] = [
|
|
254
|
+
S("$", -1)
|
|
255
|
+
])]),
|
|
256
|
+
_: 1
|
|
257
|
+
}, 8, ["modelValue"]);
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
}), ge = { class: "flex gap-16 mt-6" }, be = { class: "flex-1" }, Fe = { class: "flex-1" }, xe = { class: "my-6 w-full flex justify-end" }, Ve = { class: "w-[320px]" }, we = /* @__PURE__ */ _({
|
|
261
|
+
__name: "PaymentStatus",
|
|
262
|
+
props: {
|
|
263
|
+
onUpdate: {
|
|
264
|
+
type: Function,
|
|
265
|
+
required: !0
|
|
266
|
+
},
|
|
267
|
+
payoutAccount: {
|
|
268
|
+
type: Object,
|
|
269
|
+
required: !0
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
setup(n) {
|
|
273
|
+
const p = n, e = U(!1), d = z(), s = async (a) => {
|
|
274
|
+
try {
|
|
275
|
+
e.value = !0, await p.onUpdate(a), d.open({
|
|
276
|
+
type: "success",
|
|
277
|
+
title: "Payout account update succesfully"
|
|
278
|
+
});
|
|
279
|
+
} catch (l) {
|
|
280
|
+
d.open({
|
|
281
|
+
type: "error",
|
|
282
|
+
title: "Error occurs when updating payout account",
|
|
283
|
+
message: E(l)
|
|
284
|
+
});
|
|
285
|
+
} finally {
|
|
286
|
+
e.value = !1;
|
|
287
|
+
}
|
|
288
|
+
}, { search: t } = j({
|
|
289
|
+
search: ""
|
|
290
|
+
}), u = K(() => {
|
|
291
|
+
const { ssm: a, bank: l, bankStatement: g } = p.payoutAccount.store;
|
|
292
|
+
return a && l && l.name && l.accountNumber && l.holderName && g;
|
|
293
|
+
}), v = U(""), i = [
|
|
294
|
+
{
|
|
295
|
+
header: () => "Payment Method",
|
|
296
|
+
accessorKey: "issuer",
|
|
297
|
+
cell: (a) => `${a.row.original.issuer} (${a.row.original.variant})`
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
header: () => "Rate",
|
|
301
|
+
accessorKey: "rate",
|
|
302
|
+
cell: ({ row: a }) => {
|
|
303
|
+
let l = 0;
|
|
304
|
+
return a.original.rate && (l = a.original.rate.amount / Math.pow(10, a.original.rate.precision)), O(ye, {
|
|
305
|
+
data: l,
|
|
306
|
+
onChange: (g) => {
|
|
307
|
+
const y = p.payoutAccount.methods.at(a.index);
|
|
308
|
+
y.rate || (y.rate = {
|
|
309
|
+
amount: 0,
|
|
310
|
+
precision: 4
|
|
311
|
+
}), y.rate.amount = g * Math.pow(10, y.rate.precision);
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
header: () => "Minimum Fee",
|
|
318
|
+
accessorKey: "minimumFee",
|
|
319
|
+
cell: ({ row: a }) => {
|
|
320
|
+
let l = 0;
|
|
321
|
+
return a.original.minimumFee && (l = a.original.minimumFee.amount / Math.pow(10, a.original.minimumFee.precision)), O(fe, {
|
|
322
|
+
data: l,
|
|
323
|
+
onChange: (g) => {
|
|
324
|
+
const y = p.payoutAccount.methods.at(a.index);
|
|
325
|
+
y.minimumFee || (y.minimumFee = {
|
|
326
|
+
amount: 0,
|
|
327
|
+
precision: 2
|
|
328
|
+
}), y.minimumFee.amount = g * Math.pow(10, y.minimumFee.precision);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
header: () => "T plus",
|
|
335
|
+
accessorKey: "tPlus",
|
|
336
|
+
cell: ({ row: a }) => O(ve, {
|
|
337
|
+
data: a.original.tPlus ?? 0,
|
|
338
|
+
onChange: (l) => {
|
|
339
|
+
const g = p.payoutAccount.methods.at(a.index);
|
|
340
|
+
g.tPlus = l;
|
|
341
|
+
}
|
|
342
|
+
})
|
|
343
|
+
}
|
|
344
|
+
];
|
|
345
|
+
return (a, l) => {
|
|
346
|
+
const g = c("FmRadio"), y = c("FmRadioGroup"), b = c("FmSwitch"), C = c("FmSearch"), A = c("FmTable"), h = c("FmButton");
|
|
347
|
+
return f(), P($, null, [
|
|
348
|
+
m("div", ge, [
|
|
349
|
+
m("div", be, [
|
|
350
|
+
o(y, {
|
|
351
|
+
modelValue: n.payoutAccount.status,
|
|
352
|
+
"onUpdate:modelValue": l[0] || (l[0] = (k) => n.payoutAccount.status = k),
|
|
353
|
+
label: "Account Status"
|
|
354
|
+
}, {
|
|
355
|
+
default: x(() => [
|
|
356
|
+
o(g, {
|
|
357
|
+
value: "NEW",
|
|
358
|
+
label: "New"
|
|
359
|
+
}),
|
|
360
|
+
o(g, {
|
|
361
|
+
value: "PENDING",
|
|
362
|
+
label: "Pending"
|
|
363
|
+
}),
|
|
364
|
+
o(g, {
|
|
365
|
+
value: "APPROVED",
|
|
366
|
+
label: "Approved"
|
|
367
|
+
})
|
|
368
|
+
]),
|
|
369
|
+
_: 1
|
|
370
|
+
}, 8, ["modelValue"])
|
|
371
|
+
]),
|
|
372
|
+
m("div", Fe, [
|
|
373
|
+
o(b, {
|
|
374
|
+
modelValue: n.payoutAccount.enable,
|
|
375
|
+
"onUpdate:modelValue": l[1] || (l[1] = (k) => n.payoutAccount.enable = k),
|
|
376
|
+
disabled: !u.value,
|
|
377
|
+
label: "Enabled",
|
|
378
|
+
sublabel: "Merchant can use online features such as e-payment, settlement"
|
|
379
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
380
|
+
])
|
|
381
|
+
]),
|
|
382
|
+
n.payoutAccount.enable ? (f(), P($, { key: 0 }, [
|
|
383
|
+
m("div", xe, [
|
|
384
|
+
m("div", Ve, [
|
|
385
|
+
o(C, {
|
|
386
|
+
modelValue: r(t),
|
|
387
|
+
"onUpdate:modelValue": l[2] || (l[2] = (k) => q(t) ? t.value = k : null),
|
|
388
|
+
placeholder: "Search Method ..."
|
|
389
|
+
}, null, 8, ["modelValue"])
|
|
390
|
+
])
|
|
391
|
+
]),
|
|
392
|
+
o(A, {
|
|
393
|
+
class: "mt-6",
|
|
394
|
+
modelValue: v.value,
|
|
395
|
+
"onUpdate:modelValue": l[3] || (l[3] = (k) => v.value = k),
|
|
396
|
+
"shrink-at": !1,
|
|
397
|
+
"search-value": r(t),
|
|
398
|
+
"row-data": n.payoutAccount.methods,
|
|
399
|
+
"column-defs": i
|
|
400
|
+
}, null, 8, ["modelValue", "search-value", "row-data"])
|
|
401
|
+
], 64)) : T("", !0),
|
|
402
|
+
o(h, {
|
|
403
|
+
class: "w-full mt-6",
|
|
404
|
+
variant: "primary",
|
|
405
|
+
label: "Save",
|
|
406
|
+
loading: e.value,
|
|
407
|
+
onclick: () => s(n.payoutAccount)
|
|
408
|
+
}, null, 8, ["loading", "onclick"])
|
|
409
|
+
], 64);
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
}), Ae = { class: "flex" }, ke = /* @__PURE__ */ _({
|
|
413
|
+
__name: "Actions",
|
|
414
|
+
emits: ["edit", "delete"],
|
|
415
|
+
setup(n, { emit: p }) {
|
|
416
|
+
const e = p;
|
|
417
|
+
return (d, s) => {
|
|
418
|
+
const t = c("FmButton");
|
|
419
|
+
return f(), P("div", Ae, [
|
|
420
|
+
o(t, {
|
|
421
|
+
variant: "plain",
|
|
422
|
+
"prepend-icon": "delete",
|
|
423
|
+
onClick: s[0] || (s[0] = (u) => {
|
|
424
|
+
u.stopPropagation(), e("delete");
|
|
425
|
+
})
|
|
426
|
+
})
|
|
427
|
+
]);
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
}), _e = { class: "flex justify-end px-6 pb-6" }, Ce = /* @__PURE__ */ _({
|
|
431
|
+
__name: "PaymentChannel",
|
|
432
|
+
props: {
|
|
433
|
+
payoutAccount: {
|
|
434
|
+
type: Object,
|
|
435
|
+
required: !0
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
setup(n) {
|
|
439
|
+
const p = z(), e = n, { isLoading: d, startAsyncCall: s } = Y(), t = U([]);
|
|
440
|
+
function u() {
|
|
441
|
+
s(async () => {
|
|
442
|
+
t.value = await R.getChannels(e.payoutAccount._id);
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
ae(u);
|
|
446
|
+
function v() {
|
|
447
|
+
s(async () => {
|
|
448
|
+
try {
|
|
449
|
+
await R.updateChannels(e.payoutAccount._id, t.value), p.open({
|
|
450
|
+
type: "success",
|
|
451
|
+
title: "Payout account channels update succesfully"
|
|
452
|
+
});
|
|
453
|
+
} catch (l) {
|
|
454
|
+
p.open({
|
|
455
|
+
type: "error",
|
|
456
|
+
title: "Error occurs when updating payout account channels",
|
|
457
|
+
message: E(l)
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
function i() {
|
|
463
|
+
s(async () => {
|
|
464
|
+
try {
|
|
465
|
+
await R.resetChannels(e.payoutAccount._id), t.value = await R.getChannels(e.payoutAccount._id), p.open({
|
|
466
|
+
type: "success",
|
|
467
|
+
title: "Payout account channels reset succesfully"
|
|
468
|
+
});
|
|
469
|
+
} catch (l) {
|
|
470
|
+
p.open({
|
|
471
|
+
type: "error",
|
|
472
|
+
title: "Error occurs when reset payout account channels",
|
|
473
|
+
message: E(l)
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
const a = [
|
|
479
|
+
{
|
|
480
|
+
header: () => "Gateway",
|
|
481
|
+
accessorKey: "gateway"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
header: () => "Payment Type",
|
|
485
|
+
accessorKey: "type"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
header: () => "Display",
|
|
489
|
+
accessorKey: "icon",
|
|
490
|
+
cell: ({ row: l }) => O("img", { src: l.original.icon, width: 32, height: 32 })
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
header: () => "Label",
|
|
494
|
+
accessorKey: "label",
|
|
495
|
+
cell: ({ row: l }) => O(re.FmTextField, {
|
|
496
|
+
modelValue: l.original.label,
|
|
497
|
+
"onUpdate:modelValue": (g) => l.original.label = g
|
|
498
|
+
})
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
id: "actions",
|
|
502
|
+
header: () => "Actions",
|
|
503
|
+
cell: ({ row: l }) => O(ke, {
|
|
504
|
+
onDelete: () => t.value.splice(l.index, 1)
|
|
505
|
+
})
|
|
506
|
+
}
|
|
507
|
+
];
|
|
508
|
+
return (l, g) => {
|
|
509
|
+
const y = c("FmButton"), b = c("FmTable");
|
|
510
|
+
return f(), P($, null, [
|
|
511
|
+
m("div", _e, [
|
|
512
|
+
o(y, {
|
|
513
|
+
class: "mx-4",
|
|
514
|
+
variant: "destructive",
|
|
515
|
+
size: "md",
|
|
516
|
+
icon: "history",
|
|
517
|
+
label: "Reset",
|
|
518
|
+
onClick: i
|
|
519
|
+
}),
|
|
520
|
+
o(y, {
|
|
521
|
+
variant: "primary",
|
|
522
|
+
size: "md",
|
|
523
|
+
icon: "save",
|
|
524
|
+
label: "Save",
|
|
525
|
+
onClick: v
|
|
526
|
+
})
|
|
527
|
+
]),
|
|
528
|
+
o(b, {
|
|
529
|
+
loading: r(d),
|
|
530
|
+
"row-data": t.value,
|
|
531
|
+
"column-defs": a,
|
|
532
|
+
"shrink-at": !1
|
|
533
|
+
}, null, 8, ["loading", "row-data"])
|
|
534
|
+
], 64);
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
}), Ue = { class: "flex mt-6 space-x-6" }, Te = /* @__PURE__ */ _({
|
|
538
|
+
__name: "FiuuGateway",
|
|
539
|
+
props: {
|
|
540
|
+
gateway: {
|
|
541
|
+
type: Object,
|
|
542
|
+
required: !0
|
|
543
|
+
},
|
|
544
|
+
onUpdate: {
|
|
545
|
+
type: Function,
|
|
546
|
+
required: !0
|
|
547
|
+
},
|
|
548
|
+
onDelete: {
|
|
549
|
+
type: Function,
|
|
550
|
+
required: !0
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
setup(n) {
|
|
554
|
+
var d;
|
|
555
|
+
const e = U(((d = n.gateway) == null ? void 0 : d.config) || {
|
|
556
|
+
merchantId: "",
|
|
557
|
+
verifyKey: "",
|
|
558
|
+
secretKey: ""
|
|
559
|
+
});
|
|
560
|
+
return (s, t) => {
|
|
561
|
+
const u = c("FmTextField"), v = c("FmButton"), i = c("FmForm");
|
|
562
|
+
return f(), F(i, {
|
|
563
|
+
ref: "form",
|
|
564
|
+
class: "flex flex-col gap-16",
|
|
565
|
+
onValidationSuccess: t[3] || (t[3] = () => n.onUpdate(e.value))
|
|
566
|
+
}, {
|
|
567
|
+
default: x(() => [
|
|
568
|
+
o(u, {
|
|
569
|
+
modelValue: e.value.merchantId,
|
|
570
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.value.merchantId = a),
|
|
571
|
+
label: "Merchant ID",
|
|
572
|
+
rules: r(V)(r(w).string())
|
|
573
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
574
|
+
o(u, {
|
|
575
|
+
modelValue: e.value.verifyKey,
|
|
576
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value.verifyKey = a),
|
|
577
|
+
label: "Verify Key",
|
|
578
|
+
rules: r(V)(r(w).string())
|
|
579
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
580
|
+
o(u, {
|
|
581
|
+
modelValue: e.value.secretKey,
|
|
582
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => e.value.secretKey = a),
|
|
583
|
+
label: "Secret Key",
|
|
584
|
+
rules: r(V)(r(w).string())
|
|
585
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
586
|
+
m("div", Ue, [
|
|
587
|
+
n.gateway ? (f(), F(v, {
|
|
588
|
+
key: 0,
|
|
589
|
+
class: "flex-1",
|
|
590
|
+
variant: "secondary",
|
|
591
|
+
label: "Delete",
|
|
592
|
+
onclick: () => n.onDelete()
|
|
593
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
|
594
|
+
o(v, {
|
|
595
|
+
type: "submit",
|
|
596
|
+
class: "flex-1",
|
|
597
|
+
variant: "primary",
|
|
598
|
+
label: "Save"
|
|
599
|
+
})
|
|
600
|
+
])
|
|
601
|
+
]),
|
|
602
|
+
_: 1
|
|
603
|
+
}, 512);
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
}), he = { class: "flex mt-6 space-x-6" }, Ie = /* @__PURE__ */ _({
|
|
607
|
+
__name: "MacauPassGateway",
|
|
608
|
+
props: {
|
|
609
|
+
gateway: {
|
|
610
|
+
type: Object,
|
|
611
|
+
required: !0
|
|
612
|
+
},
|
|
613
|
+
onUpdate: {
|
|
614
|
+
type: Function,
|
|
615
|
+
required: !0
|
|
616
|
+
},
|
|
617
|
+
onDelete: {
|
|
618
|
+
type: Function,
|
|
619
|
+
required: !0
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
setup(n) {
|
|
623
|
+
var d;
|
|
624
|
+
const e = U(((d = n.gateway) == null ? void 0 : d.config) || {
|
|
625
|
+
merchantId: "",
|
|
626
|
+
merchantName: "",
|
|
627
|
+
merchantCategoryCode: "",
|
|
628
|
+
storeID: "",
|
|
629
|
+
storeName: ""
|
|
630
|
+
});
|
|
631
|
+
return (s, t) => {
|
|
632
|
+
const u = c("FmTextField"), v = c("FmButton"), i = c("FmForm");
|
|
633
|
+
return f(), F(i, {
|
|
634
|
+
ref: "form",
|
|
635
|
+
class: "flex flex-col gap-16",
|
|
636
|
+
onValidationSuccess: t[5] || (t[5] = () => n.onUpdate(e.value))
|
|
637
|
+
}, {
|
|
638
|
+
default: x(() => [
|
|
639
|
+
o(u, {
|
|
640
|
+
modelValue: e.value.merchantId,
|
|
641
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.value.merchantId = a),
|
|
642
|
+
label: "Merchant ID",
|
|
643
|
+
rules: r(V)(r(w).string())
|
|
644
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
645
|
+
o(u, {
|
|
646
|
+
modelValue: e.value.merchantName,
|
|
647
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value.merchantName = a),
|
|
648
|
+
label: "Merchant Name",
|
|
649
|
+
rules: r(V)(r(w).string())
|
|
650
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
651
|
+
o(u, {
|
|
652
|
+
modelValue: e.value.merchantCategoryCode,
|
|
653
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => e.value.merchantCategoryCode = a),
|
|
654
|
+
label: "Merchant MCC",
|
|
655
|
+
rules: r(V)(r(w).string())
|
|
656
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
657
|
+
o(u, {
|
|
658
|
+
modelValue: e.value.storeID,
|
|
659
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => e.value.storeID = a),
|
|
660
|
+
label: "Store ID",
|
|
661
|
+
rules: r(V)(r(w).string())
|
|
662
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
663
|
+
o(u, {
|
|
664
|
+
modelValue: e.value.storeName,
|
|
665
|
+
"onUpdate:modelValue": t[4] || (t[4] = (a) => e.value.storeName = a),
|
|
666
|
+
label: "Store Name",
|
|
667
|
+
rules: r(V)(r(w).string())
|
|
668
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
669
|
+
m("div", he, [
|
|
670
|
+
n.gateway ? (f(), F(v, {
|
|
671
|
+
key: 0,
|
|
672
|
+
class: "flex-1",
|
|
673
|
+
variant: "secondary",
|
|
674
|
+
label: "Delete",
|
|
675
|
+
onclick: () => n.onDelete()
|
|
676
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
|
677
|
+
o(v, {
|
|
678
|
+
type: "submit",
|
|
679
|
+
class: "flex-1",
|
|
680
|
+
variant: "primary",
|
|
681
|
+
label: "Save"
|
|
682
|
+
})
|
|
683
|
+
])
|
|
684
|
+
]),
|
|
685
|
+
_: 1
|
|
686
|
+
}, 512);
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
}), Se = { class: "flex mt-6 space-x-6" }, Pe = /* @__PURE__ */ _({
|
|
690
|
+
__name: "DigioGateway",
|
|
691
|
+
props: {
|
|
692
|
+
gateway: {
|
|
693
|
+
type: Object,
|
|
694
|
+
required: !0
|
|
695
|
+
},
|
|
696
|
+
onUpdate: {
|
|
697
|
+
type: Function,
|
|
698
|
+
required: !0
|
|
699
|
+
},
|
|
700
|
+
onDelete: {
|
|
701
|
+
type: Function,
|
|
702
|
+
required: !0
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
setup(n) {
|
|
706
|
+
var d;
|
|
707
|
+
const e = U(((d = n.gateway) == null ? void 0 : d.config) || {
|
|
708
|
+
merchantId: "",
|
|
709
|
+
cardMerchantId: ""
|
|
710
|
+
});
|
|
711
|
+
return (s, t) => {
|
|
712
|
+
const u = c("FmTextField"), v = c("FmButton"), i = c("FmForm");
|
|
713
|
+
return f(), F(i, {
|
|
714
|
+
ref: "form",
|
|
715
|
+
class: "flex flex-col gap-16",
|
|
716
|
+
onValidationSuccess: t[2] || (t[2] = () => n.onUpdate(e.value))
|
|
717
|
+
}, {
|
|
718
|
+
default: x(() => [
|
|
719
|
+
o(u, {
|
|
720
|
+
modelValue: e.value.merchantId,
|
|
721
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.value.merchantId = a),
|
|
722
|
+
label: "Merchant ID",
|
|
723
|
+
rules: r(V)(r(w).string())
|
|
724
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
725
|
+
o(u, {
|
|
726
|
+
modelValue: e.value.cardMerchantId,
|
|
727
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value.cardMerchantId = a),
|
|
728
|
+
label: "Card Merchant ID",
|
|
729
|
+
rules: r(V)(r(w).string())
|
|
730
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
731
|
+
m("div", Se, [
|
|
732
|
+
n.gateway ? (f(), F(v, {
|
|
733
|
+
key: 0,
|
|
734
|
+
class: "flex-1",
|
|
735
|
+
variant: "secondary",
|
|
736
|
+
label: "Delete",
|
|
737
|
+
onclick: () => n.onDelete()
|
|
738
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
|
739
|
+
o(v, {
|
|
740
|
+
type: "submit",
|
|
741
|
+
class: "flex-1",
|
|
742
|
+
variant: "primary",
|
|
743
|
+
label: "Save"
|
|
744
|
+
})
|
|
745
|
+
])
|
|
746
|
+
]),
|
|
747
|
+
_: 1
|
|
748
|
+
}, 512);
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
}), De = { class: "flex mt-6 space-x-6" }, Ne = /* @__PURE__ */ _({
|
|
752
|
+
__name: "AdyenGateway",
|
|
753
|
+
props: {
|
|
754
|
+
gateway: {
|
|
755
|
+
type: Object,
|
|
756
|
+
required: !0
|
|
757
|
+
},
|
|
758
|
+
onUpdate: {
|
|
759
|
+
type: Function,
|
|
760
|
+
required: !0
|
|
761
|
+
},
|
|
762
|
+
onDelete: {
|
|
763
|
+
type: Function,
|
|
764
|
+
required: !0
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
setup(n) {
|
|
768
|
+
var d;
|
|
769
|
+
const e = U(((d = n.gateway) == null ? void 0 : d.config) || {
|
|
770
|
+
merchantAccount: "",
|
|
771
|
+
username: "",
|
|
772
|
+
apiKey: "",
|
|
773
|
+
clientKey: "",
|
|
774
|
+
endpoint: "",
|
|
775
|
+
hmacKey: ""
|
|
776
|
+
});
|
|
777
|
+
return (s, t) => {
|
|
778
|
+
const u = c("FmTextField"), v = c("FmButton"), i = c("FmForm");
|
|
779
|
+
return f(), F(i, {
|
|
780
|
+
ref: "form",
|
|
781
|
+
class: "flex flex-col gap-16",
|
|
782
|
+
onValidationSuccess: t[6] || (t[6] = () => n.onUpdate(e.value))
|
|
783
|
+
}, {
|
|
784
|
+
default: x(() => [
|
|
785
|
+
o(u, {
|
|
786
|
+
modelValue: e.value.endpoint,
|
|
787
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.value.endpoint = a),
|
|
788
|
+
label: "Endpoint",
|
|
789
|
+
rules: r(V)(r(w).string())
|
|
790
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
791
|
+
o(u, {
|
|
792
|
+
modelValue: e.value.merchantAccount,
|
|
793
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value.merchantAccount = a),
|
|
794
|
+
label: "Merchant Account",
|
|
795
|
+
rules: r(V)(r(w).string())
|
|
796
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
797
|
+
o(u, {
|
|
798
|
+
modelValue: e.value.username,
|
|
799
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => e.value.username = a),
|
|
800
|
+
label: "Username",
|
|
801
|
+
rules: r(V)(r(w).string())
|
|
802
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
803
|
+
o(u, {
|
|
804
|
+
modelValue: e.value.apiKey,
|
|
805
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => e.value.apiKey = a),
|
|
806
|
+
label: "API Key",
|
|
807
|
+
rules: r(V)(r(w).string())
|
|
808
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
809
|
+
o(u, {
|
|
810
|
+
modelValue: e.value.clientKey,
|
|
811
|
+
"onUpdate:modelValue": t[4] || (t[4] = (a) => e.value.clientKey = a),
|
|
812
|
+
label: "Client Key",
|
|
813
|
+
rules: r(V)(r(w).string())
|
|
814
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
815
|
+
o(u, {
|
|
816
|
+
modelValue: e.value.hmacKey,
|
|
817
|
+
"onUpdate:modelValue": t[5] || (t[5] = (a) => e.value.hmacKey = a),
|
|
818
|
+
label: "HMac Key"
|
|
819
|
+
}, null, 8, ["modelValue"]),
|
|
820
|
+
m("div", De, [
|
|
821
|
+
n.gateway ? (f(), F(v, {
|
|
822
|
+
key: 0,
|
|
823
|
+
class: "flex-1",
|
|
824
|
+
variant: "secondary",
|
|
825
|
+
label: "Delete",
|
|
826
|
+
onclick: () => n.onDelete()
|
|
827
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
|
828
|
+
o(v, {
|
|
829
|
+
type: "submit",
|
|
830
|
+
class: "flex-1",
|
|
831
|
+
variant: "primary",
|
|
832
|
+
label: "Save"
|
|
833
|
+
})
|
|
834
|
+
])
|
|
835
|
+
]),
|
|
836
|
+
_: 1
|
|
837
|
+
}, 512);
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
}), Me = { class: "flex mt-6 space-x-6" }, Re = /* @__PURE__ */ _({
|
|
841
|
+
__name: "KsherGateway",
|
|
842
|
+
props: {
|
|
843
|
+
gateway: {
|
|
844
|
+
type: Object,
|
|
845
|
+
required: !0
|
|
846
|
+
},
|
|
847
|
+
onUpdate: {
|
|
848
|
+
type: Function,
|
|
849
|
+
required: !0
|
|
850
|
+
},
|
|
851
|
+
onDelete: {
|
|
852
|
+
type: Function,
|
|
853
|
+
required: !0
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
setup(n) {
|
|
857
|
+
var d;
|
|
858
|
+
const e = U(((d = n.gateway) == null ? void 0 : d.config) || {
|
|
859
|
+
appId: "",
|
|
860
|
+
privateKey: ""
|
|
861
|
+
});
|
|
862
|
+
return (s, t) => {
|
|
863
|
+
const u = c("FmTextField"), v = c("FmTextarea"), i = c("FmButton"), a = c("FmForm");
|
|
864
|
+
return f(), F(a, {
|
|
865
|
+
ref: "form",
|
|
866
|
+
class: "flex flex-col gap-16",
|
|
867
|
+
onValidationSuccess: t[2] || (t[2] = () => n.onUpdate(e.value))
|
|
868
|
+
}, {
|
|
869
|
+
default: x(() => [
|
|
870
|
+
o(u, {
|
|
871
|
+
modelValue: e.value.appId,
|
|
872
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.value.appId = l),
|
|
873
|
+
label: "App ID",
|
|
874
|
+
rules: r(V)(r(w).string())
|
|
875
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
876
|
+
o(v, {
|
|
877
|
+
modelValue: e.value.privateKey,
|
|
878
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => e.value.privateKey = l),
|
|
879
|
+
label: "Private Key",
|
|
880
|
+
placeholder: "Paste your private key including BEGIN and END markers",
|
|
881
|
+
rules: r(V)(r(w).string())
|
|
882
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
883
|
+
m("div", Me, [
|
|
884
|
+
n.gateway ? (f(), F(i, {
|
|
885
|
+
key: 0,
|
|
886
|
+
class: "flex-1",
|
|
887
|
+
variant: "secondary",
|
|
888
|
+
label: "Delete",
|
|
889
|
+
onclick: () => n.onDelete()
|
|
890
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
|
891
|
+
o(i, {
|
|
892
|
+
type: "submit",
|
|
893
|
+
class: "flex-1",
|
|
894
|
+
variant: "primary",
|
|
895
|
+
label: "Save"
|
|
896
|
+
})
|
|
897
|
+
])
|
|
898
|
+
]),
|
|
899
|
+
_: 1
|
|
900
|
+
}, 512);
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
}), Ge = {
|
|
904
|
+
key: 0,
|
|
905
|
+
className: "mt-1 my-6 text-gray-600"
|
|
906
|
+
}, $e = {
|
|
907
|
+
key: 1,
|
|
908
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
|
909
|
+
}, Ke = /* @__PURE__ */ _({
|
|
910
|
+
__name: "PaymentGateway",
|
|
911
|
+
props: {
|
|
912
|
+
payoutAccount: {
|
|
913
|
+
type: Object,
|
|
914
|
+
required: !0
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
setup(n) {
|
|
918
|
+
const p = ne().currentCountry, e = p.value, d = z(), { isLoading: s, startAsyncCall: t } = Y(), { gatewayTab: u } = j({
|
|
919
|
+
gatewayTab: ""
|
|
920
|
+
}), v = n, i = [
|
|
921
|
+
{
|
|
922
|
+
label: "Fiuu",
|
|
923
|
+
value: "RAZER_MERCHANT_SERVICE",
|
|
924
|
+
render: Te,
|
|
925
|
+
region: [I.F_COUNTRY.enum.MY, I.F_COUNTRY.enum.SG]
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
label: "Macau Pass",
|
|
929
|
+
value: "MACAU_PASS",
|
|
930
|
+
render: Ie,
|
|
931
|
+
region: [I.F_COUNTRY.enum.MO]
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
label: "Digio",
|
|
935
|
+
value: "DIGIO",
|
|
936
|
+
render: Pe,
|
|
937
|
+
region: [I.F_COUNTRY.enum.TH]
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
label: "Ksher",
|
|
941
|
+
value: "KSHER",
|
|
942
|
+
render: Re,
|
|
943
|
+
region: [I.F_COUNTRY.enum.TH]
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
label: "Adyen",
|
|
947
|
+
value: "ADYEN",
|
|
948
|
+
render: Ne,
|
|
949
|
+
region: [I.F_COUNTRY.enum.MY, I.F_COUNTRY.enum.SG]
|
|
950
|
+
}
|
|
951
|
+
], a = U(
|
|
952
|
+
v.payoutAccount.gateways ?? []
|
|
953
|
+
), l = K(() => i.find((A) => A.value === u.value)), g = K(() => i.filter(
|
|
954
|
+
(A) => A.region.includes(p.value ?? I.F_COUNTRY.enum.MY)
|
|
955
|
+
));
|
|
956
|
+
async function y(A) {
|
|
957
|
+
await t(async () => {
|
|
958
|
+
try {
|
|
959
|
+
await R.updateGateway(v.payoutAccount._id, A), d.open({
|
|
960
|
+
type: "success",
|
|
961
|
+
title: "Payout account gateways update succesfully"
|
|
962
|
+
}), b.value = A.length === 0;
|
|
963
|
+
} catch (h) {
|
|
964
|
+
d.open({
|
|
965
|
+
type: "error",
|
|
966
|
+
title: "Error occurs when updating payout account gateways",
|
|
967
|
+
message: E(h)
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
const b = U((v.payoutAccount.gateways ?? []).length === 0), C = K(() => e !== "MY" || !b.value);
|
|
973
|
+
return (A, h) => {
|
|
974
|
+
var B;
|
|
975
|
+
const k = c("FmCircularProgress"), D = c("FmSwitch"), H = c("FmTabs");
|
|
976
|
+
return f(), P($, null, [
|
|
977
|
+
r(e) ? (f(), P("p", Ge, [...h[2] || (h[2] = [
|
|
978
|
+
m("b", null, "Note: ", -1),
|
|
979
|
+
S(" There's no setup required for Malaysia Payment Gateway, once Payout Account is ready you will able to configure the payment channels. ", -1)
|
|
980
|
+
])])) : T("", !0),
|
|
981
|
+
r(s) ? (f(), P("div", $e, [
|
|
982
|
+
o(k, { size: "xxl" })
|
|
983
|
+
])) : (f(), P($, { key: 2 }, [
|
|
984
|
+
r(e) === "MY" ? (f(), F(D, {
|
|
985
|
+
key: 0,
|
|
986
|
+
modelValue: b.value,
|
|
987
|
+
"onUpdate:modelValue": h[0] || (h[0] = (N) => b.value = N),
|
|
988
|
+
style: { "padding-bottom": "12px" },
|
|
989
|
+
label: "Use FeedMe's Fiuu Account?"
|
|
990
|
+
}, null, 8, ["modelValue"])) : T("", !0),
|
|
991
|
+
C.value ? (f(), F(H, {
|
|
992
|
+
key: 1,
|
|
993
|
+
"model-value": r(u),
|
|
994
|
+
"onUpdate:modelValue": h[1] || (h[1] = (N) => q(u) ? u.value = N : null),
|
|
995
|
+
class: "mb-6",
|
|
996
|
+
items: g.value
|
|
997
|
+
}, null, 8, ["model-value", "items"])) : T("", !0),
|
|
998
|
+
C.value && r(u) ? (f(), F(Q((B = l.value) == null ? void 0 : B.render), W(J({ key: 2 }, {
|
|
999
|
+
gateway: a.value.find(
|
|
1000
|
+
(N) => {
|
|
1001
|
+
var G;
|
|
1002
|
+
return N.paymentGateway === ((G = l.value) == null ? void 0 : G.value);
|
|
1003
|
+
}
|
|
1004
|
+
),
|
|
1005
|
+
onDelete: async () => {
|
|
1006
|
+
a.value = a.value.filter(
|
|
1007
|
+
(N) => {
|
|
1008
|
+
var G;
|
|
1009
|
+
return N.paymentGateway !== ((G = l.value) == null ? void 0 : G.value);
|
|
1010
|
+
}
|
|
1011
|
+
), y(a.value);
|
|
1012
|
+
},
|
|
1013
|
+
onUpdate: (N) => {
|
|
1014
|
+
var X;
|
|
1015
|
+
let G = a.value.find(
|
|
1016
|
+
(le) => {
|
|
1017
|
+
var ee;
|
|
1018
|
+
return le.paymentGateway === ((ee = l.value) == null ? void 0 : ee.value);
|
|
1019
|
+
}
|
|
1020
|
+
);
|
|
1021
|
+
G ? G.config = N : a.value.push({
|
|
1022
|
+
paymentGateway: (X = l.value) == null ? void 0 : X.value,
|
|
1023
|
+
config: N
|
|
1024
|
+
}), y(a.value);
|
|
1025
|
+
}
|
|
1026
|
+
})), null, 16)) : T("", !0)
|
|
1027
|
+
], 64))
|
|
1028
|
+
], 64);
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
}), Oe = { class: "flex mt-6 space-x-6" }, Be = /* @__PURE__ */ _({
|
|
1032
|
+
__name: "GooglePayToken",
|
|
1033
|
+
props: {
|
|
1034
|
+
gateway: {
|
|
1035
|
+
type: Object,
|
|
1036
|
+
required: !0
|
|
1037
|
+
},
|
|
1038
|
+
onUpdate: {
|
|
1039
|
+
type: Function,
|
|
1040
|
+
required: !0
|
|
1041
|
+
},
|
|
1042
|
+
onDelete: {
|
|
1043
|
+
type: Function,
|
|
1044
|
+
required: !0
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
setup(n) {
|
|
1048
|
+
const e = U(
|
|
1049
|
+
n.gateway || {
|
|
1050
|
+
type: "googlePay",
|
|
1051
|
+
gateway: "RAZER_MERCHANT_SERVICE",
|
|
1052
|
+
config: {
|
|
1053
|
+
gateway: "molpay",
|
|
1054
|
+
gatewayMerchantId: "molpay"
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
);
|
|
1058
|
+
return (d, s) => {
|
|
1059
|
+
const t = c("FmTextField"), u = c("FmButton"), v = c("FmForm");
|
|
1060
|
+
return f(), F(v, {
|
|
1061
|
+
ref: "form",
|
|
1062
|
+
class: "flex flex-col gap-16",
|
|
1063
|
+
onValidationSuccess: s[3] || (s[3] = () => n.onUpdate(e.value))
|
|
1064
|
+
}, {
|
|
1065
|
+
default: x(() => [
|
|
1066
|
+
o(t, {
|
|
1067
|
+
modelValue: e.value.gateway,
|
|
1068
|
+
"onUpdate:modelValue": s[0] || (s[0] = (i) => e.value.gateway = i),
|
|
1069
|
+
label: "Gateway",
|
|
1070
|
+
disabled: !0,
|
|
1071
|
+
rules: r(V)(r(w).string())
|
|
1072
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1073
|
+
o(t, {
|
|
1074
|
+
modelValue: e.value.config.gateway,
|
|
1075
|
+
"onUpdate:modelValue": s[1] || (s[1] = (i) => e.value.config.gateway = i),
|
|
1076
|
+
label: "Gateway ID",
|
|
1077
|
+
disabled: !0,
|
|
1078
|
+
rules: r(V)(r(w).string())
|
|
1079
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1080
|
+
o(t, {
|
|
1081
|
+
modelValue: e.value.config.gatewayMerchantId,
|
|
1082
|
+
"onUpdate:modelValue": s[2] || (s[2] = (i) => e.value.config.gatewayMerchantId = i),
|
|
1083
|
+
label: "Gateway Merchant ID",
|
|
1084
|
+
disabled: !0,
|
|
1085
|
+
rules: r(V)(r(w).string())
|
|
1086
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1087
|
+
m("div", Oe, [
|
|
1088
|
+
n.gateway ? (f(), F(u, {
|
|
1089
|
+
key: 0,
|
|
1090
|
+
class: "flex-1",
|
|
1091
|
+
variant: "secondary",
|
|
1092
|
+
label: "Delete",
|
|
1093
|
+
onclick: () => n.onDelete()
|
|
1094
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
|
1095
|
+
o(u, {
|
|
1096
|
+
type: "submit",
|
|
1097
|
+
class: "flex-1",
|
|
1098
|
+
variant: "primary",
|
|
1099
|
+
label: "Save"
|
|
1100
|
+
})
|
|
1101
|
+
])
|
|
1102
|
+
]),
|
|
1103
|
+
_: 1
|
|
1104
|
+
}, 512);
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
}), Ee = { class: "flex mt-6 space-x-6" }, qe = /* @__PURE__ */ _({
|
|
1108
|
+
__name: "ApplePayToken",
|
|
1109
|
+
props: {
|
|
1110
|
+
gateway: {
|
|
1111
|
+
type: Object,
|
|
1112
|
+
required: !0
|
|
1113
|
+
},
|
|
1114
|
+
onUpdate: {
|
|
1115
|
+
type: Function,
|
|
1116
|
+
required: !0
|
|
1117
|
+
},
|
|
1118
|
+
onDelete: {
|
|
1119
|
+
type: Function,
|
|
1120
|
+
required: !0
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1123
|
+
setup(n) {
|
|
1124
|
+
const e = U(
|
|
1125
|
+
n.gateway || {
|
|
1126
|
+
type: "applePay",
|
|
1127
|
+
gateway: "RAZER_MERCHANT_SERVICE",
|
|
1128
|
+
config: {
|
|
1129
|
+
merchantId: "FMfeedme"
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
);
|
|
1133
|
+
return (d, s) => {
|
|
1134
|
+
const t = c("FmTextField"), u = c("FmButton"), v = c("FmForm");
|
|
1135
|
+
return f(), F(v, {
|
|
1136
|
+
ref: "form",
|
|
1137
|
+
class: "flex flex-col gap-16",
|
|
1138
|
+
onValidationSuccess: s[2] || (s[2] = () => n.onUpdate(e.value))
|
|
1139
|
+
}, {
|
|
1140
|
+
default: x(() => [
|
|
1141
|
+
o(t, {
|
|
1142
|
+
modelValue: e.value.gateway,
|
|
1143
|
+
"onUpdate:modelValue": s[0] || (s[0] = (i) => e.value.gateway = i),
|
|
1144
|
+
label: "Gateway",
|
|
1145
|
+
disabled: !0,
|
|
1146
|
+
rules: r(V)(r(w).string())
|
|
1147
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1148
|
+
o(t, {
|
|
1149
|
+
modelValue: e.value.config.merchantId,
|
|
1150
|
+
"onUpdate:modelValue": s[1] || (s[1] = (i) => e.value.config.merchantId = i),
|
|
1151
|
+
label: "Merchant ID",
|
|
1152
|
+
disabled: !0,
|
|
1153
|
+
rules: r(V)(r(w).string())
|
|
1154
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1155
|
+
m("div", Ee, [
|
|
1156
|
+
n.gateway ? (f(), F(u, {
|
|
1157
|
+
key: 0,
|
|
1158
|
+
class: "flex-1",
|
|
1159
|
+
variant: "secondary",
|
|
1160
|
+
label: "Delete",
|
|
1161
|
+
onclick: () => n.onDelete()
|
|
1162
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
|
1163
|
+
o(u, {
|
|
1164
|
+
type: "submit",
|
|
1165
|
+
class: "flex-1",
|
|
1166
|
+
variant: "primary",
|
|
1167
|
+
label: "Save"
|
|
1168
|
+
})
|
|
1169
|
+
])
|
|
1170
|
+
]),
|
|
1171
|
+
_: 1
|
|
1172
|
+
}, 512);
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
}), Ye = {
|
|
1176
|
+
key: 0,
|
|
1177
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
|
1178
|
+
}, je = /* @__PURE__ */ _({
|
|
1179
|
+
__name: "TokenGateway",
|
|
1180
|
+
props: {
|
|
1181
|
+
payoutAccount: {
|
|
1182
|
+
type: Object,
|
|
1183
|
+
required: !0
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
setup(n) {
|
|
1187
|
+
const p = ne().currentCountry, e = z(), { isLoading: d, startAsyncCall: s } = Y(), { tokenTab: t } = j({
|
|
1188
|
+
tokenTab: ""
|
|
1189
|
+
}), u = n, v = [
|
|
1190
|
+
{
|
|
1191
|
+
label: "Google Pay",
|
|
1192
|
+
value: "googlePay",
|
|
1193
|
+
icon: "android",
|
|
1194
|
+
render: Be,
|
|
1195
|
+
region: [I.F_COUNTRY.enum.MY, I.F_COUNTRY.enum.SG]
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
label: "Apple Pay",
|
|
1199
|
+
value: "applePay",
|
|
1200
|
+
icon: "iOS",
|
|
1201
|
+
render: qe,
|
|
1202
|
+
region: [I.F_COUNTRY.enum.MY, I.F_COUNTRY.enum.SG]
|
|
1203
|
+
}
|
|
1204
|
+
], i = U(u.payoutAccount.tokens ?? []), a = K(() => v.find((y) => y.value === t.value)), l = K(() => v.filter(
|
|
1205
|
+
(y) => y.region.includes(p.value ?? I.F_COUNTRY.enum.MY)
|
|
1206
|
+
));
|
|
1207
|
+
async function g(y) {
|
|
1208
|
+
await s(async () => {
|
|
1209
|
+
try {
|
|
1210
|
+
await R.updateTokens(u.payoutAccount._id, y), e.open({
|
|
1211
|
+
type: "success",
|
|
1212
|
+
title: "Payout account tokens gateway update succesfully"
|
|
1213
|
+
});
|
|
1214
|
+
} catch (b) {
|
|
1215
|
+
e.open({
|
|
1216
|
+
type: "error",
|
|
1217
|
+
title: "Error occurs when updating payout account tokens",
|
|
1218
|
+
message: E(b)
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
return (y, b) => {
|
|
1224
|
+
var h;
|
|
1225
|
+
const C = c("FmCircularProgress"), A = c("FmTabs");
|
|
1226
|
+
return f(), P($, null, [
|
|
1227
|
+
b[1] || (b[1] = m("p", { className: "mt-1 my-6 text-gray-600" }, [
|
|
1228
|
+
m("b", null, "Note: "),
|
|
1229
|
+
S(" Token gateways appear above other online payment channels to comply with provider branding requirements. Configuration is standardized, so you generally only need to select the provider. "),
|
|
1230
|
+
m("br"),
|
|
1231
|
+
m("br"),
|
|
1232
|
+
m("b", null, ` Token payments are automatically enabled for "Pay-First" merchants. You do not need to adjust settings here unless you're modifying for a non-Pay-First merchant who wishes to manually enable this feature. `),
|
|
1233
|
+
m("br")
|
|
1234
|
+
], -1)),
|
|
1235
|
+
r(d) ? (f(), P("div", Ye, [
|
|
1236
|
+
o(C, { size: "xxl" })
|
|
1237
|
+
])) : (f(), F(A, {
|
|
1238
|
+
key: 1,
|
|
1239
|
+
"model-value": r(t),
|
|
1240
|
+
"onUpdate:modelValue": b[0] || (b[0] = (k) => q(t) ? t.value = k : null),
|
|
1241
|
+
class: "mb-6 mt-6",
|
|
1242
|
+
items: l.value
|
|
1243
|
+
}, null, 8, ["model-value", "items"])),
|
|
1244
|
+
r(t) ? (f(), F(Q((h = a.value) == null ? void 0 : h.render), W(J({ key: 2 }, {
|
|
1245
|
+
gateway: i.value.find((k) => {
|
|
1246
|
+
var D;
|
|
1247
|
+
return k.type === ((D = a.value) == null ? void 0 : D.value);
|
|
1248
|
+
}),
|
|
1249
|
+
onDelete: async () => {
|
|
1250
|
+
i.value = i.value.filter((k) => {
|
|
1251
|
+
var D;
|
|
1252
|
+
return k.type !== ((D = a.value) == null ? void 0 : D.value);
|
|
1253
|
+
}), g(i.value);
|
|
1254
|
+
},
|
|
1255
|
+
onUpdate: (k) => {
|
|
1256
|
+
let D = i.value.find((H) => {
|
|
1257
|
+
var B;
|
|
1258
|
+
return H.type === ((B = a.value) == null ? void 0 : B.value);
|
|
1259
|
+
});
|
|
1260
|
+
D ? D.config = k : i.value.push(k), g(i.value);
|
|
1261
|
+
}
|
|
1262
|
+
})), null, 16)) : T("", !0)
|
|
1263
|
+
], 64);
|
|
1264
|
+
};
|
|
1265
|
+
}
|
|
1266
|
+
}), lt = /* @__PURE__ */ _({
|
|
1267
|
+
__name: "PayoutAccountSetting",
|
|
1268
|
+
props: {
|
|
1269
|
+
accountId: {
|
|
1270
|
+
type: String,
|
|
1271
|
+
required: !0
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
setup(n) {
|
|
1275
|
+
const p = n, { tab: e } = j({
|
|
1276
|
+
tab: "information"
|
|
1277
|
+
}), { isLoading: d, startAsyncCall: s } = Y(!0), t = ue(), u = U();
|
|
1278
|
+
async function v(g) {
|
|
1279
|
+
await R.updateById(
|
|
1280
|
+
p.accountId,
|
|
1281
|
+
g
|
|
1282
|
+
), u.value = await R.readById(p.accountId);
|
|
1283
|
+
}
|
|
1284
|
+
const i = [
|
|
1285
|
+
{
|
|
1286
|
+
label: "Information",
|
|
1287
|
+
value: "information",
|
|
1288
|
+
icon: "overview",
|
|
1289
|
+
render: ie
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
label: "Settlement",
|
|
1293
|
+
value: "settlement",
|
|
1294
|
+
icon: "payments",
|
|
1295
|
+
render: pe
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
label: "MDR Status",
|
|
1299
|
+
value: "payment",
|
|
1300
|
+
icon: "account_box",
|
|
1301
|
+
render: we
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
label: "Online Gateways",
|
|
1305
|
+
icon: "assured_workload",
|
|
1306
|
+
value: "gateways",
|
|
1307
|
+
render: Ke
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
label: "Token Gateways",
|
|
1311
|
+
value: "tokens",
|
|
1312
|
+
icon: "wallet",
|
|
1313
|
+
render: je
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
label: "Online Channels",
|
|
1317
|
+
icon: "shopping_cart",
|
|
1318
|
+
value: "channels",
|
|
1319
|
+
render: Ce
|
|
1320
|
+
}
|
|
1321
|
+
];
|
|
1322
|
+
function a() {
|
|
1323
|
+
s(async () => {
|
|
1324
|
+
u.value = await R.readById(p.accountId);
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
ae(a);
|
|
1328
|
+
const l = K(() => {
|
|
1329
|
+
const g = i.reduce((y, b) => y || (b.children ? b.children.find((C) => C.value === e.value) || null : b.value === e.value ? b : null), null);
|
|
1330
|
+
return g == null ? void 0 : g.render;
|
|
1331
|
+
});
|
|
1332
|
+
return (g, y) => {
|
|
1333
|
+
var C;
|
|
1334
|
+
const b = c("FmTabs");
|
|
1335
|
+
return f(), F(oe, {
|
|
1336
|
+
title: `Payout Account (${(C = u.value) == null ? void 0 : C._id})`,
|
|
1337
|
+
loading: r(d),
|
|
1338
|
+
onBack: r(t).back
|
|
1339
|
+
}, {
|
|
1340
|
+
default: x(() => [
|
|
1341
|
+
o(b, {
|
|
1342
|
+
"model-value": r(e),
|
|
1343
|
+
"onUpdate:modelValue": y[0] || (y[0] = (A) => q(e) ? e.value = A : null),
|
|
1344
|
+
class: "mb-6",
|
|
1345
|
+
items: i
|
|
1346
|
+
}, null, 8, ["model-value"]),
|
|
1347
|
+
r(e) ? (f(), F(Q(l.value), W(J({ key: 0 }, {
|
|
1348
|
+
payoutAccount: u.value,
|
|
1349
|
+
onUpdate: v
|
|
1350
|
+
})), null, 16)) : T("", !0)
|
|
1351
|
+
]),
|
|
1352
|
+
_: 1
|
|
1353
|
+
}, 8, ["title", "loading", "onBack"]);
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1356
|
+
});
|
|
1357
|
+
export {
|
|
1358
|
+
lt as default
|
|
1359
|
+
};
|