@feedmepos/mf-payment 1.2.14 → 1.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PayoutAccount-B9sThTU6.js → PayoutAccount-CvMczmij.js} +6 -6
- package/dist/{PayoutAccount-C1-oQCFC.js → PayoutAccount-bF6506mg.js} +5 -5
- package/dist/{PayoutAccountSetting-D3ffGE0d.js → PayoutAccountSetting-Di_Rohl7.js} +391 -330
- package/dist/{Restaurant-3FLRoz2Z.js → Restaurant-BgfJ4kMh.js} +4 -4
- package/dist/RestaurantSetting-DLB_GBbu.js +754 -0
- package/dist/{Settlement-Bdj2WaoM.js → Settlement-DqwyJFk-.js} +3 -3
- package/dist/{Settlement-CC2B-e4f.js → Settlement-Mf5XJrXc.js} +3 -3
- package/dist/{SettlementTransactions-DGCj9bAe.js → SettlementTransactions-6vkA8-4o.js} +3 -3
- package/dist/{SettlementTransactions-CwLzHWsb.js → SettlementTransactions-DvzbSvA9.js} +3 -3
- package/dist/{Terminal-7c3OQF9g.js → Terminal-DC6alAxg.js} +5 -5
- package/dist/{TerminalSetting-B7xu6e4X.js → TerminalSetting-BE9fFg4j.js} +3 -3
- package/dist/{Transaction-D1LWBBsZ.js → Transaction-BPVSJWdM.js} +7 -7
- package/dist/{Transaction--t5VJdXQ.js → Transaction-BXynWN9l.js} +5 -5
- package/dist/{TransactionOld-DHVZ5iSD.js → TransactionOld-aJqwnMYJ.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-CRkXGtHQ.js → TransactionTable.vue_vue_type_script_setup_true_lang-CX5eNJPx.js} +3 -3
- package/dist/{app-D24UkS2o.js → app-l69fYMyZ.js} +375 -375
- package/dist/app.js +1 -1
- package/dist/{assets-B5NXw6Y4.js → assets-CRA5IzdW.js} +2 -2
- package/dist/{grafana-DaIIupgz.js → grafana-AnUnO24M.js} +1 -1
- package/dist/{index-B2DvBis-.js → index-34hQY02y.js} +2 -2
- package/dist/{index-BBYs-Llt.js → index-8V-GavUD.js} +1 -1
- package/dist/{index-Bboy-oty.js → index-BrtYLN-t.js} +1 -1
- package/dist/{index-BFdB2HXN.js → index-Cer_6J8b.js} +1 -1
- package/dist/{index-DvYpRRA_.js → index-DayhN_i6.js} +1 -1
- package/dist/{index-DNHpMza-.js → index-DmI9Gt5s.js} +9532 -9385
- package/dist/{index-Lio-k9My.js → index-k7EwR1PN.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-B8G7gIcx.js → index.vue_vue_type_script_setup_true_lang-BZvBvJ7L.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-MSqoi8mH.js → payout-account-HJH4ybUc.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +22 -12
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +22 -12
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +26 -16
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +26 -16
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +22 -12
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +22 -12
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +26 -16
- package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +39 -0
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +45 -0
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +8 -10
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +48 -0
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +14 -14
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +16 -14
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +14 -14
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +44 -24
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +56 -56
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +28 -28
- package/package.json +2 -2
- package/dist/RestaurantSetting-DnqiIepz.js +0 -625
@@ -1,15 +1,15 @@
|
|
1
|
-
import { defineComponent as V, resolveComponent as
|
2
|
-
import { p as
|
3
|
-
import { u as j, e as
|
1
|
+
import { defineComponent as V, resolveComponent as m, openBlock as g, createElementBlock as h, Fragment as G, createElementVNode as i, createVNode as s, withCtx as k, createTextVNode as _, toDisplayString as U, createCommentVNode as T, createBlock as w, ref as P, watch as W, computed as R, unref as c, isRef as E, h as M, onMounted as J, resolveDynamicComponent as z, normalizeProps as L, mergeProps as H } from "vue";
|
2
|
+
import { p as I } from "./index-34hQY02y.js";
|
3
|
+
import { u as j, e as N } from "./index-DmI9Gt5s.js";
|
4
4
|
import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
5
5
|
import { useRouter as te } from "vue-router";
|
6
|
-
import { u as K } from "./index-
|
6
|
+
import { u as K } from "./index-Cer_6J8b.js";
|
7
7
|
import { P as Q } from "./PDFViewer-xrBtzrlR.js";
|
8
|
-
import { useSnackbar as
|
8
|
+
import { useSnackbar as Y, components as ae } from "@feedmepos/ui-library";
|
9
9
|
import { u as B } from "./error-K1CakhA9.js";
|
10
|
-
import { z as
|
10
|
+
import { z as C, a as A } from "./validator-D5jtpt9A.js";
|
11
11
|
import { useCoreStore as X } from "@feedmepos/mf-common";
|
12
|
-
const ne = { class: "flex gap-16 mb-6" },
|
12
|
+
const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
13
13
|
__name: "Information",
|
14
14
|
props: {
|
15
15
|
payoutAccount: {
|
@@ -17,36 +17,36 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
17
17
|
required: !0
|
18
18
|
}
|
19
19
|
},
|
20
|
-
setup(
|
20
|
+
setup(a) {
|
21
21
|
return (d, e) => {
|
22
|
-
const
|
23
|
-
return g(),
|
22
|
+
const p = m("FmCardHeader"), r = m("FmCardSection"), t = m("FmCard");
|
23
|
+
return g(), h(G, null, [
|
24
24
|
i("div", ne, [
|
25
|
-
|
25
|
+
s(t, {
|
26
26
|
horizontal: "",
|
27
27
|
class: "flex-1 p-6",
|
28
28
|
variant: "elevated"
|
29
29
|
}, {
|
30
30
|
default: k(() => [
|
31
|
-
r
|
31
|
+
s(r, { class: "flex flex-col gap-16 justify-between" }, {
|
32
32
|
default: k(() => [
|
33
|
-
|
33
|
+
s(p, {
|
34
34
|
class: "p-0",
|
35
35
|
title: "Account Info",
|
36
36
|
subtitle: ""
|
37
37
|
}),
|
38
|
-
r
|
38
|
+
s(r, { class: "p-0" }, {
|
39
39
|
default: k(() => {
|
40
|
-
var
|
40
|
+
var o, y, u, n, l;
|
41
41
|
return [
|
42
42
|
e[0] || (e[0] = i("b", null, "For", -1)),
|
43
|
-
|
43
|
+
_(": " + U((y = (o = a.payoutAccount) == null ? void 0 : o.store) == null ? void 0 : y.event) + " ", 1),
|
44
44
|
e[1] || (e[1] = i("br", null, null, -1)),
|
45
45
|
e[2] || (e[2] = i("b", null, "Reference", -1)),
|
46
|
-
|
46
|
+
_(": " + U((n = (u = a.payoutAccount) == null ? void 0 : u.store) == null ? void 0 : n.id), 1),
|
47
47
|
e[3] || (e[3] = i("br", null, null, -1)),
|
48
48
|
e[4] || (e[4] = i("b", null, "Business", -1)),
|
49
|
-
|
49
|
+
_(": " + U((l = a.payoutAccount) == null ? void 0 : l.businessId), 1),
|
50
50
|
e[5] || (e[5] = i("br", null, null, -1))
|
51
51
|
];
|
52
52
|
}),
|
@@ -58,31 +58,31 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
58
58
|
]),
|
59
59
|
_: 1
|
60
60
|
}),
|
61
|
-
|
61
|
+
s(t, {
|
62
62
|
horizontal: "",
|
63
63
|
class: "flex-1 p-6",
|
64
64
|
variant: "elevated"
|
65
65
|
}, {
|
66
66
|
default: k(() => [
|
67
|
-
r
|
67
|
+
s(r, { class: "flex flex-col gap-16 justify-between" }, {
|
68
68
|
default: k(() => [
|
69
|
-
|
69
|
+
s(p, {
|
70
70
|
class: "p-0",
|
71
71
|
title: "Key Person",
|
72
72
|
subtitle: ""
|
73
73
|
}),
|
74
|
-
r
|
74
|
+
s(r, { class: "p-0" }, {
|
75
75
|
default: k(() => {
|
76
|
-
var
|
76
|
+
var o, y, u, n, l, v, f, b;
|
77
77
|
return [
|
78
78
|
e[6] || (e[6] = i("b", null, "Email", -1)),
|
79
|
-
|
79
|
+
_(": " + U((u = (y = (o = a.payoutAccount) == null ? void 0 : o.store) == null ? void 0 : y.keyPerson) == null ? void 0 : u.email) + " ", 1),
|
80
80
|
e[7] || (e[7] = i("br", null, null, -1)),
|
81
81
|
e[8] || (e[8] = i("b", null, "Name", -1)),
|
82
|
-
|
82
|
+
_(": " + U((v = (l = (n = a.payoutAccount) == null ? void 0 : n.store) == null ? void 0 : l.keyPerson) == null ? void 0 : v.name), 1),
|
83
83
|
e[9] || (e[9] = i("br", null, null, -1)),
|
84
84
|
e[10] || (e[10] = i("b", null, "Phone", -1)),
|
85
|
-
|
85
|
+
_(": " + U((b = (f = a.payoutAccount) == null ? void 0 : f.store.keyPerson) == null ? void 0 : b.phone), 1),
|
86
86
|
e[11] || (e[11] = i("br", null, null, -1))
|
87
87
|
];
|
88
88
|
}),
|
@@ -96,10 +96,10 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
96
96
|
})
|
97
97
|
]),
|
98
98
|
e[12] || (e[12] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Exterior Photo", -1)),
|
99
|
-
|
99
|
+
a.payoutAccount.store.exteriorPhoto ? (g(), h("img", {
|
100
100
|
key: 0,
|
101
|
-
src:
|
102
|
-
}, null, 8,
|
101
|
+
src: a.payoutAccount.store.exteriorPhoto
|
102
|
+
}, null, 8, le)) : T("", !0)
|
103
103
|
], 64);
|
104
104
|
};
|
105
105
|
}
|
@@ -111,35 +111,35 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
111
111
|
required: !0
|
112
112
|
}
|
113
113
|
},
|
114
|
-
setup(
|
114
|
+
setup(a) {
|
115
115
|
return (d, e) => {
|
116
|
-
const
|
117
|
-
return g(),
|
118
|
-
|
116
|
+
const p = m("FmCardHeader"), r = m("FmCardSection"), t = m("FmCard");
|
117
|
+
return g(), h(G, null, [
|
118
|
+
s(t, {
|
119
119
|
horizontal: "",
|
120
120
|
class: "flex-1 p-6 mx-6 mb-6",
|
121
121
|
variant: "elevated"
|
122
122
|
}, {
|
123
123
|
default: k(() => [
|
124
|
-
r
|
124
|
+
s(r, { class: "flex flex-col gap-16 justify-between" }, {
|
125
125
|
default: k(() => [
|
126
|
-
|
126
|
+
s(p, {
|
127
127
|
class: "p-0",
|
128
128
|
title: "Bank Info",
|
129
129
|
subtitle: ""
|
130
130
|
}),
|
131
|
-
r
|
131
|
+
s(r, { class: "p-0" }, {
|
132
132
|
default: k(() => {
|
133
|
-
var
|
133
|
+
var o, y, u, n, l, v;
|
134
134
|
return [
|
135
135
|
e[0] || (e[0] = i("b", null, "Bank", -1)),
|
136
|
-
|
136
|
+
_(": " + U((y = (o = a.payoutAccount) == null ? void 0 : o.store.bank) == null ? void 0 : y.name), 1),
|
137
137
|
e[1] || (e[1] = i("br", null, null, -1)),
|
138
138
|
e[2] || (e[2] = i("b", null, "Name", -1)),
|
139
|
-
|
139
|
+
_(": " + U((n = (u = a.payoutAccount) == null ? void 0 : u.store.bank) == null ? void 0 : n.holderName), 1),
|
140
140
|
e[3] || (e[3] = i("br", null, null, -1)),
|
141
141
|
e[4] || (e[4] = i("b", null, "Number", -1)),
|
142
|
-
|
142
|
+
_(": " + U((v = (l = a.payoutAccount) == null ? void 0 : l.store.bank) == null ? void 0 : v.accountNumber), 1)
|
143
143
|
];
|
144
144
|
}),
|
145
145
|
_: 1
|
@@ -153,21 +153,21 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
153
153
|
i("div", ue, [
|
154
154
|
i("div", se, [
|
155
155
|
e[5] || (e[5] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
|
156
|
-
|
156
|
+
a.payoutAccount.store.ssm ? (g(), w(Q, {
|
157
157
|
key: 0,
|
158
|
-
pdf:
|
158
|
+
pdf: a.payoutAccount.store.ssm,
|
159
159
|
"disable-text-layer": !0,
|
160
160
|
"disable-annotation-layer": !0
|
161
|
-
}, null, 8, ["pdf"])) :
|
161
|
+
}, null, 8, ["pdf"])) : T("", !0)
|
162
162
|
]),
|
163
163
|
i("div", re, [
|
164
164
|
e[6] || (e[6] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
|
165
|
-
|
165
|
+
a.payoutAccount.store.bankStatement ? (g(), w(Q, {
|
166
166
|
key: 0,
|
167
|
-
pdf:
|
167
|
+
pdf: a.payoutAccount.store.bankStatement,
|
168
168
|
"disable-text-layer": !0,
|
169
169
|
"disable-annotation-layer": !0
|
170
|
-
}, null, 8, ["pdf"])) :
|
170
|
+
}, null, 8, ["pdf"])) : T("", !0)
|
171
171
|
])
|
172
172
|
])
|
173
173
|
], 64);
|
@@ -179,19 +179,19 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
179
179
|
data: {},
|
180
180
|
onChange: { type: Function }
|
181
181
|
},
|
182
|
-
setup(
|
183
|
-
const d =
|
184
|
-
return W(e, (
|
185
|
-
d.onChange(parseFloat(
|
186
|
-
}), (
|
187
|
-
const t =
|
188
|
-
return g(),
|
182
|
+
setup(a) {
|
183
|
+
const d = a, e = P(d.data.toString());
|
184
|
+
return W(e, (p) => {
|
185
|
+
d.onChange(parseFloat(p));
|
186
|
+
}), (p, r) => {
|
187
|
+
const t = m("FmTextField");
|
188
|
+
return g(), w(t, {
|
189
189
|
inputmode: "decimal",
|
190
190
|
modelValue: e.value,
|
191
|
-
"onUpdate:modelValue":
|
191
|
+
"onUpdate:modelValue": r[0] || (r[0] = (o) => e.value = o)
|
192
192
|
}, {
|
193
|
-
append: k(() =>
|
194
|
-
|
193
|
+
append: k(() => r[1] || (r[1] = [
|
194
|
+
_("%")
|
195
195
|
])),
|
196
196
|
_: 1
|
197
197
|
}, 8, ["modelValue"]);
|
@@ -203,20 +203,20 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
203
203
|
data: {},
|
204
204
|
onChange: { type: Function }
|
205
205
|
},
|
206
|
-
setup(
|
207
|
-
const d =
|
208
|
-
return W(e, (
|
209
|
-
d.onChange(parseInt(
|
210
|
-
}), (
|
211
|
-
const t =
|
212
|
-
return g(),
|
206
|
+
setup(a) {
|
207
|
+
const d = a, e = P(d.data.toString());
|
208
|
+
return W(e, (p) => {
|
209
|
+
d.onChange(parseInt(p));
|
210
|
+
}), (p, r) => {
|
211
|
+
const t = m("FmTextField");
|
212
|
+
return g(), w(t, {
|
213
213
|
inputmode: "numeric",
|
214
214
|
modelValue: e.value,
|
215
|
-
"onUpdate:modelValue":
|
215
|
+
"onUpdate:modelValue": r[0] || (r[0] = (o) => e.value = o)
|
216
216
|
}, null, 8, ["modelValue"]);
|
217
217
|
};
|
218
218
|
}
|
219
|
-
}), de = { class: "flex gap-16 mt-6" }, pe = { class: "flex-1" }, ye = { class: "flex-1" },
|
219
|
+
}), de = { class: "flex gap-16 mt-6" }, pe = { class: "flex-1" }, ye = { class: "flex-1" }, fe = { class: "my-6 w-full flex justify-end" }, ve = { class: "w-[320px]" }, ge = /* @__PURE__ */ V({
|
220
220
|
__name: "PaymentStatus",
|
221
221
|
props: {
|
222
222
|
onUpdate: {
|
@@ -228,46 +228,46 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
228
228
|
required: !0
|
229
229
|
}
|
230
230
|
},
|
231
|
-
setup(
|
232
|
-
const d =
|
231
|
+
setup(a) {
|
232
|
+
const d = a, e = P(!1), p = Y(), r = async (n) => {
|
233
233
|
try {
|
234
|
-
e.value = !0, await d.onUpdate(
|
234
|
+
e.value = !0, await d.onUpdate(n), p.open({
|
235
235
|
type: "success",
|
236
236
|
title: "Payout account update succesfully"
|
237
237
|
});
|
238
|
-
} catch (
|
239
|
-
|
238
|
+
} catch (l) {
|
239
|
+
p.open({
|
240
240
|
type: "error",
|
241
241
|
title: "Error occurs when updating payout account",
|
242
|
-
message: B(
|
242
|
+
message: B(l)
|
243
243
|
});
|
244
244
|
} finally {
|
245
245
|
e.value = !1;
|
246
246
|
}
|
247
247
|
}, { search: t } = K({
|
248
248
|
search: ""
|
249
|
-
}),
|
250
|
-
const { ssm:
|
251
|
-
return
|
252
|
-
}),
|
249
|
+
}), o = R(() => {
|
250
|
+
const { ssm: n, bank: l, bankStatement: v } = d.payoutAccount.store;
|
251
|
+
return n && l && l.name && l.accountNumber && l.holderName && v;
|
252
|
+
}), y = P(""), u = [
|
253
253
|
{
|
254
254
|
header: () => "Payment Method",
|
255
255
|
accessorKey: "issuer",
|
256
|
-
cell: (
|
256
|
+
cell: (n) => `${n.row.original.issuer} (${n.row.original.variant})`
|
257
257
|
},
|
258
258
|
{
|
259
259
|
header: () => "Rate",
|
260
260
|
accessorKey: "rate",
|
261
|
-
cell: ({ row:
|
262
|
-
let
|
263
|
-
return
|
264
|
-
data:
|
265
|
-
onChange: (
|
266
|
-
const
|
267
|
-
|
261
|
+
cell: ({ row: n }) => {
|
262
|
+
let l = 0;
|
263
|
+
return n.original.rate && (l = n.original.rate.amount / Math.pow(10, n.original.rate.precision)), M(ie, {
|
264
|
+
data: l,
|
265
|
+
onChange: (v) => {
|
266
|
+
const f = d.payoutAccount.methods.at(n.index);
|
267
|
+
f.rate || (f.rate = {
|
268
268
|
amount: 0,
|
269
269
|
precision: 4
|
270
|
-
}),
|
270
|
+
}), f.rate.amount = v * Math.pow(10, f.rate.precision);
|
271
271
|
}
|
272
272
|
});
|
273
273
|
}
|
@@ -275,35 +275,35 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
275
275
|
{
|
276
276
|
header: () => "T plus",
|
277
277
|
accessorKey: "tPlus",
|
278
|
-
cell: ({ row:
|
279
|
-
data:
|
280
|
-
onChange: (
|
281
|
-
const
|
282
|
-
|
278
|
+
cell: ({ row: n }) => M(me, {
|
279
|
+
data: n.original.tPlus ?? 0,
|
280
|
+
onChange: (l) => {
|
281
|
+
const v = d.payoutAccount.methods.at(n.index);
|
282
|
+
v.tPlus = l;
|
283
283
|
}
|
284
284
|
})
|
285
285
|
}
|
286
286
|
];
|
287
|
-
return (
|
288
|
-
const
|
289
|
-
return g(),
|
287
|
+
return (n, l) => {
|
288
|
+
const v = m("FmRadio"), f = m("FmRadioGroup"), b = m("FmSwitch"), S = m("FmSearch"), D = m("FmTable"), $ = m("FmButton");
|
289
|
+
return g(), h(G, null, [
|
290
290
|
i("div", de, [
|
291
291
|
i("div", pe, [
|
292
|
-
|
293
|
-
modelValue:
|
294
|
-
"onUpdate:modelValue":
|
292
|
+
s(f, {
|
293
|
+
modelValue: a.payoutAccount.status,
|
294
|
+
"onUpdate:modelValue": l[0] || (l[0] = (F) => a.payoutAccount.status = F),
|
295
295
|
label: "Account Status"
|
296
296
|
}, {
|
297
297
|
default: k(() => [
|
298
|
-
|
298
|
+
s(v, {
|
299
299
|
value: "NEW",
|
300
300
|
label: "New"
|
301
301
|
}),
|
302
|
-
|
302
|
+
s(v, {
|
303
303
|
value: "PENDING",
|
304
304
|
label: "Pending"
|
305
305
|
}),
|
306
|
-
|
306
|
+
s(v, {
|
307
307
|
value: "APPROVED",
|
308
308
|
label: "Approved"
|
309
309
|
})
|
@@ -312,41 +312,41 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
312
312
|
}, 8, ["modelValue"])
|
313
313
|
]),
|
314
314
|
i("div", ye, [
|
315
|
-
|
316
|
-
modelValue:
|
317
|
-
"onUpdate:modelValue":
|
318
|
-
disabled: !
|
315
|
+
s(b, {
|
316
|
+
modelValue: a.payoutAccount.enable,
|
317
|
+
"onUpdate:modelValue": l[1] || (l[1] = (F) => a.payoutAccount.enable = F),
|
318
|
+
disabled: !o.value,
|
319
319
|
label: "Enabled",
|
320
320
|
sublabel: "Merchant can use online features such as e-payment, settlement"
|
321
321
|
}, null, 8, ["modelValue", "disabled"])
|
322
322
|
])
|
323
323
|
]),
|
324
|
-
|
325
|
-
i("div",
|
326
|
-
i("div",
|
327
|
-
|
324
|
+
a.payoutAccount.enable ? (g(), h(G, { key: 0 }, [
|
325
|
+
i("div", fe, [
|
326
|
+
i("div", ve, [
|
327
|
+
s(S, {
|
328
328
|
modelValue: c(t),
|
329
|
-
"onUpdate:modelValue":
|
329
|
+
"onUpdate:modelValue": l[2] || (l[2] = (F) => E(t) ? t.value = F : null),
|
330
330
|
placeholder: "Search Method ..."
|
331
331
|
}, null, 8, ["modelValue"])
|
332
332
|
])
|
333
333
|
]),
|
334
|
-
|
334
|
+
s(D, {
|
335
335
|
class: "mt-6",
|
336
|
-
modelValue:
|
337
|
-
"onUpdate:modelValue":
|
336
|
+
modelValue: y.value,
|
337
|
+
"onUpdate:modelValue": l[3] || (l[3] = (F) => y.value = F),
|
338
338
|
"shrink-at": !1,
|
339
339
|
"search-value": c(t),
|
340
|
-
"row-data":
|
341
|
-
"column-defs":
|
340
|
+
"row-data": a.payoutAccount.methods,
|
341
|
+
"column-defs": u
|
342
342
|
}, null, 8, ["modelValue", "search-value", "row-data"])
|
343
|
-
], 64)) :
|
344
|
-
|
343
|
+
], 64)) : T("", !0),
|
344
|
+
s($, {
|
345
345
|
class: "w-full mt-6",
|
346
346
|
variant: "primary",
|
347
347
|
label: "Save",
|
348
348
|
loading: e.value,
|
349
|
-
onclick: () =>
|
349
|
+
onclick: () => r(a.payoutAccount)
|
350
350
|
}, null, 8, ["loading", "onclick"])
|
351
351
|
], 64);
|
352
352
|
};
|
@@ -354,16 +354,16 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
354
354
|
}), be = { class: "flex" }, Fe = /* @__PURE__ */ V({
|
355
355
|
__name: "Actions",
|
356
356
|
emits: ["edit", "delete"],
|
357
|
-
setup(
|
357
|
+
setup(a, { emit: d }) {
|
358
358
|
const e = d;
|
359
|
-
return (
|
360
|
-
const t =
|
361
|
-
return g(),
|
362
|
-
|
359
|
+
return (p, r) => {
|
360
|
+
const t = m("FmButton");
|
361
|
+
return g(), h("div", be, [
|
362
|
+
s(t, {
|
363
363
|
variant: "plain",
|
364
364
|
"prepend-icon": "delete",
|
365
|
-
onClick:
|
366
|
-
|
365
|
+
onClick: r[0] || (r[0] = (o) => {
|
366
|
+
o.stopPropagation(), e("delete");
|
367
367
|
})
|
368
368
|
})
|
369
369
|
]);
|
@@ -377,47 +377,47 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
377
377
|
required: !0
|
378
378
|
}
|
379
379
|
},
|
380
|
-
setup(
|
381
|
-
const d =
|
382
|
-
function
|
383
|
-
|
384
|
-
t.value = await
|
380
|
+
setup(a) {
|
381
|
+
const d = Y(), e = a, { isLoading: p, startAsyncCall: r } = j(), t = P([]);
|
382
|
+
function o() {
|
383
|
+
r(async () => {
|
384
|
+
t.value = await I.getChannels(e.payoutAccount._id);
|
385
385
|
});
|
386
386
|
}
|
387
|
-
J(
|
388
|
-
function
|
389
|
-
|
387
|
+
J(o);
|
388
|
+
function y() {
|
389
|
+
r(async () => {
|
390
390
|
try {
|
391
|
-
await
|
391
|
+
await I.updateChannels(e.payoutAccount._id, t.value), d.open({
|
392
392
|
type: "success",
|
393
393
|
title: "Payout account channels update succesfully"
|
394
394
|
});
|
395
|
-
} catch (
|
395
|
+
} catch (l) {
|
396
396
|
d.open({
|
397
397
|
type: "error",
|
398
398
|
title: "Error occurs when updating payout account channels",
|
399
|
-
message: B(
|
399
|
+
message: B(l)
|
400
400
|
});
|
401
401
|
}
|
402
402
|
});
|
403
403
|
}
|
404
|
-
function
|
405
|
-
|
404
|
+
function u() {
|
405
|
+
r(async () => {
|
406
406
|
try {
|
407
|
-
await
|
407
|
+
await I.resetChannels(e.payoutAccount._id), t.value = await I.getChannels(e.payoutAccount._id), d.open({
|
408
408
|
type: "success",
|
409
409
|
title: "Payout account channels reset succesfully"
|
410
410
|
});
|
411
|
-
} catch (
|
411
|
+
} catch (l) {
|
412
412
|
d.open({
|
413
413
|
type: "error",
|
414
414
|
title: "Error occurs when reset payout account channels",
|
415
|
-
message: B(
|
415
|
+
message: B(l)
|
416
416
|
});
|
417
417
|
}
|
418
418
|
});
|
419
419
|
}
|
420
|
-
const
|
420
|
+
const n = [
|
421
421
|
{
|
422
422
|
header: () => "Gateway",
|
423
423
|
accessorKey: "gateway"
|
@@ -429,48 +429,48 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
429
429
|
{
|
430
430
|
header: () => "Display",
|
431
431
|
accessorKey: "icon",
|
432
|
-
cell: ({ row:
|
432
|
+
cell: ({ row: l }) => M("img", { src: l.original.icon, width: 32, height: 32 })
|
433
433
|
},
|
434
434
|
{
|
435
435
|
header: () => "Label",
|
436
436
|
accessorKey: "label",
|
437
|
-
cell: ({ row:
|
438
|
-
modelValue:
|
439
|
-
"onUpdate:modelValue": (
|
437
|
+
cell: ({ row: l }) => M(ae.FmTextField, {
|
438
|
+
modelValue: l.original.label,
|
439
|
+
"onUpdate:modelValue": (v) => l.original.label = v
|
440
440
|
})
|
441
441
|
},
|
442
442
|
{
|
443
443
|
id: "actions",
|
444
444
|
header: () => "Actions",
|
445
|
-
cell: ({ row:
|
446
|
-
onDelete: () => t.value.splice(
|
445
|
+
cell: ({ row: l }) => M(Fe, {
|
446
|
+
onDelete: () => t.value.splice(l.index, 1)
|
447
447
|
})
|
448
448
|
}
|
449
449
|
];
|
450
|
-
return (
|
451
|
-
const
|
452
|
-
return g(),
|
450
|
+
return (l, v) => {
|
451
|
+
const f = m("FmButton"), b = m("FmTable");
|
452
|
+
return g(), h(G, null, [
|
453
453
|
i("div", we, [
|
454
|
-
|
454
|
+
s(f, {
|
455
455
|
class: "mx-4",
|
456
456
|
variant: "destructive",
|
457
457
|
size: "md",
|
458
458
|
icon: "history",
|
459
459
|
label: "Reset",
|
460
|
-
onClick:
|
460
|
+
onClick: u
|
461
461
|
}),
|
462
|
-
|
462
|
+
s(f, {
|
463
463
|
variant: "primary",
|
464
464
|
size: "md",
|
465
465
|
icon: "save",
|
466
466
|
label: "Save",
|
467
|
-
onClick:
|
467
|
+
onClick: y
|
468
468
|
})
|
469
469
|
]),
|
470
|
-
|
471
|
-
loading: c(
|
470
|
+
s(b, {
|
471
|
+
loading: c(p),
|
472
472
|
"row-data": t.value,
|
473
|
-
"column-defs":
|
473
|
+
"column-defs": n,
|
474
474
|
"shrink-at": !1
|
475
475
|
}, null, 8, ["loading", "row-data"])
|
476
476
|
], 64);
|
@@ -492,48 +492,48 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
492
492
|
required: !0
|
493
493
|
}
|
494
494
|
},
|
495
|
-
setup(
|
496
|
-
var
|
497
|
-
const e =
|
495
|
+
setup(a) {
|
496
|
+
var p;
|
497
|
+
const e = P(((p = a.gateway) == null ? void 0 : p.config) || {
|
498
498
|
merchantId: "",
|
499
499
|
verifyKey: "",
|
500
500
|
secretKey: ""
|
501
501
|
});
|
502
|
-
return (
|
503
|
-
const
|
504
|
-
return g(),
|
502
|
+
return (r, t) => {
|
503
|
+
const o = m("FmTextField"), y = m("FmButton"), u = m("FmForm");
|
504
|
+
return g(), w(u, {
|
505
505
|
ref: "form",
|
506
506
|
class: "flex flex-col gap-16",
|
507
|
-
onValidationSuccess: t[3] || (t[3] = () =>
|
507
|
+
onValidationSuccess: t[3] || (t[3] = () => a.onUpdate(e.value))
|
508
508
|
}, {
|
509
509
|
default: k(() => [
|
510
|
-
|
510
|
+
s(o, {
|
511
511
|
modelValue: e.value.merchantId,
|
512
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
512
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.merchantId = n),
|
513
513
|
label: "Merchant ID",
|
514
|
-
rules: c(
|
514
|
+
rules: c(C)(c(A).string())
|
515
515
|
}, null, 8, ["modelValue", "rules"]),
|
516
|
-
|
516
|
+
s(o, {
|
517
517
|
modelValue: e.value.verifyKey,
|
518
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
518
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.verifyKey = n),
|
519
519
|
label: "Verify Key",
|
520
|
-
rules: c(
|
520
|
+
rules: c(C)(c(A).string())
|
521
521
|
}, null, 8, ["modelValue", "rules"]),
|
522
|
-
|
522
|
+
s(o, {
|
523
523
|
modelValue: e.value.secretKey,
|
524
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
524
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => e.value.secretKey = n),
|
525
525
|
label: "Secret Key",
|
526
|
-
rules: c(
|
526
|
+
rules: c(C)(c(A).string())
|
527
527
|
}, null, 8, ["modelValue", "rules"]),
|
528
528
|
i("div", ke, [
|
529
|
-
|
529
|
+
a.gateway ? (g(), w(y, {
|
530
530
|
key: 0,
|
531
531
|
class: "flex-1",
|
532
532
|
variant: "secondary",
|
533
533
|
label: "Delete",
|
534
|
-
onclick: () =>
|
535
|
-
}, null, 8, ["onclick"])) :
|
536
|
-
|
534
|
+
onclick: () => a.onDelete()
|
535
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
536
|
+
s(y, {
|
537
537
|
type: "submit",
|
538
538
|
class: "flex-1",
|
539
539
|
variant: "primary",
|
@@ -545,7 +545,7 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
545
545
|
}, 512);
|
546
546
|
};
|
547
547
|
}
|
548
|
-
}),
|
548
|
+
}), _e = { class: "flex mt-6 space-x-6" }, Ce = /* @__PURE__ */ V({
|
549
549
|
__name: "MacauPassGateway",
|
550
550
|
props: {
|
551
551
|
gateway: {
|
@@ -561,62 +561,62 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
561
561
|
required: !0
|
562
562
|
}
|
563
563
|
},
|
564
|
-
setup(
|
565
|
-
var
|
566
|
-
const e =
|
564
|
+
setup(a) {
|
565
|
+
var p;
|
566
|
+
const e = P(((p = a.gateway) == null ? void 0 : p.config) || {
|
567
567
|
merchantId: "",
|
568
568
|
merchantName: "",
|
569
569
|
merchantCategoryCode: "",
|
570
570
|
storeID: "",
|
571
571
|
storeName: ""
|
572
572
|
});
|
573
|
-
return (
|
574
|
-
const
|
575
|
-
return g(),
|
573
|
+
return (r, t) => {
|
574
|
+
const o = m("FmTextField"), y = m("FmButton"), u = m("FmForm");
|
575
|
+
return g(), w(u, {
|
576
576
|
ref: "form",
|
577
577
|
class: "flex flex-col gap-16",
|
578
|
-
onValidationSuccess: t[5] || (t[5] = () =>
|
578
|
+
onValidationSuccess: t[5] || (t[5] = () => a.onUpdate(e.value))
|
579
579
|
}, {
|
580
580
|
default: k(() => [
|
581
|
-
|
581
|
+
s(o, {
|
582
582
|
modelValue: e.value.merchantId,
|
583
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
583
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.merchantId = n),
|
584
584
|
label: "Merchant ID",
|
585
|
-
rules: c(
|
585
|
+
rules: c(C)(c(A).string())
|
586
586
|
}, null, 8, ["modelValue", "rules"]),
|
587
|
-
|
587
|
+
s(o, {
|
588
588
|
modelValue: e.value.merchantName,
|
589
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
589
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.merchantName = n),
|
590
590
|
label: "Merchant Name",
|
591
|
-
rules: c(
|
591
|
+
rules: c(C)(c(A).string())
|
592
592
|
}, null, 8, ["modelValue", "rules"]),
|
593
|
-
|
593
|
+
s(o, {
|
594
594
|
modelValue: e.value.merchantCategoryCode,
|
595
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
595
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => e.value.merchantCategoryCode = n),
|
596
596
|
label: "Merchant MCC",
|
597
|
-
rules: c(
|
597
|
+
rules: c(C)(c(A).string())
|
598
598
|
}, null, 8, ["modelValue", "rules"]),
|
599
|
-
|
599
|
+
s(o, {
|
600
600
|
modelValue: e.value.storeID,
|
601
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
601
|
+
"onUpdate:modelValue": t[3] || (t[3] = (n) => e.value.storeID = n),
|
602
602
|
label: "Store ID",
|
603
|
-
rules: c(
|
603
|
+
rules: c(C)(c(A).string())
|
604
604
|
}, null, 8, ["modelValue", "rules"]),
|
605
|
-
|
605
|
+
s(o, {
|
606
606
|
modelValue: e.value.storeName,
|
607
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
607
|
+
"onUpdate:modelValue": t[4] || (t[4] = (n) => e.value.storeName = n),
|
608
608
|
label: "Store Name",
|
609
|
-
rules: c(
|
609
|
+
rules: c(C)(c(A).string())
|
610
610
|
}, null, 8, ["modelValue", "rules"]),
|
611
|
-
i("div",
|
612
|
-
|
611
|
+
i("div", _e, [
|
612
|
+
a.gateway ? (g(), w(y, {
|
613
613
|
key: 0,
|
614
614
|
class: "flex-1",
|
615
615
|
variant: "secondary",
|
616
616
|
label: "Delete",
|
617
|
-
onclick: () =>
|
618
|
-
}, null, 8, ["onclick"])) :
|
619
|
-
|
617
|
+
onclick: () => a.onDelete()
|
618
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
619
|
+
s(y, {
|
620
620
|
type: "submit",
|
621
621
|
class: "flex-1",
|
622
622
|
variant: "primary",
|
@@ -628,13 +628,68 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
628
628
|
}, 512);
|
629
629
|
};
|
630
630
|
}
|
631
|
-
}), Ae = {
|
631
|
+
}), Ae = { class: "flex mt-6 space-x-6" }, he = /* @__PURE__ */ V({
|
632
|
+
__name: "DigioGateway",
|
633
|
+
props: {
|
634
|
+
gateway: {
|
635
|
+
type: Object,
|
636
|
+
required: !0
|
637
|
+
},
|
638
|
+
onUpdate: {
|
639
|
+
type: Function,
|
640
|
+
required: !0
|
641
|
+
},
|
642
|
+
onDelete: {
|
643
|
+
type: Function,
|
644
|
+
required: !0
|
645
|
+
}
|
646
|
+
},
|
647
|
+
setup(a) {
|
648
|
+
var p;
|
649
|
+
const e = P(((p = a.gateway) == null ? void 0 : p.config) || {
|
650
|
+
merchantId: ""
|
651
|
+
});
|
652
|
+
return (r, t) => {
|
653
|
+
const o = m("FmTextField"), y = m("FmButton"), u = m("FmForm");
|
654
|
+
return g(), w(u, {
|
655
|
+
ref: "form",
|
656
|
+
class: "flex flex-col gap-16",
|
657
|
+
onValidationSuccess: t[1] || (t[1] = () => a.onUpdate(e.value))
|
658
|
+
}, {
|
659
|
+
default: k(() => [
|
660
|
+
s(o, {
|
661
|
+
modelValue: e.value.merchantId,
|
662
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.merchantId = n),
|
663
|
+
label: "Merchant ID",
|
664
|
+
rules: c(C)(c(A).string())
|
665
|
+
}, null, 8, ["modelValue", "rules"]),
|
666
|
+
i("div", Ae, [
|
667
|
+
a.gateway ? (g(), w(y, {
|
668
|
+
key: 0,
|
669
|
+
class: "flex-1",
|
670
|
+
variant: "secondary",
|
671
|
+
label: "Delete",
|
672
|
+
onclick: () => a.onDelete()
|
673
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
674
|
+
s(y, {
|
675
|
+
type: "submit",
|
676
|
+
class: "flex-1",
|
677
|
+
variant: "primary",
|
678
|
+
label: "Save"
|
679
|
+
})
|
680
|
+
])
|
681
|
+
]),
|
682
|
+
_: 1
|
683
|
+
}, 512);
|
684
|
+
};
|
685
|
+
}
|
686
|
+
}), Te = {
|
632
687
|
key: 0,
|
633
688
|
className: "mt-1 my-6 text-gray-600"
|
634
|
-
},
|
689
|
+
}, Pe = {
|
635
690
|
key: 1,
|
636
691
|
class: "flex items-center justify-center min-h-[80vh]"
|
637
|
-
},
|
692
|
+
}, Se = /* @__PURE__ */ V({
|
638
693
|
__name: "PaymentGateway",
|
639
694
|
props: {
|
640
695
|
payoutAccount: {
|
@@ -642,27 +697,33 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
642
697
|
required: !0
|
643
698
|
}
|
644
699
|
},
|
645
|
-
setup(
|
646
|
-
const d = X().currentCountry, e =
|
700
|
+
setup(a) {
|
701
|
+
const d = X().currentCountry, e = Y(), { isLoading: p, startAsyncCall: r } = j(), { gatewayTab: t } = K({
|
647
702
|
gatewayTab: ""
|
648
|
-
}),
|
703
|
+
}), o = a, y = [
|
649
704
|
{
|
650
705
|
label: "Fiuu",
|
651
706
|
value: "RAZER_MERCHANT_SERVICE",
|
652
707
|
render: Ve,
|
653
|
-
region: [
|
708
|
+
region: [N.F_COUNTRY.enum.SG]
|
654
709
|
},
|
655
710
|
{
|
656
711
|
label: "Macau Pass",
|
657
712
|
value: "MACAU_PASS",
|
658
|
-
render:
|
659
|
-
region: [
|
713
|
+
render: Ce,
|
714
|
+
region: [N.F_COUNTRY.enum.MO]
|
715
|
+
},
|
716
|
+
{
|
717
|
+
label: "Digio",
|
718
|
+
value: "DIGIO",
|
719
|
+
form: he,
|
720
|
+
region: [N.F_COUNTRY.enum.TH]
|
660
721
|
}
|
661
|
-
],
|
662
|
-
async function
|
663
|
-
await
|
722
|
+
], u = P(o.payoutAccount.gateways ?? []), n = R(() => y.find((f) => f.value === t.value)), l = R(() => y.filter((f) => f.region.includes(d.value ?? N.F_COUNTRY.enum.MY)));
|
723
|
+
async function v(f) {
|
724
|
+
await r(async () => {
|
664
725
|
try {
|
665
|
-
await
|
726
|
+
await I.updateGateway(o.payoutAccount._id, f), e.open({
|
666
727
|
type: "success",
|
667
728
|
title: "Payout account gateways update succesfully"
|
668
729
|
});
|
@@ -675,50 +736,50 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
675
736
|
}
|
676
737
|
});
|
677
738
|
}
|
678
|
-
return (
|
679
|
-
var
|
680
|
-
const S =
|
681
|
-
return g(),
|
682
|
-
c(d).value === c(
|
739
|
+
return (f, b) => {
|
740
|
+
var $;
|
741
|
+
const S = m("FmCircularProgress"), D = m("FmTabs");
|
742
|
+
return g(), h(G, null, [
|
743
|
+
c(d).value === c(N.F_COUNTRY).enum.MY ? (g(), h("p", Te, b[1] || (b[1] = [
|
683
744
|
i("b", null, "Note: ", -1),
|
684
|
-
|
685
|
-
]))) :
|
686
|
-
c(
|
687
|
-
|
688
|
-
])) : (g(),
|
745
|
+
_(" There's no setup required for Malaysia Payment Gateway, once Payout Account is ready you will able to configure the payment channels. ")
|
746
|
+
]))) : T("", !0),
|
747
|
+
c(p) ? (g(), h("div", Pe, [
|
748
|
+
s(S, { size: "xxl" })
|
749
|
+
])) : (g(), w(D, {
|
689
750
|
key: 2,
|
690
751
|
"model-value": c(t),
|
691
|
-
"onUpdate:modelValue": b[0] || (b[0] = (F) =>
|
752
|
+
"onUpdate:modelValue": b[0] || (b[0] = (F) => E(t) ? t.value = F : null),
|
692
753
|
class: "mb-6",
|
693
|
-
items:
|
754
|
+
items: l.value
|
694
755
|
}, null, 8, ["model-value", "items"])),
|
695
|
-
c(t) ? (g(),
|
696
|
-
gateway:
|
697
|
-
var
|
698
|
-
return F.paymentGateway === ((
|
756
|
+
c(t) ? (g(), w(z(($ = n.value) == null ? void 0 : $.render), L(H({ key: 3 }, {
|
757
|
+
gateway: u.value.find((F) => {
|
758
|
+
var x;
|
759
|
+
return F.paymentGateway === ((x = n.value) == null ? void 0 : x.value);
|
699
760
|
}),
|
700
761
|
onDelete: async () => {
|
701
|
-
|
702
|
-
var
|
703
|
-
return F.paymentGateway !== ((
|
704
|
-
}),
|
762
|
+
u.value = u.value.filter((F) => {
|
763
|
+
var x;
|
764
|
+
return F.paymentGateway !== ((x = n.value) == null ? void 0 : x.value);
|
765
|
+
}), v(u.value);
|
705
766
|
},
|
706
767
|
onUpdate: (F) => {
|
707
|
-
var
|
708
|
-
let
|
768
|
+
var O;
|
769
|
+
let x = u.value.find((q) => {
|
709
770
|
var Z;
|
710
|
-
return
|
771
|
+
return q.paymentGateway === ((Z = n.value) == null ? void 0 : Z.value);
|
711
772
|
});
|
712
|
-
|
713
|
-
paymentGateway: (
|
773
|
+
x ? x.config = F : u.value.push({
|
774
|
+
paymentGateway: (O = n.value) == null ? void 0 : O.value,
|
714
775
|
config: F
|
715
|
-
}),
|
776
|
+
}), v(u.value);
|
716
777
|
}
|
717
|
-
})), null, 16)) :
|
778
|
+
})), null, 16)) : T("", !0)
|
718
779
|
], 64);
|
719
780
|
};
|
720
781
|
}
|
721
|
-
}),
|
782
|
+
}), Ue = { class: "flex mt-6 space-x-6" }, Ie = /* @__PURE__ */ V({
|
722
783
|
__name: "GooglePayToken",
|
723
784
|
props: {
|
724
785
|
gateway: {
|
@@ -734,8 +795,8 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
734
795
|
required: !0
|
735
796
|
}
|
736
797
|
},
|
737
|
-
setup(
|
738
|
-
const e =
|
798
|
+
setup(a) {
|
799
|
+
const e = P(a.gateway || {
|
739
800
|
// hardcoded first since only 1 PSP supported
|
740
801
|
type: "googlePay",
|
741
802
|
gateway: "RAZER_MERCHANT_SERVICE",
|
@@ -744,44 +805,44 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
744
805
|
gatewayMerchantId: "molpay"
|
745
806
|
}
|
746
807
|
});
|
747
|
-
return (
|
748
|
-
const t =
|
749
|
-
return g(),
|
808
|
+
return (p, r) => {
|
809
|
+
const t = m("FmTextField"), o = m("FmButton"), y = m("FmForm");
|
810
|
+
return g(), w(y, {
|
750
811
|
ref: "form",
|
751
812
|
class: "flex flex-col gap-16",
|
752
|
-
onValidationSuccess:
|
813
|
+
onValidationSuccess: r[3] || (r[3] = () => a.onUpdate(e.value))
|
753
814
|
}, {
|
754
815
|
default: k(() => [
|
755
|
-
|
816
|
+
s(t, {
|
756
817
|
modelValue: e.value.gateway,
|
757
|
-
"onUpdate:modelValue":
|
818
|
+
"onUpdate:modelValue": r[0] || (r[0] = (u) => e.value.gateway = u),
|
758
819
|
label: "Gateway",
|
759
820
|
disabled: !0,
|
760
|
-
rules: c(
|
821
|
+
rules: c(C)(c(A).string())
|
761
822
|
}, null, 8, ["modelValue", "rules"]),
|
762
|
-
|
823
|
+
s(t, {
|
763
824
|
modelValue: e.value.config.gateway,
|
764
|
-
"onUpdate:modelValue":
|
825
|
+
"onUpdate:modelValue": r[1] || (r[1] = (u) => e.value.config.gateway = u),
|
765
826
|
label: "Gateway ID",
|
766
827
|
disabled: !0,
|
767
|
-
rules: c(
|
828
|
+
rules: c(C)(c(A).string())
|
768
829
|
}, null, 8, ["modelValue", "rules"]),
|
769
|
-
|
830
|
+
s(t, {
|
770
831
|
modelValue: e.value.config.gateway,
|
771
|
-
"onUpdate:modelValue":
|
832
|
+
"onUpdate:modelValue": r[2] || (r[2] = (u) => e.value.config.gateway = u),
|
772
833
|
label: "Gateway Merchant ID",
|
773
834
|
disabled: !0,
|
774
|
-
rules: c(
|
835
|
+
rules: c(C)(c(A).string())
|
775
836
|
}, null, 8, ["modelValue", "rules"]),
|
776
|
-
i("div",
|
777
|
-
|
837
|
+
i("div", Ue, [
|
838
|
+
a.gateway ? (g(), w(o, {
|
778
839
|
key: 0,
|
779
840
|
class: "flex-1",
|
780
841
|
variant: "secondary",
|
781
842
|
label: "Delete",
|
782
|
-
onclick: () =>
|
783
|
-
}, null, 8, ["onclick"])) :
|
784
|
-
|
843
|
+
onclick: () => a.onDelete()
|
844
|
+
}, null, 8, ["onclick"])) : T("", !0),
|
845
|
+
s(o, {
|
785
846
|
type: "submit",
|
786
847
|
class: "flex-1",
|
787
848
|
variant: "primary",
|
@@ -793,10 +854,10 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
793
854
|
}, 512);
|
794
855
|
};
|
795
856
|
}
|
796
|
-
}),
|
857
|
+
}), Ne = {
|
797
858
|
key: 0,
|
798
859
|
class: "flex items-center justify-center min-h-[80vh]"
|
799
|
-
},
|
860
|
+
}, De = /* @__PURE__ */ V({
|
800
861
|
__name: "TokenGateway",
|
801
862
|
props: {
|
802
863
|
payoutAccount: {
|
@@ -804,22 +865,22 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
804
865
|
required: !0
|
805
866
|
}
|
806
867
|
},
|
807
|
-
setup(
|
808
|
-
const d = X().currentCountry, e =
|
868
|
+
setup(a) {
|
869
|
+
const d = X().currentCountry, e = Y(), { isLoading: p, startAsyncCall: r } = j(), { tokenTab: t } = K({
|
809
870
|
tokenTab: ""
|
810
|
-
}),
|
871
|
+
}), o = a, y = [
|
811
872
|
{
|
812
873
|
label: "Google Pay",
|
813
874
|
value: "googlePay",
|
814
875
|
icon: "android",
|
815
|
-
render:
|
816
|
-
region: [
|
876
|
+
render: Ie,
|
877
|
+
region: [N.F_COUNTRY.enum.MY, N.F_COUNTRY.enum.SG]
|
817
878
|
}
|
818
|
-
],
|
819
|
-
async function
|
820
|
-
await
|
879
|
+
], u = P(o.payoutAccount.tokens ?? []), n = R(() => y.find((f) => f.value === t.value)), l = R(() => y.filter((f) => f.region.includes(d.value ?? N.F_COUNTRY.enum.MY)));
|
880
|
+
async function v(f) {
|
881
|
+
await r(async () => {
|
821
882
|
try {
|
822
|
-
await
|
883
|
+
await I.updateTokens(o.payoutAccount._id, f), e.open({
|
823
884
|
type: "success",
|
824
885
|
title: "Payout account tokens gateway update succesfully"
|
825
886
|
});
|
@@ -832,46 +893,46 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
832
893
|
}
|
833
894
|
});
|
834
895
|
}
|
835
|
-
return (
|
836
|
-
var
|
837
|
-
const S =
|
838
|
-
return g(),
|
896
|
+
return (f, b) => {
|
897
|
+
var $;
|
898
|
+
const S = m("FmCircularProgress"), D = m("FmTabs");
|
899
|
+
return g(), h(G, null, [
|
839
900
|
b[1] || (b[1] = i("p", { className: "mt-1 my-6 text-gray-600" }, [
|
840
901
|
i("b", null, "Note: "),
|
841
|
-
|
902
|
+
_(" 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. ")
|
842
903
|
], -1)),
|
843
|
-
c(
|
844
|
-
|
845
|
-
])) : (g(),
|
904
|
+
c(p) ? (g(), h("div", Ne, [
|
905
|
+
s(S, { size: "xxl" })
|
906
|
+
])) : (g(), w(D, {
|
846
907
|
key: 1,
|
847
908
|
"model-value": c(t),
|
848
|
-
"onUpdate:modelValue": b[0] || (b[0] = (F) =>
|
909
|
+
"onUpdate:modelValue": b[0] || (b[0] = (F) => E(t) ? t.value = F : null),
|
849
910
|
class: "mb-6",
|
850
|
-
items:
|
911
|
+
items: l.value
|
851
912
|
}, null, 8, ["model-value", "items"])),
|
852
|
-
c(t) ? (g(),
|
853
|
-
gateway:
|
854
|
-
var
|
855
|
-
return F.type === ((
|
913
|
+
c(t) ? (g(), w(z(($ = n.value) == null ? void 0 : $.render), L(H({ key: 2 }, {
|
914
|
+
gateway: u.value.find((F) => {
|
915
|
+
var x;
|
916
|
+
return F.type === ((x = n.value) == null ? void 0 : x.value);
|
856
917
|
}),
|
857
918
|
onDelete: async () => {
|
858
|
-
|
859
|
-
var
|
860
|
-
return F.type !== ((
|
861
|
-
}),
|
919
|
+
u.value = u.value.filter((F) => {
|
920
|
+
var x;
|
921
|
+
return F.type !== ((x = n.value) == null ? void 0 : x.value);
|
922
|
+
}), v(u.value);
|
862
923
|
},
|
863
924
|
onUpdate: (F) => {
|
864
|
-
let
|
865
|
-
var
|
866
|
-
return
|
925
|
+
let x = u.value.find((O) => {
|
926
|
+
var q;
|
927
|
+
return O.type === ((q = n.value) == null ? void 0 : q.value);
|
867
928
|
});
|
868
|
-
|
929
|
+
x ? x.config = F : u.value.push(F), v(u.value);
|
869
930
|
}
|
870
|
-
})), null, 16)) :
|
931
|
+
})), null, 16)) : T("", !0)
|
871
932
|
], 64);
|
872
933
|
};
|
873
934
|
}
|
874
|
-
}),
|
935
|
+
}), ze = /* @__PURE__ */ V({
|
875
936
|
__name: "PayoutAccountSetting",
|
876
937
|
props: {
|
877
938
|
accountId: {
|
@@ -879,22 +940,22 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
879
940
|
required: !0
|
880
941
|
}
|
881
942
|
},
|
882
|
-
setup(
|
883
|
-
const d =
|
943
|
+
setup(a) {
|
944
|
+
const d = a, { tab: e } = K({
|
884
945
|
tab: "information"
|
885
|
-
}), { isLoading:
|
886
|
-
async function
|
887
|
-
await
|
946
|
+
}), { isLoading: p, startAsyncCall: r } = j(!0), t = te(), o = P();
|
947
|
+
async function y(v) {
|
948
|
+
await I.updateById(
|
888
949
|
d.accountId,
|
889
|
-
|
890
|
-
),
|
950
|
+
v
|
951
|
+
), o.value = await I.readById(d.accountId);
|
891
952
|
}
|
892
|
-
const
|
953
|
+
const u = [
|
893
954
|
{
|
894
955
|
label: "Information",
|
895
956
|
value: "information",
|
896
957
|
icon: "overview",
|
897
|
-
render:
|
958
|
+
render: oe
|
898
959
|
},
|
899
960
|
{
|
900
961
|
label: "Settlement",
|
@@ -912,13 +973,13 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
912
973
|
label: "Online Gateways",
|
913
974
|
icon: "assured_workload",
|
914
975
|
value: "gateways",
|
915
|
-
render:
|
976
|
+
render: Se
|
916
977
|
},
|
917
978
|
{
|
918
979
|
label: "Token Gateways",
|
919
980
|
value: "tokens",
|
920
981
|
icon: "wallet",
|
921
|
-
render:
|
982
|
+
render: De
|
922
983
|
},
|
923
984
|
{
|
924
985
|
label: "Online Channels",
|
@@ -927,35 +988,35 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
927
988
|
render: xe
|
928
989
|
}
|
929
990
|
];
|
930
|
-
function
|
931
|
-
|
932
|
-
|
991
|
+
function n() {
|
992
|
+
r(async () => {
|
993
|
+
o.value = await I.readById(d.accountId);
|
933
994
|
});
|
934
995
|
}
|
935
|
-
J(
|
936
|
-
const
|
937
|
-
const
|
938
|
-
return
|
996
|
+
J(n);
|
997
|
+
const l = R(() => {
|
998
|
+
const v = u.reduce((f, b) => f || (b.children ? b.children.find((S) => S.value === e.value) || null : b.value === e.value ? b : null), null);
|
999
|
+
return v == null ? void 0 : v.render;
|
939
1000
|
});
|
940
|
-
return (
|
1001
|
+
return (v, f) => {
|
941
1002
|
var S;
|
942
|
-
const b =
|
943
|
-
return g(),
|
944
|
-
title: `Payout Account (${(S =
|
945
|
-
loading: c(
|
1003
|
+
const b = m("FmTabs");
|
1004
|
+
return g(), w(ee, {
|
1005
|
+
title: `Payout Account (${(S = o.value) == null ? void 0 : S._id})`,
|
1006
|
+
loading: c(p),
|
946
1007
|
onBack: c(t).back
|
947
1008
|
}, {
|
948
1009
|
default: k(() => [
|
949
|
-
|
1010
|
+
s(b, {
|
950
1011
|
"model-value": c(e),
|
951
|
-
"onUpdate:modelValue":
|
1012
|
+
"onUpdate:modelValue": f[0] || (f[0] = (D) => E(e) ? e.value = D : null),
|
952
1013
|
class: "mb-6",
|
953
|
-
items:
|
1014
|
+
items: u
|
954
1015
|
}, null, 8, ["model-value"]),
|
955
|
-
c(e) ? (g(),
|
956
|
-
payoutAccount:
|
957
|
-
onUpdate:
|
958
|
-
})), null, 16)) :
|
1016
|
+
c(e) ? (g(), w(z(l.value), L(H({ key: 0 }, {
|
1017
|
+
payoutAccount: o.value,
|
1018
|
+
onUpdate: y
|
1019
|
+
})), null, 16)) : T("", !0)
|
959
1020
|
]),
|
960
1021
|
_: 1
|
961
1022
|
}, 8, ["title", "loading", "onBack"]);
|
@@ -963,5 +1024,5 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
|
963
1024
|
}
|
964
1025
|
});
|
965
1026
|
export {
|
966
|
-
|
1027
|
+
ze as default
|
967
1028
|
};
|