@feedmepos/mf-payment 1.5.80-dev → 1.5.81-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Actions.vue_vue_type_script_setup_true_lang-Br4opTbs.js → Actions.vue_vue_type_script_setup_true_lang-arxXJc-r.js} +1 -1
- package/dist/{Chargeback-BgfVMSOS.js → Chargeback-DCBPi5nd.js} +7 -7
- package/dist/{DateRangePicker.vue_vue_type_script_setup_true_lang-BNVnvrVY.js → DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js} +1 -1
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-BXUnl2s0.js → DocumentViewer.vue_vue_type_script_setup_true_lang-CmWaoyuX.js} +3 -3
- package/dist/{OnboardForm-CjWUEKdU.js → OnboardForm-C6lqjMgj.js} +6 -6
- package/dist/{OnboardForm-CxUcDXv8.js → OnboardForm-DSMui3AP.js} +6 -6
- package/dist/{OnboardSubmission-DLIrvGEN.js → OnboardSubmission-DGlLp3NF.js} +3 -3
- package/dist/{OnboardSubmission-BwHjLKoO.js → OnboardSubmission-VW-cpEb5.js} +5 -5
- package/dist/{PayoutAccount-crTDThJ0.js → PayoutAccount-CQsohYCY.js} +425 -413
- package/dist/{PayoutAccount-BrqWRndY.js → PayoutAccount-ScwlPbDO.js} +5 -5
- package/dist/PayoutAccountSetting-4S54z0zZ.js +1814 -0
- package/dist/{Restaurant-BxMBJDv6.js → Restaurant-BdeRl1K3.js} +4 -4
- package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-DG3iyjkK.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-ClyF3x4z.js} +10 -10
- package/dist/{RestaurantSetting-DsnrDSoi.js → RestaurantSetting-DoveWDBU.js} +4 -4
- package/dist/{Settlement-BrwtMegt.js → Settlement-Db5-8Rwp.js} +106 -106
- package/dist/{Settlement-Bvyroi89.js → Settlement-tznVotsa.js} +4 -4
- package/dist/{SettlementTransactions-BwH1Xb_p.js → SettlementTransactions-CZ05tjy5.js} +4 -4
- package/dist/{SettlementTransactions-CWvmC1ux.js → SettlementTransactions-kaD_BDBE.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-MHCexgfT.js → Status.vue_vue_type_script_setup_true_lang-DcOt2SeU.js} +1 -1
- package/dist/{Terminal-VstZsjol.js → Terminal-C5bZbtLm.js} +6 -6
- package/dist/{TerminalSetting-CR6be9r-.js → TerminalSetting-B81ova2B.js} +5 -5
- package/dist/{TextInputDialog.vue_vue_type_script_setup_true_lang-D8W8_SO2.js → TextInputDialog.vue_vue_type_script_setup_true_lang-BvGYVca0.js} +1 -1
- package/dist/{Transaction-DrRSi6CA.js → Transaction-9RnGbv_s.js} +9 -9
- package/dist/{Transaction-DS42hml8.js → Transaction-DYAV_0Eo.js} +12 -12
- package/dist/{TransactionOld-9QysVHIB.js → TransactionOld-cVtzUA4m.js} +9 -9
- package/dist/{app-B5gW8oNn.js → app-COmipvpd.js} +844 -816
- package/dist/app.js +1 -1
- package/dist/{assets-DVCMZK8m.js → assets-Cz4q39pl.js} +1 -1
- package/dist/{grafana-DcIEsU2v.js → grafana-DPozfK2x.js} +1 -1
- package/dist/{index-z9d5HbRJ.js → index-B0DzMdAx.js} +1 -1
- package/dist/{index-Y_anwTGP.js → index-BP3TUn8a.js} +1 -1
- package/dist/{index-YkWD0FSQ.js → index-Bd1QespN.js} +2 -2
- package/dist/{index-BiutOqCh.js → index-BzyAnnC6.js} +1 -1
- package/dist/{index-zgv_BtEm.js → index-CFPa37b9.js} +1 -1
- package/dist/{index-KUedkpQt.js → index-CH3OMdWw.js} +1 -1
- package/dist/{index-DUwcZfJ0.js → index-DT7xGHxI.js} +1 -1
- package/dist/{index-ClDtlMas.js → index-DZkJCRc2.js} +1 -1
- package/dist/{index-C8eDa5sd.js → index-xAxcFMD3.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BnmWcdWD.js → index.vue_vue_type_script_setup_true_lang-zcEAdlF2.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-DrGPCQJI.js → payout-account-Bf74kiQM.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{validator-DzjyJnvv.js → validator-CTlVogBQ.js} +1 -0
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +9 -0
- package/dist/views/admin/payout-account/tabs/SettlementEditDialog.vue.d.ts +56 -0
- package/package.json +2 -2
- package/dist/PayoutAccountSetting-EQp5EuOk.js +0 -1502
|
@@ -0,0 +1,1814 @@
|
|
|
1
|
+
import { defineComponent as D, resolveComponent as y, openBlock as g, createElementBlock as O, Fragment as j, createElementVNode as s, createVNode as a, withCtx as k, createTextVNode as P, toDisplayString as M, unref as r, reactive as de, ref as C, createBlock as w, watch as te, computed as Y, isRef as W, createCommentVNode as q, h as H, onMounted as re, resolveDynamicComponent as ne, normalizeProps as ae, mergeProps as oe } from "vue";
|
|
2
|
+
import { p as G } from "./index-DZkJCRc2.js";
|
|
3
|
+
import { u as X, e as $ } from "./index-BP3TUn8a.js";
|
|
4
|
+
import { _ as pe } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
5
|
+
import { useRouter as ye } from "vue-router";
|
|
6
|
+
import { u as ee } from "./index-BzyAnnC6.js";
|
|
7
|
+
import { _ as Z } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-CmWaoyuX.js";
|
|
8
|
+
import { h as be } from "./moment-h96o7c8I.js";
|
|
9
|
+
import { useDialogChild as fe, useDialog as ie, useSnackbar as J, components as ve } from "@feedmepos/ui-library";
|
|
10
|
+
import { P as Q } from "./PDFViewer-CIPPbzWD.js";
|
|
11
|
+
import { u as z } from "./error-K1CakhA9.js";
|
|
12
|
+
import { P as ge } from "./payout-account-Bf74kiQM.js";
|
|
13
|
+
import { d as se } from "./index-B0DzMdAx.js";
|
|
14
|
+
import { s as L, o as Fe, z as A, a as N } from "./validator-CTlVogBQ.js";
|
|
15
|
+
import { _ as xe } from "./TextInputDialog.vue_vue_type_script_setup_true_lang-BvGYVca0.js";
|
|
16
|
+
import { useCoreStore as me } from "@feedmepos/mf-common";
|
|
17
|
+
const ke = { class: "flex gap-16 mb-6" }, Ve = { class: "flex gap-16 mb-6" }, we = /* @__PURE__ */ D({
|
|
18
|
+
__name: "Information",
|
|
19
|
+
props: {
|
|
20
|
+
payoutAccount: {
|
|
21
|
+
type: Object,
|
|
22
|
+
required: !0
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
setup(n) {
|
|
26
|
+
return (u, e) => {
|
|
27
|
+
var m, f;
|
|
28
|
+
const b = y("FmCardHeader"), l = y("FmCardSection"), t = y("FmCard");
|
|
29
|
+
return g(), O(j, null, [
|
|
30
|
+
s("div", ke, [
|
|
31
|
+
a(t, {
|
|
32
|
+
horizontal: "",
|
|
33
|
+
class: "flex-1 p-6",
|
|
34
|
+
variant: "elevated"
|
|
35
|
+
}, {
|
|
36
|
+
default: k(() => [
|
|
37
|
+
a(l, { class: "flex flex-col gap-16 justify-between" }, {
|
|
38
|
+
default: k(() => [
|
|
39
|
+
a(b, {
|
|
40
|
+
class: "p-0",
|
|
41
|
+
title: "Account Info",
|
|
42
|
+
subtitle: ""
|
|
43
|
+
}),
|
|
44
|
+
a(l, { class: "p-0" }, {
|
|
45
|
+
default: k(() => {
|
|
46
|
+
var p, i, d, o, c;
|
|
47
|
+
return [
|
|
48
|
+
e[0] || (e[0] = s("b", null, "For", -1)),
|
|
49
|
+
P(": " + M((i = (p = n.payoutAccount) == null ? void 0 : p.store) == null ? void 0 : i.event) + " ", 1),
|
|
50
|
+
e[1] || (e[1] = s("br", null, null, -1)),
|
|
51
|
+
e[2] || (e[2] = s("b", null, "Reference", -1)),
|
|
52
|
+
P(": " + M((o = (d = n.payoutAccount) == null ? void 0 : d.store) == null ? void 0 : o.id), 1),
|
|
53
|
+
e[3] || (e[3] = s("br", null, null, -1)),
|
|
54
|
+
e[4] || (e[4] = s("b", null, "Business", -1)),
|
|
55
|
+
P(": " + M((c = n.payoutAccount) == null ? void 0 : c.businessId), 1),
|
|
56
|
+
e[5] || (e[5] = s("br", null, null, -1))
|
|
57
|
+
];
|
|
58
|
+
}),
|
|
59
|
+
_: 1
|
|
60
|
+
})
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
})
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
}),
|
|
67
|
+
a(t, {
|
|
68
|
+
horizontal: "",
|
|
69
|
+
class: "flex-1 p-6",
|
|
70
|
+
variant: "elevated"
|
|
71
|
+
}, {
|
|
72
|
+
default: k(() => [
|
|
73
|
+
a(l, { class: "flex flex-col gap-16 justify-between" }, {
|
|
74
|
+
default: k(() => [
|
|
75
|
+
a(b, {
|
|
76
|
+
class: "p-0",
|
|
77
|
+
title: "Key Person",
|
|
78
|
+
subtitle: ""
|
|
79
|
+
}),
|
|
80
|
+
a(l, { class: "p-0" }, {
|
|
81
|
+
default: k(() => {
|
|
82
|
+
var p, i, d, o, c, v, F, S;
|
|
83
|
+
return [
|
|
84
|
+
e[6] || (e[6] = s("b", null, "Email", -1)),
|
|
85
|
+
P(": " + M((d = (i = (p = n.payoutAccount) == null ? void 0 : p.store) == null ? void 0 : i.keyPerson) == null ? void 0 : d.email) + " ", 1),
|
|
86
|
+
e[7] || (e[7] = s("br", null, null, -1)),
|
|
87
|
+
e[8] || (e[8] = s("b", null, "Name", -1)),
|
|
88
|
+
P(": " + M((v = (c = (o = n.payoutAccount) == null ? void 0 : o.store) == null ? void 0 : c.keyPerson) == null ? void 0 : v.name), 1),
|
|
89
|
+
e[9] || (e[9] = s("br", null, null, -1)),
|
|
90
|
+
e[10] || (e[10] = s("b", null, "Phone", -1)),
|
|
91
|
+
P(": " + M((S = (F = n.payoutAccount) == null ? void 0 : F.store.keyPerson) == null ? void 0 : S.phone), 1),
|
|
92
|
+
e[11] || (e[11] = s("br", null, null, -1))
|
|
93
|
+
];
|
|
94
|
+
}),
|
|
95
|
+
_: 1
|
|
96
|
+
})
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
})
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
})
|
|
103
|
+
]),
|
|
104
|
+
s("div", Ve, [
|
|
105
|
+
a(t, {
|
|
106
|
+
horizontal: "",
|
|
107
|
+
class: "flex-1 p-6",
|
|
108
|
+
variant: "elevated"
|
|
109
|
+
}, {
|
|
110
|
+
default: k(() => [
|
|
111
|
+
a(l, { class: "flex flex-col gap-16 justify-between" }, {
|
|
112
|
+
default: k(() => [
|
|
113
|
+
a(b, {
|
|
114
|
+
class: "p-0",
|
|
115
|
+
title: "Status Info",
|
|
116
|
+
subtitle: ""
|
|
117
|
+
}),
|
|
118
|
+
a(l, { class: "p-0" }, {
|
|
119
|
+
default: k(() => {
|
|
120
|
+
var p, i, d;
|
|
121
|
+
return [
|
|
122
|
+
e[12] || (e[12] = s("b", null, "Submission Date", -1)),
|
|
123
|
+
P(": " + M((p = n.payoutAccount) != null && p.submissionDate ? r(be)(n.payoutAccount.submissionDate).format(
|
|
124
|
+
"YYYY-MM-DD HH:mm:ss"
|
|
125
|
+
) : "—"), 1),
|
|
126
|
+
e[13] || (e[13] = s("br", null, null, -1)),
|
|
127
|
+
e[14] || (e[14] = s("b", null, "Status By", -1)),
|
|
128
|
+
P(": " + M(((i = n.payoutAccount) == null ? void 0 : i.statusBy) ?? "—"), 1),
|
|
129
|
+
e[15] || (e[15] = s("br", null, null, -1)),
|
|
130
|
+
e[16] || (e[16] = s("b", null, "Status Reason", -1)),
|
|
131
|
+
P(": " + M(((d = n.payoutAccount) == null ? void 0 : d.statusReason) ?? "—"), 1),
|
|
132
|
+
e[17] || (e[17] = s("br", null, null, -1))
|
|
133
|
+
];
|
|
134
|
+
}),
|
|
135
|
+
_: 1
|
|
136
|
+
})
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
})
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
})
|
|
143
|
+
]),
|
|
144
|
+
e[18] || (e[18] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Exterior Photo", -1)),
|
|
145
|
+
a(Z, {
|
|
146
|
+
document: n.payoutAccount.store.exteriorPhoto,
|
|
147
|
+
"business-id": n.payoutAccount.businessId,
|
|
148
|
+
"restaurant-id": ((f = (m = n.payoutAccount) == null ? void 0 : m.store) == null ? void 0 : f.event) === "ORDERING" ? n.payoutAccount.store.id : void 0
|
|
149
|
+
}, null, 8, ["document", "business-id", "restaurant-id"])
|
|
150
|
+
], 64);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}), Ae = { class: "flex flex-col gap-8" }, Se = { class: "flex flex-col gap-8" }, Ne = { class: "flex justify-end mb-2" }, Ce = /* @__PURE__ */ D({
|
|
154
|
+
__name: "SettlementEditDialog",
|
|
155
|
+
props: {
|
|
156
|
+
initialValue: {
|
|
157
|
+
type: Object,
|
|
158
|
+
required: !0
|
|
159
|
+
},
|
|
160
|
+
bankNameOptions: {
|
|
161
|
+
type: Array,
|
|
162
|
+
required: !0
|
|
163
|
+
},
|
|
164
|
+
businessId: {
|
|
165
|
+
type: String,
|
|
166
|
+
required: !0
|
|
167
|
+
},
|
|
168
|
+
restaurantId: {
|
|
169
|
+
type: String,
|
|
170
|
+
default: void 0
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
setup(n) {
|
|
174
|
+
const u = n, { emitAction: e, emitData: b } = fe(), l = de({
|
|
175
|
+
companyName: u.initialValue.companyName,
|
|
176
|
+
regNo: u.initialValue.regNo,
|
|
177
|
+
bankName: u.initialValue.bankName,
|
|
178
|
+
bankHolderName: u.initialValue.bankHolderName,
|
|
179
|
+
bankAccountNumber: u.initialValue.bankAccountNumber,
|
|
180
|
+
ssm: u.initialValue.ssm,
|
|
181
|
+
bankStatement: u.initialValue.bankStatement
|
|
182
|
+
}), t = C(), m = C(), f = C(l.ssm ?? ""), p = C(l.bankStatement ?? ""), i = L().trim().min(1, "Company name is required"), d = L().trim().min(1, "Registration number is required"), o = L().trim().min(1, "Bank name is required"), c = L().trim().min(1, "Bank holder name is required"), v = L().trim().min(1, "Bank account number is required"), F = Fe({
|
|
183
|
+
companyName: i,
|
|
184
|
+
regNo: d,
|
|
185
|
+
bankName: o,
|
|
186
|
+
bankHolderName: c,
|
|
187
|
+
bankAccountNumber: v
|
|
188
|
+
}), S = () => {
|
|
189
|
+
const V = F.safeParse(l);
|
|
190
|
+
V.success && (b({
|
|
191
|
+
...V.data,
|
|
192
|
+
ssm: l.ssm,
|
|
193
|
+
bankStatement: l.bankStatement,
|
|
194
|
+
newSSM: t.value,
|
|
195
|
+
newBankStatement: m.value
|
|
196
|
+
}), e("primary"));
|
|
197
|
+
};
|
|
198
|
+
async function U(V) {
|
|
199
|
+
const x = new FileReader();
|
|
200
|
+
return new Promise((h) => {
|
|
201
|
+
x.onload = (K) => {
|
|
202
|
+
var E;
|
|
203
|
+
h((E = K.target) == null ? void 0 : E.result);
|
|
204
|
+
}, x.readAsDataURL(V);
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
const I = async (V) => {
|
|
208
|
+
t.value = V, f.value = V ? await U(V) : "";
|
|
209
|
+
}, T = async (V) => {
|
|
210
|
+
m.value = V, p.value = V ? await U(V) : "";
|
|
211
|
+
}, R = () => {
|
|
212
|
+
t.value = void 0, f.value = "";
|
|
213
|
+
}, _ = () => {
|
|
214
|
+
m.value = void 0, p.value = "";
|
|
215
|
+
};
|
|
216
|
+
return (V, x) => {
|
|
217
|
+
const h = y("FmTextField"), K = y("FmSelect"), E = y("FmButton"), le = y("FmFormGroup"), ue = y("FmDropField"), ce = y("FmForm");
|
|
218
|
+
return g(), w(ce, {
|
|
219
|
+
class: "flex flex-col gap-16",
|
|
220
|
+
onValidationSuccess: S
|
|
221
|
+
}, {
|
|
222
|
+
default: k(() => [
|
|
223
|
+
x[9] || (x[9] = s("div", { class: "flex items-center my-2" }, [
|
|
224
|
+
s("hr", { class: "w-[80px] border-t border-gray-300" }),
|
|
225
|
+
s("span", { class: "text-left mx-6 text-gray-500" }, "Account"),
|
|
226
|
+
s("hr", { class: "flex-grow border-t border-gray-300" })
|
|
227
|
+
], -1)),
|
|
228
|
+
a(h, {
|
|
229
|
+
modelValue: l.regNo,
|
|
230
|
+
"onUpdate:modelValue": x[0] || (x[0] = (B) => l.regNo = B),
|
|
231
|
+
label: "Registration Number",
|
|
232
|
+
"label-mark": "required",
|
|
233
|
+
"helper-text": "Registration Number must match uploaded SSM registration number.",
|
|
234
|
+
rules: r(A)(r(d)),
|
|
235
|
+
autofocus: ""
|
|
236
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
237
|
+
a(h, {
|
|
238
|
+
modelValue: l.companyName,
|
|
239
|
+
"onUpdate:modelValue": x[1] || (x[1] = (B) => l.companyName = B),
|
|
240
|
+
label: "Company Name",
|
|
241
|
+
"label-mark": "required",
|
|
242
|
+
"helper-text": "Company Name must match uploaded SSM registration name.",
|
|
243
|
+
rules: r(A)(r(i))
|
|
244
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
245
|
+
x[10] || (x[10] = s("div", { class: "flex items-center my-2" }, [
|
|
246
|
+
s("hr", { class: "w-[80px] border-t border-gray-300" }),
|
|
247
|
+
s("span", { class: "text-left mx-6 text-gray-500" }, "Bank"),
|
|
248
|
+
s("hr", { class: "flex-grow border-t border-gray-300" })
|
|
249
|
+
], -1)),
|
|
250
|
+
a(K, {
|
|
251
|
+
modelValue: l.bankName,
|
|
252
|
+
"onUpdate:modelValue": x[2] || (x[2] = (B) => l.bankName = B),
|
|
253
|
+
label: "Bank",
|
|
254
|
+
"label-mark": "required",
|
|
255
|
+
items: u.bankNameOptions,
|
|
256
|
+
rules: r(A)(r(o))
|
|
257
|
+
}, null, 8, ["modelValue", "items", "rules"]),
|
|
258
|
+
a(h, {
|
|
259
|
+
modelValue: l.bankHolderName,
|
|
260
|
+
"onUpdate:modelValue": x[3] || (x[3] = (B) => l.bankHolderName = B),
|
|
261
|
+
label: "Bank Holder",
|
|
262
|
+
"label-mark": "required",
|
|
263
|
+
rules: r(A)(r(c))
|
|
264
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
265
|
+
a(h, {
|
|
266
|
+
modelValue: l.bankAccountNumber,
|
|
267
|
+
"onUpdate:modelValue": x[4] || (x[4] = (B) => l.bankAccountNumber = B),
|
|
268
|
+
label: "Bank Account Number",
|
|
269
|
+
"label-mark": "required",
|
|
270
|
+
type: "number",
|
|
271
|
+
rules: r(A)(r(v))
|
|
272
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
273
|
+
x[11] || (x[11] = s("div", { class: "flex items-center my-2" }, [
|
|
274
|
+
s("hr", { class: "w-[80px] border-t border-gray-300" }),
|
|
275
|
+
s("span", { class: "text-left mx-6 text-gray-500" }, "Document"),
|
|
276
|
+
s("hr", { class: "flex-grow border-t border-gray-300" })
|
|
277
|
+
], -1)),
|
|
278
|
+
s("div", Ae, [
|
|
279
|
+
x[7] || (x[7] = s("p", { class: "fm-typo-en-body-md-500" }, "SSM (PDF)", -1)),
|
|
280
|
+
f.value ? (g(), w(le, {
|
|
281
|
+
key: 0,
|
|
282
|
+
modelValue: f.value,
|
|
283
|
+
"onUpdate:modelValue": x[5] || (x[5] = (B) => f.value = B),
|
|
284
|
+
label: "SSM"
|
|
285
|
+
}, {
|
|
286
|
+
default: k(() => [
|
|
287
|
+
a(Z, {
|
|
288
|
+
document: f.value,
|
|
289
|
+
"business-id": n.businessId,
|
|
290
|
+
"restaurant-id": n.restaurantId
|
|
291
|
+
}, {
|
|
292
|
+
default: k(({ src: B }) => [
|
|
293
|
+
a(Q, {
|
|
294
|
+
height: 300,
|
|
295
|
+
pdf: B,
|
|
296
|
+
"disable-text-layer": !0,
|
|
297
|
+
"disable-annotation-layer": !0
|
|
298
|
+
}, null, 8, ["pdf"])
|
|
299
|
+
]),
|
|
300
|
+
_: 1
|
|
301
|
+
}, 8, ["document", "business-id", "restaurant-id"]),
|
|
302
|
+
a(E, {
|
|
303
|
+
type: "button",
|
|
304
|
+
variant: "tertiary",
|
|
305
|
+
label: "Remove",
|
|
306
|
+
size: "md",
|
|
307
|
+
"prepend-icon": "delete",
|
|
308
|
+
onClick: R
|
|
309
|
+
})
|
|
310
|
+
]),
|
|
311
|
+
_: 1
|
|
312
|
+
}, 8, ["modelValue"])) : (g(), w(ue, {
|
|
313
|
+
key: 1,
|
|
314
|
+
accept: ".pdf",
|
|
315
|
+
onFileUpload: I
|
|
316
|
+
}))
|
|
317
|
+
]),
|
|
318
|
+
s("div", Se, [
|
|
319
|
+
x[8] || (x[8] = s("p", { class: "fm-typo-en-body-md-500" }, "Bank Statement (PDF)", -1)),
|
|
320
|
+
p.value ? (g(), w(le, {
|
|
321
|
+
key: 0,
|
|
322
|
+
modelValue: p.value,
|
|
323
|
+
"onUpdate:modelValue": x[6] || (x[6] = (B) => p.value = B),
|
|
324
|
+
label: "Bank Statement"
|
|
325
|
+
}, {
|
|
326
|
+
default: k(() => [
|
|
327
|
+
a(Z, {
|
|
328
|
+
document: p.value,
|
|
329
|
+
"business-id": n.businessId,
|
|
330
|
+
"restaurant-id": n.restaurantId
|
|
331
|
+
}, {
|
|
332
|
+
default: k(({ src: B }) => [
|
|
333
|
+
a(Q, {
|
|
334
|
+
height: 300,
|
|
335
|
+
pdf: B,
|
|
336
|
+
"disable-text-layer": !0,
|
|
337
|
+
"disable-annotation-layer": !0
|
|
338
|
+
}, null, 8, ["pdf"])
|
|
339
|
+
]),
|
|
340
|
+
_: 1
|
|
341
|
+
}, 8, ["document", "business-id", "restaurant-id"]),
|
|
342
|
+
a(E, {
|
|
343
|
+
type: "button",
|
|
344
|
+
variant: "tertiary",
|
|
345
|
+
label: "Remove",
|
|
346
|
+
size: "md",
|
|
347
|
+
"prepend-icon": "delete",
|
|
348
|
+
onClick: _
|
|
349
|
+
})
|
|
350
|
+
]),
|
|
351
|
+
_: 1
|
|
352
|
+
}, 8, ["modelValue"])) : (g(), w(ue, {
|
|
353
|
+
key: 1,
|
|
354
|
+
accept: ".pdf",
|
|
355
|
+
onFileUpload: T
|
|
356
|
+
}))
|
|
357
|
+
]),
|
|
358
|
+
s("div", Ne, [
|
|
359
|
+
a(E, {
|
|
360
|
+
type: "submit",
|
|
361
|
+
variant: "primary",
|
|
362
|
+
label: "Save"
|
|
363
|
+
})
|
|
364
|
+
])
|
|
365
|
+
]),
|
|
366
|
+
_: 1
|
|
367
|
+
});
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
}), Ue = { class: "flex justify-end mb-6" }, Ie = { class: "flex gap-16 mb-6" }, Te = { class: "flex gap-16" }, De = { class: "flex-1" }, Re = { class: "flex-1" }, Pe = /* @__PURE__ */ D({
|
|
371
|
+
__name: "Settlement",
|
|
372
|
+
props: {
|
|
373
|
+
onUpdate: {
|
|
374
|
+
type: Function,
|
|
375
|
+
required: !0
|
|
376
|
+
},
|
|
377
|
+
payoutAccount: {
|
|
378
|
+
type: Object,
|
|
379
|
+
required: !0
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
setup(n) {
|
|
383
|
+
const u = n, e = C(!1), b = ie(), l = J(), t = ge.bankNameOptions(), m = () => {
|
|
384
|
+
var d, o, c, v, F, S, U, I, T, R;
|
|
385
|
+
return {
|
|
386
|
+
companyName: ((d = u.payoutAccount.store) == null ? void 0 : d.companyName) ?? "",
|
|
387
|
+
regNo: ((o = u.payoutAccount.store) == null ? void 0 : o.regNo) ?? "",
|
|
388
|
+
bankName: ((v = (c = u.payoutAccount.store) == null ? void 0 : c.bank) == null ? void 0 : v.name) ?? "",
|
|
389
|
+
bankHolderName: ((S = (F = u.payoutAccount.store) == null ? void 0 : F.bank) == null ? void 0 : S.holderName) ?? "",
|
|
390
|
+
bankAccountNumber: ((I = (U = u.payoutAccount.store) == null ? void 0 : U.bank) == null ? void 0 : I.accountNumber) ?? "",
|
|
391
|
+
ssm: ((T = u.payoutAccount.store) == null ? void 0 : T.ssm) ?? "",
|
|
392
|
+
bankStatement: ((R = u.payoutAccount.store) == null ? void 0 : R.bankStatement) ?? ""
|
|
393
|
+
};
|
|
394
|
+
}, f = async (d, o) => {
|
|
395
|
+
var F;
|
|
396
|
+
const c = (/* @__PURE__ */ new Date()).toISOString();
|
|
397
|
+
if (((F = u.payoutAccount.store) == null ? void 0 : F.event) === "ORDERING")
|
|
398
|
+
return await se.upload(
|
|
399
|
+
`restaurant/${u.payoutAccount.store.id}/documents/${d}/${c}.pdf`,
|
|
400
|
+
o,
|
|
401
|
+
u.payoutAccount.store.id
|
|
402
|
+
);
|
|
403
|
+
const v = u.payoutAccount.businessId || u.payoutAccount.store.id;
|
|
404
|
+
return await se.upload(
|
|
405
|
+
`business/${v}/documents/${d}/${c}.pdf`,
|
|
406
|
+
o
|
|
407
|
+
);
|
|
408
|
+
}, p = async (d) => {
|
|
409
|
+
if (!u.payoutAccount.store) return;
|
|
410
|
+
let o = u.payoutAccount.store.ssm;
|
|
411
|
+
d.newSSM && (o = await f("ssm", d.newSSM));
|
|
412
|
+
let c = u.payoutAccount.store.bankStatement;
|
|
413
|
+
d.newBankStatement && (c = await f(
|
|
414
|
+
"bankStatement",
|
|
415
|
+
d.newBankStatement
|
|
416
|
+
));
|
|
417
|
+
const v = {
|
|
418
|
+
...u.payoutAccount,
|
|
419
|
+
store: {
|
|
420
|
+
...u.payoutAccount.store,
|
|
421
|
+
companyName: d.companyName,
|
|
422
|
+
regNo: d.regNo,
|
|
423
|
+
bank: {
|
|
424
|
+
...u.payoutAccount.store.bank ?? {},
|
|
425
|
+
name: d.bankName,
|
|
426
|
+
holderName: d.bankHolderName,
|
|
427
|
+
accountNumber: d.bankAccountNumber
|
|
428
|
+
},
|
|
429
|
+
ssm: o,
|
|
430
|
+
bankStatement: c
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
try {
|
|
434
|
+
e.value = !0, await u.onUpdate(v), l.open({
|
|
435
|
+
type: "success",
|
|
436
|
+
title: "Settlement info updated successfully"
|
|
437
|
+
}), b.close();
|
|
438
|
+
} catch (F) {
|
|
439
|
+
l.open({
|
|
440
|
+
type: "error",
|
|
441
|
+
title: "Failed to update settlement info",
|
|
442
|
+
message: z(F)
|
|
443
|
+
});
|
|
444
|
+
} finally {
|
|
445
|
+
e.value = !1;
|
|
446
|
+
}
|
|
447
|
+
}, i = () => {
|
|
448
|
+
var d;
|
|
449
|
+
b.close(), b.open({
|
|
450
|
+
title: "Edit Settlement Info",
|
|
451
|
+
closeButton: !0,
|
|
452
|
+
overlay: !0,
|
|
453
|
+
contentComponent: Ce,
|
|
454
|
+
contentComponentProps: {
|
|
455
|
+
initialValue: m(),
|
|
456
|
+
bankNameOptions: t,
|
|
457
|
+
businessId: u.payoutAccount.businessId,
|
|
458
|
+
restaurantId: ((d = u.payoutAccount.store) == null ? void 0 : d.event) === "ORDERING" ? u.payoutAccount.store.id : void 0
|
|
459
|
+
}
|
|
460
|
+
}).onPrimary((o) => {
|
|
461
|
+
p(o);
|
|
462
|
+
});
|
|
463
|
+
};
|
|
464
|
+
return (d, o) => {
|
|
465
|
+
var U, I, T, R;
|
|
466
|
+
const c = y("FmButton"), v = y("FmCardHeader"), F = y("FmCardSection"), S = y("FmCard");
|
|
467
|
+
return g(), O(j, null, [
|
|
468
|
+
s("div", Ue, [
|
|
469
|
+
a(c, {
|
|
470
|
+
variant: "primary",
|
|
471
|
+
label: "Edit Settlement Info",
|
|
472
|
+
loading: e.value,
|
|
473
|
+
onclick: i
|
|
474
|
+
}, null, 8, ["loading"])
|
|
475
|
+
]),
|
|
476
|
+
s("div", Ie, [
|
|
477
|
+
a(S, {
|
|
478
|
+
horizontal: "",
|
|
479
|
+
class: "flex-1 p-6",
|
|
480
|
+
variant: "elevated"
|
|
481
|
+
}, {
|
|
482
|
+
default: k(() => [
|
|
483
|
+
a(F, { class: "flex flex-col gap-16 justify-between" }, {
|
|
484
|
+
default: k(() => [
|
|
485
|
+
a(v, {
|
|
486
|
+
class: "p-0",
|
|
487
|
+
title: "Company Info",
|
|
488
|
+
subtitle: ""
|
|
489
|
+
}),
|
|
490
|
+
a(F, { class: "p-0" }, {
|
|
491
|
+
default: k(() => {
|
|
492
|
+
var _, V;
|
|
493
|
+
return [
|
|
494
|
+
o[0] || (o[0] = s("b", null, "Name", -1)),
|
|
495
|
+
P(": " + M((_ = n.payoutAccount) == null ? void 0 : _.store.companyName), 1),
|
|
496
|
+
o[1] || (o[1] = s("br", null, null, -1)),
|
|
497
|
+
o[2] || (o[2] = s("b", null, "Registration Number", -1)),
|
|
498
|
+
P(": " + M((V = n.payoutAccount) == null ? void 0 : V.store.regNo), 1),
|
|
499
|
+
o[3] || (o[3] = s("br", null, null, -1))
|
|
500
|
+
];
|
|
501
|
+
}),
|
|
502
|
+
_: 1
|
|
503
|
+
})
|
|
504
|
+
]),
|
|
505
|
+
_: 1
|
|
506
|
+
})
|
|
507
|
+
]),
|
|
508
|
+
_: 1
|
|
509
|
+
}),
|
|
510
|
+
a(S, {
|
|
511
|
+
horizontal: "",
|
|
512
|
+
class: "flex-1 p-6",
|
|
513
|
+
variant: "elevated"
|
|
514
|
+
}, {
|
|
515
|
+
default: k(() => [
|
|
516
|
+
a(F, { class: "flex flex-col gap-16 justify-between" }, {
|
|
517
|
+
default: k(() => [
|
|
518
|
+
a(v, {
|
|
519
|
+
class: "p-0",
|
|
520
|
+
title: "Bank Info",
|
|
521
|
+
subtitle: ""
|
|
522
|
+
}),
|
|
523
|
+
a(F, { class: "p-0" }, {
|
|
524
|
+
default: k(() => {
|
|
525
|
+
var _, V, x, h, K, E;
|
|
526
|
+
return [
|
|
527
|
+
o[4] || (o[4] = s("b", null, "Bank", -1)),
|
|
528
|
+
P(": " + M((V = (_ = n.payoutAccount) == null ? void 0 : _.store.bank) == null ? void 0 : V.name), 1),
|
|
529
|
+
o[5] || (o[5] = s("br", null, null, -1)),
|
|
530
|
+
o[6] || (o[6] = s("b", null, "Name", -1)),
|
|
531
|
+
P(": " + M((h = (x = n.payoutAccount) == null ? void 0 : x.store.bank) == null ? void 0 : h.holderName), 1),
|
|
532
|
+
o[7] || (o[7] = s("br", null, null, -1)),
|
|
533
|
+
o[8] || (o[8] = s("b", null, "Number", -1)),
|
|
534
|
+
P(": " + M((E = (K = n.payoutAccount) == null ? void 0 : K.store.bank) == null ? void 0 : E.accountNumber), 1)
|
|
535
|
+
];
|
|
536
|
+
}),
|
|
537
|
+
_: 1
|
|
538
|
+
})
|
|
539
|
+
]),
|
|
540
|
+
_: 1
|
|
541
|
+
})
|
|
542
|
+
]),
|
|
543
|
+
_: 1
|
|
544
|
+
})
|
|
545
|
+
]),
|
|
546
|
+
s("div", Te, [
|
|
547
|
+
s("div", De, [
|
|
548
|
+
o[9] || (o[9] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
|
|
549
|
+
a(Z, {
|
|
550
|
+
"business-id": n.payoutAccount.businessId,
|
|
551
|
+
"restaurant-id": ((I = (U = n.payoutAccount) == null ? void 0 : U.store) == null ? void 0 : I.event) === "ORDERING" ? n.payoutAccount.store.id : void 0,
|
|
552
|
+
document: n.payoutAccount.store.ssm
|
|
553
|
+
}, {
|
|
554
|
+
default: k(({ src: _ }) => [
|
|
555
|
+
a(Q, {
|
|
556
|
+
pdf: _,
|
|
557
|
+
"disable-text-layer": !0,
|
|
558
|
+
"disable-annotation-layer": !0
|
|
559
|
+
}, null, 8, ["pdf"])
|
|
560
|
+
]),
|
|
561
|
+
_: 1
|
|
562
|
+
}, 8, ["business-id", "restaurant-id", "document"])
|
|
563
|
+
]),
|
|
564
|
+
s("div", Re, [
|
|
565
|
+
o[10] || (o[10] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
|
|
566
|
+
a(Z, {
|
|
567
|
+
"business-id": n.payoutAccount.businessId,
|
|
568
|
+
"restaurant-id": ((R = (T = n.payoutAccount) == null ? void 0 : T.store) == null ? void 0 : R.event) === "ORDERING" ? n.payoutAccount.store.id : void 0,
|
|
569
|
+
document: n.payoutAccount.store.bankStatement
|
|
570
|
+
}, {
|
|
571
|
+
default: k(({ src: _ }) => [
|
|
572
|
+
a(Q, {
|
|
573
|
+
pdf: _,
|
|
574
|
+
"disable-text-layer": !0,
|
|
575
|
+
"disable-annotation-layer": !0
|
|
576
|
+
}, null, 8, ["pdf"])
|
|
577
|
+
]),
|
|
578
|
+
_: 1
|
|
579
|
+
}, 8, ["business-id", "restaurant-id", "document"])
|
|
580
|
+
])
|
|
581
|
+
])
|
|
582
|
+
], 64);
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
}), _e = /* @__PURE__ */ D({
|
|
586
|
+
__name: "RateInput",
|
|
587
|
+
props: {
|
|
588
|
+
data: {},
|
|
589
|
+
onChange: { type: Function }
|
|
590
|
+
},
|
|
591
|
+
setup(n) {
|
|
592
|
+
const u = n, e = C(u.data.toString());
|
|
593
|
+
return te(e, (b) => {
|
|
594
|
+
u.onChange(parseFloat(b));
|
|
595
|
+
}), (b, l) => {
|
|
596
|
+
const t = y("FmTextField");
|
|
597
|
+
return g(), w(t, {
|
|
598
|
+
inputmode: "decimal",
|
|
599
|
+
modelValue: e.value,
|
|
600
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => e.value = m)
|
|
601
|
+
}, {
|
|
602
|
+
append: k(() => [...l[1] || (l[1] = [
|
|
603
|
+
P("%", -1)
|
|
604
|
+
])]),
|
|
605
|
+
_: 1
|
|
606
|
+
}, 8, ["modelValue"]);
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
}), Be = /* @__PURE__ */ D({
|
|
610
|
+
__name: "TPlusInput",
|
|
611
|
+
props: {
|
|
612
|
+
data: {},
|
|
613
|
+
onChange: { type: Function }
|
|
614
|
+
},
|
|
615
|
+
setup(n) {
|
|
616
|
+
const u = n, e = C(u.data.toString());
|
|
617
|
+
return te(e, (b) => {
|
|
618
|
+
u.onChange(parseInt(b));
|
|
619
|
+
}), (b, l) => {
|
|
620
|
+
const t = y("FmTextField");
|
|
621
|
+
return g(), w(t, {
|
|
622
|
+
inputmode: "numeric",
|
|
623
|
+
modelValue: e.value,
|
|
624
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => e.value = m)
|
|
625
|
+
}, null, 8, ["modelValue"]);
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
}), Me = /* @__PURE__ */ D({
|
|
629
|
+
__name: "MinimumFeeInput",
|
|
630
|
+
props: {
|
|
631
|
+
data: {},
|
|
632
|
+
onChange: { type: Function }
|
|
633
|
+
},
|
|
634
|
+
setup(n) {
|
|
635
|
+
const u = n, e = C(u.data.toString());
|
|
636
|
+
return te(e, (b) => {
|
|
637
|
+
u.onChange(parseFloat(b));
|
|
638
|
+
}), (b, l) => {
|
|
639
|
+
const t = y("FmTextField");
|
|
640
|
+
return g(), w(t, {
|
|
641
|
+
inputmode: "numeric",
|
|
642
|
+
modelValue: e.value,
|
|
643
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => e.value = m)
|
|
644
|
+
}, {
|
|
645
|
+
prepend: k(() => [...l[1] || (l[1] = [
|
|
646
|
+
P("$", -1)
|
|
647
|
+
])]),
|
|
648
|
+
_: 1
|
|
649
|
+
}, 8, ["modelValue"]);
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
}), $e = { class: "flex gap-16 mt-6" }, qe = { class: "flex-1" }, he = { class: "flex-1" }, Ee = { class: "my-6 w-full flex justify-end" }, Oe = { class: "w-[320px]" }, Ge = /* @__PURE__ */ D({
|
|
653
|
+
__name: "PaymentStatus",
|
|
654
|
+
props: {
|
|
655
|
+
onUpdate: {
|
|
656
|
+
type: Function,
|
|
657
|
+
required: !0
|
|
658
|
+
},
|
|
659
|
+
payoutAccount: {
|
|
660
|
+
type: Object,
|
|
661
|
+
required: !0
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
setup(n) {
|
|
665
|
+
const u = n, e = C(!1), b = J(), l = ie(), t = async (o) => {
|
|
666
|
+
try {
|
|
667
|
+
e.value = !0, await u.onUpdate(o), b.open({
|
|
668
|
+
type: "success",
|
|
669
|
+
title: "Payout account update succesfully"
|
|
670
|
+
});
|
|
671
|
+
} catch (c) {
|
|
672
|
+
b.open({
|
|
673
|
+
type: "error",
|
|
674
|
+
title: "Error occurs when updating payout account",
|
|
675
|
+
message: z(c)
|
|
676
|
+
});
|
|
677
|
+
} finally {
|
|
678
|
+
e.value = !1;
|
|
679
|
+
}
|
|
680
|
+
}, m = async () => {
|
|
681
|
+
l.close(), l.open({
|
|
682
|
+
title: "Rejection Reason",
|
|
683
|
+
closeButton: !0,
|
|
684
|
+
overlay: !0,
|
|
685
|
+
contentComponent: xe,
|
|
686
|
+
contentComponentProps: {
|
|
687
|
+
label: "Reason",
|
|
688
|
+
placeholder: "Enter reason for rejection..."
|
|
689
|
+
}
|
|
690
|
+
}).onPrimary((o) => {
|
|
691
|
+
u.payoutAccount.enable = !1, u.payoutAccount.status = "REJECTED", u.payoutAccount.statusReason = o, t(u.payoutAccount), l.close();
|
|
692
|
+
});
|
|
693
|
+
}, { search: f } = ee({
|
|
694
|
+
search: ""
|
|
695
|
+
}), p = Y(() => {
|
|
696
|
+
const { ssm: o, bank: c, bankStatement: v } = u.payoutAccount.store;
|
|
697
|
+
return o && c && c.name && c.accountNumber && c.holderName && v;
|
|
698
|
+
}), i = C(""), d = [
|
|
699
|
+
{
|
|
700
|
+
header: () => "Payment Method",
|
|
701
|
+
accessorKey: "issuer",
|
|
702
|
+
cell: (o) => `${o.row.original.issuer} (${o.row.original.variant})`
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
header: () => "Rate",
|
|
706
|
+
accessorKey: "rate",
|
|
707
|
+
cell: ({ row: o }) => {
|
|
708
|
+
let c = 0;
|
|
709
|
+
return o.original.rate && (c = o.original.rate.amount / Math.pow(10, o.original.rate.precision)), H(_e, {
|
|
710
|
+
data: c,
|
|
711
|
+
onChange: (v) => {
|
|
712
|
+
const F = u.payoutAccount.methods.at(o.index);
|
|
713
|
+
F.rate || (F.rate = {
|
|
714
|
+
amount: 0,
|
|
715
|
+
precision: 4
|
|
716
|
+
}), F.rate.amount = v * Math.pow(10, F.rate.precision);
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
header: () => "Minimum Fee",
|
|
723
|
+
accessorKey: "minimumFee",
|
|
724
|
+
cell: ({ row: o }) => {
|
|
725
|
+
let c = 0;
|
|
726
|
+
return o.original.minimumFee && (c = o.original.minimumFee.amount / Math.pow(10, o.original.minimumFee.precision)), H(Me, {
|
|
727
|
+
data: c,
|
|
728
|
+
onChange: (v) => {
|
|
729
|
+
const F = u.payoutAccount.methods.at(o.index);
|
|
730
|
+
F.minimumFee || (F.minimumFee = {
|
|
731
|
+
amount: 0,
|
|
732
|
+
precision: 2
|
|
733
|
+
}), F.minimumFee.amount = v * Math.pow(10, F.minimumFee.precision);
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
header: () => "T plus",
|
|
740
|
+
accessorKey: "tPlus",
|
|
741
|
+
cell: ({ row: o }) => H(Be, {
|
|
742
|
+
data: o.original.tPlus ?? 0,
|
|
743
|
+
onChange: (c) => {
|
|
744
|
+
const v = u.payoutAccount.methods.at(o.index);
|
|
745
|
+
v.tPlus = c;
|
|
746
|
+
}
|
|
747
|
+
})
|
|
748
|
+
}
|
|
749
|
+
];
|
|
750
|
+
return (o, c) => {
|
|
751
|
+
const v = y("FmRadio"), F = y("FmRadioGroup"), S = y("FmSwitch"), U = y("FmSearch"), I = y("FmTable"), T = y("FmButton");
|
|
752
|
+
return g(), O(j, null, [
|
|
753
|
+
s("div", $e, [
|
|
754
|
+
s("div", qe, [
|
|
755
|
+
a(F, {
|
|
756
|
+
modelValue: n.payoutAccount.status,
|
|
757
|
+
"onUpdate:modelValue": c[0] || (c[0] = (R) => n.payoutAccount.status = R),
|
|
758
|
+
label: "Account Status"
|
|
759
|
+
}, {
|
|
760
|
+
default: k(() => [
|
|
761
|
+
a(v, {
|
|
762
|
+
value: "PENDING",
|
|
763
|
+
label: "Pending"
|
|
764
|
+
}),
|
|
765
|
+
a(v, {
|
|
766
|
+
value: "APPROVED",
|
|
767
|
+
label: "Approved"
|
|
768
|
+
}),
|
|
769
|
+
a(v, {
|
|
770
|
+
value: "REJECTED",
|
|
771
|
+
label: "Rejected",
|
|
772
|
+
onClick: m
|
|
773
|
+
})
|
|
774
|
+
]),
|
|
775
|
+
_: 1
|
|
776
|
+
}, 8, ["modelValue"])
|
|
777
|
+
]),
|
|
778
|
+
s("div", he, [
|
|
779
|
+
a(S, {
|
|
780
|
+
modelValue: n.payoutAccount.enable,
|
|
781
|
+
"onUpdate:modelValue": c[1] || (c[1] = (R) => n.payoutAccount.enable = R),
|
|
782
|
+
disabled: !p.value,
|
|
783
|
+
label: "Enabled",
|
|
784
|
+
sublabel: "Merchant can use online features such as e-payment, settlement"
|
|
785
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
786
|
+
])
|
|
787
|
+
]),
|
|
788
|
+
n.payoutAccount.enable ? (g(), O(j, { key: 0 }, [
|
|
789
|
+
s("div", Ee, [
|
|
790
|
+
s("div", Oe, [
|
|
791
|
+
a(U, {
|
|
792
|
+
modelValue: r(f),
|
|
793
|
+
"onUpdate:modelValue": c[2] || (c[2] = (R) => W(f) ? f.value = R : null),
|
|
794
|
+
placeholder: "Search Method ..."
|
|
795
|
+
}, null, 8, ["modelValue"])
|
|
796
|
+
])
|
|
797
|
+
]),
|
|
798
|
+
a(I, {
|
|
799
|
+
class: "mt-6",
|
|
800
|
+
modelValue: i.value,
|
|
801
|
+
"onUpdate:modelValue": c[3] || (c[3] = (R) => i.value = R),
|
|
802
|
+
"shrink-at": !1,
|
|
803
|
+
"search-value": r(f),
|
|
804
|
+
"row-data": n.payoutAccount.methods,
|
|
805
|
+
"column-defs": d
|
|
806
|
+
}, null, 8, ["modelValue", "search-value", "row-data"])
|
|
807
|
+
], 64)) : q("", !0),
|
|
808
|
+
a(T, {
|
|
809
|
+
class: "w-full mt-6",
|
|
810
|
+
variant: "primary",
|
|
811
|
+
label: "Save",
|
|
812
|
+
loading: e.value,
|
|
813
|
+
onclick: () => t(n.payoutAccount)
|
|
814
|
+
}, null, 8, ["loading", "onclick"])
|
|
815
|
+
], 64);
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
}), Ke = { class: "flex" }, je = /* @__PURE__ */ D({
|
|
819
|
+
__name: "Actions",
|
|
820
|
+
emits: ["edit", "delete"],
|
|
821
|
+
setup(n, { emit: u }) {
|
|
822
|
+
const e = u;
|
|
823
|
+
return (b, l) => {
|
|
824
|
+
const t = y("FmButton");
|
|
825
|
+
return g(), O("div", Ke, [
|
|
826
|
+
a(t, {
|
|
827
|
+
variant: "plain",
|
|
828
|
+
"prepend-icon": "delete",
|
|
829
|
+
onClick: l[0] || (l[0] = (m) => {
|
|
830
|
+
m.stopPropagation(), e("delete");
|
|
831
|
+
})
|
|
832
|
+
})
|
|
833
|
+
]);
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
}), Ye = { class: "flex justify-end px-6 pb-6" }, He = /* @__PURE__ */ D({
|
|
837
|
+
__name: "PaymentChannel",
|
|
838
|
+
props: {
|
|
839
|
+
payoutAccount: {
|
|
840
|
+
type: Object,
|
|
841
|
+
required: !0
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
setup(n) {
|
|
845
|
+
const u = J(), e = n, { isLoading: b, startAsyncCall: l } = X(), t = C([]);
|
|
846
|
+
function m() {
|
|
847
|
+
l(async () => {
|
|
848
|
+
t.value = await G.getChannels(e.payoutAccount._id);
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
re(m);
|
|
852
|
+
function f() {
|
|
853
|
+
l(async () => {
|
|
854
|
+
try {
|
|
855
|
+
await G.updateChannels(e.payoutAccount._id, t.value), u.open({
|
|
856
|
+
type: "success",
|
|
857
|
+
title: "Payout account channels update succesfully"
|
|
858
|
+
});
|
|
859
|
+
} catch (d) {
|
|
860
|
+
u.open({
|
|
861
|
+
type: "error",
|
|
862
|
+
title: "Error occurs when updating payout account channels",
|
|
863
|
+
message: z(d)
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
function p() {
|
|
869
|
+
l(async () => {
|
|
870
|
+
try {
|
|
871
|
+
await G.resetChannels(e.payoutAccount._id), t.value = await G.getChannels(e.payoutAccount._id), u.open({
|
|
872
|
+
type: "success",
|
|
873
|
+
title: "Payout account channels reset succesfully"
|
|
874
|
+
});
|
|
875
|
+
} catch (d) {
|
|
876
|
+
u.open({
|
|
877
|
+
type: "error",
|
|
878
|
+
title: "Error occurs when reset payout account channels",
|
|
879
|
+
message: z(d)
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
const i = [
|
|
885
|
+
{
|
|
886
|
+
header: () => "Gateway",
|
|
887
|
+
accessorKey: "gateway"
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
header: () => "Payment Type",
|
|
891
|
+
accessorKey: "type"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
header: () => "Display",
|
|
895
|
+
accessorKey: "icon",
|
|
896
|
+
cell: ({ row: d }) => H("img", { src: d.original.icon, width: 32, height: 32 })
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
header: () => "Label",
|
|
900
|
+
accessorKey: "label",
|
|
901
|
+
cell: ({ row: d }) => H(ve.FmTextField, {
|
|
902
|
+
modelValue: d.original.label,
|
|
903
|
+
"onUpdate:modelValue": (o) => d.original.label = o
|
|
904
|
+
})
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
id: "actions",
|
|
908
|
+
header: () => "Actions",
|
|
909
|
+
cell: ({ row: d }) => H(je, {
|
|
910
|
+
onDelete: () => t.value.splice(d.index, 1)
|
|
911
|
+
})
|
|
912
|
+
}
|
|
913
|
+
];
|
|
914
|
+
return (d, o) => {
|
|
915
|
+
const c = y("FmButton"), v = y("FmTable");
|
|
916
|
+
return g(), O(j, null, [
|
|
917
|
+
s("div", Ye, [
|
|
918
|
+
a(c, {
|
|
919
|
+
class: "mx-4",
|
|
920
|
+
variant: "destructive",
|
|
921
|
+
size: "md",
|
|
922
|
+
icon: "history",
|
|
923
|
+
label: "Reset",
|
|
924
|
+
onClick: p
|
|
925
|
+
}),
|
|
926
|
+
a(c, {
|
|
927
|
+
variant: "primary",
|
|
928
|
+
size: "md",
|
|
929
|
+
icon: "save",
|
|
930
|
+
label: "Save",
|
|
931
|
+
onClick: f
|
|
932
|
+
})
|
|
933
|
+
]),
|
|
934
|
+
a(v, {
|
|
935
|
+
loading: r(b),
|
|
936
|
+
"row-data": t.value,
|
|
937
|
+
"column-defs": i,
|
|
938
|
+
"shrink-at": !1
|
|
939
|
+
}, null, 8, ["loading", "row-data"])
|
|
940
|
+
], 64);
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
}), ze = { class: "flex mt-6 space-x-6" }, Le = /* @__PURE__ */ D({
|
|
944
|
+
__name: "FiuuGateway",
|
|
945
|
+
props: {
|
|
946
|
+
gateway: {
|
|
947
|
+
type: Object,
|
|
948
|
+
required: !0
|
|
949
|
+
},
|
|
950
|
+
onUpdate: {
|
|
951
|
+
type: Function,
|
|
952
|
+
required: !0
|
|
953
|
+
},
|
|
954
|
+
onDelete: {
|
|
955
|
+
type: Function,
|
|
956
|
+
required: !0
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
setup(n) {
|
|
960
|
+
var b;
|
|
961
|
+
const e = C(((b = n.gateway) == null ? void 0 : b.config) || {
|
|
962
|
+
merchantId: "",
|
|
963
|
+
verifyKey: "",
|
|
964
|
+
secretKey: ""
|
|
965
|
+
});
|
|
966
|
+
return (l, t) => {
|
|
967
|
+
const m = y("FmTextField"), f = y("FmButton"), p = y("FmForm");
|
|
968
|
+
return g(), w(p, {
|
|
969
|
+
ref: "form",
|
|
970
|
+
class: "flex flex-col gap-16",
|
|
971
|
+
onValidationSuccess: t[3] || (t[3] = () => n.onUpdate(e.value))
|
|
972
|
+
}, {
|
|
973
|
+
default: k(() => [
|
|
974
|
+
a(m, {
|
|
975
|
+
modelValue: e.value.merchantId,
|
|
976
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => e.value.merchantId = i),
|
|
977
|
+
label: "Merchant ID",
|
|
978
|
+
rules: r(A)(r(N).string())
|
|
979
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
980
|
+
a(m, {
|
|
981
|
+
modelValue: e.value.verifyKey,
|
|
982
|
+
"onUpdate:modelValue": t[1] || (t[1] = (i) => e.value.verifyKey = i),
|
|
983
|
+
label: "Verify Key",
|
|
984
|
+
rules: r(A)(r(N).string())
|
|
985
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
986
|
+
a(m, {
|
|
987
|
+
modelValue: e.value.secretKey,
|
|
988
|
+
"onUpdate:modelValue": t[2] || (t[2] = (i) => e.value.secretKey = i),
|
|
989
|
+
label: "Secret Key",
|
|
990
|
+
rules: r(A)(r(N).string())
|
|
991
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
992
|
+
s("div", ze, [
|
|
993
|
+
n.gateway ? (g(), w(f, {
|
|
994
|
+
key: 0,
|
|
995
|
+
class: "flex-1",
|
|
996
|
+
variant: "secondary",
|
|
997
|
+
label: "Delete",
|
|
998
|
+
onclick: () => n.onDelete()
|
|
999
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
|
1000
|
+
a(f, {
|
|
1001
|
+
type: "submit",
|
|
1002
|
+
class: "flex-1",
|
|
1003
|
+
variant: "primary",
|
|
1004
|
+
label: "Save"
|
|
1005
|
+
})
|
|
1006
|
+
])
|
|
1007
|
+
]),
|
|
1008
|
+
_: 1
|
|
1009
|
+
}, 512);
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
}), Ze = { class: "flex mt-6 space-x-6" }, Je = /* @__PURE__ */ D({
|
|
1013
|
+
__name: "MacauPassGateway",
|
|
1014
|
+
props: {
|
|
1015
|
+
gateway: {
|
|
1016
|
+
type: Object,
|
|
1017
|
+
required: !0
|
|
1018
|
+
},
|
|
1019
|
+
onUpdate: {
|
|
1020
|
+
type: Function,
|
|
1021
|
+
required: !0
|
|
1022
|
+
},
|
|
1023
|
+
onDelete: {
|
|
1024
|
+
type: Function,
|
|
1025
|
+
required: !0
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
setup(n) {
|
|
1029
|
+
var b;
|
|
1030
|
+
const e = C(((b = n.gateway) == null ? void 0 : b.config) || {
|
|
1031
|
+
merchantId: "",
|
|
1032
|
+
merchantName: "",
|
|
1033
|
+
merchantCategoryCode: "",
|
|
1034
|
+
storeID: "",
|
|
1035
|
+
storeName: ""
|
|
1036
|
+
});
|
|
1037
|
+
return (l, t) => {
|
|
1038
|
+
const m = y("FmTextField"), f = y("FmButton"), p = y("FmForm");
|
|
1039
|
+
return g(), w(p, {
|
|
1040
|
+
ref: "form",
|
|
1041
|
+
class: "flex flex-col gap-16",
|
|
1042
|
+
onValidationSuccess: t[5] || (t[5] = () => n.onUpdate(e.value))
|
|
1043
|
+
}, {
|
|
1044
|
+
default: k(() => [
|
|
1045
|
+
a(m, {
|
|
1046
|
+
modelValue: e.value.merchantId,
|
|
1047
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => e.value.merchantId = i),
|
|
1048
|
+
label: "Merchant ID",
|
|
1049
|
+
rules: r(A)(r(N).string())
|
|
1050
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1051
|
+
a(m, {
|
|
1052
|
+
modelValue: e.value.merchantName,
|
|
1053
|
+
"onUpdate:modelValue": t[1] || (t[1] = (i) => e.value.merchantName = i),
|
|
1054
|
+
label: "Merchant Name",
|
|
1055
|
+
rules: r(A)(r(N).string())
|
|
1056
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1057
|
+
a(m, {
|
|
1058
|
+
modelValue: e.value.merchantCategoryCode,
|
|
1059
|
+
"onUpdate:modelValue": t[2] || (t[2] = (i) => e.value.merchantCategoryCode = i),
|
|
1060
|
+
label: "Merchant MCC",
|
|
1061
|
+
rules: r(A)(r(N).string())
|
|
1062
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1063
|
+
a(m, {
|
|
1064
|
+
modelValue: e.value.storeID,
|
|
1065
|
+
"onUpdate:modelValue": t[3] || (t[3] = (i) => e.value.storeID = i),
|
|
1066
|
+
label: "Store ID",
|
|
1067
|
+
rules: r(A)(r(N).string())
|
|
1068
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1069
|
+
a(m, {
|
|
1070
|
+
modelValue: e.value.storeName,
|
|
1071
|
+
"onUpdate:modelValue": t[4] || (t[4] = (i) => e.value.storeName = i),
|
|
1072
|
+
label: "Store Name",
|
|
1073
|
+
rules: r(A)(r(N).string())
|
|
1074
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1075
|
+
s("div", Ze, [
|
|
1076
|
+
n.gateway ? (g(), w(f, {
|
|
1077
|
+
key: 0,
|
|
1078
|
+
class: "flex-1",
|
|
1079
|
+
variant: "secondary",
|
|
1080
|
+
label: "Delete",
|
|
1081
|
+
onclick: () => n.onDelete()
|
|
1082
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
|
1083
|
+
a(f, {
|
|
1084
|
+
type: "submit",
|
|
1085
|
+
class: "flex-1",
|
|
1086
|
+
variant: "primary",
|
|
1087
|
+
label: "Save"
|
|
1088
|
+
})
|
|
1089
|
+
])
|
|
1090
|
+
]),
|
|
1091
|
+
_: 1
|
|
1092
|
+
}, 512);
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
1095
|
+
}), Qe = { class: "flex mt-6 space-x-6" }, We = /* @__PURE__ */ D({
|
|
1096
|
+
__name: "DigioGateway",
|
|
1097
|
+
props: {
|
|
1098
|
+
gateway: {
|
|
1099
|
+
type: Object,
|
|
1100
|
+
required: !0
|
|
1101
|
+
},
|
|
1102
|
+
onUpdate: {
|
|
1103
|
+
type: Function,
|
|
1104
|
+
required: !0
|
|
1105
|
+
},
|
|
1106
|
+
onDelete: {
|
|
1107
|
+
type: Function,
|
|
1108
|
+
required: !0
|
|
1109
|
+
}
|
|
1110
|
+
},
|
|
1111
|
+
setup(n) {
|
|
1112
|
+
var b;
|
|
1113
|
+
const e = C(((b = n.gateway) == null ? void 0 : b.config) || {
|
|
1114
|
+
merchantId: "",
|
|
1115
|
+
cardMerchantId: ""
|
|
1116
|
+
});
|
|
1117
|
+
return (l, t) => {
|
|
1118
|
+
const m = y("FmTextField"), f = y("FmButton"), p = y("FmForm");
|
|
1119
|
+
return g(), w(p, {
|
|
1120
|
+
ref: "form",
|
|
1121
|
+
class: "flex flex-col gap-16",
|
|
1122
|
+
onValidationSuccess: t[2] || (t[2] = () => n.onUpdate(e.value))
|
|
1123
|
+
}, {
|
|
1124
|
+
default: k(() => [
|
|
1125
|
+
a(m, {
|
|
1126
|
+
modelValue: e.value.merchantId,
|
|
1127
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => e.value.merchantId = i),
|
|
1128
|
+
label: "Merchant ID",
|
|
1129
|
+
rules: r(A)(r(N).string())
|
|
1130
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1131
|
+
a(m, {
|
|
1132
|
+
modelValue: e.value.cardMerchantId,
|
|
1133
|
+
"onUpdate:modelValue": t[1] || (t[1] = (i) => e.value.cardMerchantId = i),
|
|
1134
|
+
label: "Card Merchant ID",
|
|
1135
|
+
rules: r(A)(r(N).string())
|
|
1136
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1137
|
+
s("div", Qe, [
|
|
1138
|
+
n.gateway ? (g(), w(f, {
|
|
1139
|
+
key: 0,
|
|
1140
|
+
class: "flex-1",
|
|
1141
|
+
variant: "secondary",
|
|
1142
|
+
label: "Delete",
|
|
1143
|
+
onclick: () => n.onDelete()
|
|
1144
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
|
1145
|
+
a(f, {
|
|
1146
|
+
type: "submit",
|
|
1147
|
+
class: "flex-1",
|
|
1148
|
+
variant: "primary",
|
|
1149
|
+
label: "Save"
|
|
1150
|
+
})
|
|
1151
|
+
])
|
|
1152
|
+
]),
|
|
1153
|
+
_: 1
|
|
1154
|
+
}, 512);
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
}), Xe = { class: "flex mt-6 space-x-6" }, et = /* @__PURE__ */ D({
|
|
1158
|
+
__name: "AdyenGateway",
|
|
1159
|
+
props: {
|
|
1160
|
+
gateway: {
|
|
1161
|
+
type: Object,
|
|
1162
|
+
required: !0
|
|
1163
|
+
},
|
|
1164
|
+
onUpdate: {
|
|
1165
|
+
type: Function,
|
|
1166
|
+
required: !0
|
|
1167
|
+
},
|
|
1168
|
+
onDelete: {
|
|
1169
|
+
type: Function,
|
|
1170
|
+
required: !0
|
|
1171
|
+
}
|
|
1172
|
+
},
|
|
1173
|
+
setup(n) {
|
|
1174
|
+
var b;
|
|
1175
|
+
const e = C(((b = n.gateway) == null ? void 0 : b.config) || {
|
|
1176
|
+
merchantAccount: "",
|
|
1177
|
+
username: "",
|
|
1178
|
+
apiKey: "",
|
|
1179
|
+
clientKey: "",
|
|
1180
|
+
endpoint: "",
|
|
1181
|
+
hmacKey: ""
|
|
1182
|
+
});
|
|
1183
|
+
return (l, t) => {
|
|
1184
|
+
const m = y("FmTextField"), f = y("FmButton"), p = y("FmForm");
|
|
1185
|
+
return g(), w(p, {
|
|
1186
|
+
ref: "form",
|
|
1187
|
+
class: "flex flex-col gap-16",
|
|
1188
|
+
onValidationSuccess: t[6] || (t[6] = () => n.onUpdate(e.value))
|
|
1189
|
+
}, {
|
|
1190
|
+
default: k(() => [
|
|
1191
|
+
a(m, {
|
|
1192
|
+
modelValue: e.value.endpoint,
|
|
1193
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => e.value.endpoint = i),
|
|
1194
|
+
label: "Endpoint",
|
|
1195
|
+
rules: r(A)(r(N).string())
|
|
1196
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1197
|
+
a(m, {
|
|
1198
|
+
modelValue: e.value.merchantAccount,
|
|
1199
|
+
"onUpdate:modelValue": t[1] || (t[1] = (i) => e.value.merchantAccount = i),
|
|
1200
|
+
label: "Merchant Account",
|
|
1201
|
+
rules: r(A)(r(N).string())
|
|
1202
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1203
|
+
a(m, {
|
|
1204
|
+
modelValue: e.value.username,
|
|
1205
|
+
"onUpdate:modelValue": t[2] || (t[2] = (i) => e.value.username = i),
|
|
1206
|
+
label: "Username",
|
|
1207
|
+
rules: r(A)(r(N).string())
|
|
1208
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1209
|
+
a(m, {
|
|
1210
|
+
modelValue: e.value.apiKey,
|
|
1211
|
+
"onUpdate:modelValue": t[3] || (t[3] = (i) => e.value.apiKey = i),
|
|
1212
|
+
label: "API Key",
|
|
1213
|
+
rules: r(A)(r(N).string())
|
|
1214
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1215
|
+
a(m, {
|
|
1216
|
+
modelValue: e.value.clientKey,
|
|
1217
|
+
"onUpdate:modelValue": t[4] || (t[4] = (i) => e.value.clientKey = i),
|
|
1218
|
+
label: "Client Key",
|
|
1219
|
+
rules: r(A)(r(N).string())
|
|
1220
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1221
|
+
a(m, {
|
|
1222
|
+
modelValue: e.value.hmacKey,
|
|
1223
|
+
"onUpdate:modelValue": t[5] || (t[5] = (i) => e.value.hmacKey = i),
|
|
1224
|
+
label: "HMac Key"
|
|
1225
|
+
}, null, 8, ["modelValue"]),
|
|
1226
|
+
s("div", Xe, [
|
|
1227
|
+
n.gateway ? (g(), w(f, {
|
|
1228
|
+
key: 0,
|
|
1229
|
+
class: "flex-1",
|
|
1230
|
+
variant: "secondary",
|
|
1231
|
+
label: "Delete",
|
|
1232
|
+
onclick: () => n.onDelete()
|
|
1233
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
|
1234
|
+
a(f, {
|
|
1235
|
+
type: "submit",
|
|
1236
|
+
class: "flex-1",
|
|
1237
|
+
variant: "primary",
|
|
1238
|
+
label: "Save"
|
|
1239
|
+
})
|
|
1240
|
+
])
|
|
1241
|
+
]),
|
|
1242
|
+
_: 1
|
|
1243
|
+
}, 512);
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
}), tt = { class: "flex mt-6 space-x-6" }, nt = /* @__PURE__ */ D({
|
|
1247
|
+
__name: "KsherGateway",
|
|
1248
|
+
props: {
|
|
1249
|
+
gateway: {
|
|
1250
|
+
type: Object,
|
|
1251
|
+
required: !0
|
|
1252
|
+
},
|
|
1253
|
+
onUpdate: {
|
|
1254
|
+
type: Function,
|
|
1255
|
+
required: !0
|
|
1256
|
+
},
|
|
1257
|
+
onDelete: {
|
|
1258
|
+
type: Function,
|
|
1259
|
+
required: !0
|
|
1260
|
+
}
|
|
1261
|
+
},
|
|
1262
|
+
setup(n) {
|
|
1263
|
+
var b;
|
|
1264
|
+
const e = C(((b = n.gateway) == null ? void 0 : b.config) || {
|
|
1265
|
+
appId: "",
|
|
1266
|
+
privateKey: ""
|
|
1267
|
+
});
|
|
1268
|
+
return (l, t) => {
|
|
1269
|
+
const m = y("FmTextField"), f = y("FmTextarea"), p = y("FmButton"), i = y("FmForm");
|
|
1270
|
+
return g(), w(i, {
|
|
1271
|
+
ref: "form",
|
|
1272
|
+
class: "flex flex-col gap-16",
|
|
1273
|
+
onValidationSuccess: t[2] || (t[2] = () => n.onUpdate(e.value))
|
|
1274
|
+
}, {
|
|
1275
|
+
default: k(() => [
|
|
1276
|
+
a(m, {
|
|
1277
|
+
modelValue: e.value.appId,
|
|
1278
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => e.value.appId = d),
|
|
1279
|
+
label: "App ID",
|
|
1280
|
+
rules: r(A)(r(N).string())
|
|
1281
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1282
|
+
a(f, {
|
|
1283
|
+
modelValue: e.value.privateKey,
|
|
1284
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => e.value.privateKey = d),
|
|
1285
|
+
label: "Private Key",
|
|
1286
|
+
placeholder: "Paste your private key including BEGIN and END markers",
|
|
1287
|
+
rules: r(A)(r(N).string())
|
|
1288
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1289
|
+
s("div", tt, [
|
|
1290
|
+
n.gateway ? (g(), w(p, {
|
|
1291
|
+
key: 0,
|
|
1292
|
+
class: "flex-1",
|
|
1293
|
+
variant: "secondary",
|
|
1294
|
+
label: "Delete",
|
|
1295
|
+
onclick: () => n.onDelete()
|
|
1296
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
|
1297
|
+
a(p, {
|
|
1298
|
+
type: "submit",
|
|
1299
|
+
class: "flex-1",
|
|
1300
|
+
variant: "primary",
|
|
1301
|
+
label: "Save"
|
|
1302
|
+
})
|
|
1303
|
+
])
|
|
1304
|
+
]),
|
|
1305
|
+
_: 1
|
|
1306
|
+
}, 512);
|
|
1307
|
+
};
|
|
1308
|
+
}
|
|
1309
|
+
}), at = /* @__PURE__ */ D({
|
|
1310
|
+
__name: "TyroGateway",
|
|
1311
|
+
props: {
|
|
1312
|
+
gateway: {
|
|
1313
|
+
type: Object,
|
|
1314
|
+
required: !0
|
|
1315
|
+
},
|
|
1316
|
+
onUpdate: {
|
|
1317
|
+
type: Function,
|
|
1318
|
+
required: !0
|
|
1319
|
+
},
|
|
1320
|
+
onDelete: {
|
|
1321
|
+
type: Function,
|
|
1322
|
+
required: !0
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1325
|
+
setup(n) {
|
|
1326
|
+
var b;
|
|
1327
|
+
const e = C(
|
|
1328
|
+
((b = n.gateway) == null ? void 0 : b.config) || {
|
|
1329
|
+
locationId: ""
|
|
1330
|
+
}
|
|
1331
|
+
);
|
|
1332
|
+
return (l, t) => {
|
|
1333
|
+
const m = y("FmTextField"), f = y("FmForm");
|
|
1334
|
+
return g(), w(f, {
|
|
1335
|
+
ref: "form",
|
|
1336
|
+
class: "flex flex-col gap-16",
|
|
1337
|
+
onValidationSuccess: t[1] || (t[1] = () => n.onUpdate(e.value))
|
|
1338
|
+
}, {
|
|
1339
|
+
default: k(() => [
|
|
1340
|
+
a(m, {
|
|
1341
|
+
modelValue: e.value.locationId,
|
|
1342
|
+
"onUpdate:modelValue": t[0] || (t[0] = (p) => e.value.locationId = p),
|
|
1343
|
+
label: "Location ID",
|
|
1344
|
+
readonly: !0,
|
|
1345
|
+
rules: r(A)(r(N).string())
|
|
1346
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1347
|
+
]),
|
|
1348
|
+
_: 1
|
|
1349
|
+
}, 512);
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
}), ot = {
|
|
1353
|
+
key: 0,
|
|
1354
|
+
className: "mt-1 my-6 text-gray-600"
|
|
1355
|
+
}, lt = {
|
|
1356
|
+
key: 1,
|
|
1357
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
|
1358
|
+
}, ut = /* @__PURE__ */ D({
|
|
1359
|
+
__name: "PaymentGateway",
|
|
1360
|
+
props: {
|
|
1361
|
+
payoutAccount: {
|
|
1362
|
+
type: Object,
|
|
1363
|
+
required: !0
|
|
1364
|
+
}
|
|
1365
|
+
},
|
|
1366
|
+
setup(n) {
|
|
1367
|
+
const u = me().currentCountry, e = u.value, b = J(), { isLoading: l, startAsyncCall: t } = X(), { gatewayTab: m } = ee({
|
|
1368
|
+
gatewayTab: ""
|
|
1369
|
+
}), f = n, p = [
|
|
1370
|
+
{
|
|
1371
|
+
label: "Fiuu",
|
|
1372
|
+
value: "RAZER_MERCHANT_SERVICE",
|
|
1373
|
+
render: Le,
|
|
1374
|
+
region: [$.F_COUNTRY.enum.MY, $.F_COUNTRY.enum.SG]
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
label: "Macau Pass",
|
|
1378
|
+
value: "MACAU_PASS",
|
|
1379
|
+
render: Je,
|
|
1380
|
+
region: [$.F_COUNTRY.enum.MO]
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
label: "Digio",
|
|
1384
|
+
value: "DIGIO",
|
|
1385
|
+
render: We,
|
|
1386
|
+
region: [$.F_COUNTRY.enum.TH]
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
label: "Ksher",
|
|
1390
|
+
value: "KSHER",
|
|
1391
|
+
render: nt,
|
|
1392
|
+
region: [$.F_COUNTRY.enum.TH]
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
label: "Adyen",
|
|
1396
|
+
value: "ADYEN",
|
|
1397
|
+
render: et,
|
|
1398
|
+
region: [$.F_COUNTRY.enum.MY, $.F_COUNTRY.enum.SG]
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
label: "Tyro",
|
|
1402
|
+
value: "TYRO",
|
|
1403
|
+
render: at,
|
|
1404
|
+
region: [$.F_COUNTRY.enum.AU]
|
|
1405
|
+
}
|
|
1406
|
+
], i = C(
|
|
1407
|
+
f.payoutAccount.gateways ?? []
|
|
1408
|
+
), d = Y(() => p.find((S) => S.value === m.value)), o = Y(() => p.filter(
|
|
1409
|
+
(S) => S.region.includes(u.value ?? $.F_COUNTRY.enum.MY)
|
|
1410
|
+
));
|
|
1411
|
+
async function c(S) {
|
|
1412
|
+
await t(async () => {
|
|
1413
|
+
try {
|
|
1414
|
+
await G.updateGateway(f.payoutAccount._id, S), b.open({
|
|
1415
|
+
type: "success",
|
|
1416
|
+
title: "Payout account gateways update succesfully"
|
|
1417
|
+
}), v.value = S.length === 0;
|
|
1418
|
+
} catch (U) {
|
|
1419
|
+
b.open({
|
|
1420
|
+
type: "error",
|
|
1421
|
+
title: "Error occurs when updating payout account gateways",
|
|
1422
|
+
message: z(U)
|
|
1423
|
+
});
|
|
1424
|
+
}
|
|
1425
|
+
});
|
|
1426
|
+
}
|
|
1427
|
+
const v = C((f.payoutAccount.gateways ?? []).length === 0), F = Y(() => e !== "MY" || !v.value);
|
|
1428
|
+
return (S, U) => {
|
|
1429
|
+
var _;
|
|
1430
|
+
const I = y("FmCircularProgress"), T = y("FmSwitch"), R = y("FmTabs");
|
|
1431
|
+
return g(), O(j, null, [
|
|
1432
|
+
r(e) ? (g(), O("p", ot, [...U[2] || (U[2] = [
|
|
1433
|
+
s("b", null, "Note: ", -1),
|
|
1434
|
+
P(" There's no setup required for Malaysia Payment Gateway, once Payout Account is ready you will able to configure the payment channels. ", -1)
|
|
1435
|
+
])])) : q("", !0),
|
|
1436
|
+
r(l) ? (g(), O("div", lt, [
|
|
1437
|
+
a(I, { size: "xxl" })
|
|
1438
|
+
])) : (g(), O(j, { key: 2 }, [
|
|
1439
|
+
r(e) === "MY" ? (g(), w(T, {
|
|
1440
|
+
key: 0,
|
|
1441
|
+
modelValue: v.value,
|
|
1442
|
+
"onUpdate:modelValue": U[0] || (U[0] = (V) => v.value = V),
|
|
1443
|
+
style: { "padding-bottom": "12px" },
|
|
1444
|
+
label: "Use FeedMe's Fiuu Account?"
|
|
1445
|
+
}, null, 8, ["modelValue"])) : q("", !0),
|
|
1446
|
+
F.value ? (g(), w(R, {
|
|
1447
|
+
key: 1,
|
|
1448
|
+
"model-value": r(m),
|
|
1449
|
+
"onUpdate:modelValue": U[1] || (U[1] = (V) => W(m) ? m.value = V : null),
|
|
1450
|
+
class: "mb-6",
|
|
1451
|
+
items: o.value
|
|
1452
|
+
}, null, 8, ["model-value", "items"])) : q("", !0),
|
|
1453
|
+
F.value && r(m) ? (g(), w(ne((_ = d.value) == null ? void 0 : _.render), ae(oe({ key: 2 }, {
|
|
1454
|
+
gateway: i.value.find(
|
|
1455
|
+
(V) => {
|
|
1456
|
+
var x;
|
|
1457
|
+
return V.paymentGateway === ((x = d.value) == null ? void 0 : x.value);
|
|
1458
|
+
}
|
|
1459
|
+
),
|
|
1460
|
+
onDelete: async () => {
|
|
1461
|
+
i.value = i.value.filter(
|
|
1462
|
+
(V) => {
|
|
1463
|
+
var x;
|
|
1464
|
+
return V.paymentGateway !== ((x = d.value) == null ? void 0 : x.value);
|
|
1465
|
+
}
|
|
1466
|
+
), c(i.value);
|
|
1467
|
+
},
|
|
1468
|
+
onUpdate: (V) => {
|
|
1469
|
+
var h;
|
|
1470
|
+
let x = i.value.find(
|
|
1471
|
+
(K) => {
|
|
1472
|
+
var E;
|
|
1473
|
+
return K.paymentGateway === ((E = d.value) == null ? void 0 : E.value);
|
|
1474
|
+
}
|
|
1475
|
+
);
|
|
1476
|
+
x ? x.config = V : i.value.push({
|
|
1477
|
+
paymentGateway: (h = d.value) == null ? void 0 : h.value,
|
|
1478
|
+
config: V
|
|
1479
|
+
}), c(i.value);
|
|
1480
|
+
}
|
|
1481
|
+
})), null, 16)) : q("", !0)
|
|
1482
|
+
], 64))
|
|
1483
|
+
], 64);
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
}), st = { class: "flex mt-6 space-x-6" }, rt = /* @__PURE__ */ D({
|
|
1487
|
+
__name: "GooglePayToken",
|
|
1488
|
+
props: {
|
|
1489
|
+
gateway: {
|
|
1490
|
+
type: Object,
|
|
1491
|
+
required: !0
|
|
1492
|
+
},
|
|
1493
|
+
onUpdate: {
|
|
1494
|
+
type: Function,
|
|
1495
|
+
required: !0
|
|
1496
|
+
},
|
|
1497
|
+
onDelete: {
|
|
1498
|
+
type: Function,
|
|
1499
|
+
required: !0
|
|
1500
|
+
}
|
|
1501
|
+
},
|
|
1502
|
+
setup(n) {
|
|
1503
|
+
const e = C(
|
|
1504
|
+
n.gateway || {
|
|
1505
|
+
type: "googlePay",
|
|
1506
|
+
gateway: "RAZER_MERCHANT_SERVICE",
|
|
1507
|
+
config: {
|
|
1508
|
+
gateway: "molpay",
|
|
1509
|
+
gatewayMerchantId: "molpay"
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
);
|
|
1513
|
+
return (b, l) => {
|
|
1514
|
+
const t = y("FmTextField"), m = y("FmButton"), f = y("FmForm");
|
|
1515
|
+
return g(), w(f, {
|
|
1516
|
+
ref: "form",
|
|
1517
|
+
class: "flex flex-col gap-16",
|
|
1518
|
+
onValidationSuccess: l[3] || (l[3] = () => n.onUpdate(e.value))
|
|
1519
|
+
}, {
|
|
1520
|
+
default: k(() => [
|
|
1521
|
+
a(t, {
|
|
1522
|
+
modelValue: e.value.gateway,
|
|
1523
|
+
"onUpdate:modelValue": l[0] || (l[0] = (p) => e.value.gateway = p),
|
|
1524
|
+
label: "Gateway",
|
|
1525
|
+
disabled: !0,
|
|
1526
|
+
rules: r(A)(r(N).string())
|
|
1527
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1528
|
+
a(t, {
|
|
1529
|
+
modelValue: e.value.config.gateway,
|
|
1530
|
+
"onUpdate:modelValue": l[1] || (l[1] = (p) => e.value.config.gateway = p),
|
|
1531
|
+
label: "Gateway ID",
|
|
1532
|
+
disabled: !0,
|
|
1533
|
+
rules: r(A)(r(N).string())
|
|
1534
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1535
|
+
a(t, {
|
|
1536
|
+
modelValue: e.value.config.gatewayMerchantId,
|
|
1537
|
+
"onUpdate:modelValue": l[2] || (l[2] = (p) => e.value.config.gatewayMerchantId = p),
|
|
1538
|
+
label: "Gateway Merchant ID",
|
|
1539
|
+
disabled: !0,
|
|
1540
|
+
rules: r(A)(r(N).string())
|
|
1541
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1542
|
+
s("div", st, [
|
|
1543
|
+
n.gateway ? (g(), w(m, {
|
|
1544
|
+
key: 0,
|
|
1545
|
+
class: "flex-1",
|
|
1546
|
+
variant: "secondary",
|
|
1547
|
+
label: "Delete",
|
|
1548
|
+
onclick: () => n.onDelete()
|
|
1549
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
|
1550
|
+
a(m, {
|
|
1551
|
+
type: "submit",
|
|
1552
|
+
class: "flex-1",
|
|
1553
|
+
variant: "primary",
|
|
1554
|
+
label: "Save"
|
|
1555
|
+
})
|
|
1556
|
+
])
|
|
1557
|
+
]),
|
|
1558
|
+
_: 1
|
|
1559
|
+
}, 512);
|
|
1560
|
+
};
|
|
1561
|
+
}
|
|
1562
|
+
}), it = { class: "flex mt-6 space-x-6" }, mt = /* @__PURE__ */ D({
|
|
1563
|
+
__name: "ApplePayToken",
|
|
1564
|
+
props: {
|
|
1565
|
+
gateway: {
|
|
1566
|
+
type: Object,
|
|
1567
|
+
required: !0
|
|
1568
|
+
},
|
|
1569
|
+
onUpdate: {
|
|
1570
|
+
type: Function,
|
|
1571
|
+
required: !0
|
|
1572
|
+
},
|
|
1573
|
+
onDelete: {
|
|
1574
|
+
type: Function,
|
|
1575
|
+
required: !0
|
|
1576
|
+
}
|
|
1577
|
+
},
|
|
1578
|
+
setup(n) {
|
|
1579
|
+
const e = C(
|
|
1580
|
+
n.gateway || {
|
|
1581
|
+
type: "applePay",
|
|
1582
|
+
gateway: "RAZER_MERCHANT_SERVICE",
|
|
1583
|
+
config: {
|
|
1584
|
+
merchantId: "FMfeedme"
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
);
|
|
1588
|
+
return (b, l) => {
|
|
1589
|
+
const t = y("FmTextField"), m = y("FmButton"), f = y("FmForm");
|
|
1590
|
+
return g(), w(f, {
|
|
1591
|
+
ref: "form",
|
|
1592
|
+
class: "flex flex-col gap-16",
|
|
1593
|
+
onValidationSuccess: l[2] || (l[2] = () => n.onUpdate(e.value))
|
|
1594
|
+
}, {
|
|
1595
|
+
default: k(() => [
|
|
1596
|
+
a(t, {
|
|
1597
|
+
modelValue: e.value.gateway,
|
|
1598
|
+
"onUpdate:modelValue": l[0] || (l[0] = (p) => e.value.gateway = p),
|
|
1599
|
+
label: "Gateway",
|
|
1600
|
+
disabled: !0,
|
|
1601
|
+
rules: r(A)(r(N).string())
|
|
1602
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1603
|
+
a(t, {
|
|
1604
|
+
modelValue: e.value.config.merchantId,
|
|
1605
|
+
"onUpdate:modelValue": l[1] || (l[1] = (p) => e.value.config.merchantId = p),
|
|
1606
|
+
label: "Merchant ID",
|
|
1607
|
+
disabled: !0,
|
|
1608
|
+
rules: r(A)(r(N).string())
|
|
1609
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1610
|
+
s("div", it, [
|
|
1611
|
+
n.gateway ? (g(), w(m, {
|
|
1612
|
+
key: 0,
|
|
1613
|
+
class: "flex-1",
|
|
1614
|
+
variant: "secondary",
|
|
1615
|
+
label: "Delete",
|
|
1616
|
+
onclick: () => n.onDelete()
|
|
1617
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
|
1618
|
+
a(m, {
|
|
1619
|
+
type: "submit",
|
|
1620
|
+
class: "flex-1",
|
|
1621
|
+
variant: "primary",
|
|
1622
|
+
label: "Save"
|
|
1623
|
+
})
|
|
1624
|
+
])
|
|
1625
|
+
]),
|
|
1626
|
+
_: 1
|
|
1627
|
+
}, 512);
|
|
1628
|
+
};
|
|
1629
|
+
}
|
|
1630
|
+
}), ct = {
|
|
1631
|
+
key: 0,
|
|
1632
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
|
1633
|
+
}, dt = /* @__PURE__ */ D({
|
|
1634
|
+
__name: "TokenGateway",
|
|
1635
|
+
props: {
|
|
1636
|
+
payoutAccount: {
|
|
1637
|
+
type: Object,
|
|
1638
|
+
required: !0
|
|
1639
|
+
}
|
|
1640
|
+
},
|
|
1641
|
+
setup(n) {
|
|
1642
|
+
const u = me().currentCountry, e = J(), { isLoading: b, startAsyncCall: l } = X(), { tokenTab: t } = ee({
|
|
1643
|
+
tokenTab: ""
|
|
1644
|
+
}), m = n, f = [
|
|
1645
|
+
{
|
|
1646
|
+
label: "Google Pay",
|
|
1647
|
+
value: "googlePay",
|
|
1648
|
+
icon: "android",
|
|
1649
|
+
render: rt,
|
|
1650
|
+
region: [$.F_COUNTRY.enum.MY, $.F_COUNTRY.enum.SG]
|
|
1651
|
+
},
|
|
1652
|
+
{
|
|
1653
|
+
label: "Apple Pay",
|
|
1654
|
+
value: "applePay",
|
|
1655
|
+
icon: "iOS",
|
|
1656
|
+
render: mt,
|
|
1657
|
+
region: [$.F_COUNTRY.enum.MY, $.F_COUNTRY.enum.SG]
|
|
1658
|
+
}
|
|
1659
|
+
], p = C(m.payoutAccount.tokens ?? []), i = Y(() => f.find((c) => c.value === t.value)), d = Y(() => f.filter(
|
|
1660
|
+
(c) => c.region.includes(u.value ?? $.F_COUNTRY.enum.MY)
|
|
1661
|
+
));
|
|
1662
|
+
async function o(c) {
|
|
1663
|
+
await l(async () => {
|
|
1664
|
+
try {
|
|
1665
|
+
await G.updateTokens(m.payoutAccount._id, c), e.open({
|
|
1666
|
+
type: "success",
|
|
1667
|
+
title: "Payout account tokens gateway update succesfully"
|
|
1668
|
+
});
|
|
1669
|
+
} catch (v) {
|
|
1670
|
+
e.open({
|
|
1671
|
+
type: "error",
|
|
1672
|
+
title: "Error occurs when updating payout account tokens",
|
|
1673
|
+
message: z(v)
|
|
1674
|
+
});
|
|
1675
|
+
}
|
|
1676
|
+
});
|
|
1677
|
+
}
|
|
1678
|
+
return (c, v) => {
|
|
1679
|
+
var U;
|
|
1680
|
+
const F = y("FmCircularProgress"), S = y("FmTabs");
|
|
1681
|
+
return g(), O(j, null, [
|
|
1682
|
+
v[1] || (v[1] = s("p", { className: "mt-1 my-6 text-gray-600" }, [
|
|
1683
|
+
s("b", null, "Note: "),
|
|
1684
|
+
P(" Token gateways appear above other online payment channels to comply with provider branding requirements. Configuration is standardized, so you generally only need to select the provider. "),
|
|
1685
|
+
s("br"),
|
|
1686
|
+
s("br"),
|
|
1687
|
+
s("b", null, ` Token payments are automatically enabled for "Pay-First" merchants. You do not need to adjust settings here unless you're modifying for a non-Pay-First merchant who wishes to manually enable this feature. `),
|
|
1688
|
+
s("br")
|
|
1689
|
+
], -1)),
|
|
1690
|
+
r(b) ? (g(), O("div", ct, [
|
|
1691
|
+
a(F, { size: "xxl" })
|
|
1692
|
+
])) : (g(), w(S, {
|
|
1693
|
+
key: 1,
|
|
1694
|
+
"model-value": r(t),
|
|
1695
|
+
"onUpdate:modelValue": v[0] || (v[0] = (I) => W(t) ? t.value = I : null),
|
|
1696
|
+
class: "mb-6 mt-6",
|
|
1697
|
+
items: d.value
|
|
1698
|
+
}, null, 8, ["model-value", "items"])),
|
|
1699
|
+
r(t) ? (g(), w(ne((U = i.value) == null ? void 0 : U.render), ae(oe({ key: 2 }, {
|
|
1700
|
+
gateway: p.value.find((I) => {
|
|
1701
|
+
var T;
|
|
1702
|
+
return I.type === ((T = i.value) == null ? void 0 : T.value);
|
|
1703
|
+
}),
|
|
1704
|
+
onDelete: async () => {
|
|
1705
|
+
p.value = p.value.filter((I) => {
|
|
1706
|
+
var T;
|
|
1707
|
+
return I.type !== ((T = i.value) == null ? void 0 : T.value);
|
|
1708
|
+
}), o(p.value);
|
|
1709
|
+
},
|
|
1710
|
+
onUpdate: (I) => {
|
|
1711
|
+
let T = p.value.find((R) => {
|
|
1712
|
+
var _;
|
|
1713
|
+
return R.type === ((_ = i.value) == null ? void 0 : _.value);
|
|
1714
|
+
});
|
|
1715
|
+
T ? T.config = I : p.value.push(I), o(p.value);
|
|
1716
|
+
}
|
|
1717
|
+
})), null, 16)) : q("", !0)
|
|
1718
|
+
], 64);
|
|
1719
|
+
};
|
|
1720
|
+
}
|
|
1721
|
+
}), It = /* @__PURE__ */ D({
|
|
1722
|
+
__name: "PayoutAccountSetting",
|
|
1723
|
+
props: {
|
|
1724
|
+
accountId: {
|
|
1725
|
+
type: String,
|
|
1726
|
+
required: !0
|
|
1727
|
+
}
|
|
1728
|
+
},
|
|
1729
|
+
setup(n) {
|
|
1730
|
+
const u = n, { tab: e } = ee({
|
|
1731
|
+
tab: "information"
|
|
1732
|
+
}), { isLoading: b, startAsyncCall: l } = X(!0), t = ye(), m = C();
|
|
1733
|
+
async function f(o) {
|
|
1734
|
+
await G.updateById(
|
|
1735
|
+
u.accountId,
|
|
1736
|
+
o
|
|
1737
|
+
), m.value = await G.readById(u.accountId);
|
|
1738
|
+
}
|
|
1739
|
+
const p = [
|
|
1740
|
+
{
|
|
1741
|
+
label: "Information",
|
|
1742
|
+
value: "information",
|
|
1743
|
+
icon: "overview",
|
|
1744
|
+
render: we
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
label: "Settlement",
|
|
1748
|
+
value: "settlement",
|
|
1749
|
+
icon: "payments",
|
|
1750
|
+
render: Pe
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
label: "MDR Status",
|
|
1754
|
+
value: "payment",
|
|
1755
|
+
icon: "account_box",
|
|
1756
|
+
render: Ge
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
label: "Online Gateways",
|
|
1760
|
+
icon: "assured_workload",
|
|
1761
|
+
value: "gateways",
|
|
1762
|
+
render: ut
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
label: "Token Gateways",
|
|
1766
|
+
value: "tokens",
|
|
1767
|
+
icon: "wallet",
|
|
1768
|
+
render: dt
|
|
1769
|
+
},
|
|
1770
|
+
{
|
|
1771
|
+
label: "Online Channels",
|
|
1772
|
+
icon: "shopping_cart",
|
|
1773
|
+
value: "channels",
|
|
1774
|
+
render: He
|
|
1775
|
+
}
|
|
1776
|
+
];
|
|
1777
|
+
function i() {
|
|
1778
|
+
l(async () => {
|
|
1779
|
+
m.value = await G.readById(u.accountId);
|
|
1780
|
+
});
|
|
1781
|
+
}
|
|
1782
|
+
re(i);
|
|
1783
|
+
const d = Y(() => {
|
|
1784
|
+
const o = p.reduce((c, v) => c || (v.children ? v.children.find((F) => F.value === e.value) || null : v.value === e.value ? v : null), null);
|
|
1785
|
+
return o == null ? void 0 : o.render;
|
|
1786
|
+
});
|
|
1787
|
+
return (o, c) => {
|
|
1788
|
+
var F;
|
|
1789
|
+
const v = y("FmTabs");
|
|
1790
|
+
return g(), w(pe, {
|
|
1791
|
+
title: `Payout Account (${(F = m.value) == null ? void 0 : F._id})`,
|
|
1792
|
+
loading: r(b),
|
|
1793
|
+
onBack: r(t).back
|
|
1794
|
+
}, {
|
|
1795
|
+
default: k(() => [
|
|
1796
|
+
a(v, {
|
|
1797
|
+
"model-value": r(e),
|
|
1798
|
+
"onUpdate:modelValue": c[0] || (c[0] = (S) => W(e) ? e.value = S : null),
|
|
1799
|
+
class: "mb-6",
|
|
1800
|
+
items: p
|
|
1801
|
+
}, null, 8, ["model-value"]),
|
|
1802
|
+
r(e) ? (g(), w(ne(d.value), ae(oe({ key: 0 }, {
|
|
1803
|
+
payoutAccount: m.value,
|
|
1804
|
+
onUpdate: f
|
|
1805
|
+
})), null, 16)) : q("", !0)
|
|
1806
|
+
]),
|
|
1807
|
+
_: 1
|
|
1808
|
+
}, 8, ["title", "loading", "onBack"]);
|
|
1809
|
+
};
|
|
1810
|
+
}
|
|
1811
|
+
});
|
|
1812
|
+
export {
|
|
1813
|
+
It as default
|
|
1814
|
+
};
|