@feedmepos/mf-payment 1.2.3 → 1.2.6
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-CcD9G3tM.js → PayoutAccount-CFFgQ_65.js} +6 -6
- package/dist/{PayoutAccount-DqbpQ8mY.js → PayoutAccount-CSm0Ldg9.js} +5 -5
- package/dist/{PayoutAccountSetting-C2PsyDLM.js → PayoutAccountSetting-rO11Afiw.js} +326 -312
- package/dist/{Restaurant-C90F0Stw.js → Restaurant-CoNFB1rk.js} +4 -4
- package/dist/RestaurantSetting-BQvg8S_p.js +628 -0
- package/dist/{Settlement-CD1Vm7TK.js → Settlement-DEKvU0zP.js} +3 -3
- package/dist/{Settlement-DxkW-ltZ.js → Settlement-DpmBq0V9.js} +3 -3
- package/dist/{SettlementTransactions-Bj85X5dx.js → SettlementTransactions-3alZwucT.js} +3 -3
- package/dist/{SettlementTransactions-D6dyfrsh.js → SettlementTransactions-DugNdpd2.js} +3 -3
- package/dist/{Terminal-WFU6xb6H.js → Terminal-Dv7zS_te.js} +5 -5
- package/dist/TerminalSetting-ChM9jB-O.js +572 -0
- package/dist/{Transaction-CB62_jSg.js → Transaction-CT8Be7FS.js} +7 -7
- package/dist/{Transaction-PRcVVkhp.js → Transaction-DCKhuoVw.js} +5 -5
- package/dist/{TransactionOld-B0P4HXt8.js → TransactionOld-jkTy7Aeb.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-jF4UYhQi.js → TransactionTable.vue_vue_type_script_setup_true_lang-B_By7BvK.js} +3 -3
- package/dist/api/payment-gateway/index.d.ts +3 -0
- package/dist/{app-S42F2ZTb.js → app-CiHNgoQY.js} +344 -344
- package/dist/app.js +1 -1
- package/dist/{assets-wSUxHhv6.js → assets-BqjaEXmB.js} +2 -2
- package/dist/{grafana-kQY3riiN.js → grafana-Bwx9Kj61.js} +1 -1
- package/dist/{index-C3OElkUY.js → index-1q4ZbRix.js} +4219 -4167
- package/dist/{index-DcK-ntIi.js → index-BIDuwnm_.js} +1 -1
- package/dist/{index-C_3jgmep.js → index-C3fxBVdz.js} +1 -1
- package/dist/{index-B-2fIhCU.js → index-CCIVpogO.js} +1 -1
- package/dist/{index-JkEYKC8p.js → index-CN50SqVG.js} +1 -1
- package/dist/{index-CiIXIJ1u.js → index-CZrwq9oF.js} +1 -1
- package/dist/{index-Bj2Rs1vj.js → index-CyMElhGL.js} +2 -2
- package/dist/{index.vue_vue_type_script_setup_true_lang-C1ogwxl8.js → index.vue_vue_type_script_setup_true_lang-DT8A92zR.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-zISZXeYt.js → payout-account-cg0CKkbk.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +18 -14
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +18 -14
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +44 -40
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +44 -40
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +18 -14
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +18 -14
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +44 -40
- 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 +6 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +10 -10
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +10 -10
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +46 -0
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +10 -10
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +18 -18
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +18 -18
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +18 -18
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +18 -18
- package/dist/views/admin/terminal/tabs/{SoftspaceGateway.vue.d.ts → SoftposGateway.vue.d.ts} +18 -18
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +18 -18
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +18 -18
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +36 -28
- 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-ECCLE0zj.js +0 -501
- package/dist/TerminalSetting-DSCFAQht.js +0 -618
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +0 -92
@@ -1,15 +1,15 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { p as
|
3
|
-
import { u as j, e as R } from "./index-
|
1
|
+
import { defineComponent as V, resolveComponent as p, openBlock as g, createElementBlock as _, Fragment as $, createElementVNode as i, createVNode as r, withCtx as k, createTextVNode as C, toDisplayString as U, createCommentVNode as P, createBlock as x, ref as T, watch as W, computed as D, unref as c, isRef as q, h as G, onMounted as J, resolveDynamicComponent as Y, normalizeProps as L, mergeProps as H } from "vue";
|
2
|
+
import { p as N } from "./index-CyMElhGL.js";
|
3
|
+
import { u as j, e as R } from "./index-1q4ZbRix.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-C3fxBVdz.js";
|
7
7
|
import { P as Q } from "./PDFViewer-xrBtzrlR.js";
|
8
8
|
import { useSnackbar as z, components as ae } from "@feedmepos/ui-library";
|
9
|
-
import { u as
|
10
|
-
import { z as
|
9
|
+
import { u as B } from "./error-K1CakhA9.js";
|
10
|
+
import { z as A, a as h } from "./validator-D5jtpt9A.js";
|
11
11
|
import { useCoreStore as X } from "@feedmepos/mf-common";
|
12
|
-
const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */
|
12
|
+
const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ V({
|
13
13
|
__name: "Information",
|
14
14
|
props: {
|
15
15
|
payoutAccount: {
|
@@ -17,37 +17,37 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
17
17
|
required: !0
|
18
18
|
}
|
19
19
|
},
|
20
|
-
setup(
|
20
|
+
setup(n) {
|
21
21
|
return (m, e) => {
|
22
|
-
const
|
23
|
-
return g(),
|
24
|
-
|
22
|
+
const v = p("FmCardHeader"), u = p("FmCardSection"), t = p("FmCard");
|
23
|
+
return g(), _($, null, [
|
24
|
+
i("div", ne, [
|
25
25
|
r(t, {
|
26
26
|
horizontal: "",
|
27
27
|
class: "flex-1 p-6",
|
28
28
|
variant: "elevated"
|
29
29
|
}, {
|
30
|
-
default:
|
31
|
-
r(
|
32
|
-
default:
|
33
|
-
r(
|
30
|
+
default: k(() => [
|
31
|
+
r(u, { class: "flex flex-col gap-16 justify-between" }, {
|
32
|
+
default: k(() => [
|
33
|
+
r(v, {
|
34
34
|
class: "p-0",
|
35
35
|
title: "Account Info",
|
36
36
|
subtitle: ""
|
37
37
|
}),
|
38
|
-
r(
|
39
|
-
default:
|
40
|
-
var
|
38
|
+
r(u, { class: "p-0" }, {
|
39
|
+
default: k(() => {
|
40
|
+
var l, f, s, a, o;
|
41
41
|
return [
|
42
|
-
e[0] || (e[0] =
|
43
|
-
C(": " +
|
44
|
-
e[1] || (e[1] =
|
45
|
-
e[2] || (e[2] =
|
46
|
-
C(": " +
|
47
|
-
e[3] || (e[3] =
|
48
|
-
e[4] || (e[4] =
|
49
|
-
C(": " +
|
50
|
-
e[5] || (e[5] =
|
42
|
+
e[0] || (e[0] = i("b", null, "For", -1)),
|
43
|
+
C(": " + U((f = (l = n.payoutAccount) == null ? void 0 : l.store) == null ? void 0 : f.event) + " ", 1),
|
44
|
+
e[1] || (e[1] = i("br", null, null, -1)),
|
45
|
+
e[2] || (e[2] = i("b", null, "Reference", -1)),
|
46
|
+
C(": " + U((a = (s = n.payoutAccount) == null ? void 0 : s.store) == null ? void 0 : a.id), 1),
|
47
|
+
e[3] || (e[3] = i("br", null, null, -1)),
|
48
|
+
e[4] || (e[4] = i("b", null, "Business", -1)),
|
49
|
+
C(": " + U((o = n.payoutAccount) == null ? void 0 : o.businessId), 1),
|
50
|
+
e[5] || (e[5] = i("br", null, null, -1))
|
51
51
|
];
|
52
52
|
}),
|
53
53
|
_: 1
|
@@ -63,27 +63,27 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
63
63
|
class: "flex-1 p-6",
|
64
64
|
variant: "elevated"
|
65
65
|
}, {
|
66
|
-
default:
|
67
|
-
r(
|
68
|
-
default:
|
69
|
-
r(
|
66
|
+
default: k(() => [
|
67
|
+
r(u, { class: "flex flex-col gap-16 justify-between" }, {
|
68
|
+
default: k(() => [
|
69
|
+
r(v, {
|
70
70
|
class: "p-0",
|
71
71
|
title: "Key Person",
|
72
72
|
subtitle: ""
|
73
73
|
}),
|
74
|
-
r(
|
75
|
-
default:
|
76
|
-
var
|
74
|
+
r(u, { class: "p-0" }, {
|
75
|
+
default: k(() => {
|
76
|
+
var l, f, s, a, o, y, d, b;
|
77
77
|
return [
|
78
|
-
e[6] || (e[6] =
|
79
|
-
C(": " +
|
80
|
-
e[7] || (e[7] =
|
81
|
-
e[8] || (e[8] =
|
82
|
-
C(": " +
|
83
|
-
e[9] || (e[9] =
|
84
|
-
e[10] || (e[10] =
|
85
|
-
C(": " +
|
86
|
-
e[11] || (e[11] =
|
78
|
+
e[6] || (e[6] = i("b", null, "Email", -1)),
|
79
|
+
C(": " + U((s = (f = (l = n.payoutAccount) == null ? void 0 : l.store) == null ? void 0 : f.keyPerson) == null ? void 0 : s.email) + " ", 1),
|
80
|
+
e[7] || (e[7] = i("br", null, null, -1)),
|
81
|
+
e[8] || (e[8] = i("b", null, "Name", -1)),
|
82
|
+
C(": " + U((y = (o = (a = n.payoutAccount) == null ? void 0 : a.store) == null ? void 0 : o.keyPerson) == null ? void 0 : y.name), 1),
|
83
|
+
e[9] || (e[9] = i("br", null, null, -1)),
|
84
|
+
e[10] || (e[10] = i("b", null, "Phone", -1)),
|
85
|
+
C(": " + U((b = (d = n.payoutAccount) == null ? void 0 : d.store.keyPerson) == null ? void 0 : b.phone), 1),
|
86
|
+
e[11] || (e[11] = i("br", null, null, -1))
|
87
87
|
];
|
88
88
|
}),
|
89
89
|
_: 1
|
@@ -95,15 +95,15 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
95
95
|
_: 1
|
96
96
|
})
|
97
97
|
]),
|
98
|
-
e[12] || (e[12] =
|
99
|
-
|
98
|
+
e[12] || (e[12] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Exterior Photo", -1)),
|
99
|
+
n.payoutAccount.store.exteriorPhoto ? (g(), _("img", {
|
100
100
|
key: 0,
|
101
|
-
src:
|
102
|
-
}, null, 8, oe)) :
|
101
|
+
src: n.payoutAccount.store.exteriorPhoto
|
102
|
+
}, null, 8, oe)) : P("", !0)
|
103
103
|
], 64);
|
104
104
|
};
|
105
105
|
}
|
106
|
-
}), ue = { class: "flex gap-16" }, se = { class: "flex-1" }, re = { class: "flex-1" }, ce = /* @__PURE__ */
|
106
|
+
}), ue = { class: "flex gap-16" }, se = { class: "flex-1" }, re = { class: "flex-1" }, ce = /* @__PURE__ */ V({
|
107
107
|
__name: "Settlement",
|
108
108
|
props: {
|
109
109
|
payoutAccount: {
|
@@ -111,35 +111,35 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
111
111
|
required: !0
|
112
112
|
}
|
113
113
|
},
|
114
|
-
setup(
|
114
|
+
setup(n) {
|
115
115
|
return (m, e) => {
|
116
|
-
const
|
117
|
-
return g(),
|
116
|
+
const v = p("FmCardHeader"), u = p("FmCardSection"), t = p("FmCard");
|
117
|
+
return g(), _($, null, [
|
118
118
|
r(t, {
|
119
119
|
horizontal: "",
|
120
120
|
class: "flex-1 p-6 mx-6 mb-6",
|
121
121
|
variant: "elevated"
|
122
122
|
}, {
|
123
|
-
default:
|
124
|
-
r(
|
125
|
-
default:
|
126
|
-
r(
|
123
|
+
default: k(() => [
|
124
|
+
r(u, { class: "flex flex-col gap-16 justify-between" }, {
|
125
|
+
default: k(() => [
|
126
|
+
r(v, {
|
127
127
|
class: "p-0",
|
128
128
|
title: "Bank Info",
|
129
129
|
subtitle: ""
|
130
130
|
}),
|
131
|
-
r(
|
132
|
-
default:
|
133
|
-
var
|
131
|
+
r(u, { class: "p-0" }, {
|
132
|
+
default: k(() => {
|
133
|
+
var l, f, s, a, o, y;
|
134
134
|
return [
|
135
|
-
e[0] || (e[0] =
|
136
|
-
C(": " +
|
137
|
-
e[1] || (e[1] =
|
138
|
-
e[2] || (e[2] =
|
139
|
-
C(": " +
|
140
|
-
e[3] || (e[3] =
|
141
|
-
e[4] || (e[4] =
|
142
|
-
C(": " +
|
135
|
+
e[0] || (e[0] = i("b", null, "Bank", -1)),
|
136
|
+
C(": " + U((f = (l = n.payoutAccount) == null ? void 0 : l.store.bank) == null ? void 0 : f.name), 1),
|
137
|
+
e[1] || (e[1] = i("br", null, null, -1)),
|
138
|
+
e[2] || (e[2] = i("b", null, "Name", -1)),
|
139
|
+
C(": " + U((a = (s = n.payoutAccount) == null ? void 0 : s.store.bank) == null ? void 0 : a.holderName), 1),
|
140
|
+
e[3] || (e[3] = i("br", null, null, -1)),
|
141
|
+
e[4] || (e[4] = i("b", null, "Number", -1)),
|
142
|
+
C(": " + U((y = (o = n.payoutAccount) == null ? void 0 : o.store.bank) == null ? void 0 : y.accountNumber), 1)
|
143
143
|
];
|
144
144
|
}),
|
145
145
|
_: 1
|
@@ -150,73 +150,73 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
150
150
|
]),
|
151
151
|
_: 1
|
152
152
|
}),
|
153
|
-
|
154
|
-
|
155
|
-
e[5] || (e[5] =
|
156
|
-
|
153
|
+
i("div", ue, [
|
154
|
+
i("div", se, [
|
155
|
+
e[5] || (e[5] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
|
156
|
+
n.payoutAccount.store.ssm ? (g(), x(Q, {
|
157
157
|
key: 0,
|
158
|
-
pdf:
|
158
|
+
pdf: n.payoutAccount.store.ssm,
|
159
159
|
"disable-text-layer": !0,
|
160
160
|
"disable-annotation-layer": !0
|
161
|
-
}, null, 8, ["pdf"])) :
|
161
|
+
}, null, 8, ["pdf"])) : P("", !0)
|
162
162
|
]),
|
163
|
-
|
164
|
-
e[6] || (e[6] =
|
165
|
-
|
163
|
+
i("div", re, [
|
164
|
+
e[6] || (e[6] = i("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
|
165
|
+
n.payoutAccount.store.bankStatement ? (g(), x(Q, {
|
166
166
|
key: 0,
|
167
|
-
pdf:
|
167
|
+
pdf: n.payoutAccount.store.bankStatement,
|
168
168
|
"disable-text-layer": !0,
|
169
169
|
"disable-annotation-layer": !0
|
170
|
-
}, null, 8, ["pdf"])) :
|
170
|
+
}, null, 8, ["pdf"])) : P("", !0)
|
171
171
|
])
|
172
172
|
])
|
173
173
|
], 64);
|
174
174
|
};
|
175
175
|
}
|
176
|
-
}), ie = /* @__PURE__ */
|
176
|
+
}), ie = /* @__PURE__ */ V({
|
177
177
|
__name: "RateInput",
|
178
178
|
props: {
|
179
179
|
data: {},
|
180
180
|
onChange: { type: Function }
|
181
181
|
},
|
182
|
-
setup(
|
183
|
-
const m =
|
184
|
-
return W(e, (
|
185
|
-
m.onChange(parseFloat(
|
186
|
-
}), (
|
182
|
+
setup(n) {
|
183
|
+
const m = n, e = T(m.data.toString());
|
184
|
+
return W(e, (v) => {
|
185
|
+
m.onChange(parseFloat(v));
|
186
|
+
}), (v, u) => {
|
187
187
|
const t = p("FmTextField");
|
188
188
|
return g(), x(t, {
|
189
189
|
inputmode: "decimal",
|
190
190
|
modelValue: e.value,
|
191
|
-
"onUpdate:modelValue":
|
191
|
+
"onUpdate:modelValue": u[0] || (u[0] = (l) => e.value = l)
|
192
192
|
}, {
|
193
|
-
append:
|
193
|
+
append: k(() => u[1] || (u[1] = [
|
194
194
|
C("%")
|
195
195
|
])),
|
196
196
|
_: 1
|
197
197
|
}, 8, ["modelValue"]);
|
198
198
|
};
|
199
199
|
}
|
200
|
-
}), de = /* @__PURE__ */
|
200
|
+
}), de = /* @__PURE__ */ V({
|
201
201
|
__name: "TPlusInput",
|
202
202
|
props: {
|
203
203
|
data: {},
|
204
204
|
onChange: { type: Function }
|
205
205
|
},
|
206
|
-
setup(
|
207
|
-
const m =
|
208
|
-
return W(e, (
|
209
|
-
m.onChange(parseInt(
|
210
|
-
}), (
|
206
|
+
setup(n) {
|
207
|
+
const m = n, e = T(m.data.toString());
|
208
|
+
return W(e, (v) => {
|
209
|
+
m.onChange(parseInt(v));
|
210
|
+
}), (v, u) => {
|
211
211
|
const t = p("FmTextField");
|
212
212
|
return g(), x(t, {
|
213
213
|
inputmode: "numeric",
|
214
214
|
modelValue: e.value,
|
215
|
-
"onUpdate:modelValue":
|
215
|
+
"onUpdate:modelValue": u[0] || (u[0] = (l) => e.value = l)
|
216
216
|
}, null, 8, ["modelValue"]);
|
217
217
|
};
|
218
218
|
}
|
219
|
-
}), me = { class: "flex gap-16 mt-6" }, ye = { class: "flex-1" }, pe = { class: "flex-1" },
|
219
|
+
}), me = { class: "flex gap-16 mt-6" }, ye = { class: "flex-1" }, pe = { class: "flex-1" }, ve = { class: "my-6 w-full flex justify-end" }, fe = { class: "w-[320px]" }, ge = /* @__PURE__ */ V({
|
220
220
|
__name: "PaymentStatus",
|
221
221
|
props: {
|
222
222
|
onUpdate: {
|
@@ -228,42 +228,42 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
228
228
|
required: !0
|
229
229
|
}
|
230
230
|
},
|
231
|
-
setup(
|
232
|
-
const m =
|
231
|
+
setup(n) {
|
232
|
+
const m = n, e = T(!1), v = z(), u = async (a) => {
|
233
233
|
try {
|
234
|
-
e.value = !0, await m.onUpdate(
|
234
|
+
e.value = !0, await m.onUpdate(a), v.open({
|
235
235
|
type: "success",
|
236
236
|
title: "Payout account update succesfully"
|
237
237
|
});
|
238
238
|
} catch (o) {
|
239
|
-
|
239
|
+
v.open({
|
240
240
|
type: "error",
|
241
241
|
title: "Error occurs when updating payout account",
|
242
|
-
message:
|
242
|
+
message: B(o)
|
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
|
+
}), l = D(() => {
|
250
|
+
const { ssm: a, bank: o, bankStatement: y } = m.payoutAccount.store;
|
251
|
+
return a && o && o.name && o.accountNumber && o.holderName && y;
|
252
|
+
}), f = T(""), s = [
|
253
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 o = 0;
|
263
|
-
return
|
263
|
+
return a.original.rate && (o = a.original.rate.amount / Math.pow(10, a.original.rate.precision)), G(ie, {
|
264
264
|
data: o,
|
265
265
|
onChange: (y) => {
|
266
|
-
const d = m.payoutAccount.methods.at(
|
266
|
+
const d = m.payoutAccount.methods.at(a.index);
|
267
267
|
d.rate || (d.rate = {
|
268
268
|
amount: 0,
|
269
269
|
precision: 4
|
@@ -275,26 +275,26 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
275
275
|
{
|
276
276
|
header: () => "T plus",
|
277
277
|
accessorKey: "tPlus",
|
278
|
-
cell: ({ row:
|
279
|
-
data:
|
278
|
+
cell: ({ row: a }) => G(de, {
|
279
|
+
data: a.original.tPlus ?? 0,
|
280
280
|
onChange: (o) => {
|
281
|
-
const y = m.payoutAccount.methods.at(
|
281
|
+
const y = m.payoutAccount.methods.at(a.index);
|
282
282
|
y.tPlus = o;
|
283
283
|
}
|
284
284
|
})
|
285
285
|
}
|
286
286
|
];
|
287
|
-
return (
|
288
|
-
const y = p("FmRadio"), d = p("FmRadioGroup"), b = p("FmSwitch"),
|
289
|
-
return g(),
|
290
|
-
|
291
|
-
|
287
|
+
return (a, o) => {
|
288
|
+
const y = p("FmRadio"), d = p("FmRadioGroup"), b = p("FmSwitch"), S = p("FmSearch"), I = p("FmTable"), M = p("FmButton");
|
289
|
+
return g(), _($, null, [
|
290
|
+
i("div", me, [
|
291
|
+
i("div", ye, [
|
292
292
|
r(d, {
|
293
|
-
modelValue:
|
294
|
-
"onUpdate:modelValue": o[0] || (o[0] = (F) =>
|
293
|
+
modelValue: n.payoutAccount.status,
|
294
|
+
"onUpdate:modelValue": o[0] || (o[0] = (F) => n.payoutAccount.status = F),
|
295
295
|
label: "Account Status"
|
296
296
|
}, {
|
297
|
-
default:
|
297
|
+
default: k(() => [
|
298
298
|
r(y, {
|
299
299
|
value: "NEW",
|
300
300
|
label: "New"
|
@@ -311,21 +311,21 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
311
311
|
_: 1
|
312
312
|
}, 8, ["modelValue"])
|
313
313
|
]),
|
314
|
-
|
314
|
+
i("div", pe, [
|
315
315
|
r(b, {
|
316
|
-
modelValue:
|
317
|
-
"onUpdate:modelValue": o[1] || (o[1] = (F) =>
|
318
|
-
disabled: !
|
316
|
+
modelValue: n.payoutAccount.enable,
|
317
|
+
"onUpdate:modelValue": o[1] || (o[1] = (F) => n.payoutAccount.enable = F),
|
318
|
+
disabled: !l.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
|
-
|
326
|
-
|
327
|
-
r(
|
328
|
-
modelValue:
|
324
|
+
n.payoutAccount.enable ? (g(), _($, { key: 0 }, [
|
325
|
+
i("div", ve, [
|
326
|
+
i("div", fe, [
|
327
|
+
r(S, {
|
328
|
+
modelValue: c(t),
|
329
329
|
"onUpdate:modelValue": o[2] || (o[2] = (F) => q(t) ? t.value = F : null),
|
330
330
|
placeholder: "Search Method ..."
|
331
331
|
}, null, 8, ["modelValue"])
|
@@ -333,43 +333,43 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
333
333
|
]),
|
334
334
|
r(I, {
|
335
335
|
class: "mt-6",
|
336
|
-
modelValue:
|
337
|
-
"onUpdate:modelValue": o[3] || (o[3] = (F) =>
|
336
|
+
modelValue: f.value,
|
337
|
+
"onUpdate:modelValue": o[3] || (o[3] = (F) => f.value = F),
|
338
338
|
"shrink-at": !1,
|
339
|
-
"search-value":
|
340
|
-
"row-data":
|
341
|
-
"column-defs":
|
339
|
+
"search-value": c(t),
|
340
|
+
"row-data": n.payoutAccount.methods,
|
341
|
+
"column-defs": s
|
342
342
|
}, null, 8, ["modelValue", "search-value", "row-data"])
|
343
|
-
], 64)) :
|
343
|
+
], 64)) : P("", !0),
|
344
344
|
r(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: () => u(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__ */ V({
|
355
355
|
__name: "Actions",
|
356
356
|
emits: ["edit", "delete"],
|
357
|
-
setup(
|
357
|
+
setup(n, { emit: m }) {
|
358
358
|
const e = m;
|
359
|
-
return (
|
359
|
+
return (v, u) => {
|
360
360
|
const t = p("FmButton");
|
361
|
-
return g(),
|
361
|
+
return g(), _("div", be, [
|
362
362
|
r(t, {
|
363
363
|
variant: "plain",
|
364
364
|
"prepend-icon": "delete",
|
365
|
-
onClick:
|
366
|
-
|
365
|
+
onClick: u[0] || (u[0] = (l) => {
|
366
|
+
l.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__ */ V({
|
373
373
|
__name: "PaymentChannel",
|
374
374
|
props: {
|
375
375
|
payoutAccount: {
|
@@ -377,18 +377,18 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
377
377
|
required: !0
|
378
378
|
}
|
379
379
|
},
|
380
|
-
setup(
|
381
|
-
const m = z(), e =
|
382
|
-
function
|
383
|
-
|
384
|
-
t.value = await
|
380
|
+
setup(n) {
|
381
|
+
const m = z(), e = n, { isLoading: v, startAsyncCall: u } = j(), t = T([]);
|
382
|
+
function l() {
|
383
|
+
u(async () => {
|
384
|
+
t.value = await N.getChannels(e.payoutAccount._id);
|
385
385
|
});
|
386
386
|
}
|
387
|
-
J(
|
388
|
-
function
|
389
|
-
|
387
|
+
J(l);
|
388
|
+
function f() {
|
389
|
+
u(async () => {
|
390
390
|
try {
|
391
|
-
await
|
391
|
+
await N.updateChannels(e.payoutAccount._id, t.value), m.open({
|
392
392
|
type: "success",
|
393
393
|
title: "Payout account channels update succesfully"
|
394
394
|
});
|
@@ -396,15 +396,15 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
396
396
|
m.open({
|
397
397
|
type: "error",
|
398
398
|
title: "Error occurs when updating payout account channels",
|
399
|
-
message:
|
399
|
+
message: B(o)
|
400
400
|
});
|
401
401
|
}
|
402
402
|
});
|
403
403
|
}
|
404
|
-
function
|
405
|
-
|
404
|
+
function s() {
|
405
|
+
u(async () => {
|
406
406
|
try {
|
407
|
-
await
|
407
|
+
await N.resetChannels(e.payoutAccount._id), t.value = await N.getChannels(e.payoutAccount._id), m.open({
|
408
408
|
type: "success",
|
409
409
|
title: "Payout account channels reset succesfully"
|
410
410
|
});
|
@@ -412,12 +412,12 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
412
412
|
m.open({
|
413
413
|
type: "error",
|
414
414
|
title: "Error occurs when reset payout account channels",
|
415
|
-
message:
|
415
|
+
message: B(o)
|
416
416
|
});
|
417
417
|
}
|
418
418
|
});
|
419
419
|
}
|
420
|
-
const
|
420
|
+
const a = [
|
421
421
|
{
|
422
422
|
header: () => "Gateway",
|
423
423
|
accessorKey: "gateway"
|
@@ -429,12 +429,12 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
429
429
|
{
|
430
430
|
header: () => "Display",
|
431
431
|
accessorKey: "icon",
|
432
|
-
cell: ({ row: o }) =>
|
432
|
+
cell: ({ row: o }) => G("img", { src: o.original.icon, width: 32, height: 32 })
|
433
433
|
},
|
434
434
|
{
|
435
435
|
header: () => "Label",
|
436
436
|
accessorKey: "label",
|
437
|
-
cell: ({ row: o }) =>
|
437
|
+
cell: ({ row: o }) => G(ae.FmTextField, {
|
438
438
|
modelValue: o.original.label,
|
439
439
|
"onUpdate:modelValue": (y) => o.original.label = y
|
440
440
|
})
|
@@ -442,41 +442,41 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
442
442
|
{
|
443
443
|
id: "actions",
|
444
444
|
header: () => "Actions",
|
445
|
-
cell: ({ row: o }) =>
|
445
|
+
cell: ({ row: o }) => G(Fe, {
|
446
446
|
onDelete: () => t.value.splice(o.index, 1)
|
447
447
|
})
|
448
448
|
}
|
449
449
|
];
|
450
450
|
return (o, y) => {
|
451
451
|
const d = p("FmButton"), b = p("FmTable");
|
452
|
-
return g(),
|
453
|
-
|
452
|
+
return g(), _($, null, [
|
453
|
+
i("div", we, [
|
454
454
|
r(d, {
|
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: s
|
461
461
|
}),
|
462
462
|
r(d, {
|
463
463
|
variant: "primary",
|
464
464
|
size: "md",
|
465
465
|
icon: "save",
|
466
466
|
label: "Save",
|
467
|
-
onClick:
|
467
|
+
onClick: f
|
468
468
|
})
|
469
469
|
]),
|
470
470
|
r(b, {
|
471
|
-
loading:
|
471
|
+
loading: c(v),
|
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
|
+
}), ke = { class: "flex mt-6 space-x-6" }, Ve = /* @__PURE__ */ V({
|
480
480
|
__name: "FiuuGateway",
|
481
481
|
props: {
|
482
482
|
gateway: {
|
@@ -492,48 +492,48 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
492
492
|
required: !0
|
493
493
|
}
|
494
494
|
},
|
495
|
-
setup(
|
496
|
-
var
|
497
|
-
const e =
|
495
|
+
setup(n) {
|
496
|
+
var v;
|
497
|
+
const e = T(((v = n.gateway) == null ? void 0 : v.config) || {
|
498
498
|
merchantId: "",
|
499
499
|
verifyKey: "",
|
500
500
|
secretKey: ""
|
501
501
|
});
|
502
|
-
return (
|
503
|
-
const
|
504
|
-
return g(), x(
|
502
|
+
return (u, t) => {
|
503
|
+
const l = p("FmTextField"), f = p("FmButton"), s = p("FmForm");
|
504
|
+
return g(), x(s, {
|
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
|
-
r(
|
509
|
+
default: k(() => [
|
510
|
+
r(l, {
|
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:
|
514
|
+
rules: c(A)(c(h).string())
|
515
515
|
}, null, 8, ["modelValue", "rules"]),
|
516
|
-
r(
|
516
|
+
r(l, {
|
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:
|
520
|
+
rules: c(A)(c(h).string())
|
521
521
|
}, null, 8, ["modelValue", "rules"]),
|
522
|
-
r(
|
522
|
+
r(l, {
|
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:
|
526
|
+
rules: c(A)(c(h).string())
|
527
527
|
}, null, 8, ["modelValue", "rules"]),
|
528
|
-
|
529
|
-
|
528
|
+
i("div", ke, [
|
529
|
+
n.gateway ? (g(), x(f, {
|
530
530
|
key: 0,
|
531
531
|
class: "flex-1",
|
532
532
|
variant: "secondary",
|
533
533
|
label: "Delete",
|
534
|
-
onclick: () =>
|
535
|
-
}, null, 8, ["onclick"])) :
|
536
|
-
r(
|
534
|
+
onclick: () => n.onDelete()
|
535
|
+
}, null, 8, ["onclick"])) : P("", !0),
|
536
|
+
r(f, {
|
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__ */ k({
|
|
545
545
|
}, 512);
|
546
546
|
};
|
547
547
|
}
|
548
|
-
}), Ce = { class: "flex mt-6 space-x-6" },
|
548
|
+
}), Ce = { class: "flex mt-6 space-x-6" }, _e = /* @__PURE__ */ V({
|
549
549
|
__name: "MacauPassGateway",
|
550
550
|
props: {
|
551
551
|
gateway: {
|
@@ -561,48 +561,62 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
561
561
|
required: !0
|
562
562
|
}
|
563
563
|
},
|
564
|
-
setup(
|
565
|
-
var
|
566
|
-
const e =
|
564
|
+
setup(n) {
|
565
|
+
var v;
|
566
|
+
const e = T(((v = n.gateway) == null ? void 0 : v.config) || {
|
567
567
|
merchantId: "",
|
568
568
|
merchantName: "",
|
569
|
-
merchantCategoryCode: ""
|
569
|
+
merchantCategoryCode: "",
|
570
|
+
storeID: "",
|
571
|
+
storeName: ""
|
570
572
|
});
|
571
|
-
return (
|
572
|
-
const
|
573
|
-
return g(), x(
|
573
|
+
return (u, t) => {
|
574
|
+
const l = p("FmTextField"), f = p("FmButton"), s = p("FmForm");
|
575
|
+
return g(), x(s, {
|
574
576
|
ref: "form",
|
575
577
|
class: "flex flex-col gap-16",
|
576
|
-
onValidationSuccess: t[
|
578
|
+
onValidationSuccess: t[5] || (t[5] = () => n.onUpdate(e.value))
|
577
579
|
}, {
|
578
|
-
default:
|
579
|
-
r(
|
580
|
+
default: k(() => [
|
581
|
+
r(l, {
|
580
582
|
modelValue: e.value.merchantId,
|
581
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
583
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.value.merchantId = a),
|
582
584
|
label: "Merchant ID",
|
583
|
-
rules:
|
585
|
+
rules: c(A)(c(h).string())
|
584
586
|
}, null, 8, ["modelValue", "rules"]),
|
585
|
-
r(
|
587
|
+
r(l, {
|
586
588
|
modelValue: e.value.merchantName,
|
587
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
589
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.value.merchantName = a),
|
588
590
|
label: "Merchant Name",
|
589
|
-
rules:
|
591
|
+
rules: c(A)(c(h).string())
|
590
592
|
}, null, 8, ["modelValue", "rules"]),
|
591
|
-
r(
|
593
|
+
r(l, {
|
592
594
|
modelValue: e.value.merchantCategoryCode,
|
593
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
595
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => e.value.merchantCategoryCode = a),
|
594
596
|
label: "Merchant MCC",
|
595
|
-
rules:
|
597
|
+
rules: c(A)(c(h).string())
|
598
|
+
}, null, 8, ["modelValue", "rules"]),
|
599
|
+
r(l, {
|
600
|
+
modelValue: e.value.storeID,
|
601
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => e.value.storeID = a),
|
602
|
+
label: "Store ID",
|
603
|
+
rules: c(A)(c(h).string())
|
604
|
+
}, null, 8, ["modelValue", "rules"]),
|
605
|
+
r(l, {
|
606
|
+
modelValue: e.value.storeName,
|
607
|
+
"onUpdate:modelValue": t[4] || (t[4] = (a) => e.value.storeName = a),
|
608
|
+
label: "Store Name",
|
609
|
+
rules: c(A)(c(h).string())
|
596
610
|
}, null, 8, ["modelValue", "rules"]),
|
597
|
-
|
598
|
-
|
611
|
+
i("div", Ce, [
|
612
|
+
n.gateway ? (g(), x(f, {
|
599
613
|
key: 0,
|
600
614
|
class: "flex-1",
|
601
615
|
variant: "secondary",
|
602
616
|
label: "Delete",
|
603
|
-
onclick: () =>
|
604
|
-
}, null, 8, ["onclick"])) :
|
605
|
-
r(
|
617
|
+
onclick: () => n.onDelete()
|
618
|
+
}, null, 8, ["onclick"])) : P("", !0),
|
619
|
+
r(f, {
|
606
620
|
type: "submit",
|
607
621
|
class: "flex-1",
|
608
622
|
variant: "primary",
|
@@ -614,13 +628,13 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
614
628
|
}, 512);
|
615
629
|
};
|
616
630
|
}
|
617
|
-
}),
|
631
|
+
}), Ae = {
|
618
632
|
key: 0,
|
619
633
|
className: "mt-1 my-6 text-gray-600"
|
620
|
-
},
|
634
|
+
}, he = {
|
621
635
|
key: 1,
|
622
636
|
class: "flex items-center justify-center min-h-[80vh]"
|
623
|
-
}, Pe = /* @__PURE__ */
|
637
|
+
}, Pe = /* @__PURE__ */ V({
|
624
638
|
__name: "PaymentGateway",
|
625
639
|
props: {
|
626
640
|
payoutAccount: {
|
@@ -628,27 +642,27 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
628
642
|
required: !0
|
629
643
|
}
|
630
644
|
},
|
631
|
-
setup(
|
632
|
-
const m = X().currentCountry, e = z(), { isLoading:
|
645
|
+
setup(n) {
|
646
|
+
const m = X().currentCountry, e = z(), { isLoading: v, startAsyncCall: u } = j(), { gatewayTab: t } = K({
|
633
647
|
gatewayTab: ""
|
634
|
-
}),
|
648
|
+
}), l = n, f = [
|
635
649
|
{
|
636
650
|
label: "Fiuu",
|
637
651
|
value: "RAZER_MERCHANT_SERVICE",
|
638
|
-
render:
|
652
|
+
render: Ve,
|
639
653
|
region: [R.F_COUNTRY.enum.SG]
|
640
654
|
},
|
641
655
|
{
|
642
656
|
label: "Macau Pass",
|
643
657
|
value: "MACAU_PASS",
|
644
|
-
render:
|
658
|
+
render: _e,
|
645
659
|
region: [R.F_COUNTRY.enum.MO]
|
646
660
|
}
|
647
|
-
],
|
661
|
+
], s = T(l.payoutAccount.gateways ?? []), a = D(() => f.find((d) => d.value === t.value)), o = D(() => f.filter((d) => d.region.includes(m.value ?? R.F_COUNTRY.enum.MY)));
|
648
662
|
async function y(d) {
|
649
|
-
await
|
663
|
+
await u(async () => {
|
650
664
|
try {
|
651
|
-
await
|
665
|
+
await N.updateGateway(l.payoutAccount._id, d), e.open({
|
652
666
|
type: "success",
|
653
667
|
title: "Payout account gateways update succesfully"
|
654
668
|
});
|
@@ -656,55 +670,55 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
656
670
|
e.open({
|
657
671
|
type: "error",
|
658
672
|
title: "Error occurs when updating payout account gateways",
|
659
|
-
message:
|
673
|
+
message: B(b)
|
660
674
|
});
|
661
675
|
}
|
662
676
|
});
|
663
677
|
}
|
664
678
|
return (d, b) => {
|
665
679
|
var M;
|
666
|
-
const
|
667
|
-
return g(),
|
668
|
-
|
669
|
-
|
680
|
+
const S = p("FmCircularProgress"), I = p("FmTabs");
|
681
|
+
return g(), _($, null, [
|
682
|
+
c(m).value === c(R.F_COUNTRY).enum.MY ? (g(), _("p", Ae, b[1] || (b[1] = [
|
683
|
+
i("b", null, "Note: ", -1),
|
670
684
|
C(" There's no setup required for Malaysia Payment Gateway, once Payout Account is ready you will able to configure the payment channels. ")
|
671
|
-
]))) :
|
672
|
-
|
673
|
-
r(
|
685
|
+
]))) : P("", !0),
|
686
|
+
c(v) ? (g(), _("div", he, [
|
687
|
+
r(S, { size: "xxl" })
|
674
688
|
])) : (g(), x(I, {
|
675
689
|
key: 2,
|
676
|
-
"model-value":
|
690
|
+
"model-value": c(t),
|
677
691
|
"onUpdate:modelValue": b[0] || (b[0] = (F) => q(t) ? t.value = F : null),
|
678
692
|
class: "mb-6",
|
679
693
|
items: o.value
|
680
694
|
}, null, 8, ["model-value", "items"])),
|
681
|
-
|
682
|
-
gateway:
|
695
|
+
c(t) ? (g(), x(Y((M = a.value) == null ? void 0 : M.render), L(H({ key: 3 }, {
|
696
|
+
gateway: s.value.find((F) => {
|
683
697
|
var w;
|
684
|
-
return F.paymentGateway === ((w =
|
698
|
+
return F.paymentGateway === ((w = a.value) == null ? void 0 : w.value);
|
685
699
|
}),
|
686
700
|
onDelete: async () => {
|
687
|
-
|
701
|
+
s.value = s.value.filter((F) => {
|
688
702
|
var w;
|
689
|
-
return F.paymentGateway !== ((w =
|
690
|
-
}), y(
|
703
|
+
return F.paymentGateway !== ((w = a.value) == null ? void 0 : w.value);
|
704
|
+
}), y(s.value);
|
691
705
|
},
|
692
706
|
onUpdate: (F) => {
|
693
707
|
var E;
|
694
|
-
let w =
|
708
|
+
let w = s.value.find((O) => {
|
695
709
|
var Z;
|
696
|
-
return O.paymentGateway === ((Z =
|
710
|
+
return O.paymentGateway === ((Z = a.value) == null ? void 0 : Z.value);
|
697
711
|
});
|
698
|
-
w ? w.config = F :
|
699
|
-
paymentGateway: (E =
|
712
|
+
w ? w.config = F : s.value.push({
|
713
|
+
paymentGateway: (E = a.value) == null ? void 0 : E.value,
|
700
714
|
config: F
|
701
|
-
}), y(
|
715
|
+
}), y(s.value);
|
702
716
|
}
|
703
|
-
})), null, 16)) :
|
717
|
+
})), null, 16)) : P("", !0)
|
704
718
|
], 64);
|
705
719
|
};
|
706
720
|
}
|
707
|
-
}), Te = { class: "flex mt-6 space-x-6" }, Se = /* @__PURE__ */
|
721
|
+
}), Te = { class: "flex mt-6 space-x-6" }, Se = /* @__PURE__ */ V({
|
708
722
|
__name: "GooglePayToken",
|
709
723
|
props: {
|
710
724
|
gateway: {
|
@@ -720,8 +734,8 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
720
734
|
required: !0
|
721
735
|
}
|
722
736
|
},
|
723
|
-
setup(
|
724
|
-
const e =
|
737
|
+
setup(n) {
|
738
|
+
const e = T(n.gateway || {
|
725
739
|
// hardcoded first since only 1 PSP supported
|
726
740
|
type: "googlePay",
|
727
741
|
gateway: "RAZER_MERCHANT_SERVICE",
|
@@ -733,44 +747,44 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
733
747
|
}
|
734
748
|
}
|
735
749
|
});
|
736
|
-
return (
|
737
|
-
const t = p("FmTextField"),
|
738
|
-
return g(), x(
|
750
|
+
return (v, u) => {
|
751
|
+
const t = p("FmTextField"), l = p("FmButton"), f = p("FmForm");
|
752
|
+
return g(), x(f, {
|
739
753
|
ref: "form",
|
740
754
|
class: "flex flex-col gap-16",
|
741
|
-
onValidationSuccess:
|
755
|
+
onValidationSuccess: u[3] || (u[3] = () => n.onUpdate(e.value))
|
742
756
|
}, {
|
743
|
-
default:
|
757
|
+
default: k(() => [
|
744
758
|
r(t, {
|
745
759
|
modelValue: e.value.gateway,
|
746
|
-
"onUpdate:modelValue":
|
760
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => e.value.gateway = s),
|
747
761
|
label: "Gateway",
|
748
762
|
disabled: !0,
|
749
|
-
rules:
|
763
|
+
rules: c(A)(c(h).string())
|
750
764
|
}, null, 8, ["modelValue", "rules"]),
|
751
765
|
r(t, {
|
752
766
|
modelValue: e.value.config.gateway.gateway,
|
753
|
-
"onUpdate:modelValue":
|
767
|
+
"onUpdate:modelValue": u[1] || (u[1] = (s) => e.value.config.gateway.gateway = s),
|
754
768
|
label: "Gateway ID",
|
755
769
|
disabled: !0,
|
756
|
-
rules:
|
770
|
+
rules: c(A)(c(h).string())
|
757
771
|
}, null, 8, ["modelValue", "rules"]),
|
758
772
|
r(t, {
|
759
773
|
modelValue: e.value.config.gateway.gatewayMerchantId,
|
760
|
-
"onUpdate:modelValue":
|
774
|
+
"onUpdate:modelValue": u[2] || (u[2] = (s) => e.value.config.gateway.gatewayMerchantId = s),
|
761
775
|
label: "Gateway Merchant ID",
|
762
776
|
disabled: !0,
|
763
|
-
rules:
|
777
|
+
rules: c(A)(c(h).string())
|
764
778
|
}, null, 8, ["modelValue", "rules"]),
|
765
|
-
|
766
|
-
|
779
|
+
i("div", Te, [
|
780
|
+
n.gateway ? (g(), x(l, {
|
767
781
|
key: 0,
|
768
782
|
class: "flex-1",
|
769
783
|
variant: "secondary",
|
770
784
|
label: "Delete",
|
771
|
-
onclick: () =>
|
772
|
-
}, null, 8, ["onclick"])) :
|
773
|
-
r(
|
785
|
+
onclick: () => n.onDelete()
|
786
|
+
}, null, 8, ["onclick"])) : P("", !0),
|
787
|
+
r(l, {
|
774
788
|
type: "submit",
|
775
789
|
class: "flex-1",
|
776
790
|
variant: "primary",
|
@@ -785,7 +799,7 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
785
799
|
}), Ue = {
|
786
800
|
key: 0,
|
787
801
|
class: "flex items-center justify-center min-h-[80vh]"
|
788
|
-
}, Ne = /* @__PURE__ */
|
802
|
+
}, Ne = /* @__PURE__ */ V({
|
789
803
|
__name: "TokenGateway",
|
790
804
|
props: {
|
791
805
|
payoutAccount: {
|
@@ -793,10 +807,10 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
793
807
|
required: !0
|
794
808
|
}
|
795
809
|
},
|
796
|
-
setup(
|
797
|
-
const m = X().currentCountry, e = z(), { isLoading:
|
810
|
+
setup(n) {
|
811
|
+
const m = X().currentCountry, e = z(), { isLoading: v, startAsyncCall: u } = j(), { tokenTab: t } = K({
|
798
812
|
tokenTab: ""
|
799
|
-
}),
|
813
|
+
}), l = n, f = [
|
800
814
|
{
|
801
815
|
label: "Google Pay",
|
802
816
|
value: "googlePay",
|
@@ -804,11 +818,11 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
804
818
|
render: Se,
|
805
819
|
region: [R.F_COUNTRY.enum.MY, R.F_COUNTRY.enum.SG]
|
806
820
|
}
|
807
|
-
],
|
821
|
+
], s = T(l.payoutAccount.tokens ?? []), a = D(() => f.find((d) => d.value === t.value)), o = D(() => f.filter((d) => d.region.includes(m.value ?? R.F_COUNTRY.enum.MY)));
|
808
822
|
async function y(d) {
|
809
|
-
await
|
823
|
+
await u(async () => {
|
810
824
|
try {
|
811
|
-
await
|
825
|
+
await N.updateTokens(l.payoutAccount._id, d), e.open({
|
812
826
|
type: "success",
|
813
827
|
title: "Payout account tokens gateway update succesfully"
|
814
828
|
});
|
@@ -816,51 +830,51 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
816
830
|
e.open({
|
817
831
|
type: "error",
|
818
832
|
title: "Error occurs when updating payout account tokens",
|
819
|
-
message:
|
833
|
+
message: B(b)
|
820
834
|
});
|
821
835
|
}
|
822
836
|
});
|
823
837
|
}
|
824
838
|
return (d, b) => {
|
825
839
|
var M;
|
826
|
-
const
|
827
|
-
return g(),
|
828
|
-
b[1] || (b[1] =
|
829
|
-
|
840
|
+
const S = p("FmCircularProgress"), I = p("FmTabs");
|
841
|
+
return g(), _($, null, [
|
842
|
+
b[1] || (b[1] = i("p", { className: "mt-1 my-6 text-gray-600" }, [
|
843
|
+
i("b", null, "Note: "),
|
830
844
|
C(" Token gateway always on the top of every other methods ( online channels ), and it's was branding requirements from each of the payment token gateway provider. For setting most of the time are the same and only need to select for which provider. ")
|
831
845
|
], -1)),
|
832
|
-
|
833
|
-
r(
|
846
|
+
c(v) ? (g(), _("div", Ue, [
|
847
|
+
r(S, { size: "xxl" })
|
834
848
|
])) : (g(), x(I, {
|
835
849
|
key: 1,
|
836
|
-
"model-value":
|
850
|
+
"model-value": c(t),
|
837
851
|
"onUpdate:modelValue": b[0] || (b[0] = (F) => q(t) ? t.value = F : null),
|
838
852
|
class: "mb-6",
|
839
853
|
items: o.value
|
840
854
|
}, null, 8, ["model-value", "items"])),
|
841
|
-
|
842
|
-
gateway:
|
855
|
+
c(t) ? (g(), x(Y((M = a.value) == null ? void 0 : M.render), L(H({ key: 2 }, {
|
856
|
+
gateway: s.value.find((F) => {
|
843
857
|
var w;
|
844
|
-
return F.type === ((w =
|
858
|
+
return F.type === ((w = a.value) == null ? void 0 : w.value);
|
845
859
|
}),
|
846
860
|
onDelete: async () => {
|
847
|
-
|
861
|
+
s.value = s.value.filter((F) => {
|
848
862
|
var w;
|
849
|
-
return F.type !== ((w =
|
850
|
-
}), y(
|
863
|
+
return F.type !== ((w = a.value) == null ? void 0 : w.value);
|
864
|
+
}), y(s.value);
|
851
865
|
},
|
852
866
|
onUpdate: (F) => {
|
853
|
-
let w =
|
867
|
+
let w = s.value.find((E) => {
|
854
868
|
var O;
|
855
|
-
return E.type === ((O =
|
869
|
+
return E.type === ((O = a.value) == null ? void 0 : O.value);
|
856
870
|
});
|
857
|
-
w ? w.config = F :
|
871
|
+
w ? w.config = F : s.value.push(F), y(s.value);
|
858
872
|
}
|
859
|
-
})), null, 16)) :
|
873
|
+
})), null, 16)) : P("", !0)
|
860
874
|
], 64);
|
861
875
|
};
|
862
876
|
}
|
863
|
-
}), Ke = /* @__PURE__ */
|
877
|
+
}), Ke = /* @__PURE__ */ V({
|
864
878
|
__name: "PayoutAccountSetting",
|
865
879
|
props: {
|
866
880
|
accountId: {
|
@@ -868,17 +882,17 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
868
882
|
required: !0
|
869
883
|
}
|
870
884
|
},
|
871
|
-
setup(
|
872
|
-
const m =
|
885
|
+
setup(n) {
|
886
|
+
const m = n, { tab: e } = K({
|
873
887
|
tab: "information"
|
874
|
-
}), { isLoading:
|
875
|
-
async function
|
876
|
-
await
|
888
|
+
}), { isLoading: v, startAsyncCall: u } = j(!0), t = te(), l = T();
|
889
|
+
async function f(y) {
|
890
|
+
await N.updateById(
|
877
891
|
m.accountId,
|
878
892
|
y
|
879
|
-
),
|
893
|
+
), l.value = await N.readById(m.accountId);
|
880
894
|
}
|
881
|
-
const
|
895
|
+
const s = [
|
882
896
|
{
|
883
897
|
label: "Information",
|
884
898
|
value: "information",
|
@@ -916,35 +930,35 @@ const ne = { class: "flex gap-16 mb-6" }, oe = ["src"], le = /* @__PURE__ */ k({
|
|
916
930
|
render: xe
|
917
931
|
}
|
918
932
|
];
|
919
|
-
function
|
920
|
-
|
921
|
-
|
933
|
+
function a() {
|
934
|
+
u(async () => {
|
935
|
+
l.value = await N.readById(m.accountId);
|
922
936
|
});
|
923
937
|
}
|
924
|
-
J(
|
925
|
-
const o =
|
926
|
-
const y =
|
938
|
+
J(a);
|
939
|
+
const o = D(() => {
|
940
|
+
const y = s.reduce((d, b) => d || (b.children ? b.children.find((S) => S.value === e.value) || null : b.value === e.value ? b : null), null);
|
927
941
|
return y == null ? void 0 : y.render;
|
928
942
|
});
|
929
943
|
return (y, d) => {
|
930
|
-
var
|
944
|
+
var S;
|
931
945
|
const b = p("FmTabs");
|
932
946
|
return g(), x(ee, {
|
933
|
-
title: `Payout Account (${(
|
934
|
-
loading:
|
935
|
-
onBack:
|
947
|
+
title: `Payout Account (${(S = l.value) == null ? void 0 : S._id})`,
|
948
|
+
loading: c(v),
|
949
|
+
onBack: c(t).back
|
936
950
|
}, {
|
937
|
-
default:
|
951
|
+
default: k(() => [
|
938
952
|
r(b, {
|
939
|
-
"model-value":
|
953
|
+
"model-value": c(e),
|
940
954
|
"onUpdate:modelValue": d[0] || (d[0] = (I) => q(e) ? e.value = I : null),
|
941
955
|
class: "mb-6",
|
942
|
-
items:
|
956
|
+
items: s
|
943
957
|
}, null, 8, ["model-value"]),
|
944
|
-
|
945
|
-
payoutAccount:
|
946
|
-
onUpdate:
|
947
|
-
})), null, 16)) :
|
958
|
+
c(e) ? (g(), x(Y(o.value), L(H({ key: 0 }, {
|
959
|
+
payoutAccount: l.value,
|
960
|
+
onUpdate: f
|
961
|
+
})), null, 16)) : P("", !0)
|
948
962
|
]),
|
949
963
|
_: 1
|
950
964
|
}, 8, ["title", "loading", "onBack"]);
|