@feedmepos/mf-payment 1.0.0-beta.9 → 1.0.1-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/{AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js → AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js} +8 -9
- package/dist/{PayoutAccount-_d3TfUSc.js → PayoutAccount-CyVXI1Sx.js} +5 -5
- package/dist/{PayoutAccount-DgN3EHTj.js → PayoutAccount-DGUnImHC.js} +4 -4
- package/dist/{PayoutAccountSetting-CmgVLhdp.js → PayoutAccountSetting-BbtOFbsd.js} +161 -183
- package/dist/Restaurant-ewsvVw3P.js +262 -0
- package/dist/RestaurantSetting-BboKM1iG.js +389 -0
- package/dist/{Settlement-B1-WmCwC.js → Settlement-DsJlFpCC.js} +4 -4
- package/dist/{Settlement-BSOQRlp1.js → Settlement-Hr7jN3EL.js} +4 -4
- package/dist/{SettlementTransactions-Cqd2raea.js → SettlementTransactions-BncoGGQ3.js} +10 -10
- package/dist/{SettlementTransactions-JTwD_Vuq.js → SettlementTransactions-Bz9ZVYfq.js} +41 -41
- package/dist/{Terminal-De69bTKY.js → Terminal-D-U0BVTe.js} +121 -108
- package/dist/{TerminalSetting-DlRHaEZh.js → TerminalSetting-JD3sbXOB.js} +3 -3
- package/dist/{TerminalTransaction-CZCsCpEp.js → TerminalTransaction-B5iY_F-3.js} +18 -18
- package/dist/{TerminalTransaction-C1egvX6I.js → TerminalTransaction-DHmD5x8e.js} +12 -12
- package/dist/{Transaction-B3ZWKg6Q.js → Transaction-BedQtv8p.js} +64 -64
- package/dist/{Transaction-B_0nUmpf.js → Transaction-DA_TB9zD.js} +11 -11
- package/dist/api/restaurant/index.d.ts +6 -0
- package/dist/{app-B-XC_fSK.js → app-CpyZU23J.js} +164 -147
- package/dist/app.js +1 -1
- package/dist/{assets-BCAivOTo.js → assets-8c19wXSV.js} +22 -21
- package/dist/components/PagingTable/FmTableSelection.vue.d.ts +13 -0
- package/dist/components/PagingTable/index.vue.d.ts +48 -0
- package/dist/{index-4meiCsRz.js → index-1fXAFo2E.js} +31211 -31211
- package/dist/index-BIXuzGa9.js +19 -0
- package/dist/{index-BFYq3eq8.js → index-Cb1zVhcH.js} +1 -1
- package/dist/{index-CbsnpMWl.js → index-DEpszFWF.js} +1 -1
- package/dist/{index-BwFHcZlm.js → index-DdJrUqkm.js} +1 -1
- package/dist/{index-CBa6eapm.js → index-DeU3Qyca.js} +1 -1
- package/dist/{index-CETCXB6X.js → index-DoAIw4wM.js} +1 -1
- package/dist/index-DsLFmVsY.js +28 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-CKOlikHb.js → index.vue_vue_type_script_setup_true_lang-GT2x04Bn.js} +64 -61
- package/dist/package.json +2 -2
- package/dist/{payout-account-CKhGpN_d.js → payout-account-BbheLTUt.js} +2 -2
- package/dist/{transaction-COjHU7aN.js → transaction-W49zE8RL.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/restaurant/Restaurant.vue.d.ts +2 -0
- package/dist/views/admin/restaurant/RestaurantSetting.vue.d.ts +12 -0
- package/dist/views/admin/restaurant/cell/IsActive.vue.d.ts +7 -0
- package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +803 -0
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +56 -0
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +50 -0
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +52 -0
- package/package.json +2 -2
@@ -1,15 +1,16 @@
|
|
1
|
-
import { defineComponent as I, resolveComponent as
|
2
|
-
import { p as
|
3
|
-
import {
|
4
|
-
import { _ as
|
5
|
-
import { useRouter as
|
6
|
-
import { u as
|
7
|
-
import { P as
|
8
|
-
import { useSnackbar as
|
9
|
-
import { u as
|
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-Cb1zVhcH.js";
|
3
|
+
import { u as H, e as D } from "./index-1fXAFo2E.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-DdJrUqkm.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-DsLFmVsY.js";
|
10
11
|
import { z as A, a as S } from "./validator-D5jtpt9A.js";
|
11
|
-
import { useCoreStore as
|
12
|
-
const
|
12
|
+
import { useCoreStore as X } from "@feedmepos/mf-common";
|
13
|
+
const h = { class: "flex gap-16 mb-6" }, ee = ["src"], te = /* @__PURE__ */ I({
|
13
14
|
__name: "Information",
|
14
15
|
props: {
|
15
16
|
payoutAccount: {
|
@@ -18,10 +19,10 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
18
19
|
}
|
19
20
|
},
|
20
21
|
setup(a) {
|
21
|
-
return (
|
22
|
-
const d =
|
23
|
-
return
|
24
|
-
s("div",
|
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, [
|
25
26
|
u(t, {
|
26
27
|
horizontal: "",
|
27
28
|
class: "flex-1 p-6",
|
@@ -37,16 +38,16 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
37
38
|
}),
|
38
39
|
u(c, { class: "p-0" }, {
|
39
40
|
default: x(() => {
|
40
|
-
var
|
41
|
+
var n, v, y, o, l;
|
41
42
|
return [
|
42
43
|
e[0] || (e[0] = s("b", null, "For", -1)),
|
43
|
-
C(": " + P((v = (
|
44
|
+
C(": " + P((v = (n = a.payoutAccount) == null ? void 0 : n.store) == null ? void 0 : v.event) + " ", 1),
|
44
45
|
e[1] || (e[1] = s("br", null, null, -1)),
|
45
46
|
e[2] || (e[2] = s("b", null, "Reference", -1)),
|
46
47
|
C(": " + P((o = (y = a.payoutAccount) == null ? void 0 : y.store) == null ? void 0 : o.id), 1),
|
47
48
|
e[3] || (e[3] = s("br", null, null, -1)),
|
48
49
|
e[4] || (e[4] = s("b", null, "Business", -1)),
|
49
|
-
C(": " + P((
|
50
|
+
C(": " + P((l = a.payoutAccount) == null ? void 0 : l.businessId), 1),
|
50
51
|
e[5] || (e[5] = s("br", null, null, -1))
|
51
52
|
];
|
52
53
|
}),
|
@@ -73,13 +74,13 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
73
74
|
}),
|
74
75
|
u(c, { class: "p-0" }, {
|
75
76
|
default: x(() => {
|
76
|
-
var
|
77
|
+
var n, v, y, o, l, f, p, b;
|
77
78
|
return [
|
78
79
|
e[6] || (e[6] = s("b", null, "Email", -1)),
|
79
|
-
C(": " + P((y = (v = (
|
80
|
+
C(": " + P((y = (v = (n = a.payoutAccount) == null ? void 0 : n.store) == null ? void 0 : v.keyPerson) == null ? void 0 : y.email) + " ", 1),
|
80
81
|
e[7] || (e[7] = s("br", null, null, -1)),
|
81
82
|
e[8] || (e[8] = s("b", null, "Name", -1)),
|
82
|
-
C(": " + P((f = (
|
83
|
+
C(": " + P((f = (l = (o = a.payoutAccount) == null ? void 0 : o.store) == null ? void 0 : l.keyPerson) == null ? void 0 : f.name), 1),
|
83
84
|
e[9] || (e[9] = s("br", null, null, -1)),
|
84
85
|
e[10] || (e[10] = s("b", null, "Phone", -1)),
|
85
86
|
C(": " + P((b = (p = a.payoutAccount) == null ? void 0 : p.store.keyPerson) == null ? void 0 : b.phone), 1),
|
@@ -96,14 +97,14 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
96
97
|
})
|
97
98
|
]),
|
98
99
|
e[12] || (e[12] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Exterior Photo", -1)),
|
99
|
-
a.payoutAccount.store.exteriorPhoto ? (
|
100
|
+
a.payoutAccount.store.exteriorPhoto ? (F(), R("img", {
|
100
101
|
key: 0,
|
101
102
|
src: a.payoutAccount.store.exteriorPhoto
|
102
|
-
}, null, 8,
|
103
|
+
}, null, 8, ee)) : U("", !0)
|
103
104
|
], 64);
|
104
105
|
};
|
105
106
|
}
|
106
|
-
}),
|
107
|
+
}), ae = { class: "flex gap-16" }, le = { class: "flex-1" }, ne = { class: "flex-1" }, oe = /* @__PURE__ */ I({
|
107
108
|
__name: "Settlement",
|
108
109
|
props: {
|
109
110
|
payoutAccount: {
|
@@ -112,9 +113,9 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
112
113
|
}
|
113
114
|
},
|
114
115
|
setup(a) {
|
115
|
-
return (
|
116
|
-
const d =
|
117
|
-
return
|
116
|
+
return (m, e) => {
|
117
|
+
const d = i("FmCardHeader"), c = i("FmCardSection"), t = i("FmCard");
|
118
|
+
return F(), R(N, null, [
|
118
119
|
u(t, {
|
119
120
|
horizontal: "",
|
120
121
|
class: "flex-1 p-6 mx-6 mb-6",
|
@@ -130,16 +131,16 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
130
131
|
}),
|
131
132
|
u(c, { class: "p-0" }, {
|
132
133
|
default: x(() => {
|
133
|
-
var
|
134
|
+
var n, v, y, o, l, f;
|
134
135
|
return [
|
135
136
|
e[0] || (e[0] = s("b", null, "Bank", -1)),
|
136
|
-
C(": " + P((v = (
|
137
|
+
C(": " + P((v = (n = a.payoutAccount) == null ? void 0 : n.store.bank) == null ? void 0 : v.name), 1),
|
137
138
|
e[1] || (e[1] = s("br", null, null, -1)),
|
138
139
|
e[2] || (e[2] = s("b", null, "Name", -1)),
|
139
140
|
C(": " + P((o = (y = a.payoutAccount) == null ? void 0 : y.store.bank) == null ? void 0 : o.holderName), 1),
|
140
141
|
e[3] || (e[3] = s("br", null, null, -1)),
|
141
142
|
e[4] || (e[4] = s("b", null, "Number", -1)),
|
142
|
-
C(": " + P((f = (
|
143
|
+
C(": " + P((f = (l = a.payoutAccount) == null ? void 0 : l.store.bank) == null ? void 0 : f.accountNumber), 1)
|
143
144
|
];
|
144
145
|
}),
|
145
146
|
_: 1
|
@@ -150,19 +151,19 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
150
151
|
]),
|
151
152
|
_: 1
|
152
153
|
}),
|
153
|
-
s("div",
|
154
|
-
s("div",
|
154
|
+
s("div", ae, [
|
155
|
+
s("div", le, [
|
155
156
|
e[5] || (e[5] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
|
156
|
-
a.payoutAccount.store.ssm ? (
|
157
|
+
a.payoutAccount.store.ssm ? (F(), V(K, {
|
157
158
|
key: 0,
|
158
159
|
pdf: a.payoutAccount.store.ssm,
|
159
160
|
"disable-text-layer": !0,
|
160
161
|
"disable-annotation-layer": !0
|
161
162
|
}, null, 8, ["pdf"])) : U("", !0)
|
162
163
|
]),
|
163
|
-
s("div",
|
164
|
+
s("div", ne, [
|
164
165
|
e[6] || (e[6] = s("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
|
165
|
-
a.payoutAccount.store.bankStatement ? (
|
166
|
+
a.payoutAccount.store.bankStatement ? (F(), V(K, {
|
166
167
|
key: 0,
|
167
168
|
pdf: a.payoutAccount.store.bankStatement,
|
168
169
|
"disable-text-layer": !0,
|
@@ -173,22 +174,22 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
173
174
|
], 64);
|
174
175
|
};
|
175
176
|
}
|
176
|
-
}),
|
177
|
+
}), ue = /* @__PURE__ */ I({
|
177
178
|
__name: "RateInput",
|
178
179
|
props: {
|
179
180
|
data: {},
|
180
181
|
onChange: { type: Function }
|
181
182
|
},
|
182
183
|
setup(a) {
|
183
|
-
const
|
184
|
-
return
|
185
|
-
|
184
|
+
const m = a, e = k(m.data.toString());
|
185
|
+
return q(e, (d) => {
|
186
|
+
m.onChange(parseFloat(d));
|
186
187
|
}), (d, c) => {
|
187
|
-
const t =
|
188
|
-
return
|
188
|
+
const t = i("FmTextField");
|
189
|
+
return F(), V(t, {
|
189
190
|
inputmode: "decimal",
|
190
191
|
modelValue: e.value,
|
191
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
192
|
+
"onUpdate:modelValue": c[0] || (c[0] = (n) => e.value = n)
|
192
193
|
}, {
|
193
194
|
append: x(() => c[1] || (c[1] = [
|
194
195
|
C("%")
|
@@ -197,26 +198,26 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
197
198
|
}, 8, ["modelValue"]);
|
198
199
|
};
|
199
200
|
}
|
200
|
-
}),
|
201
|
+
}), re = /* @__PURE__ */ I({
|
201
202
|
__name: "TPlusInput",
|
202
203
|
props: {
|
203
204
|
data: {},
|
204
205
|
onChange: { type: Function }
|
205
206
|
},
|
206
207
|
setup(a) {
|
207
|
-
const
|
208
|
-
return
|
209
|
-
|
208
|
+
const m = a, e = k(m.data.toString());
|
209
|
+
return q(e, (d) => {
|
210
|
+
m.onChange(parseInt(d));
|
210
211
|
}), (d, c) => {
|
211
|
-
const t =
|
212
|
-
return
|
212
|
+
const t = i("FmTextField");
|
213
|
+
return F(), V(t, {
|
213
214
|
inputmode: "numeric",
|
214
215
|
modelValue: e.value,
|
215
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
216
|
+
"onUpdate:modelValue": c[0] || (c[0] = (n) => e.value = n)
|
216
217
|
}, null, 8, ["modelValue"]);
|
217
218
|
};
|
218
219
|
}
|
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({
|
220
221
|
__name: "PaymentStatus",
|
221
222
|
props: {
|
222
223
|
onUpdate: {
|
@@ -229,26 +230,26 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
229
230
|
}
|
230
231
|
},
|
231
232
|
setup(a) {
|
232
|
-
const
|
233
|
+
const m = a, e = k(!1), d = Z(), c = async (o) => {
|
233
234
|
try {
|
234
|
-
e.value = !0, await
|
235
|
+
e.value = !0, await m.onUpdate(o), d.open({
|
235
236
|
type: "success",
|
236
237
|
title: "Payout account update succesfully"
|
237
238
|
});
|
238
|
-
} catch (
|
239
|
+
} catch (l) {
|
239
240
|
d.open({
|
240
241
|
type: "error",
|
241
242
|
title: "Error occurs when updating payout account",
|
242
|
-
message:
|
243
|
+
message: J(l)
|
243
244
|
});
|
244
245
|
} finally {
|
245
246
|
e.value = !1;
|
246
247
|
}
|
247
|
-
}, { search: t } =
|
248
|
+
}, { search: t } = L({
|
248
249
|
search: ""
|
249
|
-
}),
|
250
|
-
const { ssm: o, bank:
|
251
|
-
return o &&
|
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;
|
252
253
|
}), v = k(""), y = [
|
253
254
|
{
|
254
255
|
header: () => "Payment Method",
|
@@ -259,11 +260,11 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
259
260
|
header: () => "Rate",
|
260
261
|
accessorKey: "rate",
|
261
262
|
cell: ({ row: o }) => {
|
262
|
-
let
|
263
|
-
return o.original.rate && (
|
264
|
-
data:
|
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,
|
265
266
|
onChange: (f) => {
|
266
|
-
const p =
|
267
|
+
const p = m.payoutAccount.methods.at(o.index);
|
267
268
|
p.rate || (p.rate = {
|
268
269
|
amount: 0,
|
269
270
|
precision: 4
|
@@ -275,23 +276,23 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
275
276
|
{
|
276
277
|
header: () => "T plus",
|
277
278
|
accessorKey: "tPlus",
|
278
|
-
cell: ({ row: o }) =>
|
279
|
+
cell: ({ row: o }) => E(re, {
|
279
280
|
data: o.original.tPlus ?? 0,
|
280
|
-
onChange: (
|
281
|
-
const f =
|
282
|
-
f.tPlus =
|
281
|
+
onChange: (l) => {
|
282
|
+
const f = m.payoutAccount.methods.at(o.index);
|
283
|
+
f.tPlus = l;
|
283
284
|
}
|
284
285
|
})
|
285
286
|
}
|
286
287
|
];
|
287
|
-
return (o,
|
288
|
-
const f =
|
289
|
-
return
|
290
|
-
s("div",
|
291
|
-
s("div",
|
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, [
|
292
293
|
u(p, {
|
293
294
|
modelValue: a.payoutAccount.status,
|
294
|
-
"onUpdate:modelValue":
|
295
|
+
"onUpdate:modelValue": l[0] || (l[0] = (G) => a.payoutAccount.status = G),
|
295
296
|
label: "Account Status"
|
296
297
|
}, {
|
297
298
|
default: x(() => [
|
@@ -311,22 +312,22 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
311
312
|
_: 1
|
312
313
|
}, 8, ["modelValue"])
|
313
314
|
]),
|
314
|
-
s("div",
|
315
|
+
s("div", me, [
|
315
316
|
u(b, {
|
316
317
|
modelValue: a.payoutAccount.enable,
|
317
|
-
"onUpdate:modelValue":
|
318
|
-
disabled: !
|
318
|
+
"onUpdate:modelValue": l[1] || (l[1] = (G) => a.payoutAccount.enable = G),
|
319
|
+
disabled: !n.value,
|
319
320
|
label: "Enabled",
|
320
321
|
sublabel: "Merchant can use online features such as e-payment, settlement"
|
321
322
|
}, null, 8, ["modelValue", "disabled"])
|
322
323
|
])
|
323
324
|
]),
|
324
|
-
a.payoutAccount.enable ? (
|
325
|
-
s("div",
|
326
|
-
s("div",
|
325
|
+
a.payoutAccount.enable ? (F(), R(N, { key: 0 }, [
|
326
|
+
s("div", de, [
|
327
|
+
s("div", ce, [
|
327
328
|
u(w, {
|
328
329
|
modelValue: r(t),
|
329
|
-
"onUpdate:modelValue":
|
330
|
+
"onUpdate:modelValue": l[2] || (l[2] = (G) => M(t) ? t.value = G : null),
|
330
331
|
placeholder: "Search Method ..."
|
331
332
|
}, null, 8, ["modelValue"])
|
332
333
|
])
|
@@ -334,13 +335,13 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
334
335
|
u(T, {
|
335
336
|
class: "mt-6",
|
336
337
|
modelValue: v.value,
|
337
|
-
"onUpdate:modelValue":
|
338
|
+
"onUpdate:modelValue": l[3] || (l[3] = (G) => v.value = G),
|
338
339
|
"search-value": r(t),
|
339
340
|
"row-data": a.payoutAccount.methods,
|
340
341
|
"column-defs": y
|
341
342
|
}, null, 8, ["modelValue", "search-value", "row-data"])
|
342
343
|
], 64)) : U("", !0),
|
343
|
-
u(
|
344
|
+
u(g, {
|
344
345
|
class: "w-full mt-6",
|
345
346
|
variant: "primary",
|
346
347
|
label: "Save",
|
@@ -350,30 +351,7 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
350
351
|
], 64);
|
351
352
|
};
|
352
353
|
}
|
353
|
-
}),
|
354
|
-
async get(a) {
|
355
|
-
return B(
|
356
|
-
await E().get(
|
357
|
-
`restaurants/${a}/payment-gateway`
|
358
|
-
)
|
359
|
-
);
|
360
|
-
},
|
361
|
-
async upsert(a, i) {
|
362
|
-
return B(
|
363
|
-
await E().post(
|
364
|
-
`restaurants/${a}/payment-gateway`,
|
365
|
-
{ data: i }
|
366
|
-
)
|
367
|
-
);
|
368
|
-
},
|
369
|
-
async delete(a, i) {
|
370
|
-
return B(
|
371
|
-
await E().delete(
|
372
|
-
`restaurants/${a}/payment-gateway/${i}`
|
373
|
-
)
|
374
|
-
);
|
375
|
-
}
|
376
|
-
}, ve = { class: "flex mt-6 space-x-6" }, be = /* @__PURE__ */ I({
|
354
|
+
}), ye = { class: "flex mt-6 space-x-6" }, fe = /* @__PURE__ */ I({
|
377
355
|
__name: "FiuuGateway",
|
378
356
|
props: {
|
379
357
|
onUpdate: {
|
@@ -400,51 +378,51 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
400
378
|
offlineSecret: ""
|
401
379
|
});
|
402
380
|
return (c, t) => {
|
403
|
-
const
|
404
|
-
return
|
381
|
+
const n = i("FmTextField"), v = i("FmButton"), y = i("FmForm");
|
382
|
+
return F(), V(y, {
|
405
383
|
ref: "form",
|
406
384
|
class: "flex flex-col gap-16",
|
407
385
|
onValidationSuccess: t[6] || (t[6] = () => a.onUpdate(e.value))
|
408
386
|
}, {
|
409
387
|
default: x(() => [
|
410
|
-
u(
|
388
|
+
u(n, {
|
411
389
|
modelValue: e.value.merchantId,
|
412
390
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.merchantId = o),
|
413
391
|
label: "Merchant ID",
|
414
392
|
rules: r(A)(r(S).string())
|
415
393
|
}, null, 8, ["modelValue", "rules"]),
|
416
|
-
u(
|
394
|
+
u(n, {
|
417
395
|
modelValue: e.value.uniqueId,
|
418
396
|
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.uniqueId = o),
|
419
397
|
label: "Unique ID",
|
420
398
|
rules: r(A)(r(S).string())
|
421
399
|
}, null, 8, ["modelValue", "rules"]),
|
422
|
-
u(
|
400
|
+
u(n, {
|
423
401
|
modelValue: e.value.verifyKey,
|
424
402
|
"onUpdate:modelValue": t[2] || (t[2] = (o) => e.value.verifyKey = o),
|
425
403
|
label: "Verify Key",
|
426
404
|
rules: r(A)(r(S).string())
|
427
405
|
}, null, 8, ["modelValue", "rules"]),
|
428
|
-
u(
|
406
|
+
u(n, {
|
429
407
|
modelValue: e.value.secretKey,
|
430
408
|
"onUpdate:modelValue": t[3] || (t[3] = (o) => e.value.secretKey = o),
|
431
409
|
label: "Secret Key",
|
432
410
|
rules: r(A)(r(S).string())
|
433
411
|
}, null, 8, ["modelValue", "rules"]),
|
434
|
-
u(
|
412
|
+
u(n, {
|
435
413
|
modelValue: e.value.applicationCode,
|
436
414
|
"onUpdate:modelValue": t[4] || (t[4] = (o) => e.value.applicationCode = o),
|
437
415
|
label: "Application Code ( Offline )",
|
438
416
|
rules: r(A)(r(S).string())
|
439
417
|
}, null, 8, ["modelValue", "rules"]),
|
440
|
-
u(
|
418
|
+
u(n, {
|
441
419
|
modelValue: e.value.offlineSecret,
|
442
420
|
"onUpdate:modelValue": t[5] || (t[5] = (o) => e.value.offlineSecret = o),
|
443
421
|
label: "Offline Secret ( Offline )",
|
444
422
|
rules: r(A)(r(S).string())
|
445
423
|
}, null, 8, ["modelValue", "rules"]),
|
446
|
-
s("div",
|
447
|
-
a.gateway ? (
|
424
|
+
s("div", ye, [
|
425
|
+
a.gateway ? (F(), V(v, {
|
448
426
|
key: 0,
|
449
427
|
class: "flex-1",
|
450
428
|
variant: "secondary",
|
@@ -463,7 +441,7 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
463
441
|
}, 512);
|
464
442
|
};
|
465
443
|
}
|
466
|
-
}),
|
444
|
+
}), ve = { class: "flex mt-6 space-x-6" }, be = /* @__PURE__ */ I({
|
467
445
|
__name: "RevenueMonsterGateway",
|
468
446
|
props: {
|
469
447
|
onUpdate: {
|
@@ -488,38 +466,38 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
488
466
|
clientPrivateKey: ""
|
489
467
|
});
|
490
468
|
return (c, t) => {
|
491
|
-
const
|
492
|
-
return
|
469
|
+
const n = i("FmTextField"), v = i("FmTextarea"), y = i("FmButton"), o = i("FmForm");
|
470
|
+
return F(), V(o, {
|
493
471
|
ref: "form",
|
494
472
|
class: "flex flex-col gap-16",
|
495
473
|
onValidationSuccess: t[4] || (t[4] = () => a.onUpdate(e.value))
|
496
474
|
}, {
|
497
475
|
default: x(() => [
|
498
|
-
u(
|
476
|
+
u(n, {
|
499
477
|
modelValue: e.value.storeId,
|
500
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
478
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.value.storeId = l),
|
501
479
|
label: "Store ID",
|
502
480
|
rules: r(A)(r(S).string())
|
503
481
|
}, null, 8, ["modelValue", "rules"]),
|
504
|
-
u(
|
482
|
+
u(n, {
|
505
483
|
modelValue: e.value.clientId,
|
506
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
484
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => e.value.clientId = l),
|
507
485
|
label: "Client ID",
|
508
486
|
rules: r(A)(r(S).string())
|
509
487
|
}, null, 8, ["modelValue", "rules"]),
|
510
|
-
u(
|
488
|
+
u(n, {
|
511
489
|
modelValue: e.value.clientSecret,
|
512
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
490
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => e.value.clientSecret = l),
|
513
491
|
label: "Client Secret",
|
514
492
|
rules: r(A)(r(S).string())
|
515
493
|
}, null, 8, ["modelValue", "rules"]),
|
516
494
|
u(v, {
|
517
495
|
modelValue: e.value.clientPrivateKey,
|
518
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
496
|
+
"onUpdate:modelValue": t[3] || (t[3] = (l) => e.value.clientPrivateKey = l),
|
519
497
|
label: "Client Private Key"
|
520
498
|
}, null, 8, ["modelValue"]),
|
521
|
-
s("div",
|
522
|
-
a.gateway ? (
|
499
|
+
s("div", ve, [
|
500
|
+
a.gateway ? (F(), V(y, {
|
523
501
|
key: 0,
|
524
502
|
class: "flex-1",
|
525
503
|
variant: "secondary",
|
@@ -538,7 +516,7 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
538
516
|
}, 512);
|
539
517
|
};
|
540
518
|
}
|
541
|
-
}),
|
519
|
+
}), Fe = { class: "flex mt-6 space-x-6" }, ge = /* @__PURE__ */ I({
|
542
520
|
__name: "GhlGateway",
|
543
521
|
props: {
|
544
522
|
onUpdate: {
|
@@ -562,33 +540,33 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
562
540
|
privateKey: ""
|
563
541
|
});
|
564
542
|
return (c, t) => {
|
565
|
-
const
|
566
|
-
return
|
543
|
+
const n = i("FmTextField"), v = i("FmTextarea"), y = i("FmButton"), o = i("FmForm");
|
544
|
+
return F(), V(o, {
|
567
545
|
ref: "form",
|
568
546
|
class: "flex flex-col gap-16",
|
569
547
|
onValidationSuccess: t[3] || (t[3] = () => a.onUpdate(e.value))
|
570
548
|
}, {
|
571
549
|
default: x(() => [
|
572
|
-
u(
|
550
|
+
u(n, {
|
573
551
|
modelValue: e.value.merchantId,
|
574
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
552
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.value.merchantId = l),
|
575
553
|
label: "Merchant ID",
|
576
554
|
rules: r(A)(r(S).string())
|
577
555
|
}, null, 8, ["modelValue", "rules"]),
|
578
|
-
u(
|
556
|
+
u(n, {
|
579
557
|
modelValue: e.value.terminalId,
|
580
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
558
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => e.value.terminalId = l),
|
581
559
|
label: "Terminal ID",
|
582
560
|
rules: r(A)(r(S).string())
|
583
561
|
}, null, 8, ["modelValue", "rules"]),
|
584
562
|
u(v, {
|
585
563
|
modelValue: e.value.privateKey,
|
586
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
564
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => e.value.privateKey = l),
|
587
565
|
label: "Private Key",
|
588
566
|
rules: r(A)(r(S).string())
|
589
567
|
}, null, 8, ["modelValue", "rules"]),
|
590
|
-
s("div",
|
591
|
-
a.gateway ? (
|
568
|
+
s("div", Fe, [
|
569
|
+
a.gateway ? (F(), V(y, {
|
592
570
|
key: 0,
|
593
571
|
class: "flex-1",
|
594
572
|
variant: "secondary",
|
@@ -607,10 +585,10 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
607
585
|
}, 512);
|
608
586
|
};
|
609
587
|
}
|
610
|
-
}),
|
588
|
+
}), xe = {
|
611
589
|
key: 0,
|
612
590
|
class: "flex items-center justify-center min-h-[80vh]"
|
613
|
-
},
|
591
|
+
}, Ve = /* @__PURE__ */ I({
|
614
592
|
__name: "PaymentGateway",
|
615
593
|
props: {
|
616
594
|
payoutAccount: {
|
@@ -619,11 +597,11 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
619
597
|
}
|
620
598
|
},
|
621
599
|
setup(a) {
|
622
|
-
const
|
600
|
+
const m = a, e = X(), { isLoading: d, startAsyncCall: c } = H(), t = k(), n = k([]);
|
623
601
|
function v() {
|
624
602
|
c(async () => {
|
625
603
|
var p;
|
626
|
-
|
604
|
+
n.value = await _.get(m.payoutAccount.store.id), t.value = (p = n.value.find((b) => b.active)) == null ? void 0 : p.paymentGateway;
|
627
605
|
});
|
628
606
|
}
|
629
607
|
async function y(p) {
|
@@ -635,62 +613,62 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
635
613
|
paymentGateway: t.value,
|
636
614
|
config: p,
|
637
615
|
active: !0
|
638
|
-
}, w =
|
616
|
+
}, w = n.value.find((g) => g.paymentGateway === t.value);
|
639
617
|
w && (b._id = w._id, b._rev = w._rev), await Promise.all(
|
640
|
-
|
641
|
-
|
642
|
-
...
|
618
|
+
n.value.map(async (g) => {
|
619
|
+
g.active && g.paymentGateway !== b.paymentGateway && await _.upsert(m.payoutAccount.store.id, {
|
620
|
+
...g,
|
643
621
|
active: !1
|
644
622
|
});
|
645
623
|
})
|
646
|
-
), await _.upsert(
|
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;
|
647
625
|
});
|
648
626
|
}
|
649
627
|
async function o(p) {
|
650
628
|
c(async () => {
|
651
629
|
var b;
|
652
|
-
await _.delete(
|
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;
|
653
631
|
});
|
654
632
|
}
|
655
|
-
|
656
|
-
const
|
633
|
+
O(v);
|
634
|
+
const l = [
|
657
635
|
{
|
658
636
|
label: "Fiuu",
|
659
637
|
value: "RAZER_MERCHANT_SERVICE",
|
660
|
-
form:
|
661
|
-
region: [
|
638
|
+
form: fe,
|
639
|
+
region: [D.F_COUNTRY.enum.MY, D.F_COUNTRY.enum.SG]
|
662
640
|
},
|
663
641
|
{
|
664
642
|
label: "Revenue Monster",
|
665
643
|
value: "REVENUE_MONSTER",
|
666
|
-
form:
|
667
|
-
region: [
|
644
|
+
form: be,
|
645
|
+
region: [D.F_COUNTRY.enum.MY]
|
668
646
|
},
|
669
647
|
{
|
670
648
|
label: "GHL",
|
671
649
|
value: "E_GHL",
|
672
|
-
form:
|
673
|
-
region: [
|
650
|
+
form: ge,
|
651
|
+
region: [D.F_COUNTRY.enum.MY]
|
674
652
|
}
|
675
|
-
], f =
|
653
|
+
], f = B(() => {
|
676
654
|
var p;
|
677
|
-
return (p =
|
655
|
+
return (p = l.find((b) => b.value === t.value)) == null ? void 0 : p.form;
|
678
656
|
});
|
679
657
|
return (p, b) => {
|
680
|
-
const w =
|
681
|
-
return
|
682
|
-
r(d) ? (
|
658
|
+
const w = i("FmCircularProgress"), T = i("FmSelect");
|
659
|
+
return F(), R(N, null, [
|
660
|
+
r(d) ? (F(), R("div", xe, [
|
683
661
|
u(w, { size: "xxl" })
|
684
|
-
])) : (
|
662
|
+
])) : (F(), V(T, {
|
685
663
|
key: 1,
|
686
664
|
modelValue: t.value,
|
687
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
665
|
+
"onUpdate:modelValue": b[0] || (b[0] = (g) => t.value = g),
|
688
666
|
class: "mb-6",
|
689
667
|
label: "Payment Service Provider",
|
690
|
-
items:
|
668
|
+
items: l.filter((g) => g.region.includes(r(e).currentCountry.value ?? r(D.F_COUNTRY).enum.MY))
|
691
669
|
}, null, 8, ["modelValue", "items"])),
|
692
|
-
t.value ? (
|
693
|
-
gateway:
|
670
|
+
t.value ? (F(), V(j(f.value), Y(z({ key: 2 }, {
|
671
|
+
gateway: n.value.find((g) => g.paymentGateway === t.value),
|
694
672
|
onDelete: o,
|
695
673
|
onUpdate: y
|
696
674
|
})), null, 16)) : U("", !0)
|
@@ -706,67 +684,67 @@ const te = { class: "flex gap-16 mb-6" }, ae = ["src"], ne = /* @__PURE__ */ I({
|
|
706
684
|
}
|
707
685
|
},
|
708
686
|
setup(a) {
|
709
|
-
const
|
687
|
+
const m = a, { tab: e } = L({
|
710
688
|
tab: "information"
|
711
|
-
}), { isLoading: d, startAsyncCall: c } =
|
689
|
+
}), { isLoading: d, startAsyncCall: c } = H(!0), t = W(), n = k();
|
712
690
|
async function v(f) {
|
713
|
-
await
|
714
|
-
|
691
|
+
await $.updateById(
|
692
|
+
m.accountId,
|
715
693
|
f
|
716
|
-
),
|
694
|
+
), n.value = await $.readById(m.accountId);
|
717
695
|
}
|
718
696
|
const y = [
|
719
697
|
{
|
720
698
|
label: "Information",
|
721
699
|
value: "information",
|
722
700
|
icon: "overview",
|
723
|
-
render:
|
701
|
+
render: te
|
724
702
|
},
|
725
703
|
{
|
726
704
|
label: "Settlement",
|
727
705
|
value: "settlement",
|
728
706
|
icon: "payments",
|
729
|
-
render:
|
707
|
+
render: oe
|
730
708
|
},
|
731
709
|
{
|
732
710
|
label: "MDR Status",
|
733
711
|
value: "payment",
|
734
712
|
icon: "account_box",
|
735
|
-
render:
|
713
|
+
render: pe
|
736
714
|
}
|
737
715
|
];
|
738
716
|
function o() {
|
739
717
|
c(async () => {
|
740
|
-
|
718
|
+
n.value = await $.readById(m.accountId), n.value.store.event === "ORDERING" && y.push({
|
741
719
|
label: "Payment Gateway",
|
742
720
|
value: "payment-gateway",
|
743
721
|
icon: "assured_workload",
|
744
|
-
render:
|
722
|
+
render: Ve
|
745
723
|
});
|
746
724
|
});
|
747
725
|
}
|
748
|
-
|
749
|
-
const
|
726
|
+
O(o);
|
727
|
+
const l = B(() => {
|
750
728
|
var f;
|
751
729
|
return (f = y.find((p) => p.value === e.value)) == null ? void 0 : f.render;
|
752
730
|
});
|
753
731
|
return (f, p) => {
|
754
732
|
var w;
|
755
|
-
const b =
|
756
|
-
return
|
757
|
-
title: `Payout Account (${(w =
|
733
|
+
const b = i("FmTabs");
|
734
|
+
return F(), V(Q, {
|
735
|
+
title: `Payout Account (${(w = n.value) == null ? void 0 : w._id})`,
|
758
736
|
loading: r(d),
|
759
737
|
onBack: r(t).back
|
760
738
|
}, {
|
761
739
|
default: x(() => [
|
762
740
|
u(b, {
|
763
741
|
"model-value": r(e),
|
764
|
-
"onUpdate:modelValue": p[0] || (p[0] = (T) =>
|
742
|
+
"onUpdate:modelValue": p[0] || (p[0] = (T) => M(e) ? e.value = T : null),
|
765
743
|
class: "mb-6",
|
766
744
|
items: y
|
767
745
|
}, null, 8, ["model-value"]),
|
768
|
-
r(e) ? (
|
769
|
-
payoutAccount:
|
746
|
+
r(e) ? (F(), V(j(l.value), Y(z({ key: 0 }, {
|
747
|
+
payoutAccount: n.value,
|
770
748
|
onUpdate: v
|
771
749
|
})), null, 16)) : U("", !0)
|
772
750
|
]),
|