@feedmepos/mf-payment 1.2.0 → 1.2.2
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/{PDFViewer-BQfgFexr.js → PDFViewer-xrBtzrlR.js} +1 -2
- package/dist/{PayoutAccount-CLJp9Jyn.js → PayoutAccount-C1eI-Tha.js} +6 -6
- package/dist/{PayoutAccount-BvU23xuM.js → PayoutAccount-QY9LkR0r.js} +7 -7
- package/dist/PayoutAccountSetting-Bt-BBfpF.js +970 -0
- package/dist/{Restaurant-C962cqyn.js → Restaurant-DMEt0GSf.js} +4 -4
- package/dist/RestaurantSetting-Bjgjx7_c.js +487 -0
- package/dist/{Settlement-BZuKvRaG.js → Settlement-DHczxjKA.js} +3 -3
- package/dist/{Settlement-BHHc5YoF.js → Settlement-PYl2xRrw.js} +3 -3
- package/dist/{SettlementTransactions-zqQOlNmL.js → SettlementTransactions-B6eUs4ay.js} +3 -3
- package/dist/{SettlementTransactions-T_NueCUi.js → SettlementTransactions-Bn2-iO30.js} +3 -3
- package/dist/{Terminal-DEndcR6q.js → Terminal-q9AtQVTw.js} +36 -36
- package/dist/{TerminalSetting-Y11VutPg.js → TerminalSetting-DKvLKsrH.js} +218 -212
- package/dist/{Transaction-BMh7HeF-.js → Transaction-BSDhGkTu.js} +5 -5
- package/dist/{Transaction-CKHYz4EJ.js → Transaction-DlkiWPJt.js} +7 -7
- package/dist/{TransactionOld-CBu3JNau.js → TransactionOld-B93Kp78J.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-Bm6pV5Ps.js → TransactionTable.vue_vue_type_script_setup_true_lang-DEgiifDL.js} +3 -3
- package/dist/api/payout/index.d.ts +2 -1
- package/dist/{app-BpdRZpkd.js → app-B1yXzXMJ.js} +270 -270
- package/dist/app.js +1 -1
- package/dist/{assets-CiNHrDU0.js → assets-DbCf2oTj.js} +2 -2
- package/dist/{grafana-D4sIBgS0.js → grafana-CxvNheOh.js} +1 -1
- package/dist/{index-D7YmrmZF.js → index-BoafQG_3.js} +1 -1
- package/dist/{index-B9Q6VJh7.js → index-BwmZGhzh.js} +6719 -6639
- package/dist/{index-CtH76apJ.js → index-C9YbV874.js} +1 -1
- package/dist/{index-CtGB8IE0.js → index-DJx90D2_.js} +1 -1
- package/dist/{index-C2ZxjTVN.js → index-DQ6y1YEM.js} +1 -1
- package/dist/index-DoWYy-5F.js +73 -0
- package/dist/{index-CuBlZneL.js → index-DrVrxzsm.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-C5YwGnbl.js → index.vue_vue_type_script_setup_true_lang-BJAdIBCX.js} +1 -1
- package/dist/package.json +4 -4
- package/dist/{payout-account-DoiqVkOg.js → payout-account-Cy0D7ycP.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +60 -10
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +60 -10
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +56 -16
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +56 -16
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +60 -10
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +60 -10
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +173 -0
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +46 -1
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +49 -0
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +50 -0
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +2 -2
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +14 -12
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/SoftspaceGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +12 -12
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +120 -20
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +16 -16
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +8 -8
- package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
- package/package.json +4 -4
- package/dist/PayoutAccountSetting-DjrQRJDm.js +0 -728
- package/dist/RestaurantSetting-C2zHT9N3.js +0 -412
- package/dist/index-CJL2mrrn.js +0 -67
@@ -0,0 +1,970 @@
|
|
1
|
+
import { defineComponent as V, resolveComponent as p, openBlock as g, createElementBlock as _, Fragment as $, createElementVNode as i, createVNode as r, withCtx as k, createTextVNode as C, toDisplayString as U, createCommentVNode as P, createBlock as x, ref as T, watch as W, computed as D, unref as c, isRef as q, h as G, onMounted as J, resolveDynamicComponent as Y, normalizeProps as L, mergeProps as H } from "vue";
|
2
|
+
import { p as N } from "./index-DoWYy-5F.js";
|
3
|
+
import { u as j, e as R } from "./index-BwmZGhzh.js";
|
4
|
+
import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
5
|
+
import { useRouter as te } from "vue-router";
|
6
|
+
import { u as K } from "./index-DQ6y1YEM.js";
|
7
|
+
import { P as Q } from "./PDFViewer-xrBtzrlR.js";
|
8
|
+
import { useSnackbar as z, components as ae } from "@feedmepos/ui-library";
|
9
|
+
import { u as B } from "./error-K1CakhA9.js";
|
10
|
+
import { z as A, a as h } from "./validator-D5jtpt9A.js";
|
11
|
+
import { useCoreStore as X } from "@feedmepos/mf-common";
|
12
|
+
const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
13
|
+
__name: "Information",
|
14
|
+
props: {
|
15
|
+
payoutAccount: {
|
16
|
+
type: Object,
|
17
|
+
required: !0
|
18
|
+
}
|
19
|
+
},
|
20
|
+
setup(n) {
|
21
|
+
return (m, e) => {
|
22
|
+
const v = p("FmCardHeader"), u = p("FmCardSection"), t = p("FmCard");
|
23
|
+
return g(), _($, null, [
|
24
|
+
i("div", ne, [
|
25
|
+
r(t, {
|
26
|
+
horizontal: "",
|
27
|
+
class: "flex-1 p-6",
|
28
|
+
variant: "elevated"
|
29
|
+
}, {
|
30
|
+
default: k(() => [
|
31
|
+
r(u, { class: "flex flex-col gap-16 justify-between" }, {
|
32
|
+
default: k(() => [
|
33
|
+
r(v, {
|
34
|
+
class: "p-0",
|
35
|
+
title: "Account Info",
|
36
|
+
subtitle: ""
|
37
|
+
}),
|
38
|
+
r(u, { class: "p-0" }, {
|
39
|
+
default: k(() => {
|
40
|
+
var l, f, s, a, o;
|
41
|
+
return [
|
42
|
+
e[0] || (e[0] = i("b", null, "For", -1)),
|
43
|
+
C(": " + U((f = (l = n.payoutAccount) == null ? void 0 : l.store) == null ? void 0 : f.event) + " ", 1),
|
44
|
+
e[1] || (e[1] = i("br", null, null, -1)),
|
45
|
+
e[2] || (e[2] = i("b", null, "Reference", -1)),
|
46
|
+
C(": " + U((a = (s = n.payoutAccount) == null ? void 0 : s.store) == null ? void 0 : a.id), 1),
|
47
|
+
e[3] || (e[3] = i("br", null, null, -1)),
|
48
|
+
e[4] || (e[4] = i("b", null, "Business", -1)),
|
49
|
+
C(": " + U((o = n.payoutAccount) == null ? void 0 : o.businessId), 1),
|
50
|
+
e[5] || (e[5] = i("br", null, null, -1))
|
51
|
+
];
|
52
|
+
}),
|
53
|
+
_: 1
|
54
|
+
})
|
55
|
+
]),
|
56
|
+
_: 1
|
57
|
+
})
|
58
|
+
]),
|
59
|
+
_: 1
|
60
|
+
}),
|
61
|
+
r(t, {
|
62
|
+
horizontal: "",
|
63
|
+
class: "flex-1 p-6",
|
64
|
+
variant: "elevated"
|
65
|
+
}, {
|
66
|
+
default: k(() => [
|
67
|
+
r(u, { class: "flex flex-col gap-16 justify-between" }, {
|
68
|
+
default: k(() => [
|
69
|
+
r(v, {
|
70
|
+
class: "p-0",
|
71
|
+
title: "Key Person",
|
72
|
+
subtitle: ""
|
73
|
+
}),
|
74
|
+
r(u, { class: "p-0" }, {
|
75
|
+
default: k(() => {
|
76
|
+
var l, f, s, a, o, y, d, b;
|
77
|
+
return [
|
78
|
+
e[6] || (e[6] = i("b", null, "Email", -1)),
|
79
|
+
C(": " + U((s = (f = (l = n.payoutAccount) == null ? void 0 : l.store) == null ? void 0 : f.keyPerson) == null ? void 0 : s.email) + " ", 1),
|
80
|
+
e[7] || (e[7] = i("br", null, null, -1)),
|
81
|
+
e[8] || (e[8] = i("b", null, "Name", -1)),
|
82
|
+
C(": " + U((y = (o = (a = n.payoutAccount) == null ? void 0 : a.store) == null ? void 0 : o.keyPerson) == null ? void 0 : y.name), 1),
|
83
|
+
e[9] || (e[9] = i("br", null, null, -1)),
|
84
|
+
e[10] || (e[10] = i("b", null, "Phone", -1)),
|
85
|
+
C(": " + U((b = (d = n.payoutAccount) == null ? void 0 : d.store.keyPerson) == null ? void 0 : b.phone), 1),
|
86
|
+
e[11] || (e[11] = i("br", null, null, -1))
|
87
|
+
];
|
88
|
+
}),
|
89
|
+
_: 1
|
90
|
+
})
|
91
|
+
]),
|
92
|
+
_: 1
|
93
|
+
})
|
94
|
+
]),
|
95
|
+
_: 1
|
96
|
+
})
|
97
|
+
]),
|
98
|
+
e[12] || (e[12] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Exterior Photo", -1)),
|
99
|
+
n.payoutAccount.store.exteriorPhoto ? (g(), _("img", {
|
100
|
+
key: 0,
|
101
|
+
src: n.payoutAccount.store.exteriorPhoto
|
102
|
+
}, null, 8, oe)) : P("", !0)
|
103
|
+
], 64);
|
104
|
+
};
|
105
|
+
}
|
106
|
+
}), ue = { class: "flex gap-16" }, se = { class: "flex-1" }, re = { class: "flex-1" }, ce = /* @__PURE__ */ V({
|
107
|
+
__name: "Settlement",
|
108
|
+
props: {
|
109
|
+
payoutAccount: {
|
110
|
+
type: Object,
|
111
|
+
required: !0
|
112
|
+
}
|
113
|
+
},
|
114
|
+
setup(n) {
|
115
|
+
return (m, e) => {
|
116
|
+
const v = p("FmCardHeader"), u = p("FmCardSection"), t = p("FmCard");
|
117
|
+
return g(), _($, null, [
|
118
|
+
r(t, {
|
119
|
+
horizontal: "",
|
120
|
+
class: "flex-1 p-6 mx-6 mb-6",
|
121
|
+
variant: "elevated"
|
122
|
+
}, {
|
123
|
+
default: k(() => [
|
124
|
+
r(u, { class: "flex flex-col gap-16 justify-between" }, {
|
125
|
+
default: k(() => [
|
126
|
+
r(v, {
|
127
|
+
class: "p-0",
|
128
|
+
title: "Bank Info",
|
129
|
+
subtitle: ""
|
130
|
+
}),
|
131
|
+
r(u, { class: "p-0" }, {
|
132
|
+
default: k(() => {
|
133
|
+
var l, f, s, a, o, y;
|
134
|
+
return [
|
135
|
+
e[0] || (e[0] = i("b", null, "Bank", -1)),
|
136
|
+
C(": " + U((f = (l = n.payoutAccount) == null ? void 0 : l.store.bank) == null ? void 0 : f.name), 1),
|
137
|
+
e[1] || (e[1] = i("br", null, null, -1)),
|
138
|
+
e[2] || (e[2] = i("b", null, "Name", -1)),
|
139
|
+
C(": " + U((a = (s = n.payoutAccount) == null ? void 0 : s.store.bank) == null ? void 0 : a.holderName), 1),
|
140
|
+
e[3] || (e[3] = i("br", null, null, -1)),
|
141
|
+
e[4] || (e[4] = i("b", null, "Number", -1)),
|
142
|
+
C(": " + U((y = (o = n.payoutAccount) == null ? void 0 : o.store.bank) == null ? void 0 : y.accountNumber), 1)
|
143
|
+
];
|
144
|
+
}),
|
145
|
+
_: 1
|
146
|
+
})
|
147
|
+
]),
|
148
|
+
_: 1
|
149
|
+
})
|
150
|
+
]),
|
151
|
+
_: 1
|
152
|
+
}),
|
153
|
+
i("div", ue, [
|
154
|
+
i("div", se, [
|
155
|
+
e[5] || (e[5] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
|
156
|
+
n.payoutAccount.store.ssm ? (g(), x(Q, {
|
157
|
+
key: 0,
|
158
|
+
pdf: n.payoutAccount.store.ssm,
|
159
|
+
"disable-text-layer": !0,
|
160
|
+
"disable-annotation-layer": !0
|
161
|
+
}, null, 8, ["pdf"])) : P("", !0)
|
162
|
+
]),
|
163
|
+
i("div", re, [
|
164
|
+
e[6] || (e[6] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
|
165
|
+
n.payoutAccount.store.bankStatement ? (g(), x(Q, {
|
166
|
+
key: 0,
|
167
|
+
pdf: n.payoutAccount.store.bankStatement,
|
168
|
+
"disable-text-layer": !0,
|
169
|
+
"disable-annotation-layer": !0
|
170
|
+
}, null, 8, ["pdf"])) : P("", !0)
|
171
|
+
])
|
172
|
+
])
|
173
|
+
], 64);
|
174
|
+
};
|
175
|
+
}
|
176
|
+
}), ie = /* @__PURE__ */ V({
|
177
|
+
__name: "RateInput",
|
178
|
+
props: {
|
179
|
+
data: {},
|
180
|
+
onChange: { type: Function }
|
181
|
+
},
|
182
|
+
setup(n) {
|
183
|
+
const m = n, e = T(m.data.toString());
|
184
|
+
return W(e, (v) => {
|
185
|
+
m.onChange(parseFloat(v));
|
186
|
+
}), (v, u) => {
|
187
|
+
const t = p("FmTextField");
|
188
|
+
return g(), x(t, {
|
189
|
+
inputmode: "decimal",
|
190
|
+
modelValue: e.value,
|
191
|
+
"onUpdate:modelValue": u[0] || (u[0] = (l) => e.value = l)
|
192
|
+
}, {
|
193
|
+
append: k(() => u[1] || (u[1] = [
|
194
|
+
C("%")
|
195
|
+
])),
|
196
|
+
_: 1
|
197
|
+
}, 8, ["modelValue"]);
|
198
|
+
};
|
199
|
+
}
|
200
|
+
}), de = /* @__PURE__ */ V({
|
201
|
+
__name: "TPlusInput",
|
202
|
+
props: {
|
203
|
+
data: {},
|
204
|
+
onChange: { type: Function }
|
205
|
+
},
|
206
|
+
setup(n) {
|
207
|
+
const m = n, e = T(m.data.toString());
|
208
|
+
return W(e, (v) => {
|
209
|
+
m.onChange(parseInt(v));
|
210
|
+
}), (v, u) => {
|
211
|
+
const t = p("FmTextField");
|
212
|
+
return g(), x(t, {
|
213
|
+
inputmode: "numeric",
|
214
|
+
modelValue: e.value,
|
215
|
+
"onUpdate:modelValue": u[0] || (u[0] = (l) => e.value = l)
|
216
|
+
}, null, 8, ["modelValue"]);
|
217
|
+
};
|
218
|
+
}
|
219
|
+
}), me = { class: "flex gap-16 mt-6" }, ye = { class: "flex-1" }, pe = { class: "flex-1" }, ve = { class: "my-6 w-full flex justify-end" }, fe = { class: "w-[320px]" }, ge = /* @__PURE__ */ V({
|
220
|
+
__name: "PaymentStatus",
|
221
|
+
props: {
|
222
|
+
onUpdate: {
|
223
|
+
type: Function,
|
224
|
+
required: !0
|
225
|
+
},
|
226
|
+
payoutAccount: {
|
227
|
+
type: Object,
|
228
|
+
required: !0
|
229
|
+
}
|
230
|
+
},
|
231
|
+
setup(n) {
|
232
|
+
const m = n, e = T(!1), v = z(), u = async (a) => {
|
233
|
+
try {
|
234
|
+
e.value = !0, await m.onUpdate(a), v.open({
|
235
|
+
type: "success",
|
236
|
+
title: "Payout account update succesfully"
|
237
|
+
});
|
238
|
+
} catch (o) {
|
239
|
+
v.open({
|
240
|
+
type: "error",
|
241
|
+
title: "Error occurs when updating payout account",
|
242
|
+
message: B(o)
|
243
|
+
});
|
244
|
+
} finally {
|
245
|
+
e.value = !1;
|
246
|
+
}
|
247
|
+
}, { search: t } = K({
|
248
|
+
search: ""
|
249
|
+
}), l = D(() => {
|
250
|
+
const { ssm: a, bank: o, bankStatement: y } = m.payoutAccount.store;
|
251
|
+
return a && o && o.name && o.accountNumber && o.holderName && y;
|
252
|
+
}), f = T(""), s = [
|
253
|
+
{
|
254
|
+
header: () => "Payment Method",
|
255
|
+
accessorKey: "issuer",
|
256
|
+
cell: (a) => `${a.row.original.issuer} (${a.row.original.variant})`
|
257
|
+
},
|
258
|
+
{
|
259
|
+
header: () => "Rate",
|
260
|
+
accessorKey: "rate",
|
261
|
+
cell: ({ row: a }) => {
|
262
|
+
let o = 0;
|
263
|
+
return a.original.rate && (o = a.original.rate.amount / Math.pow(10, a.original.rate.precision)), G(ie, {
|
264
|
+
data: o,
|
265
|
+
onChange: (y) => {
|
266
|
+
const d = m.payoutAccount.methods.at(a.index);
|
267
|
+
d.rate || (d.rate = {
|
268
|
+
amount: 0,
|
269
|
+
precision: 4
|
270
|
+
}), d.rate.amount = y * Math.pow(10, d.rate.precision);
|
271
|
+
}
|
272
|
+
});
|
273
|
+
}
|
274
|
+
},
|
275
|
+
{
|
276
|
+
header: () => "T plus",
|
277
|
+
accessorKey: "tPlus",
|
278
|
+
cell: ({ row: a }) => G(de, {
|
279
|
+
data: a.original.tPlus ?? 0,
|
280
|
+
onChange: (o) => {
|
281
|
+
const y = m.payoutAccount.methods.at(a.index);
|
282
|
+
y.tPlus = o;
|
283
|
+
}
|
284
|
+
})
|
285
|
+
}
|
286
|
+
];
|
287
|
+
return (a, o) => {
|
288
|
+
const y = p("FmRadio"), d = p("FmRadioGroup"), b = p("FmSwitch"), S = p("FmSearch"), I = p("FmTable"), M = p("FmButton");
|
289
|
+
return g(), _($, null, [
|
290
|
+
i("div", me, [
|
291
|
+
i("div", ye, [
|
292
|
+
r(d, {
|
293
|
+
modelValue: n.payoutAccount.status,
|
294
|
+
"onUpdate:modelValue": o[0] || (o[0] = (F) => n.payoutAccount.status = F),
|
295
|
+
label: "Account Status"
|
296
|
+
}, {
|
297
|
+
default: k(() => [
|
298
|
+
r(y, {
|
299
|
+
value: "NEW",
|
300
|
+
label: "New"
|
301
|
+
}),
|
302
|
+
r(y, {
|
303
|
+
value: "PENDING",
|
304
|
+
label: "Pending"
|
305
|
+
}),
|
306
|
+
r(y, {
|
307
|
+
value: "APPROVED",
|
308
|
+
label: "Approved"
|
309
|
+
})
|
310
|
+
]),
|
311
|
+
_: 1
|
312
|
+
}, 8, ["modelValue"])
|
313
|
+
]),
|
314
|
+
i("div", pe, [
|
315
|
+
r(b, {
|
316
|
+
modelValue: n.payoutAccount.enable,
|
317
|
+
"onUpdate:modelValue": o[1] || (o[1] = (F) => n.payoutAccount.enable = F),
|
318
|
+
disabled: !l.value,
|
319
|
+
label: "Enabled",
|
320
|
+
sublabel: "Merchant can use online features such as e-payment, settlement"
|
321
|
+
}, null, 8, ["modelValue", "disabled"])
|
322
|
+
])
|
323
|
+
]),
|
324
|
+
n.payoutAccount.enable ? (g(), _($, { key: 0 }, [
|
325
|
+
i("div", ve, [
|
326
|
+
i("div", fe, [
|
327
|
+
r(S, {
|
328
|
+
modelValue: c(t),
|
329
|
+
"onUpdate:modelValue": o[2] || (o[2] = (F) => q(t) ? t.value = F : null),
|
330
|
+
placeholder: "Search Method ..."
|
331
|
+
}, null, 8, ["modelValue"])
|
332
|
+
])
|
333
|
+
]),
|
334
|
+
r(I, {
|
335
|
+
class: "mt-6",
|
336
|
+
modelValue: f.value,
|
337
|
+
"onUpdate:modelValue": o[3] || (o[3] = (F) => f.value = F),
|
338
|
+
"shrink-at": !1,
|
339
|
+
"search-value": c(t),
|
340
|
+
"row-data": n.payoutAccount.methods,
|
341
|
+
"column-defs": s
|
342
|
+
}, null, 8, ["modelValue", "search-value", "row-data"])
|
343
|
+
], 64)) : P("", !0),
|
344
|
+
r(M, {
|
345
|
+
class: "w-full mt-6",
|
346
|
+
variant: "primary",
|
347
|
+
label: "Save",
|
348
|
+
loading: e.value,
|
349
|
+
onclick: () => u(n.payoutAccount)
|
350
|
+
}, null, 8, ["loading", "onclick"])
|
351
|
+
], 64);
|
352
|
+
};
|
353
|
+
}
|
354
|
+
}), be = { class: "flex" }, Fe = /* @__PURE__ */ V({
|
355
|
+
__name: "Actions",
|
356
|
+
emits: ["edit", "delete"],
|
357
|
+
setup(n, { emit: m }) {
|
358
|
+
const e = m;
|
359
|
+
return (v, u) => {
|
360
|
+
const t = p("FmButton");
|
361
|
+
return g(), _("div", be, [
|
362
|
+
r(t, {
|
363
|
+
variant: "plain",
|
364
|
+
"prepend-icon": "delete",
|
365
|
+
onClick: u[0] || (u[0] = (l) => {
|
366
|
+
l.stopPropagation(), e("delete");
|
367
|
+
})
|
368
|
+
})
|
369
|
+
]);
|
370
|
+
};
|
371
|
+
}
|
372
|
+
}), we = { class: "flex justify-end px-6 pb-6" }, xe = /* @__PURE__ */ V({
|
373
|
+
__name: "PaymentChannel",
|
374
|
+
props: {
|
375
|
+
payoutAccount: {
|
376
|
+
type: Object,
|
377
|
+
required: !0
|
378
|
+
}
|
379
|
+
},
|
380
|
+
setup(n) {
|
381
|
+
const m = z(), e = n, { isLoading: v, startAsyncCall: u } = j(), t = T([]);
|
382
|
+
function l() {
|
383
|
+
u(async () => {
|
384
|
+
t.value = await N.getChannels(e.payoutAccount._id);
|
385
|
+
});
|
386
|
+
}
|
387
|
+
J(l);
|
388
|
+
function f() {
|
389
|
+
u(async () => {
|
390
|
+
try {
|
391
|
+
await N.updateChannels(e.payoutAccount._id, t.value), m.open({
|
392
|
+
type: "success",
|
393
|
+
title: "Payout account channels update succesfully"
|
394
|
+
});
|
395
|
+
} catch (o) {
|
396
|
+
m.open({
|
397
|
+
type: "error",
|
398
|
+
title: "Error occurs when updating payout account channels",
|
399
|
+
message: B(o)
|
400
|
+
});
|
401
|
+
}
|
402
|
+
});
|
403
|
+
}
|
404
|
+
function s() {
|
405
|
+
u(async () => {
|
406
|
+
try {
|
407
|
+
await N.resetChannels(e.payoutAccount._id), t.value = await N.getChannels(e.payoutAccount._id), m.open({
|
408
|
+
type: "success",
|
409
|
+
title: "Payout account channels reset succesfully"
|
410
|
+
});
|
411
|
+
} catch (o) {
|
412
|
+
m.open({
|
413
|
+
type: "error",
|
414
|
+
title: "Error occurs when reset payout account channels",
|
415
|
+
message: B(o)
|
416
|
+
});
|
417
|
+
}
|
418
|
+
});
|
419
|
+
}
|
420
|
+
const a = [
|
421
|
+
{
|
422
|
+
header: () => "Gateway",
|
423
|
+
accessorKey: "gateway"
|
424
|
+
},
|
425
|
+
{
|
426
|
+
header: () => "Payment Type",
|
427
|
+
accessorKey: "type"
|
428
|
+
},
|
429
|
+
{
|
430
|
+
header: () => "Display",
|
431
|
+
accessorKey: "icon",
|
432
|
+
cell: ({ row: o }) => G("img", { src: o.original.icon, width: 32, height: 32 })
|
433
|
+
},
|
434
|
+
{
|
435
|
+
header: () => "Label",
|
436
|
+
accessorKey: "label",
|
437
|
+
cell: ({ row: o }) => G(ae.FmTextField, {
|
438
|
+
modelValue: o.original.label,
|
439
|
+
"onUpdate:modelValue": (y) => o.original.label = y
|
440
|
+
})
|
441
|
+
},
|
442
|
+
{
|
443
|
+
id: "actions",
|
444
|
+
header: () => "Actions",
|
445
|
+
cell: ({ row: o }) => G(Fe, {
|
446
|
+
onDelete: () => t.value.splice(o.index, 1)
|
447
|
+
})
|
448
|
+
}
|
449
|
+
];
|
450
|
+
return (o, y) => {
|
451
|
+
const d = p("FmButton"), b = p("FmTable");
|
452
|
+
return g(), _($, null, [
|
453
|
+
i("div", we, [
|
454
|
+
r(d, {
|
455
|
+
class: "mx-4",
|
456
|
+
variant: "destructive",
|
457
|
+
size: "md",
|
458
|
+
icon: "history",
|
459
|
+
label: "Reset",
|
460
|
+
onClick: s
|
461
|
+
}),
|
462
|
+
r(d, {
|
463
|
+
variant: "primary",
|
464
|
+
size: "md",
|
465
|
+
icon: "save",
|
466
|
+
label: "Save",
|
467
|
+
onClick: f
|
468
|
+
})
|
469
|
+
]),
|
470
|
+
r(b, {
|
471
|
+
loading: c(v),
|
472
|
+
"row-data": t.value,
|
473
|
+
"column-defs": a,
|
474
|
+
"shrink-at": !1
|
475
|
+
}, null, 8, ["loading", "row-data"])
|
476
|
+
], 64);
|
477
|
+
};
|
478
|
+
}
|
479
|
+
}), ke = { class: "flex mt-6 space-x-6" }, Ve = /* @__PURE__ */ V({
|
480
|
+
__name: "FiuuGateway",
|
481
|
+
props: {
|
482
|
+
gateway: {
|
483
|
+
type: Object,
|
484
|
+
required: !0
|
485
|
+
},
|
486
|
+
onUpdate: {
|
487
|
+
type: Function,
|
488
|
+
required: !0
|
489
|
+
},
|
490
|
+
onDelete: {
|
491
|
+
type: Function,
|
492
|
+
required: !0
|
493
|
+
}
|
494
|
+
},
|
495
|
+
setup(n) {
|
496
|
+
var v;
|
497
|
+
const e = T(((v = n.gateway) == null ? void 0 : v.config) || {
|
498
|
+
merchantId: "",
|
499
|
+
verifyKey: "",
|
500
|
+
secretKey: ""
|
501
|
+
});
|
502
|
+
return (u, t) => {
|
503
|
+
const l = p("FmTextField"), f = p("FmButton"), s = p("FmForm");
|
504
|
+
return g(), x(s, {
|
505
|
+
ref: "form",
|
506
|
+
class: "flex flex-col gap-16",
|
507
|
+
onValidationSuccess: t[3] || (t[3] = () => n.onUpdate(e.value))
|
508
|
+
}, {
|
509
|
+
default: k(() => [
|
510
|
+
r(l, {
|
511
|
+
modelValue: e.value.merchantId,
|
512
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.value.merchantId = a),
|
513
|
+
label: "Merchant ID",
|
514
|
+
rules: c(A)(c(h).string())
|
515
|
+
}, null, 8, ["modelValue", "rules"]),
|
516
|
+
r(l, {
|
517
|
+
modelValue: e.value.verifyKey,
|
518
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value.verifyKey = a),
|
519
|
+
label: "Verify Key",
|
520
|
+
rules: c(A)(c(h).string())
|
521
|
+
}, null, 8, ["modelValue", "rules"]),
|
522
|
+
r(l, {
|
523
|
+
modelValue: e.value.secretKey,
|
524
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => e.value.secretKey = a),
|
525
|
+
label: "Secret Key",
|
526
|
+
rules: c(A)(c(h).string())
|
527
|
+
}, null, 8, ["modelValue", "rules"]),
|
528
|
+
i("div", ke, [
|
529
|
+
n.gateway ? (g(), x(f, {
|
530
|
+
key: 0,
|
531
|
+
class: "flex-1",
|
532
|
+
variant: "secondary",
|
533
|
+
label: "Delete",
|
534
|
+
onclick: () => n.onDelete()
|
535
|
+
}, null, 8, ["onclick"])) : P("", !0),
|
536
|
+
r(f, {
|
537
|
+
type: "submit",
|
538
|
+
class: "flex-1",
|
539
|
+
variant: "primary",
|
540
|
+
label: "Save"
|
541
|
+
})
|
542
|
+
])
|
543
|
+
]),
|
544
|
+
_: 1
|
545
|
+
}, 512);
|
546
|
+
};
|
547
|
+
}
|
548
|
+
}), Ce = { class: "flex mt-6 space-x-6" }, _e = /* @__PURE__ */ V({
|
549
|
+
__name: "MacauPassGateway",
|
550
|
+
props: {
|
551
|
+
gateway: {
|
552
|
+
type: Object,
|
553
|
+
required: !0
|
554
|
+
},
|
555
|
+
onUpdate: {
|
556
|
+
type: Function,
|
557
|
+
required: !0
|
558
|
+
},
|
559
|
+
onDelete: {
|
560
|
+
type: Function,
|
561
|
+
required: !0
|
562
|
+
}
|
563
|
+
},
|
564
|
+
setup(n) {
|
565
|
+
var v;
|
566
|
+
const e = T(((v = n.gateway) == null ? void 0 : v.config) || {
|
567
|
+
merchantId: "",
|
568
|
+
merchantName: "",
|
569
|
+
merchantCategoryCode: "",
|
570
|
+
storeID: "",
|
571
|
+
storeName: ""
|
572
|
+
});
|
573
|
+
return (u, t) => {
|
574
|
+
const l = p("FmTextField"), f = p("FmButton"), s = p("FmForm");
|
575
|
+
return g(), x(s, {
|
576
|
+
ref: "form",
|
577
|
+
class: "flex flex-col gap-16",
|
578
|
+
onValidationSuccess: t[5] || (t[5] = () => n.onUpdate(e.value))
|
579
|
+
}, {
|
580
|
+
default: k(() => [
|
581
|
+
r(l, {
|
582
|
+
modelValue: e.value.merchantId,
|
583
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.value.merchantId = a),
|
584
|
+
label: "Merchant ID",
|
585
|
+
rules: c(A)(c(h).string())
|
586
|
+
}, null, 8, ["modelValue", "rules"]),
|
587
|
+
r(l, {
|
588
|
+
modelValue: e.value.merchantName,
|
589
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value.merchantName = a),
|
590
|
+
label: "Merchant Name",
|
591
|
+
rules: c(A)(c(h).string())
|
592
|
+
}, null, 8, ["modelValue", "rules"]),
|
593
|
+
r(l, {
|
594
|
+
modelValue: e.value.merchantCategoryCode,
|
595
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => e.value.merchantCategoryCode = a),
|
596
|
+
label: "Merchant MCC",
|
597
|
+
rules: c(A)(c(h).string())
|
598
|
+
}, null, 8, ["modelValue", "rules"]),
|
599
|
+
r(l, {
|
600
|
+
modelValue: e.value.storeID,
|
601
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => e.value.storeID = a),
|
602
|
+
label: "Store ID",
|
603
|
+
rules: c(A)(c(h).string())
|
604
|
+
}, null, 8, ["modelValue", "rules"]),
|
605
|
+
r(l, {
|
606
|
+
modelValue: e.value.storeName,
|
607
|
+
"onUpdate:modelValue": t[4] || (t[4] = (a) => e.value.storeName = a),
|
608
|
+
label: "Store Name",
|
609
|
+
rules: c(A)(c(h).string())
|
610
|
+
}, null, 8, ["modelValue", "rules"]),
|
611
|
+
i("div", Ce, [
|
612
|
+
n.gateway ? (g(), x(f, {
|
613
|
+
key: 0,
|
614
|
+
class: "flex-1",
|
615
|
+
variant: "secondary",
|
616
|
+
label: "Delete",
|
617
|
+
onclick: () => n.onDelete()
|
618
|
+
}, null, 8, ["onclick"])) : P("", !0),
|
619
|
+
r(f, {
|
620
|
+
type: "submit",
|
621
|
+
class: "flex-1",
|
622
|
+
variant: "primary",
|
623
|
+
label: "Save"
|
624
|
+
})
|
625
|
+
])
|
626
|
+
]),
|
627
|
+
_: 1
|
628
|
+
}, 512);
|
629
|
+
};
|
630
|
+
}
|
631
|
+
}), Ae = {
|
632
|
+
key: 0,
|
633
|
+
className: "mt-1 my-6 text-gray-600"
|
634
|
+
}, he = {
|
635
|
+
key: 1,
|
636
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
637
|
+
}, Pe = /* @__PURE__ */ V({
|
638
|
+
__name: "PaymentGateway",
|
639
|
+
props: {
|
640
|
+
payoutAccount: {
|
641
|
+
type: Object,
|
642
|
+
required: !0
|
643
|
+
}
|
644
|
+
},
|
645
|
+
setup(n) {
|
646
|
+
const m = X().currentCountry, e = z(), { isLoading: v, startAsyncCall: u } = j(), { gatewayTab: t } = K({
|
647
|
+
gatewayTab: ""
|
648
|
+
}), l = n, f = [
|
649
|
+
{
|
650
|
+
label: "Fiuu",
|
651
|
+
value: "RAZER_MERCHANT_SERVICE",
|
652
|
+
render: Ve,
|
653
|
+
region: [R.F_COUNTRY.enum.SG]
|
654
|
+
},
|
655
|
+
{
|
656
|
+
label: "Macau Pass",
|
657
|
+
value: "MACAU_PASS",
|
658
|
+
render: _e,
|
659
|
+
region: [R.F_COUNTRY.enum.MO]
|
660
|
+
}
|
661
|
+
], s = T(l.payoutAccount.gateways ?? []), a = D(() => f.find((d) => d.value === t.value)), o = D(() => f.filter((d) => d.region.includes(m.value ?? R.F_COUNTRY.enum.MY)));
|
662
|
+
async function y(d) {
|
663
|
+
await u(async () => {
|
664
|
+
try {
|
665
|
+
await N.updateGateway(l.payoutAccount._id, d), e.open({
|
666
|
+
type: "success",
|
667
|
+
title: "Payout account gateways update succesfully"
|
668
|
+
});
|
669
|
+
} catch (b) {
|
670
|
+
e.open({
|
671
|
+
type: "error",
|
672
|
+
title: "Error occurs when updating payout account gateways",
|
673
|
+
message: B(b)
|
674
|
+
});
|
675
|
+
}
|
676
|
+
});
|
677
|
+
}
|
678
|
+
return (d, b) => {
|
679
|
+
var M;
|
680
|
+
const S = p("FmCircularProgress"), I = p("FmTabs");
|
681
|
+
return g(), _($, null, [
|
682
|
+
c(m).value === c(R.F_COUNTRY).enum.MY ? (g(), _("p", Ae, b[1] || (b[1] = [
|
683
|
+
i("b", null, "Note: ", -1),
|
684
|
+
C(" There's no setup required for Malaysia Payment Gateway, once Payout Account is ready you will able to configure the payment channels. ")
|
685
|
+
]))) : P("", !0),
|
686
|
+
c(v) ? (g(), _("div", he, [
|
687
|
+
r(S, { size: "xxl" })
|
688
|
+
])) : (g(), x(I, {
|
689
|
+
key: 2,
|
690
|
+
"model-value": c(t),
|
691
|
+
"onUpdate:modelValue": b[0] || (b[0] = (F) => q(t) ? t.value = F : null),
|
692
|
+
class: "mb-6",
|
693
|
+
items: o.value
|
694
|
+
}, null, 8, ["model-value", "items"])),
|
695
|
+
c(t) ? (g(), x(Y((M = a.value) == null ? void 0 : M.render), L(H({ key: 3 }, {
|
696
|
+
gateway: s.value.find((F) => {
|
697
|
+
var w;
|
698
|
+
return F.paymentGateway === ((w = a.value) == null ? void 0 : w.value);
|
699
|
+
}),
|
700
|
+
onDelete: async () => {
|
701
|
+
s.value = s.value.filter((F) => {
|
702
|
+
var w;
|
703
|
+
return F.paymentGateway !== ((w = a.value) == null ? void 0 : w.value);
|
704
|
+
}), y(s.value);
|
705
|
+
},
|
706
|
+
onUpdate: (F) => {
|
707
|
+
var E;
|
708
|
+
let w = s.value.find((O) => {
|
709
|
+
var Z;
|
710
|
+
return O.paymentGateway === ((Z = a.value) == null ? void 0 : Z.value);
|
711
|
+
});
|
712
|
+
w ? w.config = F : s.value.push({
|
713
|
+
paymentGateway: (E = a.value) == null ? void 0 : E.value,
|
714
|
+
config: F
|
715
|
+
}), y(s.value);
|
716
|
+
}
|
717
|
+
})), null, 16)) : P("", !0)
|
718
|
+
], 64);
|
719
|
+
};
|
720
|
+
}
|
721
|
+
}), Te = { class: "flex mt-6 space-x-6" }, Se = /* @__PURE__ */ V({
|
722
|
+
__name: "GooglePayToken",
|
723
|
+
props: {
|
724
|
+
gateway: {
|
725
|
+
type: Object,
|
726
|
+
required: !0
|
727
|
+
},
|
728
|
+
onUpdate: {
|
729
|
+
type: Function,
|
730
|
+
required: !0
|
731
|
+
},
|
732
|
+
onDelete: {
|
733
|
+
type: Function,
|
734
|
+
required: !0
|
735
|
+
}
|
736
|
+
},
|
737
|
+
setup(n) {
|
738
|
+
const e = T(n.gateway || {
|
739
|
+
// hardcoded first since only 1 PSP supported
|
740
|
+
type: "googlePay",
|
741
|
+
gateway: "RAZER_MERCHANT_SERVICE",
|
742
|
+
config: {
|
743
|
+
paymentType: "googlePay",
|
744
|
+
gateway: {
|
745
|
+
gateway: "molpay",
|
746
|
+
gatewayMerchantId: "molpay"
|
747
|
+
}
|
748
|
+
}
|
749
|
+
});
|
750
|
+
return (v, u) => {
|
751
|
+
const t = p("FmTextField"), l = p("FmButton"), f = p("FmForm");
|
752
|
+
return g(), x(f, {
|
753
|
+
ref: "form",
|
754
|
+
class: "flex flex-col gap-16",
|
755
|
+
onValidationSuccess: u[3] || (u[3] = () => n.onUpdate(e.value))
|
756
|
+
}, {
|
757
|
+
default: k(() => [
|
758
|
+
r(t, {
|
759
|
+
modelValue: e.value.gateway,
|
760
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => e.value.gateway = s),
|
761
|
+
label: "Gateway",
|
762
|
+
disabled: !0,
|
763
|
+
rules: c(A)(c(h).string())
|
764
|
+
}, null, 8, ["modelValue", "rules"]),
|
765
|
+
r(t, {
|
766
|
+
modelValue: e.value.config.gateway.gateway,
|
767
|
+
"onUpdate:modelValue": u[1] || (u[1] = (s) => e.value.config.gateway.gateway = s),
|
768
|
+
label: "Gateway ID",
|
769
|
+
disabled: !0,
|
770
|
+
rules: c(A)(c(h).string())
|
771
|
+
}, null, 8, ["modelValue", "rules"]),
|
772
|
+
r(t, {
|
773
|
+
modelValue: e.value.config.gateway.gatewayMerchantId,
|
774
|
+
"onUpdate:modelValue": u[2] || (u[2] = (s) => e.value.config.gateway.gatewayMerchantId = s),
|
775
|
+
label: "Gateway Merchant ID",
|
776
|
+
disabled: !0,
|
777
|
+
rules: c(A)(c(h).string())
|
778
|
+
}, null, 8, ["modelValue", "rules"]),
|
779
|
+
i("div", Te, [
|
780
|
+
n.gateway ? (g(), x(l, {
|
781
|
+
key: 0,
|
782
|
+
class: "flex-1",
|
783
|
+
variant: "secondary",
|
784
|
+
label: "Delete",
|
785
|
+
onclick: () => n.onDelete()
|
786
|
+
}, null, 8, ["onclick"])) : P("", !0),
|
787
|
+
r(l, {
|
788
|
+
type: "submit",
|
789
|
+
class: "flex-1",
|
790
|
+
variant: "primary",
|
791
|
+
label: "Save"
|
792
|
+
})
|
793
|
+
])
|
794
|
+
]),
|
795
|
+
_: 1
|
796
|
+
}, 512);
|
797
|
+
};
|
798
|
+
}
|
799
|
+
}), Ue = {
|
800
|
+
key: 0,
|
801
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
802
|
+
}, Ne = /* @__PURE__ */ V({
|
803
|
+
__name: "TokenGateway",
|
804
|
+
props: {
|
805
|
+
payoutAccount: {
|
806
|
+
type: Object,
|
807
|
+
required: !0
|
808
|
+
}
|
809
|
+
},
|
810
|
+
setup(n) {
|
811
|
+
const m = X().currentCountry, e = z(), { isLoading: v, startAsyncCall: u } = j(), { tokenTab: t } = K({
|
812
|
+
tokenTab: ""
|
813
|
+
}), l = n, f = [
|
814
|
+
{
|
815
|
+
label: "Google Pay",
|
816
|
+
value: "googlePay",
|
817
|
+
icon: "android",
|
818
|
+
render: Se,
|
819
|
+
region: [R.F_COUNTRY.enum.MY, R.F_COUNTRY.enum.SG]
|
820
|
+
}
|
821
|
+
], s = T(l.payoutAccount.tokens ?? []), a = D(() => f.find((d) => d.value === t.value)), o = D(() => f.filter((d) => d.region.includes(m.value ?? R.F_COUNTRY.enum.MY)));
|
822
|
+
async function y(d) {
|
823
|
+
await u(async () => {
|
824
|
+
try {
|
825
|
+
await N.updateTokens(l.payoutAccount._id, d), e.open({
|
826
|
+
type: "success",
|
827
|
+
title: "Payout account tokens gateway update succesfully"
|
828
|
+
});
|
829
|
+
} catch (b) {
|
830
|
+
e.open({
|
831
|
+
type: "error",
|
832
|
+
title: "Error occurs when updating payout account tokens",
|
833
|
+
message: B(b)
|
834
|
+
});
|
835
|
+
}
|
836
|
+
});
|
837
|
+
}
|
838
|
+
return (d, b) => {
|
839
|
+
var M;
|
840
|
+
const S = p("FmCircularProgress"), I = p("FmTabs");
|
841
|
+
return g(), _($, null, [
|
842
|
+
b[1] || (b[1] = i("p", { className: "mt-1 my-6 text-gray-600" }, [
|
843
|
+
i("b", null, "Note: "),
|
844
|
+
C(" Token gateway always on the top of every other methods ( online channels ), and it's was branding requirements from each of the payment token gateway provider. For setting most of the time are the same and only need to select for which provider. ")
|
845
|
+
], -1)),
|
846
|
+
c(v) ? (g(), _("div", Ue, [
|
847
|
+
r(S, { size: "xxl" })
|
848
|
+
])) : (g(), x(I, {
|
849
|
+
key: 1,
|
850
|
+
"model-value": c(t),
|
851
|
+
"onUpdate:modelValue": b[0] || (b[0] = (F) => q(t) ? t.value = F : null),
|
852
|
+
class: "mb-6",
|
853
|
+
items: o.value
|
854
|
+
}, null, 8, ["model-value", "items"])),
|
855
|
+
c(t) ? (g(), x(Y((M = a.value) == null ? void 0 : M.render), L(H({ key: 2 }, {
|
856
|
+
gateway: s.value.find((F) => {
|
857
|
+
var w;
|
858
|
+
return F.type === ((w = a.value) == null ? void 0 : w.value);
|
859
|
+
}),
|
860
|
+
onDelete: async () => {
|
861
|
+
s.value = s.value.filter((F) => {
|
862
|
+
var w;
|
863
|
+
return F.type !== ((w = a.value) == null ? void 0 : w.value);
|
864
|
+
}), y(s.value);
|
865
|
+
},
|
866
|
+
onUpdate: (F) => {
|
867
|
+
let w = s.value.find((E) => {
|
868
|
+
var O;
|
869
|
+
return E.type === ((O = a.value) == null ? void 0 : O.value);
|
870
|
+
});
|
871
|
+
w ? w.config = F : s.value.push(F), y(s.value);
|
872
|
+
}
|
873
|
+
})), null, 16)) : P("", !0)
|
874
|
+
], 64);
|
875
|
+
};
|
876
|
+
}
|
877
|
+
}), Ke = /* @__PURE__ */ V({
|
878
|
+
__name: "PayoutAccountSetting",
|
879
|
+
props: {
|
880
|
+
accountId: {
|
881
|
+
type: String,
|
882
|
+
required: !0
|
883
|
+
}
|
884
|
+
},
|
885
|
+
setup(n) {
|
886
|
+
const m = n, { tab: e } = K({
|
887
|
+
tab: "information"
|
888
|
+
}), { isLoading: v, startAsyncCall: u } = j(!0), t = te(), l = T();
|
889
|
+
async function f(y) {
|
890
|
+
await N.updateById(
|
891
|
+
m.accountId,
|
892
|
+
y
|
893
|
+
), l.value = await N.readById(m.accountId);
|
894
|
+
}
|
895
|
+
const s = [
|
896
|
+
{
|
897
|
+
label: "Information",
|
898
|
+
value: "information",
|
899
|
+
icon: "overview",
|
900
|
+
render: le
|
901
|
+
},
|
902
|
+
{
|
903
|
+
label: "Settlement",
|
904
|
+
value: "settlement",
|
905
|
+
icon: "payments",
|
906
|
+
render: ce
|
907
|
+
},
|
908
|
+
{
|
909
|
+
label: "MDR Status",
|
910
|
+
value: "payment",
|
911
|
+
icon: "account_box",
|
912
|
+
render: ge
|
913
|
+
},
|
914
|
+
{
|
915
|
+
label: "Online Gateways",
|
916
|
+
icon: "assured_workload",
|
917
|
+
value: "gateways",
|
918
|
+
render: Pe
|
919
|
+
},
|
920
|
+
{
|
921
|
+
label: "Token Gateways",
|
922
|
+
value: "tokens",
|
923
|
+
icon: "wallet",
|
924
|
+
render: Ne
|
925
|
+
},
|
926
|
+
{
|
927
|
+
label: "Online Channels",
|
928
|
+
icon: "shopping_cart",
|
929
|
+
value: "channels",
|
930
|
+
render: xe
|
931
|
+
}
|
932
|
+
];
|
933
|
+
function a() {
|
934
|
+
u(async () => {
|
935
|
+
l.value = await N.readById(m.accountId);
|
936
|
+
});
|
937
|
+
}
|
938
|
+
J(a);
|
939
|
+
const o = D(() => {
|
940
|
+
const y = s.reduce((d, b) => d || (b.children ? b.children.find((S) => S.value === e.value) || null : b.value === e.value ? b : null), null);
|
941
|
+
return y == null ? void 0 : y.render;
|
942
|
+
});
|
943
|
+
return (y, d) => {
|
944
|
+
var S;
|
945
|
+
const b = p("FmTabs");
|
946
|
+
return g(), x(ee, {
|
947
|
+
title: `Payout Account (${(S = l.value) == null ? void 0 : S._id})`,
|
948
|
+
loading: c(v),
|
949
|
+
onBack: c(t).back
|
950
|
+
}, {
|
951
|
+
default: k(() => [
|
952
|
+
r(b, {
|
953
|
+
"model-value": c(e),
|
954
|
+
"onUpdate:modelValue": d[0] || (d[0] = (I) => q(e) ? e.value = I : null),
|
955
|
+
class: "mb-6",
|
956
|
+
items: s
|
957
|
+
}, null, 8, ["model-value"]),
|
958
|
+
c(e) ? (g(), x(Y(o.value), L(H({ key: 0 }, {
|
959
|
+
payoutAccount: l.value,
|
960
|
+
onUpdate: f
|
961
|
+
})), null, 16)) : P("", !0)
|
962
|
+
]),
|
963
|
+
_: 1
|
964
|
+
}, 8, ["title", "loading", "onBack"]);
|
965
|
+
};
|
966
|
+
}
|
967
|
+
});
|
968
|
+
export {
|
969
|
+
Ke as default
|
970
|
+
};
|