@feedmepos/mf-payment 1.2.6 → 1.2.7
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-CFFgQ_65.js → PayoutAccount-90Fg0Eqb.js} +6 -6
- package/dist/{PayoutAccount-CSm0Ldg9.js → PayoutAccount-DS14d5_9.js} +5 -5
- package/dist/{PayoutAccountSetting-rO11Afiw.js → PayoutAccountSetting-PfKPX1B-.js} +3 -3
- package/dist/{Restaurant-CoNFB1rk.js → Restaurant-Dk0X2E1m.js} +4 -4
- package/dist/{RestaurantSetting-BQvg8S_p.js → RestaurantSetting-S0CcLhRS.js} +182 -185
- package/dist/{Settlement-DpmBq0V9.js → Settlement-DlFBQNQZ.js} +3 -3
- package/dist/{Settlement-DEKvU0zP.js → Settlement-DxI1z91R.js} +3 -3
- package/dist/{SettlementTransactions-3alZwucT.js → SettlementTransactions-CRFD0bFO.js} +3 -3
- package/dist/{SettlementTransactions-DugNdpd2.js → SettlementTransactions-DgOj_D8D.js} +3 -3
- package/dist/{Terminal-Dv7zS_te.js → Terminal-Ckx8vQ_3.js} +5 -5
- package/dist/TerminalSetting-DicoKPoS.js +572 -0
- package/dist/{Transaction-DCKhuoVw.js → Transaction-CF_sHrl6.js} +5 -5
- package/dist/{Transaction-CT8Be7FS.js → Transaction-Da1_AnWG.js} +7 -7
- package/dist/{TransactionOld-jkTy7Aeb.js → TransactionOld-6Nm8xhGh.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-B_By7BvK.js → TransactionTable.vue_vue_type_script_setup_true_lang-CaKdn0VN.js} +3 -3
- package/dist/{app-CiHNgoQY.js → app-C4_gin4V.js} +343 -343
- package/dist/app.js +1 -1
- package/dist/{assets-BqjaEXmB.js → assets-CkJwKbJo.js} +2 -2
- package/dist/{grafana-Bwx9Kj61.js → grafana-5rTce_2u.js} +1 -1
- package/dist/{index-CyMElhGL.js → index-B-dODLCP.js} +2 -2
- package/dist/{index-CZrwq9oF.js → index-B2K92QTs.js} +1 -1
- package/dist/{index-BIDuwnm_.js → index-CjFw5eYb.js} +1 -1
- package/dist/{index-1q4ZbRix.js → index-D_ZQysnD.js} +3909 -3907
- package/dist/{index-CN50SqVG.js → index-REZAHMM0.js} +1 -1
- package/dist/{index-C3fxBVdz.js → index-pQqLjJzo.js} +1 -1
- package/dist/{index-CCIVpogO.js → index-yHpeK6eL.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-DT8A92zR.js → index.vue_vue_type_script_setup_true_lang-B-LNPiqR.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-cg0CKkbk.js → payout-account-DYhD0NF_.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +6 -6
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +6 -6
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +6 -6
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +2 -0
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +4 -4
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +4 -4
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +4 -4
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +4 -4
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +4 -4
- package/package.json +2 -2
- package/dist/TerminalSetting-ChM9jB-O.js +0 -572
@@ -1,44 +1,44 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { g as
|
3
|
-
import { _ as
|
4
|
-
import { useRouter as
|
5
|
-
import { u as
|
1
|
+
import { defineComponent as D, ref as x, resolveComponent as s, openBlock as F, createBlock as w, withCtx as k, createVNode as o, unref as a, createElementVNode as G, createCommentVNode as S, computed as q, onMounted as $, createElementBlock as O, Fragment as j, isRef as B, resolveDynamicComponent as K, normalizeProps as P, mergeProps as E } from "vue";
|
2
|
+
import { g as R, b as A, u as N, e as C } from "./index-D_ZQysnD.js";
|
3
|
+
import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
4
|
+
import { useRouter as H } from "vue-router";
|
5
|
+
import { u as Y } from "./index-pQqLjJzo.js";
|
6
6
|
import { z as p, a as f } from "./validator-D5jtpt9A.js";
|
7
|
-
import { useCoreStore as
|
7
|
+
import { useCoreStore as L } from "@feedmepos/mf-common";
|
8
8
|
import { u as Q } from "./error-K1CakhA9.js";
|
9
9
|
import { useSnackbar as Z } from "@feedmepos/ui-library";
|
10
|
-
import { r as h } from "./index-
|
11
|
-
const
|
10
|
+
import { r as h } from "./index-yHpeK6eL.js";
|
11
|
+
const T = {
|
12
12
|
async get(n) {
|
13
|
-
return
|
14
|
-
await
|
13
|
+
return R(
|
14
|
+
await A().get(
|
15
15
|
`restaurants/${n}/payment-gateway`
|
16
16
|
)
|
17
17
|
);
|
18
18
|
},
|
19
|
-
async upsert(n,
|
20
|
-
return
|
21
|
-
await
|
19
|
+
async upsert(n, m) {
|
20
|
+
return R(
|
21
|
+
await A().post(
|
22
22
|
`restaurants/${n}/payment-gateway`,
|
23
|
-
{ data:
|
23
|
+
{ data: m }
|
24
24
|
)
|
25
25
|
);
|
26
26
|
},
|
27
|
-
async delete(n,
|
28
|
-
return
|
29
|
-
await
|
30
|
-
`restaurants/${n}/payment-gateway/${
|
27
|
+
async delete(n, m) {
|
28
|
+
return R(
|
29
|
+
await A().delete(
|
30
|
+
`restaurants/${n}/payment-gateway/${m}`
|
31
31
|
)
|
32
32
|
);
|
33
33
|
},
|
34
34
|
async grabSync(n) {
|
35
|
-
return
|
36
|
-
await
|
35
|
+
return R(
|
36
|
+
await A().post(
|
37
37
|
`restaurants/${n}/payment-gateway/grab/sync`
|
38
38
|
)
|
39
39
|
);
|
40
40
|
}
|
41
|
-
}, J = { class: "flex mt-6 space-x-6" }, W = /* @__PURE__ */
|
41
|
+
}, J = { class: "flex mt-6 space-x-6" }, W = /* @__PURE__ */ D({
|
42
42
|
__name: "FiuuGateway",
|
43
43
|
props: {
|
44
44
|
onUpdate: {
|
@@ -56,7 +56,7 @@ const G = {
|
|
56
56
|
},
|
57
57
|
setup(n) {
|
58
58
|
var g, c;
|
59
|
-
const
|
59
|
+
const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((c = m.gateway) == null ? void 0 : c.config) || {
|
60
60
|
merchantId: "",
|
61
61
|
uniqueId: "",
|
62
62
|
verifyKey: "",
|
@@ -64,64 +64,64 @@ const G = {
|
|
64
64
|
applicationCode: "",
|
65
65
|
offlineSecret: ""
|
66
66
|
});
|
67
|
-
return (
|
68
|
-
const i = s("FmTextField"),
|
69
|
-
return
|
67
|
+
return (d, e) => {
|
68
|
+
const i = s("FmTextField"), V = s("FmSwitch"), y = s("FmButton"), v = s("FmForm");
|
69
|
+
return F(), w(v, {
|
70
70
|
ref: "form",
|
71
71
|
class: "flex flex-col gap-16",
|
72
72
|
onValidationSuccess: e[7] || (e[7] = () => n.onUpdate(r.value, t.value))
|
73
73
|
}, {
|
74
|
-
default:
|
74
|
+
default: k(() => [
|
75
75
|
o(i, {
|
76
76
|
modelValue: t.value.merchantId,
|
77
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
77
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
|
78
78
|
label: "Merchant ID",
|
79
|
-
rules:
|
79
|
+
rules: a(p)(a(f).string())
|
80
80
|
}, null, 8, ["modelValue", "rules"]),
|
81
81
|
o(i, {
|
82
82
|
modelValue: t.value.uniqueId,
|
83
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
83
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.uniqueId = l),
|
84
84
|
label: "Unique ID",
|
85
|
-
rules:
|
85
|
+
rules: a(p)(a(f).string())
|
86
86
|
}, null, 8, ["modelValue", "rules"]),
|
87
87
|
o(i, {
|
88
88
|
modelValue: t.value.verifyKey,
|
89
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
89
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.verifyKey = l),
|
90
90
|
label: "Verify Key",
|
91
|
-
rules:
|
91
|
+
rules: a(p)(a(f).string())
|
92
92
|
}, null, 8, ["modelValue", "rules"]),
|
93
93
|
o(i, {
|
94
94
|
modelValue: t.value.secretKey,
|
95
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
95
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.secretKey = l),
|
96
96
|
label: "Secret Key",
|
97
|
-
rules:
|
97
|
+
rules: a(p)(a(f).string())
|
98
98
|
}, null, 8, ["modelValue", "rules"]),
|
99
99
|
o(i, {
|
100
100
|
modelValue: t.value.applicationCode,
|
101
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
101
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.applicationCode = l),
|
102
102
|
label: "Application Code ( Offline )",
|
103
|
-
rules:
|
103
|
+
rules: a(p)(a(f).string())
|
104
104
|
}, null, 8, ["modelValue", "rules"]),
|
105
105
|
o(i, {
|
106
106
|
modelValue: t.value.offlineSecret,
|
107
|
-
"onUpdate:modelValue": e[5] || (e[5] = (
|
107
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => t.value.offlineSecret = l),
|
108
108
|
label: "Offline Secret ( Offline )",
|
109
|
-
rules:
|
109
|
+
rules: a(p)(a(f).string())
|
110
110
|
}, null, 8, ["modelValue", "rules"]),
|
111
|
-
o(
|
111
|
+
o(V, {
|
112
112
|
modelValue: r.value,
|
113
|
-
"onUpdate:modelValue": e[6] || (e[6] = (
|
113
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => r.value = l),
|
114
114
|
label: "Is Active"
|
115
115
|
}, null, 8, ["modelValue"]),
|
116
|
-
|
117
|
-
n.gateway ? (
|
116
|
+
G("div", J, [
|
117
|
+
n.gateway ? (F(), w(y, {
|
118
118
|
key: 0,
|
119
119
|
class: "flex-1",
|
120
120
|
variant: "secondary",
|
121
121
|
label: "Delete",
|
122
122
|
onclick: () => n.onDelete(n.gateway)
|
123
|
-
}, null, 8, ["onclick"])) :
|
124
|
-
o(
|
123
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
124
|
+
o(y, {
|
125
125
|
type: "submit",
|
126
126
|
class: "flex-1",
|
127
127
|
variant: "primary",
|
@@ -133,7 +133,7 @@ const G = {
|
|
133
133
|
}, 512);
|
134
134
|
};
|
135
135
|
}
|
136
|
-
}), X = { class: "flex mt-6 space-x-6" }, ee = /* @__PURE__ */
|
136
|
+
}), X = { class: "flex mt-6 space-x-6" }, ee = /* @__PURE__ */ D({
|
137
137
|
__name: "RevenueMonsterGateway",
|
138
138
|
props: {
|
139
139
|
onUpdate: {
|
@@ -151,57 +151,57 @@ const G = {
|
|
151
151
|
},
|
152
152
|
setup(n) {
|
153
153
|
var g, c;
|
154
|
-
const
|
154
|
+
const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((c = m.gateway) == null ? void 0 : c.config) || {
|
155
155
|
storeId: "",
|
156
156
|
clientId: "",
|
157
157
|
clientSecret: "",
|
158
158
|
clientPrivateKey: ""
|
159
159
|
});
|
160
|
-
return (
|
161
|
-
const i = s("FmTextField"),
|
162
|
-
return
|
160
|
+
return (d, e) => {
|
161
|
+
const i = s("FmTextField"), V = s("FmTextarea"), y = s("FmSwitch"), v = s("FmButton"), l = s("FmForm");
|
162
|
+
return F(), w(l, {
|
163
163
|
ref: "form",
|
164
164
|
class: "flex flex-col gap-16",
|
165
165
|
onValidationSuccess: e[5] || (e[5] = () => n.onUpdate(r.value, t.value))
|
166
166
|
}, {
|
167
|
-
default:
|
167
|
+
default: k(() => [
|
168
168
|
o(i, {
|
169
169
|
modelValue: t.value.storeId,
|
170
170
|
"onUpdate:modelValue": e[0] || (e[0] = (u) => t.value.storeId = u),
|
171
171
|
label: "Store ID",
|
172
|
-
rules:
|
172
|
+
rules: a(p)(a(f).string())
|
173
173
|
}, null, 8, ["modelValue", "rules"]),
|
174
174
|
o(i, {
|
175
175
|
modelValue: t.value.clientId,
|
176
176
|
"onUpdate:modelValue": e[1] || (e[1] = (u) => t.value.clientId = u),
|
177
177
|
label: "Client ID",
|
178
|
-
rules:
|
178
|
+
rules: a(p)(a(f).string())
|
179
179
|
}, null, 8, ["modelValue", "rules"]),
|
180
180
|
o(i, {
|
181
181
|
modelValue: t.value.clientSecret,
|
182
182
|
"onUpdate:modelValue": e[2] || (e[2] = (u) => t.value.clientSecret = u),
|
183
183
|
label: "Client Secret",
|
184
|
-
rules:
|
184
|
+
rules: a(p)(a(f).string())
|
185
185
|
}, null, 8, ["modelValue", "rules"]),
|
186
|
-
o(
|
186
|
+
o(V, {
|
187
187
|
modelValue: t.value.clientPrivateKey,
|
188
188
|
"onUpdate:modelValue": e[3] || (e[3] = (u) => t.value.clientPrivateKey = u),
|
189
189
|
label: "Client Private Key"
|
190
190
|
}, null, 8, ["modelValue"]),
|
191
|
-
o(
|
191
|
+
o(y, {
|
192
192
|
modelValue: r.value,
|
193
193
|
"onUpdate:modelValue": e[4] || (e[4] = (u) => r.value = u),
|
194
194
|
label: "Is Active"
|
195
195
|
}, null, 8, ["modelValue"]),
|
196
|
-
|
197
|
-
n.gateway ? (
|
196
|
+
G("div", X, [
|
197
|
+
n.gateway ? (F(), w(v, {
|
198
198
|
key: 0,
|
199
199
|
class: "flex-1",
|
200
200
|
variant: "secondary",
|
201
201
|
label: "Delete",
|
202
202
|
onclick: () => n.onDelete(n.gateway)
|
203
|
-
}, null, 8, ["onclick"])) :
|
204
|
-
o(
|
203
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
204
|
+
o(v, {
|
205
205
|
type: "submit",
|
206
206
|
class: "flex-1",
|
207
207
|
variant: "primary",
|
@@ -213,7 +213,7 @@ const G = {
|
|
213
213
|
}, 512);
|
214
214
|
};
|
215
215
|
}
|
216
|
-
}), te = { class: "flex mt-6 space-x-6" }, ae = /* @__PURE__ */
|
216
|
+
}), te = { class: "flex mt-6 space-x-6" }, ae = /* @__PURE__ */ D({
|
217
217
|
__name: "GhlGateway",
|
218
218
|
props: {
|
219
219
|
onUpdate: {
|
@@ -231,52 +231,52 @@ const G = {
|
|
231
231
|
},
|
232
232
|
setup(n) {
|
233
233
|
var g, c;
|
234
|
-
const
|
234
|
+
const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((c = m.gateway) == null ? void 0 : c.config) || {
|
235
235
|
merchantId: "",
|
236
236
|
terminalId: "",
|
237
237
|
privateKey: ""
|
238
238
|
});
|
239
|
-
return (
|
240
|
-
const i = s("FmTextField"),
|
241
|
-
return
|
239
|
+
return (d, e) => {
|
240
|
+
const i = s("FmTextField"), V = s("FmTextarea"), y = s("FmSwitch"), v = s("FmButton"), l = s("FmForm");
|
241
|
+
return F(), w(l, {
|
242
242
|
ref: "form",
|
243
243
|
class: "flex flex-col gap-16",
|
244
244
|
onValidationSuccess: e[4] || (e[4] = () => n.onUpdate(r.value, t.value))
|
245
245
|
}, {
|
246
|
-
default:
|
246
|
+
default: k(() => [
|
247
247
|
o(i, {
|
248
248
|
modelValue: t.value.merchantId,
|
249
249
|
"onUpdate:modelValue": e[0] || (e[0] = (u) => t.value.merchantId = u),
|
250
250
|
label: "Merchant ID",
|
251
|
-
rules:
|
251
|
+
rules: a(p)(a(f).string())
|
252
252
|
}, null, 8, ["modelValue", "rules"]),
|
253
253
|
o(i, {
|
254
254
|
modelValue: t.value.terminalId,
|
255
255
|
"onUpdate:modelValue": e[1] || (e[1] = (u) => t.value.terminalId = u),
|
256
256
|
label: "Terminal ID",
|
257
|
-
rules:
|
257
|
+
rules: a(p)(a(f).string())
|
258
258
|
}, null, 8, ["modelValue", "rules"]),
|
259
|
-
o(
|
259
|
+
o(V, {
|
260
260
|
id: "ghl_pkey",
|
261
261
|
modelValue: t.value.privateKey,
|
262
262
|
"onUpdate:modelValue": e[2] || (e[2] = (u) => t.value.privateKey = u),
|
263
263
|
label: "Private Key",
|
264
|
-
rules:
|
264
|
+
rules: a(p)(a(f).string())
|
265
265
|
}, null, 8, ["modelValue", "rules"]),
|
266
|
-
o(
|
266
|
+
o(y, {
|
267
267
|
modelValue: r.value,
|
268
268
|
"onUpdate:modelValue": e[3] || (e[3] = (u) => r.value = u),
|
269
269
|
label: "Is Active"
|
270
270
|
}, null, 8, ["modelValue"]),
|
271
|
-
|
272
|
-
n.gateway ? (
|
271
|
+
G("div", te, [
|
272
|
+
n.gateway ? (F(), w(v, {
|
273
273
|
key: 0,
|
274
274
|
class: "flex-1",
|
275
275
|
variant: "secondary",
|
276
276
|
label: "Delete",
|
277
277
|
onclick: () => n.onDelete(n.gateway)
|
278
|
-
}, null, 8, ["onclick"])) :
|
279
|
-
o(
|
278
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
279
|
+
o(v, {
|
280
280
|
type: "submit",
|
281
281
|
class: "flex-1",
|
282
282
|
variant: "primary",
|
@@ -288,7 +288,7 @@ const G = {
|
|
288
288
|
}, 512);
|
289
289
|
};
|
290
290
|
}
|
291
|
-
}), le = { class: "flex mt-6 space-x-6" }, ne = /* @__PURE__ */
|
291
|
+
}), le = { class: "flex mt-6 space-x-6" }, ne = /* @__PURE__ */ D({
|
292
292
|
__name: "MacauPassGateway",
|
293
293
|
props: {
|
294
294
|
onUpdate: {
|
@@ -306,65 +306,65 @@ const G = {
|
|
306
306
|
},
|
307
307
|
setup(n) {
|
308
308
|
var g, c;
|
309
|
-
const
|
309
|
+
const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((c = m.gateway) == null ? void 0 : c.config) || {
|
310
310
|
merchantId: "",
|
311
311
|
merchantName: "",
|
312
312
|
merchantCategoryCode: "",
|
313
313
|
storeID: "",
|
314
314
|
storeName: ""
|
315
315
|
});
|
316
|
-
return (
|
317
|
-
const i = s("FmTextField"),
|
318
|
-
return
|
316
|
+
return (d, e) => {
|
317
|
+
const i = s("FmTextField"), V = s("FmSwitch"), y = s("FmButton"), v = s("FmForm");
|
318
|
+
return F(), w(v, {
|
319
319
|
ref: "form",
|
320
320
|
class: "flex flex-col gap-16",
|
321
321
|
onValidationSuccess: e[6] || (e[6] = () => n.onUpdate(r.value, t.value))
|
322
322
|
}, {
|
323
|
-
default:
|
323
|
+
default: k(() => [
|
324
324
|
o(i, {
|
325
325
|
modelValue: t.value.merchantId,
|
326
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
326
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
|
327
327
|
label: "Merchant ID",
|
328
|
-
rules:
|
328
|
+
rules: a(p)(a(f).string())
|
329
329
|
}, null, 8, ["modelValue", "rules"]),
|
330
330
|
o(i, {
|
331
331
|
modelValue: t.value.merchantName,
|
332
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
332
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.merchantName = l),
|
333
333
|
label: "Merchant Name",
|
334
|
-
rules:
|
334
|
+
rules: a(p)(a(f).string())
|
335
335
|
}, null, 8, ["modelValue", "rules"]),
|
336
336
|
o(i, {
|
337
337
|
modelValue: t.value.merchantCategoryCode,
|
338
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
338
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.merchantCategoryCode = l),
|
339
339
|
label: "Merchant MCC",
|
340
|
-
rules:
|
340
|
+
rules: a(p)(a(f).string())
|
341
341
|
}, null, 8, ["modelValue", "rules"]),
|
342
342
|
o(i, {
|
343
343
|
modelValue: t.value.storeID,
|
344
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
344
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.storeID = l),
|
345
345
|
label: "Store ID",
|
346
|
-
rules:
|
346
|
+
rules: a(p)(a(f).string())
|
347
347
|
}, null, 8, ["modelValue", "rules"]),
|
348
348
|
o(i, {
|
349
349
|
modelValue: t.value.storeName,
|
350
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
350
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.storeName = l),
|
351
351
|
label: "Store Name",
|
352
|
-
rules:
|
352
|
+
rules: a(p)(a(f).string())
|
353
353
|
}, null, 8, ["modelValue", "rules"]),
|
354
|
-
o(
|
354
|
+
o(V, {
|
355
355
|
modelValue: r.value,
|
356
|
-
"onUpdate:modelValue": e[5] || (e[5] = (
|
356
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => r.value = l),
|
357
357
|
label: "Is Active"
|
358
358
|
}, null, 8, ["modelValue"]),
|
359
|
-
|
360
|
-
n.gateway ? (
|
359
|
+
G("div", le, [
|
360
|
+
n.gateway ? (F(), w(y, {
|
361
361
|
key: 0,
|
362
362
|
class: "flex-1",
|
363
363
|
variant: "secondary",
|
364
364
|
label: "Delete",
|
365
365
|
onclick: () => n.onDelete(n.gateway)
|
366
|
-
}, null, 8, ["onclick"])) :
|
367
|
-
o(
|
366
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
367
|
+
o(y, {
|
368
368
|
type: "submit",
|
369
369
|
class: "flex-1",
|
370
370
|
variant: "primary",
|
@@ -376,10 +376,7 @@ const G = {
|
|
376
376
|
}, 512);
|
377
377
|
};
|
378
378
|
}
|
379
|
-
}), oe = {
|
380
|
-
class: "flex items-end",
|
381
|
-
'"': ""
|
382
|
-
}, ue = { class: "flex mt-6 space-x-6" }, re = /* @__PURE__ */ T({
|
379
|
+
}), oe = { class: "flex items-end" }, ue = { class: "flex mt-6 space-x-6" }, re = /* @__PURE__ */ D({
|
383
380
|
__name: "GrabGateway",
|
384
381
|
props: {
|
385
382
|
onUpdate: {
|
@@ -396,75 +393,75 @@ const G = {
|
|
396
393
|
}
|
397
394
|
},
|
398
395
|
setup(n) {
|
399
|
-
var
|
400
|
-
const
|
396
|
+
var V, y;
|
397
|
+
const m = Z(), { isLoading: r, startAsyncCall: t } = N(), g = L(), c = n, d = x(((V = c.gateway) == null ? void 0 : V.active) ?? !1), e = x(((y = c.gateway) == null ? void 0 : y.config) || {
|
401
398
|
merchantId: ""
|
402
399
|
});
|
403
400
|
async function i() {
|
404
401
|
t(async () => {
|
405
|
-
var
|
402
|
+
var v;
|
406
403
|
try {
|
407
|
-
const { merchantID:
|
408
|
-
e.value.merchantId =
|
404
|
+
const { merchantID: l } = await T.grabSync(((v = g.currentRestaurant.value) == null ? void 0 : v._id) ?? "");
|
405
|
+
e.value.merchantId = l, d.value = !0, m.open({
|
409
406
|
type: "success",
|
410
407
|
title: "Grab Setting sync succesfully, you will still need to save the changes."
|
411
408
|
});
|
412
|
-
} catch (
|
413
|
-
|
409
|
+
} catch (l) {
|
410
|
+
m.open({
|
414
411
|
type: "error",
|
415
412
|
title: "Error occurs when sync ordering settings",
|
416
|
-
message: Q(
|
413
|
+
message: Q(l)
|
417
414
|
});
|
418
415
|
}
|
419
416
|
});
|
420
417
|
}
|
421
|
-
return (
|
422
|
-
const u = s("FmTextField"),
|
423
|
-
return
|
418
|
+
return (v, l) => {
|
419
|
+
const u = s("FmTextField"), b = s("FmButton"), I = s("FmTooltip"), U = s("FmSwitch"), _ = s("FmForm");
|
420
|
+
return F(), w(_, {
|
424
421
|
ref: "form",
|
425
422
|
class: "flex flex-col gap-16",
|
426
|
-
onValidationSuccess:
|
423
|
+
onValidationSuccess: l[2] || (l[2] = () => n.onUpdate(d.value, e.value))
|
427
424
|
}, {
|
428
|
-
default:
|
429
|
-
|
425
|
+
default: k(() => [
|
426
|
+
G("div", oe, [
|
430
427
|
o(u, {
|
431
428
|
modelValue: e.value.merchantId,
|
432
|
-
"onUpdate:modelValue":
|
429
|
+
"onUpdate:modelValue": l[0] || (l[0] = (M) => e.value.merchantId = M),
|
433
430
|
label: "Merchant ID",
|
434
|
-
rules:
|
431
|
+
rules: a(p)(a(f).string())
|
435
432
|
}, null, 8, ["modelValue", "rules"]),
|
436
|
-
o(
|
433
|
+
o(I, {
|
437
434
|
variant: "plain",
|
438
435
|
placement: "right",
|
439
436
|
content: "Sync from Ordering Settings"
|
440
437
|
}, {
|
441
|
-
default:
|
442
|
-
o(
|
438
|
+
default: k(() => [
|
439
|
+
o(b, {
|
443
440
|
class: "ml-2",
|
444
441
|
type: "button",
|
445
442
|
variant: "primary",
|
446
443
|
icon: "sync",
|
447
|
-
loading:
|
444
|
+
loading: a(r),
|
448
445
|
onclick: () => i()
|
449
446
|
}, null, 8, ["loading", "onclick"])
|
450
447
|
]),
|
451
448
|
_: 1
|
452
449
|
})
|
453
450
|
]),
|
454
|
-
o(
|
455
|
-
modelValue:
|
456
|
-
"onUpdate:modelValue":
|
451
|
+
o(U, {
|
452
|
+
modelValue: d.value,
|
453
|
+
"onUpdate:modelValue": l[1] || (l[1] = (M) => d.value = M),
|
457
454
|
label: "Is Active"
|
458
455
|
}, null, 8, ["modelValue"]),
|
459
|
-
|
460
|
-
n.gateway ? (
|
456
|
+
G("div", ue, [
|
457
|
+
n.gateway ? (F(), w(b, {
|
461
458
|
key: 0,
|
462
459
|
class: "flex-1",
|
463
460
|
variant: "secondary",
|
464
461
|
label: "Delete",
|
465
462
|
onclick: () => n.onDelete(n.gateway)
|
466
|
-
}, null, 8, ["onclick"])) :
|
467
|
-
o(
|
463
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
464
|
+
o(b, {
|
468
465
|
type: "submit",
|
469
466
|
class: "flex-1",
|
470
467
|
variant: "primary",
|
@@ -479,7 +476,7 @@ const G = {
|
|
479
476
|
}), se = {
|
480
477
|
key: 0,
|
481
478
|
class: "flex items-center justify-center min-h-[80vh]"
|
482
|
-
}, ie = /* @__PURE__ */
|
479
|
+
}, ie = /* @__PURE__ */ D({
|
483
480
|
__name: "PaymentGateway",
|
484
481
|
props: {
|
485
482
|
restaurant: {
|
@@ -488,89 +485,89 @@ const G = {
|
|
488
485
|
}
|
489
486
|
},
|
490
487
|
setup(n) {
|
491
|
-
const
|
488
|
+
const m = [
|
492
489
|
{
|
493
490
|
label: "Fiuu",
|
494
491
|
value: "RAZER_MERCHANT_SERVICE",
|
495
492
|
form: W,
|
496
|
-
region: [
|
493
|
+
region: [C.F_COUNTRY.enum.MY, C.F_COUNTRY.enum.SG]
|
497
494
|
},
|
498
495
|
{
|
499
496
|
label: "Revenue Monster",
|
500
497
|
value: "REVENUE_MONSTER",
|
501
498
|
form: ee,
|
502
|
-
region: [
|
499
|
+
region: [C.F_COUNTRY.enum.MY]
|
503
500
|
},
|
504
501
|
{
|
505
502
|
label: "GHL",
|
506
503
|
value: "E_GHL",
|
507
504
|
form: ae,
|
508
|
-
region: [
|
505
|
+
region: [C.F_COUNTRY.enum.MY]
|
509
506
|
},
|
510
507
|
{
|
511
508
|
label: "Grab",
|
512
509
|
value: "GRAB",
|
513
510
|
form: re,
|
514
|
-
region: [
|
511
|
+
region: [C.F_COUNTRY.enum.MY]
|
515
512
|
},
|
516
513
|
{
|
517
514
|
label: "Macau Pass",
|
518
515
|
value: "MACAU_PASS",
|
519
516
|
form: ne,
|
520
|
-
region: [
|
517
|
+
region: [C.F_COUNTRY.enum.MO]
|
521
518
|
}
|
522
|
-
], r = n, t =
|
523
|
-
|
519
|
+
], r = n, t = L(), { isLoading: g, startAsyncCall: c } = N(), { activeGateway: d } = Y({
|
520
|
+
activeGateway: ""
|
521
|
+
}), e = x([]);
|
522
|
+
async function i(u, b) {
|
524
523
|
await c(async () => {
|
525
|
-
|
526
|
-
const S = {
|
524
|
+
const I = {
|
527
525
|
_id: "",
|
528
526
|
_rev: "",
|
529
|
-
paymentGateway:
|
530
|
-
config:
|
527
|
+
paymentGateway: d.value,
|
528
|
+
config: b,
|
531
529
|
active: u
|
532
|
-
},
|
533
|
-
|
530
|
+
}, U = e.value.find((_) => _.paymentGateway === d.value);
|
531
|
+
U && (I._id = U._id, I._rev = U._rev), await T.upsert(r.restaurant._id, I), e.value = await T.get(r.restaurant._id);
|
534
532
|
});
|
535
533
|
}
|
536
|
-
async function
|
534
|
+
async function V(u) {
|
537
535
|
c(async () => {
|
538
|
-
|
539
|
-
await G.delete(r.restaurant._id, u._id), e.value = await G.get(r.restaurant._id), m.value = (F = e.value.find((S) => S.active)) == null ? void 0 : F.paymentGateway;
|
536
|
+
await T.delete(r.restaurant._id, u._id), e.value = await T.get(r.restaurant._id);
|
540
537
|
});
|
541
538
|
}
|
542
|
-
const
|
543
|
-
function
|
539
|
+
const y = q(() => m.filter((u) => u.region.includes(t.currentCountry.value ?? C.F_COUNTRY.enum.MY)));
|
540
|
+
function v() {
|
544
541
|
c(async () => {
|
545
|
-
e.value = await
|
542
|
+
e.value = await T.get(r.restaurant._id), y.value.length > 0 && (d.value = y.value[0].value);
|
546
543
|
});
|
547
544
|
}
|
548
|
-
$(
|
549
|
-
const
|
545
|
+
$(v);
|
546
|
+
const l = q(() => {
|
550
547
|
var u;
|
551
|
-
return (u =
|
548
|
+
return (u = m.find((b) => b.value === d.value)) == null ? void 0 : u.form;
|
552
549
|
});
|
553
|
-
return (u,
|
554
|
-
const
|
555
|
-
return
|
556
|
-
|
557
|
-
o(
|
558
|
-
])) :
|
559
|
-
o(
|
550
|
+
return (u, b) => {
|
551
|
+
const I = s("FmCircularProgress"), U = s("FmTabs");
|
552
|
+
return F(), O(j, null, [
|
553
|
+
a(g) ? (F(), O("div", se, [
|
554
|
+
o(I, { size: "xxl" })
|
555
|
+
])) : S("", !0),
|
556
|
+
o(U, {
|
560
557
|
class: "mb-6",
|
561
|
-
"model-value":
|
562
|
-
"onUpdate:modelValue":
|
563
|
-
items:
|
558
|
+
"model-value": a(d),
|
559
|
+
"onUpdate:modelValue": b[0] || (b[0] = (_) => B(d) ? d.value = _ : null),
|
560
|
+
items: y.value
|
564
561
|
}, null, 8, ["model-value", "items"]),
|
565
|
-
|
566
|
-
gateway: e.value.find((
|
567
|
-
onDelete:
|
562
|
+
a(d) ? (F(), w(K(l.value), P(E({ key: 1 }, {
|
563
|
+
gateway: e.value.find((_) => _.paymentGateway === a(d)),
|
564
|
+
onDelete: V,
|
568
565
|
onUpdate: i
|
569
|
-
})), null, 16)) :
|
566
|
+
})), null, 16)) : S("", !0)
|
570
567
|
], 64);
|
571
568
|
};
|
572
569
|
}
|
573
|
-
}), we = /* @__PURE__ */
|
570
|
+
}), we = /* @__PURE__ */ D({
|
574
571
|
__name: "RestaurantSetting",
|
575
572
|
props: {
|
576
573
|
restaurantId: {
|
@@ -579,9 +576,9 @@ const G = {
|
|
579
576
|
}
|
580
577
|
},
|
581
578
|
setup(n) {
|
582
|
-
const
|
579
|
+
const m = n, { tab: r } = Y({
|
583
580
|
tab: "payment-gateway"
|
584
|
-
}), { isLoading: t, startAsyncCall: g } = N(!0), c =
|
581
|
+
}), { isLoading: t, startAsyncCall: g } = N(!0), c = H(), d = x(), e = [
|
585
582
|
{
|
586
583
|
label: "Payment Gateway",
|
587
584
|
value: "payment-gateway",
|
@@ -591,32 +588,32 @@ const G = {
|
|
591
588
|
];
|
592
589
|
function i() {
|
593
590
|
g(async () => {
|
594
|
-
|
591
|
+
d.value = await h.readRestaurantById(m.restaurantId);
|
595
592
|
});
|
596
593
|
}
|
597
594
|
$(i);
|
598
|
-
const
|
599
|
-
var
|
600
|
-
return (
|
595
|
+
const V = q(() => {
|
596
|
+
var y;
|
597
|
+
return (y = e.find((v) => v.value === r.value)) == null ? void 0 : y.render;
|
601
598
|
});
|
602
|
-
return (
|
599
|
+
return (y, v) => {
|
603
600
|
var u;
|
604
|
-
const
|
605
|
-
return
|
606
|
-
title: `Restaurant (${(u =
|
607
|
-
loading:
|
608
|
-
onBack:
|
601
|
+
const l = s("FmTabs");
|
602
|
+
return F(), w(z, {
|
603
|
+
title: `Restaurant (${(u = d.value) == null ? void 0 : u._id})`,
|
604
|
+
loading: a(t),
|
605
|
+
onBack: a(c).back
|
609
606
|
}, {
|
610
|
-
default:
|
611
|
-
o(
|
612
|
-
"model-value":
|
613
|
-
"onUpdate:modelValue":
|
607
|
+
default: k(() => [
|
608
|
+
o(l, {
|
609
|
+
"model-value": a(r),
|
610
|
+
"onUpdate:modelValue": v[0] || (v[0] = (b) => B(r) ? r.value = b : null),
|
614
611
|
class: "mb-6",
|
615
612
|
items: e
|
616
613
|
}, null, 8, ["model-value"]),
|
617
|
-
|
618
|
-
restaurant:
|
619
|
-
})), null, 16)) :
|
614
|
+
a(r) && d.value ? (F(), w(K(V.value), P(E({ key: 0 }, {
|
615
|
+
restaurant: d.value
|
616
|
+
})), null, 16)) : S("", !0)
|
620
617
|
]),
|
621
618
|
_: 1
|
622
619
|
}, 8, ["title", "loading", "onBack"]);
|