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