@feedmepos/mf-payment 1.2.23 → 1.2.26
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-CH8We8lQ.js → PayoutAccount-C4zN4xMw.js} +10 -11
- package/dist/{PayoutAccount-DpD668YX.js → PayoutAccount-DoUb4juo.js} +41 -42
- package/dist/{PayoutAccountSetting-4rChUUC2.js → PayoutAccountSetting-IgBRFN0A.js} +305 -298
- package/dist/{Restaurant-BdX8Zvgf.js → Restaurant-CIGhOFvk.js} +4 -4
- package/dist/{RestaurantSetting-GwZG2qIM.js → RestaurantSetting-0CbusLcz.js} +3 -3
- package/dist/{Settlement-BxgrIFl0.js → Settlement-CUmpNHMN.js} +3 -3
- package/dist/{Settlement-C1Cnjbfa.js → Settlement-DmG5-VSP.js} +3 -3
- package/dist/{SettlementTransactions-DJSO-CHK.js → SettlementTransactions-CcMUINyi.js} +3 -3
- package/dist/{SettlementTransactions-BCXpOllL.js → SettlementTransactions-DhjGSAg4.js} +3 -3
- package/dist/{Terminal-DgtrqIDu.js → Terminal-CRizNZ4p.js} +5 -5
- package/dist/{TerminalSetting-BDfDUo4z.js → TerminalSetting-DdJl_9JJ.js} +3 -3
- package/dist/{Transaction-CRhYNPh0.js → Transaction-E9_hSpx4.js} +27 -28
- package/dist/{Transaction-DudH8wYy.js → Transaction-ykrWGKIa.js} +5 -5
- package/dist/{TransactionOld-RjXR9GsJ.js → TransactionOld-lPUiTl8n.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-8unyvpBs.js → TransactionTable.vue_vue_type_script_setup_true_lang-B03g8Jum.js} +3 -3
- package/dist/api/payout/index.d.ts +1 -1
- package/dist/api/transaction/index.d.ts +1 -1
- package/dist/{app-DE_s3s24.js → app-CU7mklRE.js} +18 -18
- package/dist/app.js +1 -1
- package/dist/{assets-B3_vL33P.js → assets-Dttfej_E.js} +20 -20
- package/dist/{grafana-gGem10RX.js → grafana-DCGA3gMb.js} +1 -1
- package/dist/helpers/assets.d.ts +1 -1
- package/dist/{index-Bu7KNcy0.js → index-BOwfUR6x.js} +1 -1
- package/dist/{index-BO20Q-JI.js → index-BQtW6X1l.js} +1 -1
- package/dist/{index-C46w44Pn.js → index-BYLzp2JB.js} +1 -1
- package/dist/{index-B-qY0UqE.js → index-CZKvrBM7.js} +1 -1
- package/dist/{index-C5KhoncH.js → index-JCMXdVSJ.js} +3 -4
- package/dist/{index-DuTkLd3Q.js → index-tCobqIDD.js} +1730 -1728
- package/dist/{index.vue_vue_type_script_setup_true_lang-DlPKXE4R.js → index.vue_vue_type_script_setup_true_lang-HBMZ5z3-.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-Cm8EH3zV.js → payout-account-CdudVI6I.js} +4 -5
- package/dist/stores/payoutAccount.d.ts +22 -20
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +22 -20
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +26 -24
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +26 -24
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +22 -20
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +22 -20
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +26 -24
- package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -0
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +8 -8
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +6 -6
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +6 -6
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +6 -6
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +6 -6
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +6 -6
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +6 -6
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +6 -6
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +44 -40
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +24 -24
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +12 -12
- package/dist/views/settlement/SettlementTable.vue.d.ts +8 -8
- package/package.json +2 -2
- package/dist/index-uquYA8M1.js +0 -162
@@ -1,15 +1,15 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { p as I } from "./index-
|
3
|
-
import { u as j, e as N } from "./index-
|
1
|
+
import { defineComponent as k, resolveComponent as d, openBlock as g, createElementBlock as h, Fragment as $, createElementVNode as i, createVNode as u, withCtx as V, createTextVNode as A, toDisplayString as U, createCommentVNode as T, createBlock as w, ref as P, watch as W, computed as G, unref as c, isRef as E, h as R, onMounted as J, resolveDynamicComponent as z, normalizeProps as L, mergeProps as H } from "vue";
|
2
|
+
import { p as I } from "./index-JCMXdVSJ.js";
|
3
|
+
import { u as j, e as N } from "./index-tCobqIDD.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-BOwfUR6x.js";
|
7
7
|
import { P as Q } from "./PDFViewer-xrBtzrlR.js";
|
8
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 _, a as C } from "./validator-D5jtpt9A.js";
|
11
11
|
import { useCoreStore as X } from "@feedmepos/mf-common";
|
12
|
-
const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */
|
12
|
+
const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ k({
|
13
13
|
__name: "Information",
|
14
14
|
props: {
|
15
15
|
payoutAccount: {
|
@@ -17,36 +17,36 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
17
17
|
required: !0
|
18
18
|
}
|
19
19
|
},
|
20
|
-
setup(
|
21
|
-
return (
|
22
|
-
const p =
|
23
|
-
return g(), h(
|
20
|
+
setup(n) {
|
21
|
+
return (m, e) => {
|
22
|
+
const p = d("FmCardHeader"), s = d("FmCardSection"), t = d("FmCard");
|
23
|
+
return g(), h($, null, [
|
24
24
|
i("div", ne, [
|
25
|
-
|
25
|
+
u(t, {
|
26
26
|
horizontal: "",
|
27
27
|
class: "flex-1 p-6",
|
28
28
|
variant: "elevated"
|
29
29
|
}, {
|
30
|
-
default:
|
31
|
-
s
|
32
|
-
default:
|
33
|
-
|
30
|
+
default: V(() => [
|
31
|
+
u(s, { class: "flex flex-col gap-16 justify-between" }, {
|
32
|
+
default: V(() => [
|
33
|
+
u(p, {
|
34
34
|
class: "p-0",
|
35
35
|
title: "Account Info",
|
36
36
|
subtitle: ""
|
37
37
|
}),
|
38
|
-
s
|
39
|
-
default:
|
40
|
-
var o, y,
|
38
|
+
u(s, { class: "p-0" }, {
|
39
|
+
default: V(() => {
|
40
|
+
var o, y, r, a, l;
|
41
41
|
return [
|
42
42
|
e[0] || (e[0] = i("b", null, "For", -1)),
|
43
|
-
|
43
|
+
A(": " + U((y = (o = n.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
|
+
A(": " + U((a = (r = n.payoutAccount) == null ? void 0 : r.store) == null ? void 0 : a.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
|
+
A(": " + U((l = n.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" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
58
58
|
]),
|
59
59
|
_: 1
|
60
60
|
}),
|
61
|
-
|
61
|
+
u(t, {
|
62
62
|
horizontal: "",
|
63
63
|
class: "flex-1 p-6",
|
64
64
|
variant: "elevated"
|
65
65
|
}, {
|
66
|
-
default:
|
67
|
-
s
|
68
|
-
default:
|
69
|
-
|
66
|
+
default: V(() => [
|
67
|
+
u(s, { class: "flex flex-col gap-16 justify-between" }, {
|
68
|
+
default: V(() => [
|
69
|
+
u(p, {
|
70
70
|
class: "p-0",
|
71
71
|
title: "Key Person",
|
72
72
|
subtitle: ""
|
73
73
|
}),
|
74
|
-
s
|
75
|
-
default:
|
76
|
-
var o, y,
|
74
|
+
u(s, { class: "p-0" }, {
|
75
|
+
default: V(() => {
|
76
|
+
var o, y, r, a, l, f, v, b;
|
77
77
|
return [
|
78
78
|
e[6] || (e[6] = i("b", null, "Email", -1)),
|
79
|
-
|
79
|
+
A(": " + U((r = (y = (o = n.payoutAccount) == null ? void 0 : o.store) == null ? void 0 : y.keyPerson) == null ? void 0 : r.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
|
+
A(": " + U((f = (l = (a = n.payoutAccount) == null ? void 0 : a.store) == null ? void 0 : l.keyPerson) == null ? void 0 : f.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
|
+
A(": " + U((b = (v = n.payoutAccount) == null ? void 0 : v.store.keyPerson) == null ? void 0 : b.phone), 1),
|
86
86
|
e[11] || (e[11] = i("br", null, null, -1))
|
87
87
|
];
|
88
88
|
}),
|
@@ -96,14 +96,14 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__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
|
+
n.payoutAccount.store.exteriorPhoto ? (g(), h("img", {
|
100
100
|
key: 0,
|
101
|
-
src:
|
101
|
+
src: n.payoutAccount.store.exteriorPhoto
|
102
102
|
}, null, 8, le)) : T("", !0)
|
103
103
|
], 64);
|
104
104
|
};
|
105
105
|
}
|
106
|
-
}), ue = { class: "flex gap-16" },
|
106
|
+
}), ue = { class: "flex gap-16" }, re = { class: "flex-1" }, se = { class: "flex-1" }, ce = /* @__PURE__ */ k({
|
107
107
|
__name: "Settlement",
|
108
108
|
props: {
|
109
109
|
payoutAccount: {
|
@@ -111,35 +111,35 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
111
111
|
required: !0
|
112
112
|
}
|
113
113
|
},
|
114
|
-
setup(
|
115
|
-
return (
|
116
|
-
const p =
|
117
|
-
return g(), h(
|
118
|
-
|
114
|
+
setup(n) {
|
115
|
+
return (m, e) => {
|
116
|
+
const p = d("FmCardHeader"), s = d("FmCardSection"), t = d("FmCard");
|
117
|
+
return g(), h($, null, [
|
118
|
+
u(t, {
|
119
119
|
horizontal: "",
|
120
120
|
class: "flex-1 p-6 mx-6 mb-6",
|
121
121
|
variant: "elevated"
|
122
122
|
}, {
|
123
|
-
default:
|
124
|
-
s
|
125
|
-
default:
|
126
|
-
|
123
|
+
default: V(() => [
|
124
|
+
u(s, { class: "flex flex-col gap-16 justify-between" }, {
|
125
|
+
default: V(() => [
|
126
|
+
u(p, {
|
127
127
|
class: "p-0",
|
128
128
|
title: "Bank Info",
|
129
129
|
subtitle: ""
|
130
130
|
}),
|
131
|
-
s
|
132
|
-
default:
|
133
|
-
var o, y,
|
131
|
+
u(s, { class: "p-0" }, {
|
132
|
+
default: V(() => {
|
133
|
+
var o, y, r, a, l, f;
|
134
134
|
return [
|
135
135
|
e[0] || (e[0] = i("b", null, "Bank", -1)),
|
136
|
-
|
136
|
+
A(": " + U((y = (o = n.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
|
+
A(": " + U((a = (r = n.payoutAccount) == null ? void 0 : r.store.bank) == null ? void 0 : a.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
|
+
A(": " + U((f = (l = n.payoutAccount) == null ? void 0 : l.store.bank) == null ? void 0 : f.accountNumber), 1)
|
143
143
|
];
|
144
144
|
}),
|
145
145
|
_: 1
|
@@ -151,20 +151,20 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
151
151
|
_: 1
|
152
152
|
}),
|
153
153
|
i("div", ue, [
|
154
|
-
i("div",
|
154
|
+
i("div", re, [
|
155
155
|
e[5] || (e[5] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
|
156
|
-
|
156
|
+
n.payoutAccount.store.ssm ? (g(), w(Q, {
|
157
157
|
key: 0,
|
158
|
-
pdf:
|
158
|
+
pdf: n.payoutAccount.store.ssm,
|
159
159
|
"disable-text-layer": !0,
|
160
160
|
"disable-annotation-layer": !0
|
161
161
|
}, null, 8, ["pdf"])) : T("", !0)
|
162
162
|
]),
|
163
|
-
i("div",
|
163
|
+
i("div", se, [
|
164
164
|
e[6] || (e[6] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
|
165
|
-
|
165
|
+
n.payoutAccount.store.bankStatement ? (g(), w(Q, {
|
166
166
|
key: 0,
|
167
|
-
pdf:
|
167
|
+
pdf: n.payoutAccount.store.bankStatement,
|
168
168
|
"disable-text-layer": !0,
|
169
169
|
"disable-annotation-layer": !0
|
170
170
|
}, null, 8, ["pdf"])) : T("", !0)
|
@@ -173,50 +173,50 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
173
173
|
], 64);
|
174
174
|
};
|
175
175
|
}
|
176
|
-
}), ie = /* @__PURE__ */
|
176
|
+
}), ie = /* @__PURE__ */ k({
|
177
177
|
__name: "RateInput",
|
178
178
|
props: {
|
179
179
|
data: {},
|
180
180
|
onChange: { type: Function }
|
181
181
|
},
|
182
|
-
setup(
|
183
|
-
const
|
182
|
+
setup(n) {
|
183
|
+
const m = n, e = P(m.data.toString());
|
184
184
|
return W(e, (p) => {
|
185
|
-
|
186
|
-
}), (p,
|
187
|
-
const t =
|
185
|
+
m.onChange(parseFloat(p));
|
186
|
+
}), (p, s) => {
|
187
|
+
const t = d("FmTextField");
|
188
188
|
return g(), w(t, {
|
189
189
|
inputmode: "decimal",
|
190
190
|
modelValue: e.value,
|
191
|
-
"onUpdate:modelValue":
|
191
|
+
"onUpdate:modelValue": s[0] || (s[0] = (o) => e.value = o)
|
192
192
|
}, {
|
193
|
-
append:
|
194
|
-
|
193
|
+
append: V(() => s[1] || (s[1] = [
|
194
|
+
A("%")
|
195
195
|
])),
|
196
196
|
_: 1
|
197
197
|
}, 8, ["modelValue"]);
|
198
198
|
};
|
199
199
|
}
|
200
|
-
}),
|
200
|
+
}), de = /* @__PURE__ */ k({
|
201
201
|
__name: "TPlusInput",
|
202
202
|
props: {
|
203
203
|
data: {},
|
204
204
|
onChange: { type: Function }
|
205
205
|
},
|
206
|
-
setup(
|
207
|
-
const
|
206
|
+
setup(n) {
|
207
|
+
const m = n, e = P(m.data.toString());
|
208
208
|
return W(e, (p) => {
|
209
|
-
|
210
|
-
}), (p,
|
211
|
-
const t =
|
209
|
+
m.onChange(parseInt(p));
|
210
|
+
}), (p, s) => {
|
211
|
+
const t = d("FmTextField");
|
212
212
|
return g(), w(t, {
|
213
213
|
inputmode: "numeric",
|
214
214
|
modelValue: e.value,
|
215
|
-
"onUpdate:modelValue":
|
215
|
+
"onUpdate:modelValue": s[0] || (s[0] = (o) => e.value = o)
|
216
216
|
}, null, 8, ["modelValue"]);
|
217
217
|
};
|
218
218
|
}
|
219
|
-
}),
|
219
|
+
}), me = { class: "flex gap-16 mt-6" }, pe = { class: "flex-1" }, ye = { class: "flex-1" }, ve = { class: "my-6 w-full flex justify-end" }, fe = { class: "w-[320px]" }, ge = /* @__PURE__ */ k({
|
220
220
|
__name: "PaymentStatus",
|
221
221
|
props: {
|
222
222
|
onUpdate: {
|
@@ -228,10 +228,10 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
228
228
|
required: !0
|
229
229
|
}
|
230
230
|
},
|
231
|
-
setup(
|
232
|
-
const
|
231
|
+
setup(n) {
|
232
|
+
const m = n, e = P(!1), p = Y(), s = async (a) => {
|
233
233
|
try {
|
234
|
-
e.value = !0, await
|
234
|
+
e.value = !0, await m.onUpdate(a), p.open({
|
235
235
|
type: "success",
|
236
236
|
title: "Payout account update succesfully"
|
237
237
|
});
|
@@ -246,28 +246,28 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
246
246
|
}
|
247
247
|
}, { search: t } = K({
|
248
248
|
search: ""
|
249
|
-
}), o =
|
250
|
-
const { ssm:
|
251
|
-
return
|
252
|
-
}), y = P(""),
|
249
|
+
}), o = G(() => {
|
250
|
+
const { ssm: a, bank: l, bankStatement: f } = m.payoutAccount.store;
|
251
|
+
return a && l && l.name && l.accountNumber && l.holderName && f;
|
252
|
+
}), y = P(""), r = [
|
253
253
|
{
|
254
254
|
header: () => "Payment Method",
|
255
255
|
accessorKey: "issuer",
|
256
|
-
cell: (
|
256
|
+
cell: (a) => `${a.row.original.issuer} (${a.row.original.variant})`
|
257
257
|
},
|
258
258
|
{
|
259
259
|
header: () => "Rate",
|
260
260
|
accessorKey: "rate",
|
261
|
-
cell: ({ row:
|
261
|
+
cell: ({ row: a }) => {
|
262
262
|
let l = 0;
|
263
|
-
return
|
263
|
+
return a.original.rate && (l = a.original.rate.amount / Math.pow(10, a.original.rate.precision)), R(ie, {
|
264
264
|
data: l,
|
265
|
-
onChange: (
|
266
|
-
const
|
267
|
-
|
265
|
+
onChange: (f) => {
|
266
|
+
const v = m.payoutAccount.methods.at(a.index);
|
267
|
+
v.rate || (v.rate = {
|
268
268
|
amount: 0,
|
269
269
|
precision: 4
|
270
|
-
}),
|
270
|
+
}), v.rate.amount = f * Math.pow(10, v.rate.precision);
|
271
271
|
}
|
272
272
|
});
|
273
273
|
}
|
@@ -275,35 +275,35 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
275
275
|
{
|
276
276
|
header: () => "T plus",
|
277
277
|
accessorKey: "tPlus",
|
278
|
-
cell: ({ row:
|
279
|
-
data:
|
278
|
+
cell: ({ row: a }) => R(de, {
|
279
|
+
data: a.original.tPlus ?? 0,
|
280
280
|
onChange: (l) => {
|
281
|
-
const
|
282
|
-
|
281
|
+
const f = m.payoutAccount.methods.at(a.index);
|
282
|
+
f.tPlus = l;
|
283
283
|
}
|
284
284
|
})
|
285
285
|
}
|
286
286
|
];
|
287
|
-
return (
|
288
|
-
const
|
289
|
-
return g(), h(
|
290
|
-
i("div",
|
287
|
+
return (a, l) => {
|
288
|
+
const f = d("FmRadio"), v = d("FmRadioGroup"), b = d("FmSwitch"), S = d("FmSearch"), D = d("FmTable"), M = d("FmButton");
|
289
|
+
return g(), h($, null, [
|
290
|
+
i("div", me, [
|
291
291
|
i("div", pe, [
|
292
|
-
|
293
|
-
modelValue:
|
294
|
-
"onUpdate:modelValue": l[0] || (l[0] = (F) =>
|
292
|
+
u(v, {
|
293
|
+
modelValue: n.payoutAccount.status,
|
294
|
+
"onUpdate:modelValue": l[0] || (l[0] = (F) => n.payoutAccount.status = F),
|
295
295
|
label: "Account Status"
|
296
296
|
}, {
|
297
|
-
default:
|
298
|
-
|
297
|
+
default: V(() => [
|
298
|
+
u(f, {
|
299
299
|
value: "NEW",
|
300
300
|
label: "New"
|
301
301
|
}),
|
302
|
-
|
302
|
+
u(f, {
|
303
303
|
value: "PENDING",
|
304
304
|
label: "Pending"
|
305
305
|
}),
|
306
|
-
|
306
|
+
u(f, {
|
307
307
|
value: "APPROVED",
|
308
308
|
label: "Approved"
|
309
309
|
})
|
@@ -312,64 +312,64 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
312
312
|
}, 8, ["modelValue"])
|
313
313
|
]),
|
314
314
|
i("div", ye, [
|
315
|
-
|
316
|
-
modelValue:
|
317
|
-
"onUpdate:modelValue": l[1] || (l[1] = (F) =>
|
315
|
+
u(b, {
|
316
|
+
modelValue: n.payoutAccount.enable,
|
317
|
+
"onUpdate:modelValue": l[1] || (l[1] = (F) => n.payoutAccount.enable = F),
|
318
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
|
+
n.payoutAccount.enable ? (g(), h($, { key: 0 }, [
|
325
|
+
i("div", ve, [
|
326
|
+
i("div", fe, [
|
327
|
+
u(S, {
|
328
328
|
modelValue: c(t),
|
329
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
|
+
u(D, {
|
335
335
|
class: "mt-6",
|
336
336
|
modelValue: y.value,
|
337
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": n.payoutAccount.methods,
|
341
|
+
"column-defs": r
|
342
342
|
}, null, 8, ["modelValue", "search-value", "row-data"])
|
343
343
|
], 64)) : T("", !0),
|
344
|
-
|
344
|
+
u(M, {
|
345
345
|
class: "w-full mt-6",
|
346
346
|
variant: "primary",
|
347
347
|
label: "Save",
|
348
348
|
loading: e.value,
|
349
|
-
onclick: () =>
|
349
|
+
onclick: () => s(n.payoutAccount)
|
350
350
|
}, null, 8, ["loading", "onclick"])
|
351
351
|
], 64);
|
352
352
|
};
|
353
353
|
}
|
354
|
-
}), be = { class: "flex" }, Fe = /* @__PURE__ */
|
354
|
+
}), be = { class: "flex" }, Fe = /* @__PURE__ */ k({
|
355
355
|
__name: "Actions",
|
356
356
|
emits: ["edit", "delete"],
|
357
|
-
setup(
|
358
|
-
const e =
|
359
|
-
return (p,
|
360
|
-
const t =
|
357
|
+
setup(n, { emit: m }) {
|
358
|
+
const e = m;
|
359
|
+
return (p, s) => {
|
360
|
+
const t = d("FmButton");
|
361
361
|
return g(), h("div", be, [
|
362
|
-
|
362
|
+
u(t, {
|
363
363
|
variant: "plain",
|
364
364
|
"prepend-icon": "delete",
|
365
|
-
onClick:
|
365
|
+
onClick: s[0] || (s[0] = (o) => {
|
366
366
|
o.stopPropagation(), e("delete");
|
367
367
|
})
|
368
368
|
})
|
369
369
|
]);
|
370
370
|
};
|
371
371
|
}
|
372
|
-
}), we = { class: "flex justify-end px-6 pb-6" }, xe = /* @__PURE__ */
|
372
|
+
}), we = { class: "flex justify-end px-6 pb-6" }, xe = /* @__PURE__ */ k({
|
373
373
|
__name: "PaymentChannel",
|
374
374
|
props: {
|
375
375
|
payoutAccount: {
|
@@ -377,23 +377,23 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
377
377
|
required: !0
|
378
378
|
}
|
379
379
|
},
|
380
|
-
setup(
|
381
|
-
const
|
380
|
+
setup(n) {
|
381
|
+
const m = Y(), e = n, { isLoading: p, startAsyncCall: s } = j(), t = P([]);
|
382
382
|
function o() {
|
383
|
-
|
383
|
+
s(async () => {
|
384
384
|
t.value = await I.getChannels(e.payoutAccount._id);
|
385
385
|
});
|
386
386
|
}
|
387
387
|
J(o);
|
388
388
|
function y() {
|
389
|
-
|
389
|
+
s(async () => {
|
390
390
|
try {
|
391
|
-
await I.updateChannels(e.payoutAccount._id, t.value),
|
391
|
+
await I.updateChannels(e.payoutAccount._id, t.value), m.open({
|
392
392
|
type: "success",
|
393
393
|
title: "Payout account channels update succesfully"
|
394
394
|
});
|
395
395
|
} catch (l) {
|
396
|
-
|
396
|
+
m.open({
|
397
397
|
type: "error",
|
398
398
|
title: "Error occurs when updating payout account channels",
|
399
399
|
message: B(l)
|
@@ -401,15 +401,15 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
401
401
|
}
|
402
402
|
});
|
403
403
|
}
|
404
|
-
function
|
405
|
-
|
404
|
+
function r() {
|
405
|
+
s(async () => {
|
406
406
|
try {
|
407
|
-
await I.resetChannels(e.payoutAccount._id), t.value = await I.getChannels(e.payoutAccount._id),
|
407
|
+
await I.resetChannels(e.payoutAccount._id), t.value = await I.getChannels(e.payoutAccount._id), m.open({
|
408
408
|
type: "success",
|
409
409
|
title: "Payout account channels reset succesfully"
|
410
410
|
});
|
411
411
|
} catch (l) {
|
412
|
-
|
412
|
+
m.open({
|
413
413
|
type: "error",
|
414
414
|
title: "Error occurs when reset payout account channels",
|
415
415
|
message: B(l)
|
@@ -417,7 +417,7 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
417
417
|
}
|
418
418
|
});
|
419
419
|
}
|
420
|
-
const
|
420
|
+
const a = [
|
421
421
|
{
|
422
422
|
header: () => "Gateway",
|
423
423
|
accessorKey: "gateway"
|
@@ -429,37 +429,37 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
429
429
|
{
|
430
430
|
header: () => "Display",
|
431
431
|
accessorKey: "icon",
|
432
|
-
cell: ({ row: l }) =>
|
432
|
+
cell: ({ row: l }) => R("img", { src: l.original.icon, width: 32, height: 32 })
|
433
433
|
},
|
434
434
|
{
|
435
435
|
header: () => "Label",
|
436
436
|
accessorKey: "label",
|
437
|
-
cell: ({ row: l }) =>
|
437
|
+
cell: ({ row: l }) => R(ae.FmTextField, {
|
438
438
|
modelValue: l.original.label,
|
439
|
-
"onUpdate:modelValue": (
|
439
|
+
"onUpdate:modelValue": (f) => l.original.label = f
|
440
440
|
})
|
441
441
|
},
|
442
442
|
{
|
443
443
|
id: "actions",
|
444
444
|
header: () => "Actions",
|
445
|
-
cell: ({ row: l }) =>
|
445
|
+
cell: ({ row: l }) => R(Fe, {
|
446
446
|
onDelete: () => t.value.splice(l.index, 1)
|
447
447
|
})
|
448
448
|
}
|
449
449
|
];
|
450
|
-
return (l,
|
451
|
-
const
|
452
|
-
return g(), h(
|
450
|
+
return (l, f) => {
|
451
|
+
const v = d("FmButton"), b = d("FmTable");
|
452
|
+
return g(), h($, null, [
|
453
453
|
i("div", we, [
|
454
|
-
|
454
|
+
u(v, {
|
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: r
|
461
461
|
}),
|
462
|
-
|
462
|
+
u(v, {
|
463
463
|
variant: "primary",
|
464
464
|
size: "md",
|
465
465
|
icon: "save",
|
@@ -467,16 +467,16 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
467
467
|
onClick: y
|
468
468
|
})
|
469
469
|
]),
|
470
|
-
|
470
|
+
u(b, {
|
471
471
|
loading: c(p),
|
472
472
|
"row-data": t.value,
|
473
|
-
"column-defs":
|
473
|
+
"column-defs": a,
|
474
474
|
"shrink-at": !1
|
475
475
|
}, null, 8, ["loading", "row-data"])
|
476
476
|
], 64);
|
477
477
|
};
|
478
478
|
}
|
479
|
-
}),
|
479
|
+
}), Ve = { class: "flex mt-6 space-x-6" }, ke = /* @__PURE__ */ k({
|
480
480
|
__name: "FiuuGateway",
|
481
481
|
props: {
|
482
482
|
gateway: {
|
@@ -492,48 +492,48 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
492
492
|
required: !0
|
493
493
|
}
|
494
494
|
},
|
495
|
-
setup(
|
495
|
+
setup(n) {
|
496
496
|
var p;
|
497
|
-
const e = P(((p =
|
497
|
+
const e = P(((p = n.gateway) == null ? void 0 : p.config) || {
|
498
498
|
merchantId: "",
|
499
499
|
verifyKey: "",
|
500
500
|
secretKey: ""
|
501
501
|
});
|
502
|
-
return (
|
503
|
-
const o =
|
504
|
-
return g(), w(
|
502
|
+
return (s, t) => {
|
503
|
+
const o = d("FmTextField"), y = d("FmButton"), r = d("FmForm");
|
504
|
+
return g(), w(r, {
|
505
505
|
ref: "form",
|
506
506
|
class: "flex flex-col gap-16",
|
507
|
-
onValidationSuccess: t[3] || (t[3] = () =>
|
507
|
+
onValidationSuccess: t[3] || (t[3] = () => n.onUpdate(e.value))
|
508
508
|
}, {
|
509
|
-
default:
|
510
|
-
|
509
|
+
default: V(() => [
|
510
|
+
u(o, {
|
511
511
|
modelValue: e.value.merchantId,
|
512
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
512
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.value.merchantId = a),
|
513
513
|
label: "Merchant ID",
|
514
|
-
rules: c(
|
514
|
+
rules: c(_)(c(C).string())
|
515
515
|
}, null, 8, ["modelValue", "rules"]),
|
516
|
-
|
516
|
+
u(o, {
|
517
517
|
modelValue: e.value.verifyKey,
|
518
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
518
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value.verifyKey = a),
|
519
519
|
label: "Verify Key",
|
520
|
-
rules: c(
|
520
|
+
rules: c(_)(c(C).string())
|
521
521
|
}, null, 8, ["modelValue", "rules"]),
|
522
|
-
|
522
|
+
u(o, {
|
523
523
|
modelValue: e.value.secretKey,
|
524
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
524
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => e.value.secretKey = a),
|
525
525
|
label: "Secret Key",
|
526
|
-
rules: c(
|
526
|
+
rules: c(_)(c(C).string())
|
527
527
|
}, null, 8, ["modelValue", "rules"]),
|
528
|
-
i("div",
|
529
|
-
|
528
|
+
i("div", Ve, [
|
529
|
+
n.gateway ? (g(), w(y, {
|
530
530
|
key: 0,
|
531
531
|
class: "flex-1",
|
532
532
|
variant: "secondary",
|
533
533
|
label: "Delete",
|
534
|
-
onclick: () =>
|
534
|
+
onclick: () => n.onDelete()
|
535
535
|
}, null, 8, ["onclick"])) : T("", !0),
|
536
|
-
|
536
|
+
u(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" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
545
545
|
}, 512);
|
546
546
|
};
|
547
547
|
}
|
548
|
-
}), _e = { class: "flex mt-6 space-x-6" }, Ce = /* @__PURE__ */
|
548
|
+
}), _e = { class: "flex mt-6 space-x-6" }, Ce = /* @__PURE__ */ k({
|
549
549
|
__name: "MacauPassGateway",
|
550
550
|
props: {
|
551
551
|
gateway: {
|
@@ -561,62 +561,62 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
561
561
|
required: !0
|
562
562
|
}
|
563
563
|
},
|
564
|
-
setup(
|
564
|
+
setup(n) {
|
565
565
|
var p;
|
566
|
-
const e = P(((p =
|
566
|
+
const e = P(((p = n.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 o =
|
575
|
-
return g(), w(
|
573
|
+
return (s, t) => {
|
574
|
+
const o = d("FmTextField"), y = d("FmButton"), r = d("FmForm");
|
575
|
+
return g(), w(r, {
|
576
576
|
ref: "form",
|
577
577
|
class: "flex flex-col gap-16",
|
578
|
-
onValidationSuccess: t[5] || (t[5] = () =>
|
578
|
+
onValidationSuccess: t[5] || (t[5] = () => n.onUpdate(e.value))
|
579
579
|
}, {
|
580
|
-
default:
|
581
|
-
|
580
|
+
default: V(() => [
|
581
|
+
u(o, {
|
582
582
|
modelValue: e.value.merchantId,
|
583
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
583
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.value.merchantId = a),
|
584
584
|
label: "Merchant ID",
|
585
|
-
rules: c(
|
585
|
+
rules: c(_)(c(C).string())
|
586
586
|
}, null, 8, ["modelValue", "rules"]),
|
587
|
-
|
587
|
+
u(o, {
|
588
588
|
modelValue: e.value.merchantName,
|
589
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
589
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value.merchantName = a),
|
590
590
|
label: "Merchant Name",
|
591
|
-
rules: c(
|
591
|
+
rules: c(_)(c(C).string())
|
592
592
|
}, null, 8, ["modelValue", "rules"]),
|
593
|
-
|
593
|
+
u(o, {
|
594
594
|
modelValue: e.value.merchantCategoryCode,
|
595
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
595
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => e.value.merchantCategoryCode = a),
|
596
596
|
label: "Merchant MCC",
|
597
|
-
rules: c(
|
597
|
+
rules: c(_)(c(C).string())
|
598
598
|
}, null, 8, ["modelValue", "rules"]),
|
599
|
-
|
599
|
+
u(o, {
|
600
600
|
modelValue: e.value.storeID,
|
601
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
601
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => e.value.storeID = a),
|
602
602
|
label: "Store ID",
|
603
|
-
rules: c(
|
603
|
+
rules: c(_)(c(C).string())
|
604
604
|
}, null, 8, ["modelValue", "rules"]),
|
605
|
-
|
605
|
+
u(o, {
|
606
606
|
modelValue: e.value.storeName,
|
607
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
607
|
+
"onUpdate:modelValue": t[4] || (t[4] = (a) => e.value.storeName = a),
|
608
608
|
label: "Store Name",
|
609
|
-
rules: c(
|
609
|
+
rules: c(_)(c(C).string())
|
610
610
|
}, null, 8, ["modelValue", "rules"]),
|
611
611
|
i("div", _e, [
|
612
|
-
|
612
|
+
n.gateway ? (g(), w(y, {
|
613
613
|
key: 0,
|
614
614
|
class: "flex-1",
|
615
615
|
variant: "secondary",
|
616
616
|
label: "Delete",
|
617
|
-
onclick: () =>
|
617
|
+
onclick: () => n.onDelete()
|
618
618
|
}, null, 8, ["onclick"])) : T("", !0),
|
619
|
-
|
619
|
+
u(y, {
|
620
620
|
type: "submit",
|
621
621
|
class: "flex-1",
|
622
622
|
variant: "primary",
|
@@ -628,7 +628,7 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
628
628
|
}, 512);
|
629
629
|
};
|
630
630
|
}
|
631
|
-
}), Ae = { class: "flex mt-6 space-x-6" }, he = /* @__PURE__ */
|
631
|
+
}), Ae = { class: "flex mt-6 space-x-6" }, he = /* @__PURE__ */ k({
|
632
632
|
__name: "DigioGateway",
|
633
633
|
props: {
|
634
634
|
gateway: {
|
@@ -644,34 +644,41 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
644
644
|
required: !0
|
645
645
|
}
|
646
646
|
},
|
647
|
-
setup(
|
647
|
+
setup(n) {
|
648
648
|
var p;
|
649
|
-
const e = P(((p =
|
650
|
-
merchantId: ""
|
649
|
+
const e = P(((p = n.gateway) == null ? void 0 : p.config) || {
|
650
|
+
merchantId: "",
|
651
|
+
cardMerchantId: ""
|
651
652
|
});
|
652
|
-
return (
|
653
|
-
const o =
|
654
|
-
return g(), w(
|
653
|
+
return (s, t) => {
|
654
|
+
const o = d("FmTextField"), y = d("FmButton"), r = d("FmForm");
|
655
|
+
return g(), w(r, {
|
655
656
|
ref: "form",
|
656
657
|
class: "flex flex-col gap-16",
|
657
|
-
onValidationSuccess: t[
|
658
|
+
onValidationSuccess: t[2] || (t[2] = () => n.onUpdate(e.value))
|
658
659
|
}, {
|
659
|
-
default:
|
660
|
-
|
660
|
+
default: V(() => [
|
661
|
+
u(o, {
|
661
662
|
modelValue: e.value.merchantId,
|
662
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
663
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.value.merchantId = a),
|
663
664
|
label: "Merchant ID",
|
664
|
-
rules: c(
|
665
|
+
rules: c(_)(c(C).string())
|
666
|
+
}, null, 8, ["modelValue", "rules"]),
|
667
|
+
u(o, {
|
668
|
+
modelValue: e.value.cardMerchantId,
|
669
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value.cardMerchantId = a),
|
670
|
+
label: "Card Merchant ID",
|
671
|
+
rules: c(_)(c(C).string())
|
665
672
|
}, null, 8, ["modelValue", "rules"]),
|
666
673
|
i("div", Ae, [
|
667
|
-
|
674
|
+
n.gateway ? (g(), w(y, {
|
668
675
|
key: 0,
|
669
676
|
class: "flex-1",
|
670
677
|
variant: "secondary",
|
671
678
|
label: "Delete",
|
672
|
-
onclick: () =>
|
679
|
+
onclick: () => n.onDelete()
|
673
680
|
}, null, 8, ["onclick"])) : T("", !0),
|
674
|
-
|
681
|
+
u(y, {
|
675
682
|
type: "submit",
|
676
683
|
class: "flex-1",
|
677
684
|
variant: "primary",
|
@@ -689,7 +696,7 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
689
696
|
}, Pe = {
|
690
697
|
key: 1,
|
691
698
|
class: "flex items-center justify-center min-h-[80vh]"
|
692
|
-
}, Se = /* @__PURE__ */
|
699
|
+
}, Se = /* @__PURE__ */ k({
|
693
700
|
__name: "PaymentGateway",
|
694
701
|
props: {
|
695
702
|
payoutAccount: {
|
@@ -697,14 +704,14 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
697
704
|
required: !0
|
698
705
|
}
|
699
706
|
},
|
700
|
-
setup(
|
701
|
-
const
|
707
|
+
setup(n) {
|
708
|
+
const m = X().currentCountry, e = Y(), { isLoading: p, startAsyncCall: s } = j(), { gatewayTab: t } = K({
|
702
709
|
gatewayTab: ""
|
703
|
-
}), o =
|
710
|
+
}), o = n, y = [
|
704
711
|
{
|
705
712
|
label: "Fiuu",
|
706
713
|
value: "RAZER_MERCHANT_SERVICE",
|
707
|
-
render:
|
714
|
+
render: ke,
|
708
715
|
region: [N.F_COUNTRY.enum.SG]
|
709
716
|
},
|
710
717
|
{
|
@@ -719,11 +726,11 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
719
726
|
render: he,
|
720
727
|
region: [N.F_COUNTRY.enum.TH]
|
721
728
|
}
|
722
|
-
],
|
723
|
-
async function v
|
724
|
-
await
|
729
|
+
], r = P(o.payoutAccount.gateways ?? []), a = G(() => y.find((v) => v.value === t.value)), l = G(() => y.filter((v) => v.region.includes(m.value ?? N.F_COUNTRY.enum.MY)));
|
730
|
+
async function f(v) {
|
731
|
+
await s(async () => {
|
725
732
|
try {
|
726
|
-
await I.updateGateway(o.payoutAccount._id,
|
733
|
+
await I.updateGateway(o.payoutAccount._id, v), e.open({
|
727
734
|
type: "success",
|
728
735
|
title: "Payout account gateways update succesfully"
|
729
736
|
});
|
@@ -736,16 +743,16 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
736
743
|
}
|
737
744
|
});
|
738
745
|
}
|
739
|
-
return (
|
740
|
-
var
|
741
|
-
const S =
|
742
|
-
return g(), h(
|
743
|
-
c(
|
746
|
+
return (v, b) => {
|
747
|
+
var M;
|
748
|
+
const S = d("FmCircularProgress"), D = d("FmTabs");
|
749
|
+
return g(), h($, null, [
|
750
|
+
c(m).value === c(N.F_COUNTRY).enum.MY ? (g(), h("p", Te, b[1] || (b[1] = [
|
744
751
|
i("b", null, "Note: ", -1),
|
745
|
-
|
752
|
+
A(" There's no setup required for Malaysia Payment Gateway, once Payout Account is ready you will able to configure the payment channels. ")
|
746
753
|
]))) : T("", !0),
|
747
754
|
c(p) ? (g(), h("div", Pe, [
|
748
|
-
|
755
|
+
u(S, { size: "xxl" })
|
749
756
|
])) : (g(), w(D, {
|
750
757
|
key: 2,
|
751
758
|
"model-value": c(t),
|
@@ -753,33 +760,33 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
753
760
|
class: "mb-6",
|
754
761
|
items: l.value
|
755
762
|
}, null, 8, ["model-value", "items"])),
|
756
|
-
c(t) ? (g(), w(z((
|
757
|
-
gateway:
|
763
|
+
c(t) ? (g(), w(z((M = a.value) == null ? void 0 : M.render), L(H({ key: 3 }, {
|
764
|
+
gateway: r.value.find((F) => {
|
758
765
|
var x;
|
759
|
-
return F.paymentGateway === ((x =
|
766
|
+
return F.paymentGateway === ((x = a.value) == null ? void 0 : x.value);
|
760
767
|
}),
|
761
768
|
onDelete: async () => {
|
762
|
-
|
769
|
+
r.value = r.value.filter((F) => {
|
763
770
|
var x;
|
764
|
-
return F.paymentGateway !== ((x =
|
765
|
-
}),
|
771
|
+
return F.paymentGateway !== ((x = a.value) == null ? void 0 : x.value);
|
772
|
+
}), f(r.value);
|
766
773
|
},
|
767
774
|
onUpdate: (F) => {
|
768
775
|
var O;
|
769
|
-
let x =
|
776
|
+
let x = r.value.find((q) => {
|
770
777
|
var Z;
|
771
|
-
return q.paymentGateway === ((Z =
|
778
|
+
return q.paymentGateway === ((Z = a.value) == null ? void 0 : Z.value);
|
772
779
|
});
|
773
|
-
x ? x.config = F :
|
774
|
-
paymentGateway: (O =
|
780
|
+
x ? x.config = F : r.value.push({
|
781
|
+
paymentGateway: (O = a.value) == null ? void 0 : O.value,
|
775
782
|
config: F
|
776
|
-
}),
|
783
|
+
}), f(r.value);
|
777
784
|
}
|
778
785
|
})), null, 16)) : T("", !0)
|
779
786
|
], 64);
|
780
787
|
};
|
781
788
|
}
|
782
|
-
}), Ue = { class: "flex mt-6 space-x-6" }, Ie = /* @__PURE__ */
|
789
|
+
}), Ue = { class: "flex mt-6 space-x-6" }, Ie = /* @__PURE__ */ k({
|
783
790
|
__name: "GooglePayToken",
|
784
791
|
props: {
|
785
792
|
gateway: {
|
@@ -795,8 +802,8 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
795
802
|
required: !0
|
796
803
|
}
|
797
804
|
},
|
798
|
-
setup(
|
799
|
-
const e = P(
|
805
|
+
setup(n) {
|
806
|
+
const e = P(n.gateway || {
|
800
807
|
// hardcoded first since only 1 PSP supported
|
801
808
|
type: "googlePay",
|
802
809
|
gateway: "RAZER_MERCHANT_SERVICE",
|
@@ -805,44 +812,44 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
805
812
|
gatewayMerchantId: "molpay"
|
806
813
|
}
|
807
814
|
});
|
808
|
-
return (p,
|
809
|
-
const t =
|
815
|
+
return (p, s) => {
|
816
|
+
const t = d("FmTextField"), o = d("FmButton"), y = d("FmForm");
|
810
817
|
return g(), w(y, {
|
811
818
|
ref: "form",
|
812
819
|
class: "flex flex-col gap-16",
|
813
|
-
onValidationSuccess:
|
820
|
+
onValidationSuccess: s[3] || (s[3] = () => n.onUpdate(e.value))
|
814
821
|
}, {
|
815
|
-
default:
|
816
|
-
|
822
|
+
default: V(() => [
|
823
|
+
u(t, {
|
817
824
|
modelValue: e.value.gateway,
|
818
|
-
"onUpdate:modelValue":
|
825
|
+
"onUpdate:modelValue": s[0] || (s[0] = (r) => e.value.gateway = r),
|
819
826
|
label: "Gateway",
|
820
827
|
disabled: !0,
|
821
|
-
rules: c(
|
828
|
+
rules: c(_)(c(C).string())
|
822
829
|
}, null, 8, ["modelValue", "rules"]),
|
823
|
-
|
830
|
+
u(t, {
|
824
831
|
modelValue: e.value.config.gateway,
|
825
|
-
"onUpdate:modelValue":
|
832
|
+
"onUpdate:modelValue": s[1] || (s[1] = (r) => e.value.config.gateway = r),
|
826
833
|
label: "Gateway ID",
|
827
834
|
disabled: !0,
|
828
|
-
rules: c(
|
835
|
+
rules: c(_)(c(C).string())
|
829
836
|
}, null, 8, ["modelValue", "rules"]),
|
830
|
-
|
837
|
+
u(t, {
|
831
838
|
modelValue: e.value.config.gateway,
|
832
|
-
"onUpdate:modelValue":
|
839
|
+
"onUpdate:modelValue": s[2] || (s[2] = (r) => e.value.config.gateway = r),
|
833
840
|
label: "Gateway Merchant ID",
|
834
841
|
disabled: !0,
|
835
|
-
rules: c(
|
842
|
+
rules: c(_)(c(C).string())
|
836
843
|
}, null, 8, ["modelValue", "rules"]),
|
837
844
|
i("div", Ue, [
|
838
|
-
|
845
|
+
n.gateway ? (g(), w(o, {
|
839
846
|
key: 0,
|
840
847
|
class: "flex-1",
|
841
848
|
variant: "secondary",
|
842
849
|
label: "Delete",
|
843
|
-
onclick: () =>
|
850
|
+
onclick: () => n.onDelete()
|
844
851
|
}, null, 8, ["onclick"])) : T("", !0),
|
845
|
-
|
852
|
+
u(o, {
|
846
853
|
type: "submit",
|
847
854
|
class: "flex-1",
|
848
855
|
variant: "primary",
|
@@ -857,7 +864,7 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
857
864
|
}), Ne = {
|
858
865
|
key: 0,
|
859
866
|
class: "flex items-center justify-center min-h-[80vh]"
|
860
|
-
}, De = /* @__PURE__ */
|
867
|
+
}, De = /* @__PURE__ */ k({
|
861
868
|
__name: "TokenGateway",
|
862
869
|
props: {
|
863
870
|
payoutAccount: {
|
@@ -865,10 +872,10 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
865
872
|
required: !0
|
866
873
|
}
|
867
874
|
},
|
868
|
-
setup(
|
869
|
-
const
|
875
|
+
setup(n) {
|
876
|
+
const m = X().currentCountry, e = Y(), { isLoading: p, startAsyncCall: s } = j(), { tokenTab: t } = K({
|
870
877
|
tokenTab: ""
|
871
|
-
}), o =
|
878
|
+
}), o = n, y = [
|
872
879
|
{
|
873
880
|
label: "Google Pay",
|
874
881
|
value: "googlePay",
|
@@ -876,11 +883,11 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
876
883
|
render: Ie,
|
877
884
|
region: [N.F_COUNTRY.enum.MY, N.F_COUNTRY.enum.SG]
|
878
885
|
}
|
879
|
-
],
|
880
|
-
async function v
|
881
|
-
await
|
886
|
+
], r = P(o.payoutAccount.tokens ?? []), a = G(() => y.find((v) => v.value === t.value)), l = G(() => y.filter((v) => v.region.includes(m.value ?? N.F_COUNTRY.enum.MY)));
|
887
|
+
async function f(v) {
|
888
|
+
await s(async () => {
|
882
889
|
try {
|
883
|
-
await I.updateTokens(o.payoutAccount._id,
|
890
|
+
await I.updateTokens(o.payoutAccount._id, v), e.open({
|
884
891
|
type: "success",
|
885
892
|
title: "Payout account tokens gateway update succesfully"
|
886
893
|
});
|
@@ -893,16 +900,16 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
893
900
|
}
|
894
901
|
});
|
895
902
|
}
|
896
|
-
return (
|
897
|
-
var
|
898
|
-
const S =
|
899
|
-
return g(), h(
|
903
|
+
return (v, b) => {
|
904
|
+
var M;
|
905
|
+
const S = d("FmCircularProgress"), D = d("FmTabs");
|
906
|
+
return g(), h($, null, [
|
900
907
|
b[1] || (b[1] = i("p", { className: "mt-1 my-6 text-gray-600" }, [
|
901
908
|
i("b", null, "Note: "),
|
902
|
-
|
909
|
+
A(" 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. ")
|
903
910
|
], -1)),
|
904
911
|
c(p) ? (g(), h("div", Ne, [
|
905
|
-
|
912
|
+
u(S, { size: "xxl" })
|
906
913
|
])) : (g(), w(D, {
|
907
914
|
key: 1,
|
908
915
|
"model-value": c(t),
|
@@ -910,29 +917,29 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
910
917
|
class: "mb-6",
|
911
918
|
items: l.value
|
912
919
|
}, null, 8, ["model-value", "items"])),
|
913
|
-
c(t) ? (g(), w(z((
|
914
|
-
gateway:
|
920
|
+
c(t) ? (g(), w(z((M = a.value) == null ? void 0 : M.render), L(H({ key: 2 }, {
|
921
|
+
gateway: r.value.find((F) => {
|
915
922
|
var x;
|
916
|
-
return F.type === ((x =
|
923
|
+
return F.type === ((x = a.value) == null ? void 0 : x.value);
|
917
924
|
}),
|
918
925
|
onDelete: async () => {
|
919
|
-
|
926
|
+
r.value = r.value.filter((F) => {
|
920
927
|
var x;
|
921
|
-
return F.type !== ((x =
|
922
|
-
}),
|
928
|
+
return F.type !== ((x = a.value) == null ? void 0 : x.value);
|
929
|
+
}), f(r.value);
|
923
930
|
},
|
924
931
|
onUpdate: (F) => {
|
925
|
-
let x =
|
932
|
+
let x = r.value.find((O) => {
|
926
933
|
var q;
|
927
|
-
return O.type === ((q =
|
934
|
+
return O.type === ((q = a.value) == null ? void 0 : q.value);
|
928
935
|
});
|
929
|
-
x ? x.config = F :
|
936
|
+
x ? x.config = F : r.value.push(F), f(r.value);
|
930
937
|
}
|
931
938
|
})), null, 16)) : T("", !0)
|
932
939
|
], 64);
|
933
940
|
};
|
934
941
|
}
|
935
|
-
}), ze = /* @__PURE__ */
|
942
|
+
}), ze = /* @__PURE__ */ k({
|
936
943
|
__name: "PayoutAccountSetting",
|
937
944
|
props: {
|
938
945
|
accountId: {
|
@@ -940,17 +947,17 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
940
947
|
required: !0
|
941
948
|
}
|
942
949
|
},
|
943
|
-
setup(
|
944
|
-
const
|
950
|
+
setup(n) {
|
951
|
+
const m = n, { tab: e } = K({
|
945
952
|
tab: "information"
|
946
|
-
}), { isLoading: p, startAsyncCall:
|
947
|
-
async function y(
|
953
|
+
}), { isLoading: p, startAsyncCall: s } = j(!0), t = te(), o = P();
|
954
|
+
async function y(f) {
|
948
955
|
await I.updateById(
|
949
|
-
|
950
|
-
|
951
|
-
), o.value = await I.readById(
|
956
|
+
m.accountId,
|
957
|
+
f
|
958
|
+
), o.value = await I.readById(m.accountId);
|
952
959
|
}
|
953
|
-
const
|
960
|
+
const r = [
|
954
961
|
{
|
955
962
|
label: "Information",
|
956
963
|
value: "information",
|
@@ -988,30 +995,30 @@ const ne = { class: "flex gap-16 mb-6" }, le = ["src"], oe = /* @__PURE__ */ V({
|
|
988
995
|
render: xe
|
989
996
|
}
|
990
997
|
];
|
991
|
-
function
|
992
|
-
|
993
|
-
o.value = await I.readById(
|
998
|
+
function a() {
|
999
|
+
s(async () => {
|
1000
|
+
o.value = await I.readById(m.accountId);
|
994
1001
|
});
|
995
1002
|
}
|
996
|
-
J(
|
997
|
-
const l =
|
998
|
-
const
|
999
|
-
return
|
1003
|
+
J(a);
|
1004
|
+
const l = G(() => {
|
1005
|
+
const f = r.reduce((v, b) => v || (b.children ? b.children.find((S) => S.value === e.value) || null : b.value === e.value ? b : null), null);
|
1006
|
+
return f == null ? void 0 : f.render;
|
1000
1007
|
});
|
1001
|
-
return (
|
1008
|
+
return (f, v) => {
|
1002
1009
|
var S;
|
1003
|
-
const b =
|
1010
|
+
const b = d("FmTabs");
|
1004
1011
|
return g(), w(ee, {
|
1005
1012
|
title: `Payout Account (${(S = o.value) == null ? void 0 : S._id})`,
|
1006
1013
|
loading: c(p),
|
1007
1014
|
onBack: c(t).back
|
1008
1015
|
}, {
|
1009
|
-
default:
|
1010
|
-
|
1016
|
+
default: V(() => [
|
1017
|
+
u(b, {
|
1011
1018
|
"model-value": c(e),
|
1012
|
-
"onUpdate:modelValue":
|
1019
|
+
"onUpdate:modelValue": v[0] || (v[0] = (D) => E(e) ? e.value = D : null),
|
1013
1020
|
class: "mb-6",
|
1014
|
-
items:
|
1021
|
+
items: r
|
1015
1022
|
}, null, 8, ["model-value"]),
|
1016
1023
|
c(e) ? (g(), w(z(l.value), L(H({ key: 0 }, {
|
1017
1024
|
payoutAccount: o.value,
|