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