@feedmepos/mf-payment 1.0.17 → 1.0.18-beta.1
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-B4_FlpNy.js → PayoutAccount-DCq9zJ7I.js} +4 -3
- package/dist/{PayoutAccount-C1F4nzhY.js → PayoutAccount-Dlrre2MV.js} +83 -115
- package/dist/PayoutAccountSetting-D6Scsqvm.js +426 -0
- package/dist/{Restaurant-TCSbQjCj.js → Restaurant-AoDzEhKi.js} +4 -4
- package/dist/{RestaurantSetting-D_dNcxQd.js → RestaurantSetting-CAQfJwaq.js} +137 -115
- package/dist/{Settlement-BQe2JW-Q.js → Settlement-anAN-1YR.js} +3 -3
- package/dist/Settlement-kfM1jLO-.js +444 -0
- package/dist/{SettlementTransactions-DD6wLd4W.js → SettlementTransactions-IhEM3Qtp.js} +4 -4
- package/dist/{SettlementTransactions-9sVg8_eQ.js → SettlementTransactions-dVE594dr.js} +4 -4
- package/dist/Terminal-C0Irg7I_.js +435 -0
- package/dist/{TerminalSetting-CNjiW8AS.js → TerminalSetting-mMj1OSGc.js} +43 -41
- package/dist/{TerminalTransaction-BHdUR8kU.js → TerminalTransaction-2Oe5b_rm.js} +205 -194
- package/dist/TerminalTransaction-Coth2MwA.js +269 -0
- package/dist/Transaction-BbbVDMIm.js +247 -0
- package/dist/{Transaction-Sq0Vy8K5.js → Transaction-ChE2VgSa.js} +6 -6
- package/dist/{TransactionOld-DgFEZ8lO.js → TransactionOld-T8CKBB6U.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-B10hKLw3.js → TransactionTable.vue_vue_type_script_setup_true_lang-CoPiWynn.js} +2 -2
- package/dist/api/index.d.ts +1 -1
- package/dist/api/settlement/index.d.ts +5 -1
- package/dist/api/terminal/index.d.ts +1 -0
- package/dist/api/terminal-transaction/index.d.ts +2 -2
- package/dist/{app-DSs9frsP.js → app-B36bwKcX.js} +145 -145
- package/dist/app.js +1 -1
- package/dist/{assets-isbnAWcO.js → assets-fxpnHIZr.js} +1 -1
- package/dist/grafana-BFQCDk-V.js +54 -0
- package/dist/index-9a-RyWYf.js +52 -0
- package/dist/{index-M-Xwbigf.js → index-C2q2ptf8.js} +1 -1
- package/dist/{index-CRJ6lKaL.js → index-CC8HNMje.js} +2 -2
- package/dist/{index-zuIHTzhv.js → index-CEJAjyRa.js} +1 -1
- package/dist/{index-CMfikq5P.js → index-Cj90pU-C.js} +27 -20
- package/dist/{index-_cvebzIU.js → index-DueuWuxx.js} +1 -1
- package/dist/{index-C-YBzOUs.js → index-ZMBnoQxd.js} +31 -23
- package/dist/{index.vue_vue_type_script_setup_true_lang-atP7HnX3.js → index.vue_vue_type_script_setup_true_lang-PfAufXp3.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-DcBR5HoD.js → payout-account-D-LZ6-Lb.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{transaction-3qMvkl2b.js → transaction-5dZS6JFA.js} +21 -12
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/terminal/cell/Actions.vue.d.ts +2 -0
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +293 -0
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +147 -0
- package/package.json +2 -2
- package/dist/PayoutAccountSelector.vue_vue_type_script_setup_true_lang-D1JZ56cv.js +0 -110
- package/dist/PayoutAccountSetting-BEw1XNuX.js +0 -758
- package/dist/Settlement-DTA0SdZc.js +0 -145
- package/dist/Terminal-Dd2OGvH_.js +0 -404
- package/dist/TerminalTransaction-BDye71lK.js +0 -819
- package/dist/Transaction-EmgoD2xm.js +0 -145
- package/dist/grafana-Bf4L47IF.js +0 -49
- package/dist/index-B7mrn8cQ.js +0 -47
- package/dist/index-DuemQbuN.js +0 -28
- package/dist/views/admin/payout-account/cell/IsActive.vue.d.ts +0 -7
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +0 -81
- package/dist/views/admin/terminal-transaction/cell/Timestamp.vue.d.ts +0 -7
@@ -1,758 +0,0 @@
|
|
1
|
-
import { defineComponent as I, resolveComponent as i, openBlock as F, createElementBlock as R, Fragment as N, createElementVNode as s, createVNode as u, withCtx as x, createTextVNode as C, toDisplayString as P, createCommentVNode as U, createBlock as V, ref as k, watch as q, computed as B, unref as r, isRef as M, h as E, onMounted as O, resolveDynamicComponent as j, normalizeProps as Y, mergeProps as z } from "vue";
|
2
|
-
import { p as $ } from "./index-zuIHTzhv.js";
|
3
|
-
import { u as H, e as D } from "./index-CRJ6lKaL.js";
|
4
|
-
import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
5
|
-
import { useRouter as W } from "vue-router";
|
6
|
-
import { u as L } from "./index-_cvebzIU.js";
|
7
|
-
import { P as K } from "./PDFViewer-xrBtzrlR.js";
|
8
|
-
import { useSnackbar as Z } from "@feedmepos/ui-library";
|
9
|
-
import { u as J } from "./error-K1CakhA9.js";
|
10
|
-
import { p as _ } from "./index-DuemQbuN.js";
|
11
|
-
import { z as A, a as S } from "./validator-D5jtpt9A.js";
|
12
|
-
import { useCoreStore as X } from "@feedmepos/mf-common";
|
13
|
-
const h = { class: "flex gap-16 mb-6" }, ee = ["src"], te = /* @__PURE__ */ I({
|
14
|
-
__name: "Information",
|
15
|
-
props: {
|
16
|
-
payoutAccount: {
|
17
|
-
type: Object,
|
18
|
-
required: !0
|
19
|
-
}
|
20
|
-
},
|
21
|
-
setup(a) {
|
22
|
-
return (m, e) => {
|
23
|
-
const d = i("FmCardHeader"), c = i("FmCardSection"), t = i("FmCard");
|
24
|
-
return F(), R(N, null, [
|
25
|
-
s("div", h, [
|
26
|
-
u(t, {
|
27
|
-
horizontal: "",
|
28
|
-
class: "flex-1 p-6",
|
29
|
-
variant: "elevated"
|
30
|
-
}, {
|
31
|
-
default: x(() => [
|
32
|
-
u(c, { class: "flex flex-col gap-16 justify-between" }, {
|
33
|
-
default: x(() => [
|
34
|
-
u(d, {
|
35
|
-
class: "p-0",
|
36
|
-
title: "Account Info",
|
37
|
-
subtitle: ""
|
38
|
-
}),
|
39
|
-
u(c, { class: "p-0" }, {
|
40
|
-
default: x(() => {
|
41
|
-
var n, v, y, o, l;
|
42
|
-
return [
|
43
|
-
e[0] || (e[0] = s("b", null, "For", -1)),
|
44
|
-
C(": " + P((v = (n = a.payoutAccount) == null ? void 0 : n.store) == null ? void 0 : v.event) + " ", 1),
|
45
|
-
e[1] || (e[1] = s("br", null, null, -1)),
|
46
|
-
e[2] || (e[2] = s("b", null, "Reference", -1)),
|
47
|
-
C(": " + P((o = (y = a.payoutAccount) == null ? void 0 : y.store) == null ? void 0 : o.id), 1),
|
48
|
-
e[3] || (e[3] = s("br", null, null, -1)),
|
49
|
-
e[4] || (e[4] = s("b", null, "Business", -1)),
|
50
|
-
C(": " + P((l = a.payoutAccount) == null ? void 0 : l.businessId), 1),
|
51
|
-
e[5] || (e[5] = s("br", null, null, -1))
|
52
|
-
];
|
53
|
-
}),
|
54
|
-
_: 1
|
55
|
-
})
|
56
|
-
]),
|
57
|
-
_: 1
|
58
|
-
})
|
59
|
-
]),
|
60
|
-
_: 1
|
61
|
-
}),
|
62
|
-
u(t, {
|
63
|
-
horizontal: "",
|
64
|
-
class: "flex-1 p-6",
|
65
|
-
variant: "elevated"
|
66
|
-
}, {
|
67
|
-
default: x(() => [
|
68
|
-
u(c, { class: "flex flex-col gap-16 justify-between" }, {
|
69
|
-
default: x(() => [
|
70
|
-
u(d, {
|
71
|
-
class: "p-0",
|
72
|
-
title: "Key Person",
|
73
|
-
subtitle: ""
|
74
|
-
}),
|
75
|
-
u(c, { class: "p-0" }, {
|
76
|
-
default: x(() => {
|
77
|
-
var n, v, y, o, l, f, p, b;
|
78
|
-
return [
|
79
|
-
e[6] || (e[6] = s("b", null, "Email", -1)),
|
80
|
-
C(": " + P((y = (v = (n = a.payoutAccount) == null ? void 0 : n.store) == null ? void 0 : v.keyPerson) == null ? void 0 : y.email) + " ", 1),
|
81
|
-
e[7] || (e[7] = s("br", null, null, -1)),
|
82
|
-
e[8] || (e[8] = s("b", null, "Name", -1)),
|
83
|
-
C(": " + P((f = (l = (o = a.payoutAccount) == null ? void 0 : o.store) == null ? void 0 : l.keyPerson) == null ? void 0 : f.name), 1),
|
84
|
-
e[9] || (e[9] = s("br", null, null, -1)),
|
85
|
-
e[10] || (e[10] = s("b", null, "Phone", -1)),
|
86
|
-
C(": " + P((b = (p = a.payoutAccount) == null ? void 0 : p.store.keyPerson) == null ? void 0 : b.phone), 1),
|
87
|
-
e[11] || (e[11] = s("br", null, null, -1))
|
88
|
-
];
|
89
|
-
}),
|
90
|
-
_: 1
|
91
|
-
})
|
92
|
-
]),
|
93
|
-
_: 1
|
94
|
-
})
|
95
|
-
]),
|
96
|
-
_: 1
|
97
|
-
})
|
98
|
-
]),
|
99
|
-
e[12] || (e[12] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Exterior Photo", -1)),
|
100
|
-
a.payoutAccount.store.exteriorPhoto ? (F(), R("img", {
|
101
|
-
key: 0,
|
102
|
-
src: a.payoutAccount.store.exteriorPhoto
|
103
|
-
}, null, 8, ee)) : U("", !0)
|
104
|
-
], 64);
|
105
|
-
};
|
106
|
-
}
|
107
|
-
}), ae = { class: "flex gap-16" }, le = { class: "flex-1" }, ne = { class: "flex-1" }, oe = /* @__PURE__ */ I({
|
108
|
-
__name: "Settlement",
|
109
|
-
props: {
|
110
|
-
payoutAccount: {
|
111
|
-
type: Object,
|
112
|
-
required: !0
|
113
|
-
}
|
114
|
-
},
|
115
|
-
setup(a) {
|
116
|
-
return (m, e) => {
|
117
|
-
const d = i("FmCardHeader"), c = i("FmCardSection"), t = i("FmCard");
|
118
|
-
return F(), R(N, null, [
|
119
|
-
u(t, {
|
120
|
-
horizontal: "",
|
121
|
-
class: "flex-1 p-6 mx-6 mb-6",
|
122
|
-
variant: "elevated"
|
123
|
-
}, {
|
124
|
-
default: x(() => [
|
125
|
-
u(c, { class: "flex flex-col gap-16 justify-between" }, {
|
126
|
-
default: x(() => [
|
127
|
-
u(d, {
|
128
|
-
class: "p-0",
|
129
|
-
title: "Bank Info",
|
130
|
-
subtitle: ""
|
131
|
-
}),
|
132
|
-
u(c, { class: "p-0" }, {
|
133
|
-
default: x(() => {
|
134
|
-
var n, v, y, o, l, f;
|
135
|
-
return [
|
136
|
-
e[0] || (e[0] = s("b", null, "Bank", -1)),
|
137
|
-
C(": " + P((v = (n = a.payoutAccount) == null ? void 0 : n.store.bank) == null ? void 0 : v.name), 1),
|
138
|
-
e[1] || (e[1] = s("br", null, null, -1)),
|
139
|
-
e[2] || (e[2] = s("b", null, "Name", -1)),
|
140
|
-
C(": " + P((o = (y = a.payoutAccount) == null ? void 0 : y.store.bank) == null ? void 0 : o.holderName), 1),
|
141
|
-
e[3] || (e[3] = s("br", null, null, -1)),
|
142
|
-
e[4] || (e[4] = s("b", null, "Number", -1)),
|
143
|
-
C(": " + P((f = (l = a.payoutAccount) == null ? void 0 : l.store.bank) == null ? void 0 : f.accountNumber), 1)
|
144
|
-
];
|
145
|
-
}),
|
146
|
-
_: 1
|
147
|
-
})
|
148
|
-
]),
|
149
|
-
_: 1
|
150
|
-
})
|
151
|
-
]),
|
152
|
-
_: 1
|
153
|
-
}),
|
154
|
-
s("div", ae, [
|
155
|
-
s("div", le, [
|
156
|
-
e[5] || (e[5] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
|
157
|
-
a.payoutAccount.store.ssm ? (F(), V(K, {
|
158
|
-
key: 0,
|
159
|
-
pdf: a.payoutAccount.store.ssm,
|
160
|
-
"disable-text-layer": !0,
|
161
|
-
"disable-annotation-layer": !0
|
162
|
-
}, null, 8, ["pdf"])) : U("", !0)
|
163
|
-
]),
|
164
|
-
s("div", ne, [
|
165
|
-
e[6] || (e[6] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
|
166
|
-
a.payoutAccount.store.bankStatement ? (F(), V(K, {
|
167
|
-
key: 0,
|
168
|
-
pdf: a.payoutAccount.store.bankStatement,
|
169
|
-
"disable-text-layer": !0,
|
170
|
-
"disable-annotation-layer": !0
|
171
|
-
}, null, 8, ["pdf"])) : U("", !0)
|
172
|
-
])
|
173
|
-
])
|
174
|
-
], 64);
|
175
|
-
};
|
176
|
-
}
|
177
|
-
}), ue = /* @__PURE__ */ I({
|
178
|
-
__name: "RateInput",
|
179
|
-
props: {
|
180
|
-
data: {},
|
181
|
-
onChange: { type: Function }
|
182
|
-
},
|
183
|
-
setup(a) {
|
184
|
-
const m = a, e = k(m.data.toString());
|
185
|
-
return q(e, (d) => {
|
186
|
-
m.onChange(parseFloat(d));
|
187
|
-
}), (d, c) => {
|
188
|
-
const t = i("FmTextField");
|
189
|
-
return F(), V(t, {
|
190
|
-
inputmode: "decimal",
|
191
|
-
modelValue: e.value,
|
192
|
-
"onUpdate:modelValue": c[0] || (c[0] = (n) => e.value = n)
|
193
|
-
}, {
|
194
|
-
append: x(() => c[1] || (c[1] = [
|
195
|
-
C("%")
|
196
|
-
])),
|
197
|
-
_: 1
|
198
|
-
}, 8, ["modelValue"]);
|
199
|
-
};
|
200
|
-
}
|
201
|
-
}), re = /* @__PURE__ */ I({
|
202
|
-
__name: "TPlusInput",
|
203
|
-
props: {
|
204
|
-
data: {},
|
205
|
-
onChange: { type: Function }
|
206
|
-
},
|
207
|
-
setup(a) {
|
208
|
-
const m = a, e = k(m.data.toString());
|
209
|
-
return q(e, (d) => {
|
210
|
-
m.onChange(parseInt(d));
|
211
|
-
}), (d, c) => {
|
212
|
-
const t = i("FmTextField");
|
213
|
-
return F(), V(t, {
|
214
|
-
inputmode: "numeric",
|
215
|
-
modelValue: e.value,
|
216
|
-
"onUpdate:modelValue": c[0] || (c[0] = (n) => e.value = n)
|
217
|
-
}, null, 8, ["modelValue"]);
|
218
|
-
};
|
219
|
-
}
|
220
|
-
}), se = { class: "flex gap-16 mt-6" }, ie = { class: "flex-1" }, me = { class: "flex-1" }, de = { class: "my-6 w-full flex justify-end" }, ce = { class: "w-[320px]" }, pe = /* @__PURE__ */ I({
|
221
|
-
__name: "PaymentStatus",
|
222
|
-
props: {
|
223
|
-
onUpdate: {
|
224
|
-
type: Function,
|
225
|
-
required: !0
|
226
|
-
},
|
227
|
-
payoutAccount: {
|
228
|
-
type: Object,
|
229
|
-
required: !0
|
230
|
-
}
|
231
|
-
},
|
232
|
-
setup(a) {
|
233
|
-
const m = a, e = k(!1), d = Z(), c = async (o) => {
|
234
|
-
try {
|
235
|
-
e.value = !0, await m.onUpdate(o), d.open({
|
236
|
-
type: "success",
|
237
|
-
title: "Payout account update succesfully"
|
238
|
-
});
|
239
|
-
} catch (l) {
|
240
|
-
d.open({
|
241
|
-
type: "error",
|
242
|
-
title: "Error occurs when updating payout account",
|
243
|
-
message: J(l)
|
244
|
-
});
|
245
|
-
} finally {
|
246
|
-
e.value = !1;
|
247
|
-
}
|
248
|
-
}, { search: t } = L({
|
249
|
-
search: ""
|
250
|
-
}), n = B(() => {
|
251
|
-
const { ssm: o, bank: l, bankStatement: f } = m.payoutAccount.store;
|
252
|
-
return o && l && l.name && l.accountNumber && l.holderName && f;
|
253
|
-
}), v = k(""), y = [
|
254
|
-
{
|
255
|
-
header: () => "Payment Method",
|
256
|
-
accessorKey: "issuer",
|
257
|
-
cell: (o) => `${o.row.original.issuer} (${o.row.original.variant})`
|
258
|
-
},
|
259
|
-
{
|
260
|
-
header: () => "Rate",
|
261
|
-
accessorKey: "rate",
|
262
|
-
cell: ({ row: o }) => {
|
263
|
-
let l = 0;
|
264
|
-
return o.original.rate && (l = o.original.rate.amount / Math.pow(10, o.original.rate.precision)), E(ue, {
|
265
|
-
data: l,
|
266
|
-
onChange: (f) => {
|
267
|
-
const p = m.payoutAccount.methods.at(o.index);
|
268
|
-
p.rate || (p.rate = {
|
269
|
-
amount: 0,
|
270
|
-
precision: 4
|
271
|
-
}), p.rate.amount = f * Math.pow(10, p.rate.precision);
|
272
|
-
}
|
273
|
-
});
|
274
|
-
}
|
275
|
-
},
|
276
|
-
{
|
277
|
-
header: () => "T plus",
|
278
|
-
accessorKey: "tPlus",
|
279
|
-
cell: ({ row: o }) => E(re, {
|
280
|
-
data: o.original.tPlus ?? 0,
|
281
|
-
onChange: (l) => {
|
282
|
-
const f = m.payoutAccount.methods.at(o.index);
|
283
|
-
f.tPlus = l;
|
284
|
-
}
|
285
|
-
})
|
286
|
-
}
|
287
|
-
];
|
288
|
-
return (o, l) => {
|
289
|
-
const f = i("FmRadio"), p = i("FmRadioGroup"), b = i("FmSwitch"), w = i("FmSearch"), T = i("FmTable"), g = i("FmButton");
|
290
|
-
return F(), R(N, null, [
|
291
|
-
s("div", se, [
|
292
|
-
s("div", ie, [
|
293
|
-
u(p, {
|
294
|
-
modelValue: a.payoutAccount.status,
|
295
|
-
"onUpdate:modelValue": l[0] || (l[0] = (G) => a.payoutAccount.status = G),
|
296
|
-
label: "Account Status"
|
297
|
-
}, {
|
298
|
-
default: x(() => [
|
299
|
-
u(f, {
|
300
|
-
value: "NEW",
|
301
|
-
label: "New"
|
302
|
-
}),
|
303
|
-
u(f, {
|
304
|
-
value: "PENDING",
|
305
|
-
label: "Pending"
|
306
|
-
}),
|
307
|
-
u(f, {
|
308
|
-
value: "APPROVED",
|
309
|
-
label: "Approved"
|
310
|
-
})
|
311
|
-
]),
|
312
|
-
_: 1
|
313
|
-
}, 8, ["modelValue"])
|
314
|
-
]),
|
315
|
-
s("div", me, [
|
316
|
-
u(b, {
|
317
|
-
modelValue: a.payoutAccount.enable,
|
318
|
-
"onUpdate:modelValue": l[1] || (l[1] = (G) => a.payoutAccount.enable = G),
|
319
|
-
disabled: !n.value,
|
320
|
-
label: "Enabled",
|
321
|
-
sublabel: "Merchant can use online features such as e-payment, settlement"
|
322
|
-
}, null, 8, ["modelValue", "disabled"])
|
323
|
-
])
|
324
|
-
]),
|
325
|
-
a.payoutAccount.enable ? (F(), R(N, { key: 0 }, [
|
326
|
-
s("div", de, [
|
327
|
-
s("div", ce, [
|
328
|
-
u(w, {
|
329
|
-
modelValue: r(t),
|
330
|
-
"onUpdate:modelValue": l[2] || (l[2] = (G) => M(t) ? t.value = G : null),
|
331
|
-
placeholder: "Search Method ..."
|
332
|
-
}, null, 8, ["modelValue"])
|
333
|
-
])
|
334
|
-
]),
|
335
|
-
u(T, {
|
336
|
-
class: "mt-6",
|
337
|
-
modelValue: v.value,
|
338
|
-
"onUpdate:modelValue": l[3] || (l[3] = (G) => v.value = G),
|
339
|
-
"search-value": r(t),
|
340
|
-
"row-data": a.payoutAccount.methods,
|
341
|
-
"column-defs": y
|
342
|
-
}, null, 8, ["modelValue", "search-value", "row-data"])
|
343
|
-
], 64)) : U("", !0),
|
344
|
-
u(g, {
|
345
|
-
class: "w-full mt-6",
|
346
|
-
variant: "primary",
|
347
|
-
label: "Save",
|
348
|
-
loading: e.value,
|
349
|
-
onclick: () => c(a.payoutAccount)
|
350
|
-
}, null, 8, ["loading", "onclick"])
|
351
|
-
], 64);
|
352
|
-
};
|
353
|
-
}
|
354
|
-
}), ye = { class: "flex mt-6 space-x-6" }, fe = /* @__PURE__ */ I({
|
355
|
-
__name: "FiuuGateway",
|
356
|
-
props: {
|
357
|
-
onUpdate: {
|
358
|
-
type: Function,
|
359
|
-
required: !0
|
360
|
-
},
|
361
|
-
onDelete: {
|
362
|
-
type: Function,
|
363
|
-
required: !0
|
364
|
-
},
|
365
|
-
gateway: {
|
366
|
-
type: Object,
|
367
|
-
required: !0
|
368
|
-
}
|
369
|
-
},
|
370
|
-
setup(a) {
|
371
|
-
var d;
|
372
|
-
const e = k(((d = a.gateway) == null ? void 0 : d.config) || {
|
373
|
-
merchantId: "",
|
374
|
-
uniqueId: "",
|
375
|
-
verifyKey: "",
|
376
|
-
secretKey: "",
|
377
|
-
applicationCode: "",
|
378
|
-
offlineSecret: ""
|
379
|
-
});
|
380
|
-
return (c, t) => {
|
381
|
-
const n = i("FmTextField"), v = i("FmButton"), y = i("FmForm");
|
382
|
-
return F(), V(y, {
|
383
|
-
ref: "form",
|
384
|
-
class: "flex flex-col gap-16",
|
385
|
-
onValidationSuccess: t[6] || (t[6] = () => a.onUpdate(e.value))
|
386
|
-
}, {
|
387
|
-
default: x(() => [
|
388
|
-
u(n, {
|
389
|
-
modelValue: e.value.merchantId,
|
390
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.merchantId = o),
|
391
|
-
label: "Merchant ID",
|
392
|
-
rules: r(A)(r(S).string())
|
393
|
-
}, null, 8, ["modelValue", "rules"]),
|
394
|
-
u(n, {
|
395
|
-
modelValue: e.value.uniqueId,
|
396
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.uniqueId = o),
|
397
|
-
label: "Unique ID",
|
398
|
-
rules: r(A)(r(S).string())
|
399
|
-
}, null, 8, ["modelValue", "rules"]),
|
400
|
-
u(n, {
|
401
|
-
modelValue: e.value.verifyKey,
|
402
|
-
"onUpdate:modelValue": t[2] || (t[2] = (o) => e.value.verifyKey = o),
|
403
|
-
label: "Verify Key",
|
404
|
-
rules: r(A)(r(S).string())
|
405
|
-
}, null, 8, ["modelValue", "rules"]),
|
406
|
-
u(n, {
|
407
|
-
modelValue: e.value.secretKey,
|
408
|
-
"onUpdate:modelValue": t[3] || (t[3] = (o) => e.value.secretKey = o),
|
409
|
-
label: "Secret Key",
|
410
|
-
rules: r(A)(r(S).string())
|
411
|
-
}, null, 8, ["modelValue", "rules"]),
|
412
|
-
u(n, {
|
413
|
-
modelValue: e.value.applicationCode,
|
414
|
-
"onUpdate:modelValue": t[4] || (t[4] = (o) => e.value.applicationCode = o),
|
415
|
-
label: "Application Code ( Offline )",
|
416
|
-
rules: r(A)(r(S).string())
|
417
|
-
}, null, 8, ["modelValue", "rules"]),
|
418
|
-
u(n, {
|
419
|
-
modelValue: e.value.offlineSecret,
|
420
|
-
"onUpdate:modelValue": t[5] || (t[5] = (o) => e.value.offlineSecret = o),
|
421
|
-
label: "Offline Secret ( Offline )",
|
422
|
-
rules: r(A)(r(S).string())
|
423
|
-
}, null, 8, ["modelValue", "rules"]),
|
424
|
-
s("div", ye, [
|
425
|
-
a.gateway ? (F(), V(v, {
|
426
|
-
key: 0,
|
427
|
-
class: "flex-1",
|
428
|
-
variant: "secondary",
|
429
|
-
label: "Delete",
|
430
|
-
onclick: () => a.onDelete(a.gateway)
|
431
|
-
}, null, 8, ["onclick"])) : U("", !0),
|
432
|
-
u(v, {
|
433
|
-
type: "submit",
|
434
|
-
class: "flex-1",
|
435
|
-
variant: "primary",
|
436
|
-
label: "Save"
|
437
|
-
})
|
438
|
-
])
|
439
|
-
]),
|
440
|
-
_: 1
|
441
|
-
}, 512);
|
442
|
-
};
|
443
|
-
}
|
444
|
-
}), ve = { class: "flex mt-6 space-x-6" }, be = /* @__PURE__ */ I({
|
445
|
-
__name: "RevenueMonsterGateway",
|
446
|
-
props: {
|
447
|
-
onUpdate: {
|
448
|
-
type: Function,
|
449
|
-
required: !0
|
450
|
-
},
|
451
|
-
onDelete: {
|
452
|
-
type: Function,
|
453
|
-
required: !0
|
454
|
-
},
|
455
|
-
gateway: {
|
456
|
-
type: Object,
|
457
|
-
required: !0
|
458
|
-
}
|
459
|
-
},
|
460
|
-
setup(a) {
|
461
|
-
var d;
|
462
|
-
const e = k(((d = a.gateway) == null ? void 0 : d.config) || {
|
463
|
-
storeId: "",
|
464
|
-
clientId: "",
|
465
|
-
clientSecret: "",
|
466
|
-
clientPrivateKey: ""
|
467
|
-
});
|
468
|
-
return (c, t) => {
|
469
|
-
const n = i("FmTextField"), v = i("FmTextarea"), y = i("FmButton"), o = i("FmForm");
|
470
|
-
return F(), V(o, {
|
471
|
-
ref: "form",
|
472
|
-
class: "flex flex-col gap-16",
|
473
|
-
onValidationSuccess: t[4] || (t[4] = () => a.onUpdate(e.value))
|
474
|
-
}, {
|
475
|
-
default: x(() => [
|
476
|
-
u(n, {
|
477
|
-
modelValue: e.value.storeId,
|
478
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.value.storeId = l),
|
479
|
-
label: "Store ID",
|
480
|
-
rules: r(A)(r(S).string())
|
481
|
-
}, null, 8, ["modelValue", "rules"]),
|
482
|
-
u(n, {
|
483
|
-
modelValue: e.value.clientId,
|
484
|
-
"onUpdate:modelValue": t[1] || (t[1] = (l) => e.value.clientId = l),
|
485
|
-
label: "Client ID",
|
486
|
-
rules: r(A)(r(S).string())
|
487
|
-
}, null, 8, ["modelValue", "rules"]),
|
488
|
-
u(n, {
|
489
|
-
modelValue: e.value.clientSecret,
|
490
|
-
"onUpdate:modelValue": t[2] || (t[2] = (l) => e.value.clientSecret = l),
|
491
|
-
label: "Client Secret",
|
492
|
-
rules: r(A)(r(S).string())
|
493
|
-
}, null, 8, ["modelValue", "rules"]),
|
494
|
-
u(v, {
|
495
|
-
modelValue: e.value.clientPrivateKey,
|
496
|
-
"onUpdate:modelValue": t[3] || (t[3] = (l) => e.value.clientPrivateKey = l),
|
497
|
-
label: "Client Private Key"
|
498
|
-
}, null, 8, ["modelValue"]),
|
499
|
-
s("div", ve, [
|
500
|
-
a.gateway ? (F(), V(y, {
|
501
|
-
key: 0,
|
502
|
-
class: "flex-1",
|
503
|
-
variant: "secondary",
|
504
|
-
label: "Delete",
|
505
|
-
onclick: () => a.onDelete(a.gateway)
|
506
|
-
}, null, 8, ["onclick"])) : U("", !0),
|
507
|
-
u(y, {
|
508
|
-
type: "submit",
|
509
|
-
class: "flex-1",
|
510
|
-
variant: "primary",
|
511
|
-
label: "Save"
|
512
|
-
})
|
513
|
-
])
|
514
|
-
]),
|
515
|
-
_: 1
|
516
|
-
}, 512);
|
517
|
-
};
|
518
|
-
}
|
519
|
-
}), Fe = { class: "flex mt-6 space-x-6" }, ge = /* @__PURE__ */ I({
|
520
|
-
__name: "GhlGateway",
|
521
|
-
props: {
|
522
|
-
onUpdate: {
|
523
|
-
type: Function,
|
524
|
-
required: !0
|
525
|
-
},
|
526
|
-
onDelete: {
|
527
|
-
type: Function,
|
528
|
-
required: !0
|
529
|
-
},
|
530
|
-
gateway: {
|
531
|
-
type: Object,
|
532
|
-
required: !0
|
533
|
-
}
|
534
|
-
},
|
535
|
-
setup(a) {
|
536
|
-
var d;
|
537
|
-
const e = k(((d = a.gateway) == null ? void 0 : d.config) || {
|
538
|
-
merchantId: "",
|
539
|
-
terminalId: "",
|
540
|
-
privateKey: ""
|
541
|
-
});
|
542
|
-
return (c, t) => {
|
543
|
-
const n = i("FmTextField"), v = i("FmTextarea"), y = i("FmButton"), o = i("FmForm");
|
544
|
-
return F(), V(o, {
|
545
|
-
ref: "form",
|
546
|
-
class: "flex flex-col gap-16",
|
547
|
-
onValidationSuccess: t[3] || (t[3] = () => a.onUpdate(e.value))
|
548
|
-
}, {
|
549
|
-
default: x(() => [
|
550
|
-
u(n, {
|
551
|
-
modelValue: e.value.merchantId,
|
552
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.value.merchantId = l),
|
553
|
-
label: "Merchant ID",
|
554
|
-
rules: r(A)(r(S).string())
|
555
|
-
}, null, 8, ["modelValue", "rules"]),
|
556
|
-
u(n, {
|
557
|
-
modelValue: e.value.terminalId,
|
558
|
-
"onUpdate:modelValue": t[1] || (t[1] = (l) => e.value.terminalId = l),
|
559
|
-
label: "Terminal ID",
|
560
|
-
rules: r(A)(r(S).string())
|
561
|
-
}, null, 8, ["modelValue", "rules"]),
|
562
|
-
u(v, {
|
563
|
-
modelValue: e.value.privateKey,
|
564
|
-
"onUpdate:modelValue": t[2] || (t[2] = (l) => e.value.privateKey = l),
|
565
|
-
label: "Private Key",
|
566
|
-
rules: r(A)(r(S).string())
|
567
|
-
}, null, 8, ["modelValue", "rules"]),
|
568
|
-
s("div", Fe, [
|
569
|
-
a.gateway ? (F(), V(y, {
|
570
|
-
key: 0,
|
571
|
-
class: "flex-1",
|
572
|
-
variant: "secondary",
|
573
|
-
label: "Delete",
|
574
|
-
onclick: () => a.onDelete(a.gateway)
|
575
|
-
}, null, 8, ["onclick"])) : U("", !0),
|
576
|
-
u(y, {
|
577
|
-
type: "submit",
|
578
|
-
class: "flex-1",
|
579
|
-
variant: "primary",
|
580
|
-
label: "Save"
|
581
|
-
})
|
582
|
-
])
|
583
|
-
]),
|
584
|
-
_: 1
|
585
|
-
}, 512);
|
586
|
-
};
|
587
|
-
}
|
588
|
-
}), xe = {
|
589
|
-
key: 0,
|
590
|
-
class: "flex items-center justify-center min-h-[80vh]"
|
591
|
-
}, Ve = /* @__PURE__ */ I({
|
592
|
-
__name: "PaymentGateway",
|
593
|
-
props: {
|
594
|
-
payoutAccount: {
|
595
|
-
type: Object,
|
596
|
-
required: !0
|
597
|
-
}
|
598
|
-
},
|
599
|
-
setup(a) {
|
600
|
-
const m = a, e = X(), { isLoading: d, startAsyncCall: c } = H(), t = k(), n = k([]);
|
601
|
-
function v() {
|
602
|
-
c(async () => {
|
603
|
-
var p;
|
604
|
-
n.value = await _.get(m.payoutAccount.store.id), t.value = (p = n.value.find((b) => b.active)) == null ? void 0 : p.paymentGateway;
|
605
|
-
});
|
606
|
-
}
|
607
|
-
async function y(p) {
|
608
|
-
c(async () => {
|
609
|
-
var T;
|
610
|
-
const b = {
|
611
|
-
_id: "",
|
612
|
-
_rev: "",
|
613
|
-
paymentGateway: t.value,
|
614
|
-
config: p,
|
615
|
-
active: !0
|
616
|
-
}, w = n.value.find((g) => g.paymentGateway === t.value);
|
617
|
-
w && (b._id = w._id, b._rev = w._rev), await Promise.all(
|
618
|
-
n.value.map(async (g) => {
|
619
|
-
g.active && g.paymentGateway !== b.paymentGateway && await _.upsert(m.payoutAccount.store.id, {
|
620
|
-
...g,
|
621
|
-
active: !1
|
622
|
-
});
|
623
|
-
})
|
624
|
-
), await _.upsert(m.payoutAccount.store.id, b), n.value = await _.get(m.payoutAccount.store.id), t.value = (T = n.value.find((g) => g.active)) == null ? void 0 : T.paymentGateway;
|
625
|
-
});
|
626
|
-
}
|
627
|
-
async function o(p) {
|
628
|
-
c(async () => {
|
629
|
-
var b;
|
630
|
-
await _.delete(m.payoutAccount.store.id, p._id), n.value = await _.get(m.payoutAccount.store.id), t.value = (b = n.value.find((w) => w.active)) == null ? void 0 : b.paymentGateway;
|
631
|
-
});
|
632
|
-
}
|
633
|
-
O(v);
|
634
|
-
const l = [
|
635
|
-
{
|
636
|
-
label: "Fiuu",
|
637
|
-
value: "RAZER_MERCHANT_SERVICE",
|
638
|
-
form: fe,
|
639
|
-
region: [D.F_COUNTRY.enum.MY, D.F_COUNTRY.enum.SG]
|
640
|
-
},
|
641
|
-
{
|
642
|
-
label: "Revenue Monster",
|
643
|
-
value: "REVENUE_MONSTER",
|
644
|
-
form: be,
|
645
|
-
region: [D.F_COUNTRY.enum.MY]
|
646
|
-
},
|
647
|
-
{
|
648
|
-
label: "GHL",
|
649
|
-
value: "E_GHL",
|
650
|
-
form: ge,
|
651
|
-
region: [D.F_COUNTRY.enum.MY]
|
652
|
-
}
|
653
|
-
], f = B(() => {
|
654
|
-
var p;
|
655
|
-
return (p = l.find((b) => b.value === t.value)) == null ? void 0 : p.form;
|
656
|
-
});
|
657
|
-
return (p, b) => {
|
658
|
-
const w = i("FmCircularProgress"), T = i("FmSelect");
|
659
|
-
return F(), R(N, null, [
|
660
|
-
r(d) ? (F(), R("div", xe, [
|
661
|
-
u(w, { size: "xxl" })
|
662
|
-
])) : (F(), V(T, {
|
663
|
-
key: 1,
|
664
|
-
modelValue: t.value,
|
665
|
-
"onUpdate:modelValue": b[0] || (b[0] = (g) => t.value = g),
|
666
|
-
class: "mb-6",
|
667
|
-
label: "Payment Service Provider",
|
668
|
-
items: l.filter((g) => g.region.includes(r(e).currentCountry.value ?? r(D.F_COUNTRY).enum.MY))
|
669
|
-
}, null, 8, ["modelValue", "items"])),
|
670
|
-
t.value ? (F(), V(j(f.value), Y(z({ key: 2 }, {
|
671
|
-
gateway: n.value.find((g) => g.paymentGateway === t.value),
|
672
|
-
onDelete: o,
|
673
|
-
onUpdate: y
|
674
|
-
})), null, 16)) : U("", !0)
|
675
|
-
], 64);
|
676
|
-
};
|
677
|
-
}
|
678
|
-
}), De = /* @__PURE__ */ I({
|
679
|
-
__name: "PayoutAccountSetting",
|
680
|
-
props: {
|
681
|
-
accountId: {
|
682
|
-
type: String,
|
683
|
-
required: !0
|
684
|
-
}
|
685
|
-
},
|
686
|
-
setup(a) {
|
687
|
-
const m = a, { tab: e } = L({
|
688
|
-
tab: "information"
|
689
|
-
}), { isLoading: d, startAsyncCall: c } = H(!0), t = W(), n = k();
|
690
|
-
async function v(f) {
|
691
|
-
await $.updateById(
|
692
|
-
m.accountId,
|
693
|
-
f
|
694
|
-
), n.value = await $.readById(m.accountId);
|
695
|
-
}
|
696
|
-
const y = [
|
697
|
-
{
|
698
|
-
label: "Information",
|
699
|
-
value: "information",
|
700
|
-
icon: "overview",
|
701
|
-
render: te
|
702
|
-
},
|
703
|
-
{
|
704
|
-
label: "Settlement",
|
705
|
-
value: "settlement",
|
706
|
-
icon: "payments",
|
707
|
-
render: oe
|
708
|
-
},
|
709
|
-
{
|
710
|
-
label: "MDR Status",
|
711
|
-
value: "payment",
|
712
|
-
icon: "account_box",
|
713
|
-
render: pe
|
714
|
-
}
|
715
|
-
];
|
716
|
-
function o() {
|
717
|
-
c(async () => {
|
718
|
-
n.value = await $.readById(m.accountId), n.value.store.event === "ORDERING" && y.push({
|
719
|
-
label: "Payment Gateway",
|
720
|
-
value: "payment-gateway",
|
721
|
-
icon: "assured_workload",
|
722
|
-
render: Ve
|
723
|
-
});
|
724
|
-
});
|
725
|
-
}
|
726
|
-
O(o);
|
727
|
-
const l = B(() => {
|
728
|
-
var f;
|
729
|
-
return (f = y.find((p) => p.value === e.value)) == null ? void 0 : f.render;
|
730
|
-
});
|
731
|
-
return (f, p) => {
|
732
|
-
var w;
|
733
|
-
const b = i("FmTabs");
|
734
|
-
return F(), V(Q, {
|
735
|
-
title: `Payout Account (${(w = n.value) == null ? void 0 : w._id})`,
|
736
|
-
loading: r(d),
|
737
|
-
onBack: r(t).back
|
738
|
-
}, {
|
739
|
-
default: x(() => [
|
740
|
-
u(b, {
|
741
|
-
"model-value": r(e),
|
742
|
-
"onUpdate:modelValue": p[0] || (p[0] = (T) => M(e) ? e.value = T : null),
|
743
|
-
class: "mb-6",
|
744
|
-
items: y
|
745
|
-
}, null, 8, ["model-value"]),
|
746
|
-
r(e) ? (F(), V(j(l.value), Y(z({ key: 0 }, {
|
747
|
-
payoutAccount: n.value,
|
748
|
-
onUpdate: v
|
749
|
-
})), null, 16)) : U("", !0)
|
750
|
-
]),
|
751
|
-
_: 1
|
752
|
-
}, 8, ["title", "loading", "onBack"]);
|
753
|
-
};
|
754
|
-
}
|
755
|
-
});
|
756
|
-
export {
|
757
|
-
De as default
|
758
|
-
};
|