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