@feedmepos/mf-payment 1.5.22-dev → 1.5.23-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-DbsSsOek.js → Actions.vue_vue_type_script_setup_true_lang-DfOqCsBc.js} +2 -2
- package/dist/{Chargeback-Bds2iEV5.js → Chargeback-LAZF6Y4q.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-BgL6Nuvr.js → DocumentViewer.vue_vue_type_script_setup_true_lang-jmcA-Rss.js} +1 -1
- package/dist/{OnboardForm-ueJUjfpR.js → OnboardForm-CtChcgmH.js} +5 -5
- package/dist/{OnboardForm-DJ4M3xzs.js → OnboardForm-aaxBLPA0.js} +5 -5
- package/dist/{OnboardSubmission-CNjQNirx.js → OnboardSubmission-BgqEIQCr.js} +2 -2
- package/dist/{OnboardSubmission-CBXLX9vB.js → OnboardSubmission-D1j_5ftK.js} +5 -5
- package/dist/{PayoutAccount-DwAuN5tQ.js → PayoutAccount-CpKgK-HN.js} +4 -4
- package/dist/{PayoutAccount-C_Ce0l8Z.js → PayoutAccount-D8_Npu0h.js} +5 -5
- package/dist/{PayoutAccountSetting-CUJtxE8n.js → PayoutAccountSetting-Dcpm9Gkk.js} +4 -4
- package/dist/{Restaurant-DVSk4KFB.js → Restaurant-c070wI_P.js} +4 -4
- package/dist/{RestaurantSetting-CPa7CFaW.js → RestaurantSetting-BkVjDa3z.js} +259 -176
- package/dist/{Settlement-CMEBmvhn.js → Settlement-Bm87IwKh.js} +3 -3
- package/dist/{Settlement-BOS0NVhn.js → Settlement-m8tqL81k.js} +3 -3
- package/dist/{SettlementTransactions-BKCPfMDs.js → SettlementTransactions-C48pCpgY.js} +4 -4
- package/dist/{SettlementTransactions-BwVjsFCT.js → SettlementTransactions-DSAZbk0X.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-BiTeDpBk.js → Status.vue_vue_type_script_setup_true_lang-BRiIy5oT.js} +1 -1
- package/dist/{Terminal-DJSDtUUp.js → Terminal-C9DaOqfy.js} +5 -5
- package/dist/{TerminalSetting-CGGpemW8.js → TerminalSetting-iba5_SaH.js} +3 -3
- package/dist/{Transaction-BASuO5u4.js → Transaction-B5GajiVl.js} +6 -6
- package/dist/{Transaction-DA3HSvt8.js → Transaction-BkS1_0Pd.js} +9 -9
- package/dist/{TransactionOld-CmjVUkD9.js → TransactionOld-ZugoqB6G.js} +6 -6
- package/dist/{app-CmtR0utg.js → app-CK7gvFhR.js} +23 -23
- package/dist/app.js +1 -1
- package/dist/{assets-BqyjGcBE.js → assets-DGM3kT8t.js} +1 -1
- package/dist/{grafana-DecAHDp-.js → grafana-C4wqzqXd.js} +1 -1
- package/dist/{index-pBoJWBgh.js → index--Vhcmoup.js} +2 -2
- package/dist/{index-BKXccERQ.js → index-B0T0JJcA.js} +1 -1
- package/dist/{index-CylkiU8i.js → index-BDrun1GN.js} +1 -1
- package/dist/{index-HvRabCwb.js → index-BMXL6zS2.js} +1 -1
- package/dist/{index-DtIipWj2.js → index-CJMvhmnK.js} +1 -1
- package/dist/{index-DQany4ND.js → index-CXKpIH4Y.js} +12 -3
- package/dist/{index-DklLFCf5.js → index-DunzHvy3.js} +1 -1
- package/dist/{index-lkMlxXDI.js → index-KR-lpgRW.js} +1 -1
- package/dist/{index-B5j5U-Da.js → index-xTWBGJ_4.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-0YY23afw.js → index.vue_vue_type_script_setup_true_lang-Disf1xIR.js} +1 -1
- package/dist/package.json +3 -3
- package/dist/{payout-account-BsGbztRq.js → payout-account-BPVv_jkn.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +50 -0
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +12 -12
- package/package.json +2 -2
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { defineComponent as D, ref as
|
|
2
|
-
import { g as q, b as
|
|
1
|
+
import { defineComponent as D, ref as w, resolveComponent as r, openBlock as g, createBlock as b, withCtx as I, createVNode as o, unref as n, createElementVNode as T, createCommentVNode as S, computed as G, onMounted as N, createElementBlock as R, Fragment as L, isRef as B, resolveDynamicComponent as $, mergeProps as Y, normalizeProps as H } from "vue";
|
|
2
|
+
import { g as q, b as M, u as O, e as U } from "./index-CXKpIH4Y.js";
|
|
3
3
|
import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
4
4
|
import { useRouter as Q } from "vue-router";
|
|
5
|
-
import { u as
|
|
6
|
-
import { z as
|
|
5
|
+
import { u as P } from "./index-xTWBGJ_4.js";
|
|
6
|
+
import { z as p, a as f } from "./validator-DzjyJnvv.js";
|
|
7
7
|
import { useCoreStore as E } from "@feedmepos/mf-common";
|
|
8
8
|
import { u as Z } from "./error-K1CakhA9.js";
|
|
9
9
|
import { useSnackbar as J } from "@feedmepos/ui-library";
|
|
10
|
-
import { r as W } from "./index-
|
|
11
|
-
const
|
|
10
|
+
import { r as W } from "./index-DunzHvy3.js";
|
|
11
|
+
const _ = {
|
|
12
12
|
async get(a) {
|
|
13
13
|
return q(
|
|
14
|
-
await
|
|
14
|
+
await M().get(
|
|
15
15
|
`restaurants/${a}/payment-gateway`
|
|
16
16
|
)
|
|
17
17
|
);
|
|
18
18
|
},
|
|
19
|
-
async upsert(a,
|
|
19
|
+
async upsert(a, i) {
|
|
20
20
|
return q(
|
|
21
|
-
await
|
|
21
|
+
await M().post(
|
|
22
22
|
`restaurants/${a}/payment-gateway`,
|
|
23
|
-
{ data:
|
|
23
|
+
{ data: i }
|
|
24
24
|
)
|
|
25
25
|
);
|
|
26
26
|
},
|
|
27
|
-
async delete(a,
|
|
27
|
+
async delete(a, i) {
|
|
28
28
|
return q(
|
|
29
|
-
await
|
|
30
|
-
`restaurants/${a}/payment-gateway/${
|
|
29
|
+
await M().delete(
|
|
30
|
+
`restaurants/${a}/payment-gateway/${i}`
|
|
31
31
|
)
|
|
32
32
|
);
|
|
33
33
|
},
|
|
34
34
|
async grabSync(a) {
|
|
35
35
|
return q(
|
|
36
|
-
await
|
|
36
|
+
await M().post(
|
|
37
37
|
`restaurants/${a}/payment-gateway/grab/sync`
|
|
38
38
|
)
|
|
39
39
|
);
|
|
@@ -55,9 +55,9 @@ const C = {
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
setup(a) {
|
|
58
|
-
var
|
|
59
|
-
const
|
|
60
|
-
((
|
|
58
|
+
var c, m;
|
|
59
|
+
const i = a, u = w(((c = i.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
60
|
+
((m = i.gateway) == null ? void 0 : m.config) || {
|
|
61
61
|
merchantId: "",
|
|
62
62
|
uniqueId: "",
|
|
63
63
|
verifyKey: "",
|
|
@@ -66,9 +66,9 @@ const C = {
|
|
|
66
66
|
offlineSecret: ""
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
|
-
return (
|
|
70
|
-
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"),
|
|
71
|
-
return g(),
|
|
69
|
+
return (F, e) => {
|
|
70
|
+
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
|
71
|
+
return g(), b(v, {
|
|
72
72
|
ref: "form",
|
|
73
73
|
class: "flex flex-col gap-16",
|
|
74
74
|
onValidationSuccess: e[7] || (e[7] = () => a.onUpdate(u.value, t.value))
|
|
@@ -78,37 +78,37 @@ const C = {
|
|
|
78
78
|
modelValue: t.value.merchantId,
|
|
79
79
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
|
|
80
80
|
label: "Merchant ID",
|
|
81
|
-
rules: n(
|
|
81
|
+
rules: n(p)(n(f).string())
|
|
82
82
|
}, null, 8, ["modelValue", "rules"]),
|
|
83
83
|
o(s, {
|
|
84
84
|
modelValue: t.value.uniqueId,
|
|
85
85
|
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.uniqueId = l),
|
|
86
86
|
label: "Unique ID",
|
|
87
|
-
rules: n(
|
|
87
|
+
rules: n(p)(n(f).string())
|
|
88
88
|
}, null, 8, ["modelValue", "rules"]),
|
|
89
89
|
o(s, {
|
|
90
90
|
modelValue: t.value.verifyKey,
|
|
91
91
|
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.verifyKey = l),
|
|
92
92
|
label: "Verify Key",
|
|
93
|
-
rules: n(
|
|
93
|
+
rules: n(p)(n(f).string())
|
|
94
94
|
}, null, 8, ["modelValue", "rules"]),
|
|
95
95
|
o(s, {
|
|
96
96
|
modelValue: t.value.secretKey,
|
|
97
97
|
"onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.secretKey = l),
|
|
98
98
|
label: "Secret Key",
|
|
99
|
-
rules: n(
|
|
99
|
+
rules: n(p)(n(f).string())
|
|
100
100
|
}, null, 8, ["modelValue", "rules"]),
|
|
101
101
|
o(s, {
|
|
102
102
|
modelValue: t.value.applicationCode,
|
|
103
103
|
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.applicationCode = l),
|
|
104
104
|
label: "Application Code ( Offline )",
|
|
105
|
-
rules: n(
|
|
105
|
+
rules: n(p)(n(f).string())
|
|
106
106
|
}, null, 8, ["modelValue", "rules"]),
|
|
107
107
|
o(s, {
|
|
108
108
|
modelValue: t.value.offlineSecret,
|
|
109
109
|
"onUpdate:modelValue": e[5] || (e[5] = (l) => t.value.offlineSecret = l),
|
|
110
110
|
label: "Offline Secret ( Offline )",
|
|
111
|
-
rules: n(
|
|
111
|
+
rules: n(p)(n(f).string())
|
|
112
112
|
}, null, 8, ["modelValue", "rules"]),
|
|
113
113
|
o(V, {
|
|
114
114
|
modelValue: u.value,
|
|
@@ -116,7 +116,7 @@ const C = {
|
|
|
116
116
|
label: "Is Active"
|
|
117
117
|
}, null, 8, ["modelValue"]),
|
|
118
118
|
T("div", X, [
|
|
119
|
-
a.gateway ? (g(),
|
|
119
|
+
a.gateway ? (g(), b(d, {
|
|
120
120
|
key: 0,
|
|
121
121
|
class: "flex-1",
|
|
122
122
|
variant: "secondary",
|
|
@@ -152,18 +152,18 @@ const C = {
|
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
setup(a) {
|
|
155
|
-
var
|
|
156
|
-
const
|
|
157
|
-
((
|
|
155
|
+
var c, m;
|
|
156
|
+
const i = a, u = w(((c = i.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
157
|
+
((m = i.gateway) == null ? void 0 : m.config) || {
|
|
158
158
|
storeId: "",
|
|
159
159
|
clientId: "",
|
|
160
160
|
clientSecret: "",
|
|
161
161
|
clientPrivateKey: ""
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
|
-
return (
|
|
165
|
-
const s = r("FmTextField"), V = r("FmTextarea"), d = r("FmSwitch"),
|
|
166
|
-
return g(),
|
|
164
|
+
return (F, e) => {
|
|
165
|
+
const s = r("FmTextField"), V = r("FmTextarea"), d = r("FmSwitch"), v = r("FmButton"), l = r("FmForm");
|
|
166
|
+
return g(), b(l, {
|
|
167
167
|
ref: "form",
|
|
168
168
|
class: "flex flex-col gap-16",
|
|
169
169
|
onValidationSuccess: e[5] || (e[5] = () => a.onUpdate(u.value, t.value))
|
|
@@ -171,41 +171,41 @@ const C = {
|
|
|
171
171
|
default: I(() => [
|
|
172
172
|
o(s, {
|
|
173
173
|
modelValue: t.value.storeId,
|
|
174
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
174
|
+
"onUpdate:modelValue": e[0] || (e[0] = (y) => t.value.storeId = y),
|
|
175
175
|
label: "Store ID",
|
|
176
|
-
rules: n(
|
|
176
|
+
rules: n(p)(n(f).string())
|
|
177
177
|
}, null, 8, ["modelValue", "rules"]),
|
|
178
178
|
o(s, {
|
|
179
179
|
modelValue: t.value.clientId,
|
|
180
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
180
|
+
"onUpdate:modelValue": e[1] || (e[1] = (y) => t.value.clientId = y),
|
|
181
181
|
label: "Client ID",
|
|
182
|
-
rules: n(
|
|
182
|
+
rules: n(p)(n(f).string())
|
|
183
183
|
}, null, 8, ["modelValue", "rules"]),
|
|
184
184
|
o(s, {
|
|
185
185
|
modelValue: t.value.clientSecret,
|
|
186
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
186
|
+
"onUpdate:modelValue": e[2] || (e[2] = (y) => t.value.clientSecret = y),
|
|
187
187
|
label: "Client Secret",
|
|
188
|
-
rules: n(
|
|
188
|
+
rules: n(p)(n(f).string())
|
|
189
189
|
}, null, 8, ["modelValue", "rules"]),
|
|
190
190
|
o(V, {
|
|
191
191
|
modelValue: t.value.clientPrivateKey,
|
|
192
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
192
|
+
"onUpdate:modelValue": e[3] || (e[3] = (y) => t.value.clientPrivateKey = y),
|
|
193
193
|
label: "Client Private Key"
|
|
194
194
|
}, null, 8, ["modelValue"]),
|
|
195
195
|
o(d, {
|
|
196
196
|
modelValue: u.value,
|
|
197
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
197
|
+
"onUpdate:modelValue": e[4] || (e[4] = (y) => u.value = y),
|
|
198
198
|
label: "Is Active"
|
|
199
199
|
}, null, 8, ["modelValue"]),
|
|
200
200
|
T("div", ee, [
|
|
201
|
-
a.gateway ? (g(),
|
|
201
|
+
a.gateway ? (g(), b(v, {
|
|
202
202
|
key: 0,
|
|
203
203
|
class: "flex-1",
|
|
204
204
|
variant: "secondary",
|
|
205
205
|
label: "Delete",
|
|
206
206
|
onclick: () => a.onDelete(a.gateway)
|
|
207
207
|
}, null, 8, ["onclick"])) : S("", !0),
|
|
208
|
-
o(
|
|
208
|
+
o(v, {
|
|
209
209
|
type: "submit",
|
|
210
210
|
class: "flex-1",
|
|
211
211
|
variant: "primary",
|
|
@@ -234,17 +234,17 @@ const C = {
|
|
|
234
234
|
}
|
|
235
235
|
},
|
|
236
236
|
setup(a) {
|
|
237
|
-
var
|
|
238
|
-
const
|
|
239
|
-
((
|
|
237
|
+
var c, m;
|
|
238
|
+
const i = a, u = w(((c = i.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
239
|
+
((m = i.gateway) == null ? void 0 : m.config) || {
|
|
240
240
|
merchantId: "",
|
|
241
241
|
terminalId: "",
|
|
242
242
|
privateKey: ""
|
|
243
243
|
}
|
|
244
244
|
);
|
|
245
|
-
return (
|
|
246
|
-
const s = r("FmTextField"), V = r("FmTextarea"), d = r("FmSwitch"),
|
|
247
|
-
return g(),
|
|
245
|
+
return (F, e) => {
|
|
246
|
+
const s = r("FmTextField"), V = r("FmTextarea"), d = r("FmSwitch"), v = r("FmButton"), l = r("FmForm");
|
|
247
|
+
return g(), b(l, {
|
|
248
248
|
ref: "form",
|
|
249
249
|
class: "flex flex-col gap-16",
|
|
250
250
|
onValidationSuccess: e[4] || (e[4] = () => a.onUpdate(u.value, t.value))
|
|
@@ -252,37 +252,37 @@ const C = {
|
|
|
252
252
|
default: I(() => [
|
|
253
253
|
o(s, {
|
|
254
254
|
modelValue: t.value.merchantId,
|
|
255
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
255
|
+
"onUpdate:modelValue": e[0] || (e[0] = (y) => t.value.merchantId = y),
|
|
256
256
|
label: "Merchant ID",
|
|
257
|
-
rules: n(
|
|
257
|
+
rules: n(p)(n(f).string())
|
|
258
258
|
}, null, 8, ["modelValue", "rules"]),
|
|
259
259
|
o(s, {
|
|
260
260
|
modelValue: t.value.terminalId,
|
|
261
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
261
|
+
"onUpdate:modelValue": e[1] || (e[1] = (y) => t.value.terminalId = y),
|
|
262
262
|
label: "Terminal ID",
|
|
263
|
-
rules: n(
|
|
263
|
+
rules: n(p)(n(f).string())
|
|
264
264
|
}, null, 8, ["modelValue", "rules"]),
|
|
265
265
|
o(V, {
|
|
266
266
|
modelValue: t.value.privateKey,
|
|
267
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
267
|
+
"onUpdate:modelValue": e[2] || (e[2] = (y) => t.value.privateKey = y),
|
|
268
268
|
label: "Private Key",
|
|
269
269
|
"label-mark": "optional",
|
|
270
270
|
"label-info": "Default will use FeedMe Private Key"
|
|
271
271
|
}, null, 8, ["modelValue"]),
|
|
272
272
|
o(d, {
|
|
273
273
|
modelValue: u.value,
|
|
274
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
274
|
+
"onUpdate:modelValue": e[3] || (e[3] = (y) => u.value = y),
|
|
275
275
|
label: "Is Active"
|
|
276
276
|
}, null, 8, ["modelValue"]),
|
|
277
277
|
T("div", le, [
|
|
278
|
-
a.gateway ? (g(),
|
|
278
|
+
a.gateway ? (g(), b(v, {
|
|
279
279
|
key: 0,
|
|
280
280
|
class: "flex-1",
|
|
281
281
|
variant: "secondary",
|
|
282
282
|
label: "Delete",
|
|
283
283
|
onclick: () => a.onDelete(a.gateway)
|
|
284
284
|
}, null, 8, ["onclick"])) : S("", !0),
|
|
285
|
-
o(
|
|
285
|
+
o(v, {
|
|
286
286
|
type: "submit",
|
|
287
287
|
class: "flex-1",
|
|
288
288
|
variant: "primary",
|
|
@@ -311,9 +311,9 @@ const C = {
|
|
|
311
311
|
}
|
|
312
312
|
},
|
|
313
313
|
setup(a) {
|
|
314
|
-
var
|
|
315
|
-
const
|
|
316
|
-
((
|
|
314
|
+
var c, m;
|
|
315
|
+
const i = a, u = w(((c = i.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
316
|
+
((m = i.gateway) == null ? void 0 : m.config) || {
|
|
317
317
|
merchantId: "",
|
|
318
318
|
merchantName: "",
|
|
319
319
|
merchantCategoryCode: "",
|
|
@@ -321,9 +321,9 @@ const C = {
|
|
|
321
321
|
storeName: ""
|
|
322
322
|
}
|
|
323
323
|
);
|
|
324
|
-
return (
|
|
325
|
-
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"),
|
|
326
|
-
return g(),
|
|
324
|
+
return (F, e) => {
|
|
325
|
+
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
|
326
|
+
return g(), b(v, {
|
|
327
327
|
ref: "form",
|
|
328
328
|
class: "flex flex-col gap-16",
|
|
329
329
|
onValidationSuccess: e[6] || (e[6] = () => a.onUpdate(u.value, t.value))
|
|
@@ -333,31 +333,31 @@ const C = {
|
|
|
333
333
|
modelValue: t.value.merchantId,
|
|
334
334
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
|
|
335
335
|
label: "Merchant ID",
|
|
336
|
-
rules: n(
|
|
336
|
+
rules: n(p)(n(f).string())
|
|
337
337
|
}, null, 8, ["modelValue", "rules"]),
|
|
338
338
|
o(s, {
|
|
339
339
|
modelValue: t.value.merchantName,
|
|
340
340
|
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.merchantName = l),
|
|
341
341
|
label: "Merchant Name",
|
|
342
|
-
rules: n(
|
|
342
|
+
rules: n(p)(n(f).string())
|
|
343
343
|
}, null, 8, ["modelValue", "rules"]),
|
|
344
344
|
o(s, {
|
|
345
345
|
modelValue: t.value.merchantCategoryCode,
|
|
346
346
|
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.merchantCategoryCode = l),
|
|
347
347
|
label: "Merchant MCC",
|
|
348
|
-
rules: n(
|
|
348
|
+
rules: n(p)(n(f).string())
|
|
349
349
|
}, null, 8, ["modelValue", "rules"]),
|
|
350
350
|
o(s, {
|
|
351
351
|
modelValue: t.value.storeID,
|
|
352
352
|
"onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.storeID = l),
|
|
353
353
|
label: "Store ID",
|
|
354
|
-
rules: n(
|
|
354
|
+
rules: n(p)(n(f).string())
|
|
355
355
|
}, null, 8, ["modelValue", "rules"]),
|
|
356
356
|
o(s, {
|
|
357
357
|
modelValue: t.value.storeName,
|
|
358
358
|
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.storeName = l),
|
|
359
359
|
label: "Store Name",
|
|
360
|
-
rules: n(
|
|
360
|
+
rules: n(p)(n(f).string())
|
|
361
361
|
}, null, 8, ["modelValue", "rules"]),
|
|
362
362
|
o(V, {
|
|
363
363
|
modelValue: u.value,
|
|
@@ -365,7 +365,7 @@ const C = {
|
|
|
365
365
|
label: "Is Active"
|
|
366
366
|
}, null, 8, ["modelValue"]),
|
|
367
367
|
T("div", ne, [
|
|
368
|
-
a.gateway ? (g(),
|
|
368
|
+
a.gateway ? (g(), b(d, {
|
|
369
369
|
key: 0,
|
|
370
370
|
class: "flex-1",
|
|
371
371
|
variant: "secondary",
|
|
@@ -402,24 +402,24 @@ const C = {
|
|
|
402
402
|
},
|
|
403
403
|
setup(a) {
|
|
404
404
|
var V, d;
|
|
405
|
-
const
|
|
406
|
-
((d =
|
|
405
|
+
const i = J(), { isLoading: u, startAsyncCall: t } = O(), c = E(), m = a, F = w(((V = m.gateway) == null ? void 0 : V.active) ?? !1), e = w(
|
|
406
|
+
((d = m.gateway) == null ? void 0 : d.config) || {
|
|
407
407
|
merchantId: ""
|
|
408
408
|
}
|
|
409
409
|
);
|
|
410
410
|
async function s() {
|
|
411
411
|
t(async () => {
|
|
412
|
-
var
|
|
412
|
+
var v;
|
|
413
413
|
try {
|
|
414
|
-
const { merchantID: l } = await
|
|
415
|
-
((
|
|
414
|
+
const { merchantID: l } = await _.grabSync(
|
|
415
|
+
((v = c.currentRestaurant.value) == null ? void 0 : v._id) ?? ""
|
|
416
416
|
);
|
|
417
|
-
e.value.merchantId = l,
|
|
417
|
+
e.value.merchantId = l, F.value = !0, i.open({
|
|
418
418
|
type: "success",
|
|
419
419
|
title: "Grab Setting sync successfully, you will still need to save the changes."
|
|
420
420
|
});
|
|
421
421
|
} catch (l) {
|
|
422
|
-
|
|
422
|
+
i.open({
|
|
423
423
|
type: "error",
|
|
424
424
|
title: "Error occurs when sync ordering settings",
|
|
425
425
|
message: Z(l)
|
|
@@ -427,20 +427,20 @@ const C = {
|
|
|
427
427
|
}
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
|
-
return (
|
|
431
|
-
const
|
|
432
|
-
return g(),
|
|
430
|
+
return (v, l) => {
|
|
431
|
+
const y = r("FmTextField"), x = r("FmButton"), k = r("FmTooltip"), A = r("FmSwitch"), K = r("FmForm");
|
|
432
|
+
return g(), b(K, {
|
|
433
433
|
ref: "form",
|
|
434
434
|
class: "flex flex-col gap-16",
|
|
435
|
-
onValidationSuccess: l[2] || (l[2] = () => a.onUpdate(
|
|
435
|
+
onValidationSuccess: l[2] || (l[2] = () => a.onUpdate(F.value, e.value))
|
|
436
436
|
}, {
|
|
437
437
|
default: I(() => [
|
|
438
438
|
T("div", ue, [
|
|
439
|
-
o(
|
|
439
|
+
o(y, {
|
|
440
440
|
modelValue: e.value.merchantId,
|
|
441
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
441
|
+
"onUpdate:modelValue": l[0] || (l[0] = (C) => e.value.merchantId = C),
|
|
442
442
|
label: "Merchant ID",
|
|
443
|
-
rules: n(
|
|
443
|
+
rules: n(p)(n(f).string())
|
|
444
444
|
}, null, 8, ["modelValue", "rules"]),
|
|
445
445
|
o(k, {
|
|
446
446
|
variant: "plain",
|
|
@@ -461,12 +461,12 @@ const C = {
|
|
|
461
461
|
})
|
|
462
462
|
]),
|
|
463
463
|
o(A, {
|
|
464
|
-
modelValue:
|
|
465
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
464
|
+
modelValue: F.value,
|
|
465
|
+
"onUpdate:modelValue": l[1] || (l[1] = (C) => F.value = C),
|
|
466
466
|
label: "Is Active"
|
|
467
467
|
}, null, 8, ["modelValue"]),
|
|
468
468
|
T("div", re, [
|
|
469
|
-
a.gateway ? (g(),
|
|
469
|
+
a.gateway ? (g(), b(x, {
|
|
470
470
|
key: 0,
|
|
471
471
|
class: "flex-1",
|
|
472
472
|
variant: "secondary",
|
|
@@ -485,7 +485,7 @@ const C = {
|
|
|
485
485
|
}, 512);
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
-
}),
|
|
488
|
+
}), ie = { class: "flex mt-6 space-x-6" }, me = /* @__PURE__ */ D({
|
|
489
489
|
__name: "SoftSpaceGateway",
|
|
490
490
|
props: {
|
|
491
491
|
onUpdate: {
|
|
@@ -502,16 +502,16 @@ const C = {
|
|
|
502
502
|
}
|
|
503
503
|
},
|
|
504
504
|
setup(a) {
|
|
505
|
-
var
|
|
506
|
-
const
|
|
507
|
-
((
|
|
505
|
+
var c, m;
|
|
506
|
+
const i = a, u = w(((c = i.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
507
|
+
((m = i.gateway) == null ? void 0 : m.config) || {
|
|
508
508
|
mid: "",
|
|
509
509
|
tid: ""
|
|
510
510
|
}
|
|
511
511
|
);
|
|
512
|
-
return (
|
|
513
|
-
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"),
|
|
514
|
-
return g(),
|
|
512
|
+
return (F, e) => {
|
|
513
|
+
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
|
514
|
+
return g(), b(v, {
|
|
515
515
|
ref: "form",
|
|
516
516
|
class: "flex flex-col gap-16",
|
|
517
517
|
onValidationSuccess: e[3] || (e[3] = () => a.onUpdate(u.value, t.value))
|
|
@@ -521,21 +521,21 @@ const C = {
|
|
|
521
521
|
modelValue: t.value.mid,
|
|
522
522
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.mid = l),
|
|
523
523
|
label: "MID",
|
|
524
|
-
rules: n(
|
|
524
|
+
rules: n(p)(n(f).string())
|
|
525
525
|
}, null, 8, ["modelValue", "rules"]),
|
|
526
526
|
o(s, {
|
|
527
527
|
modelValue: t.value.tid,
|
|
528
528
|
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.tid = l),
|
|
529
529
|
label: "TID",
|
|
530
|
-
rules: n(
|
|
530
|
+
rules: n(p)(n(f).string())
|
|
531
531
|
}, null, 8, ["modelValue", "rules"]),
|
|
532
532
|
o(V, {
|
|
533
533
|
modelValue: u.value,
|
|
534
534
|
"onUpdate:modelValue": e[2] || (e[2] = (l) => u.value = l),
|
|
535
535
|
label: "Is Active"
|
|
536
536
|
}, null, 8, ["modelValue"]),
|
|
537
|
-
T("div",
|
|
538
|
-
a.gateway ? (g(),
|
|
537
|
+
T("div", ie, [
|
|
538
|
+
a.gateway ? (g(), b(d, {
|
|
539
539
|
key: 0,
|
|
540
540
|
class: "flex-1",
|
|
541
541
|
variant: "secondary",
|
|
@@ -571,15 +571,15 @@ const C = {
|
|
|
571
571
|
}
|
|
572
572
|
},
|
|
573
573
|
setup(a) {
|
|
574
|
-
var
|
|
575
|
-
const
|
|
576
|
-
((
|
|
574
|
+
var c, m;
|
|
575
|
+
const i = a, u = w(((c = i.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
576
|
+
((m = i.gateway) == null ? void 0 : m.config) || {
|
|
577
577
|
merchantId: ""
|
|
578
578
|
}
|
|
579
579
|
);
|
|
580
|
-
return (
|
|
581
|
-
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"),
|
|
582
|
-
return g(),
|
|
580
|
+
return (F, e) => {
|
|
581
|
+
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
|
582
|
+
return g(), b(v, {
|
|
583
583
|
ref: "form",
|
|
584
584
|
class: "flex flex-col gap-16",
|
|
585
585
|
onValidationSuccess: e[2] || (e[2] = () => a.onUpdate(u.value, t.value))
|
|
@@ -589,7 +589,7 @@ const C = {
|
|
|
589
589
|
modelValue: t.value.merchantId,
|
|
590
590
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
|
|
591
591
|
label: "Merchant ID",
|
|
592
|
-
rules: n(
|
|
592
|
+
rules: n(p)(n(f).string())
|
|
593
593
|
}, null, 8, ["modelValue", "rules"]),
|
|
594
594
|
o(V, {
|
|
595
595
|
modelValue: u.value,
|
|
@@ -597,7 +597,7 @@ const C = {
|
|
|
597
597
|
label: "Is Active"
|
|
598
598
|
}, null, 8, ["modelValue"]),
|
|
599
599
|
T("div", de, [
|
|
600
|
-
a.gateway ? (g(),
|
|
600
|
+
a.gateway ? (g(), b(d, {
|
|
601
601
|
key: 0,
|
|
602
602
|
class: "flex-1",
|
|
603
603
|
variant: "secondary",
|
|
@@ -633,9 +633,9 @@ const C = {
|
|
|
633
633
|
}
|
|
634
634
|
},
|
|
635
635
|
setup(a) {
|
|
636
|
-
var
|
|
637
|
-
const
|
|
638
|
-
((
|
|
636
|
+
var c, m;
|
|
637
|
+
const i = a, u = w(((c = i.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
638
|
+
((m = i.gateway) == null ? void 0 : m.config) || {
|
|
639
639
|
merchantAccount: "",
|
|
640
640
|
username: "",
|
|
641
641
|
apiKey: "",
|
|
@@ -643,9 +643,9 @@ const C = {
|
|
|
643
643
|
hmacKey: ""
|
|
644
644
|
}
|
|
645
645
|
);
|
|
646
|
-
return (
|
|
647
|
-
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"),
|
|
648
|
-
return g(),
|
|
646
|
+
return (F, e) => {
|
|
647
|
+
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
|
648
|
+
return g(), b(v, {
|
|
649
649
|
ref: "form",
|
|
650
650
|
class: "flex flex-col gap-16",
|
|
651
651
|
onValidationSuccess: e[6] || (e[6] = () => a.onUpdate(u.value, t.value))
|
|
@@ -655,25 +655,25 @@ const C = {
|
|
|
655
655
|
modelValue: t.value.endpoint,
|
|
656
656
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.endpoint = l),
|
|
657
657
|
label: "Endpoint",
|
|
658
|
-
rules: n(
|
|
658
|
+
rules: n(p)(n(f).string())
|
|
659
659
|
}, null, 8, ["modelValue", "rules"]),
|
|
660
660
|
o(s, {
|
|
661
661
|
modelValue: t.value.merchantAccount,
|
|
662
662
|
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.merchantAccount = l),
|
|
663
663
|
label: "Merchant Account",
|
|
664
|
-
rules: n(
|
|
664
|
+
rules: n(p)(n(f).string())
|
|
665
665
|
}, null, 8, ["modelValue", "rules"]),
|
|
666
666
|
o(s, {
|
|
667
667
|
modelValue: t.value.username,
|
|
668
668
|
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.username = l),
|
|
669
669
|
label: "Username",
|
|
670
|
-
rules: n(
|
|
670
|
+
rules: n(p)(n(f).string())
|
|
671
671
|
}, null, 8, ["modelValue", "rules"]),
|
|
672
672
|
o(s, {
|
|
673
673
|
modelValue: t.value.apiKey,
|
|
674
674
|
"onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.apiKey = l),
|
|
675
675
|
label: "API Key",
|
|
676
|
-
rules: n(
|
|
676
|
+
rules: n(p)(n(f).string())
|
|
677
677
|
}, null, 8, ["modelValue", "rules"]),
|
|
678
678
|
o(s, {
|
|
679
679
|
modelValue: t.value.hmacKey,
|
|
@@ -686,7 +686,7 @@ const C = {
|
|
|
686
686
|
label: "Is Active"
|
|
687
687
|
}, null, 8, ["modelValue"]),
|
|
688
688
|
T("div", ve, [
|
|
689
|
-
a.gateway ? (g(),
|
|
689
|
+
a.gateway ? (g(), b(d, {
|
|
690
690
|
key: 0,
|
|
691
691
|
class: "flex-1",
|
|
692
692
|
variant: "secondary",
|
|
@@ -722,16 +722,16 @@ const C = {
|
|
|
722
722
|
}
|
|
723
723
|
},
|
|
724
724
|
setup(a) {
|
|
725
|
-
var
|
|
726
|
-
const
|
|
727
|
-
((
|
|
725
|
+
var c, m;
|
|
726
|
+
const i = a, u = w(((c = i.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
727
|
+
((m = i.gateway) == null ? void 0 : m.config) || {
|
|
728
728
|
appId: "",
|
|
729
729
|
privateKey: ""
|
|
730
730
|
}
|
|
731
731
|
);
|
|
732
|
-
return (
|
|
733
|
-
const s = r("FmTextField"), V = r("FmTextarea"), d = r("FmSwitch"),
|
|
734
|
-
return g(),
|
|
732
|
+
return (F, e) => {
|
|
733
|
+
const s = r("FmTextField"), V = r("FmTextarea"), d = r("FmSwitch"), v = r("FmButton"), l = r("FmForm");
|
|
734
|
+
return g(), b(l, {
|
|
735
735
|
ref: "form",
|
|
736
736
|
class: "flex flex-col gap-16",
|
|
737
737
|
onValidationSuccess: e[3] || (e[3] = () => a.onUpdate(u.value, t.value))
|
|
@@ -739,30 +739,30 @@ const C = {
|
|
|
739
739
|
default: I(() => [
|
|
740
740
|
o(s, {
|
|
741
741
|
modelValue: t.value.appId,
|
|
742
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
742
|
+
"onUpdate:modelValue": e[0] || (e[0] = (y) => t.value.appId = y),
|
|
743
743
|
label: "App ID",
|
|
744
|
-
rules: n(
|
|
744
|
+
rules: n(p)(n(f).string())
|
|
745
745
|
}, null, 8, ["modelValue", "rules"]),
|
|
746
746
|
o(V, {
|
|
747
747
|
modelValue: t.value.privateKey,
|
|
748
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
748
|
+
"onUpdate:modelValue": e[1] || (e[1] = (y) => t.value.privateKey = y),
|
|
749
749
|
label: "Private Key",
|
|
750
750
|
placeholder: "Paste your private key including BEGIN and END markers"
|
|
751
751
|
}, null, 8, ["modelValue"]),
|
|
752
752
|
o(d, {
|
|
753
753
|
modelValue: u.value,
|
|
754
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
754
|
+
"onUpdate:modelValue": e[2] || (e[2] = (y) => u.value = y),
|
|
755
755
|
label: "Is Active"
|
|
756
756
|
}, null, 8, ["modelValue"]),
|
|
757
757
|
T("div", pe, [
|
|
758
|
-
a.gateway ? (g(),
|
|
758
|
+
a.gateway ? (g(), b(v, {
|
|
759
759
|
key: 0,
|
|
760
760
|
class: "flex-1",
|
|
761
761
|
variant: "secondary",
|
|
762
762
|
label: "Delete",
|
|
763
763
|
onclick: () => a.onDelete(a.gateway)
|
|
764
764
|
}, null, 8, ["onclick"])) : S("", !0),
|
|
765
|
-
o(
|
|
765
|
+
o(v, {
|
|
766
766
|
type: "submit",
|
|
767
767
|
class: "flex-1",
|
|
768
768
|
variant: "primary",
|
|
@@ -774,10 +774,86 @@ const C = {
|
|
|
774
774
|
}, 512);
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
|
-
}), Fe = {
|
|
777
|
+
}), Fe = { class: "flex mt-6 space-x-6" }, ge = /* @__PURE__ */ D({
|
|
778
|
+
__name: "MaybankGateway",
|
|
779
|
+
props: {
|
|
780
|
+
onUpdate: {
|
|
781
|
+
type: Function,
|
|
782
|
+
required: !0
|
|
783
|
+
},
|
|
784
|
+
onDelete: {
|
|
785
|
+
type: Function,
|
|
786
|
+
required: !0
|
|
787
|
+
},
|
|
788
|
+
gateway: {
|
|
789
|
+
type: Object,
|
|
790
|
+
required: !0
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
setup(a) {
|
|
794
|
+
var c, m;
|
|
795
|
+
const i = a, u = w(((c = i.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
796
|
+
((m = i.gateway) == null ? void 0 : m.config) || {
|
|
797
|
+
clientId: "",
|
|
798
|
+
clientSecret: "",
|
|
799
|
+
merchantId: ""
|
|
800
|
+
}
|
|
801
|
+
);
|
|
802
|
+
return (F, e) => {
|
|
803
|
+
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
|
804
|
+
return g(), b(v, {
|
|
805
|
+
ref: "form",
|
|
806
|
+
class: "flex flex-col gap-16",
|
|
807
|
+
onValidationSuccess: e[4] || (e[4] = () => a.onUpdate(u.value, t.value))
|
|
808
|
+
}, {
|
|
809
|
+
default: I(() => [
|
|
810
|
+
o(s, {
|
|
811
|
+
modelValue: t.value.clientId,
|
|
812
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.clientId = l),
|
|
813
|
+
label: "Client ID",
|
|
814
|
+
rules: n(p)(n(f).string())
|
|
815
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
816
|
+
o(s, {
|
|
817
|
+
modelValue: t.value.clientSecret,
|
|
818
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.clientSecret = l),
|
|
819
|
+
label: "Client Secret",
|
|
820
|
+
rules: n(p)(n(f).string())
|
|
821
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
822
|
+
o(s, {
|
|
823
|
+
modelValue: t.value.merchantId,
|
|
824
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.merchantId = l),
|
|
825
|
+
label: "Merchant ID (Client Ref ID)",
|
|
826
|
+
rules: n(p)(n(f).string())
|
|
827
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
828
|
+
o(V, {
|
|
829
|
+
modelValue: u.value,
|
|
830
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => u.value = l),
|
|
831
|
+
label: "Is Active"
|
|
832
|
+
}, null, 8, ["modelValue"]),
|
|
833
|
+
T("div", Fe, [
|
|
834
|
+
a.gateway ? (g(), b(d, {
|
|
835
|
+
key: 0,
|
|
836
|
+
class: "flex-1",
|
|
837
|
+
variant: "secondary",
|
|
838
|
+
label: "Delete",
|
|
839
|
+
onclick: () => a.onDelete(a.gateway)
|
|
840
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
|
841
|
+
o(d, {
|
|
842
|
+
type: "submit",
|
|
843
|
+
class: "flex-1",
|
|
844
|
+
variant: "primary",
|
|
845
|
+
label: "Save"
|
|
846
|
+
})
|
|
847
|
+
])
|
|
848
|
+
]),
|
|
849
|
+
_: 1
|
|
850
|
+
}, 512);
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
}), Ve = {
|
|
778
854
|
key: 0,
|
|
779
855
|
class: "flex items-center justify-center min-h-[80vh]"
|
|
780
|
-
},
|
|
856
|
+
}, be = /* @__PURE__ */ D({
|
|
781
857
|
__name: "PaymentGateway",
|
|
782
858
|
props: {
|
|
783
859
|
restaurant: {
|
|
@@ -786,7 +862,7 @@ const C = {
|
|
|
786
862
|
}
|
|
787
863
|
},
|
|
788
864
|
setup(a) {
|
|
789
|
-
const
|
|
865
|
+
const i = [
|
|
790
866
|
{
|
|
791
867
|
label: "Fiuu",
|
|
792
868
|
value: "RAZER_MERCHANT_SERVICE",
|
|
@@ -820,7 +896,7 @@ const C = {
|
|
|
820
896
|
{
|
|
821
897
|
label: "SoftSpace",
|
|
822
898
|
value: "SOFTSPACE",
|
|
823
|
-
form:
|
|
899
|
+
form: me,
|
|
824
900
|
region: [U.F_COUNTRY.enum.MY]
|
|
825
901
|
},
|
|
826
902
|
{
|
|
@@ -840,62 +916,69 @@ const C = {
|
|
|
840
916
|
value: "ADYEN",
|
|
841
917
|
form: ye,
|
|
842
918
|
region: [U.F_COUNTRY.enum.MY, U.F_COUNTRY.enum.SG]
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
label: "Maybank",
|
|
922
|
+
value: "MAYBANK_QR",
|
|
923
|
+
form: ge,
|
|
924
|
+
region: [U.F_COUNTRY.enum.MY]
|
|
843
925
|
}
|
|
844
|
-
], u = a, t = E(), { isLoading:
|
|
926
|
+
], u = a, t = E(), { isLoading: c, startAsyncCall: m } = O(), { activeGateway: F } = P({
|
|
845
927
|
activeGateway: ""
|
|
846
|
-
}), e =
|
|
928
|
+
}), e = w([]);
|
|
847
929
|
async function s(x, k) {
|
|
848
|
-
await
|
|
930
|
+
await m(async () => {
|
|
849
931
|
const A = {
|
|
850
|
-
paymentGateway:
|
|
932
|
+
paymentGateway: F.value,
|
|
851
933
|
config: k,
|
|
852
934
|
active: x
|
|
853
935
|
};
|
|
854
|
-
await
|
|
936
|
+
await _.upsert(u.restaurant._id, A), e.value = [...await _.get(u.restaurant._id)];
|
|
855
937
|
});
|
|
856
938
|
}
|
|
857
939
|
async function V(x) {
|
|
858
|
-
await
|
|
859
|
-
await
|
|
940
|
+
await m(async () => {
|
|
941
|
+
await _.delete(u.restaurant._id, x._id), e.value = [...await _.get(u.restaurant._id)];
|
|
860
942
|
});
|
|
861
943
|
}
|
|
862
|
-
const d =
|
|
944
|
+
const d = G(() => i.filter(
|
|
863
945
|
(x) => x.region.includes(t.currentCountry.value ?? U.F_COUNTRY.enum.MY)
|
|
864
946
|
));
|
|
865
|
-
function
|
|
866
|
-
|
|
867
|
-
e.value = await
|
|
947
|
+
function v() {
|
|
948
|
+
m(async () => {
|
|
949
|
+
e.value = await _.get(u.restaurant._id), d.value.length > 0 && (F.value = d.value[0].value);
|
|
868
950
|
});
|
|
869
951
|
}
|
|
870
|
-
|
|
871
|
-
const l =
|
|
952
|
+
N(v);
|
|
953
|
+
const l = G(() => {
|
|
872
954
|
var x;
|
|
873
|
-
return (x =
|
|
874
|
-
}),
|
|
955
|
+
return (x = i.find((k) => k.value === F.value)) == null ? void 0 : x.form;
|
|
956
|
+
}), y = G(() => e.value.find((x) => x.paymentGateway === F.value));
|
|
875
957
|
return (x, k) => {
|
|
876
|
-
var
|
|
877
|
-
const A = r("FmCircularProgress"),
|
|
878
|
-
return g(),
|
|
879
|
-
n(
|
|
958
|
+
var C;
|
|
959
|
+
const A = r("FmCircularProgress"), K = r("FmTabs");
|
|
960
|
+
return g(), R(L, null, [
|
|
961
|
+
n(c) ? (g(), R("div", Ve, [
|
|
880
962
|
o(A, { size: "xxl" })
|
|
881
963
|
])) : S("", !0),
|
|
882
|
-
o(
|
|
964
|
+
o(K, {
|
|
883
965
|
class: "mb-6",
|
|
884
|
-
"model-value": n(
|
|
885
|
-
"onUpdate:modelValue": k[0] || (k[0] = (j) => B(
|
|
886
|
-
items: d.value
|
|
966
|
+
"model-value": n(F),
|
|
967
|
+
"onUpdate:modelValue": k[0] || (k[0] = (j) => B(F) ? F.value = j : null),
|
|
968
|
+
items: d.value,
|
|
969
|
+
showMoreAt: 8
|
|
887
970
|
}, null, 8, ["model-value", "items"]),
|
|
888
|
-
n(
|
|
889
|
-
key: (
|
|
971
|
+
n(F) ? (g(), b($(l.value), Y({
|
|
972
|
+
key: (C = y.value) == null ? void 0 : C._id
|
|
890
973
|
}, {
|
|
891
|
-
gateway:
|
|
974
|
+
gateway: y.value,
|
|
892
975
|
onDelete: V,
|
|
893
976
|
onUpdate: s
|
|
894
977
|
}), null, 16)) : S("", !0)
|
|
895
978
|
], 64);
|
|
896
979
|
};
|
|
897
980
|
}
|
|
898
|
-
}),
|
|
981
|
+
}), Ae = /* @__PURE__ */ D({
|
|
899
982
|
__name: "RestaurantSetting",
|
|
900
983
|
props: {
|
|
901
984
|
restaurantId: {
|
|
@@ -904,43 +987,43 @@ const C = {
|
|
|
904
987
|
}
|
|
905
988
|
},
|
|
906
989
|
setup(a) {
|
|
907
|
-
const
|
|
990
|
+
const i = a, { tab: u } = P({
|
|
908
991
|
tab: "payment-gateway"
|
|
909
|
-
}), { isLoading: t, startAsyncCall:
|
|
992
|
+
}), { isLoading: t, startAsyncCall: c } = O(!0), m = Q(), F = w(), e = [
|
|
910
993
|
{
|
|
911
994
|
label: "Payment Gateway",
|
|
912
995
|
value: "payment-gateway",
|
|
913
996
|
icon: "assured_workload",
|
|
914
|
-
render:
|
|
997
|
+
render: be
|
|
915
998
|
}
|
|
916
999
|
];
|
|
917
1000
|
function s() {
|
|
918
|
-
|
|
919
|
-
|
|
1001
|
+
c(async () => {
|
|
1002
|
+
F.value = await W.readRestaurantById(i.restaurantId);
|
|
920
1003
|
});
|
|
921
1004
|
}
|
|
922
|
-
|
|
923
|
-
const V =
|
|
1005
|
+
N(s);
|
|
1006
|
+
const V = G(() => {
|
|
924
1007
|
var d;
|
|
925
|
-
return (d = e.find((
|
|
1008
|
+
return (d = e.find((v) => v.value === u.value)) == null ? void 0 : d.render;
|
|
926
1009
|
});
|
|
927
|
-
return (d,
|
|
928
|
-
var
|
|
1010
|
+
return (d, v) => {
|
|
1011
|
+
var y;
|
|
929
1012
|
const l = r("FmTabs");
|
|
930
|
-
return g(),
|
|
931
|
-
title: `Restaurant (${(
|
|
1013
|
+
return g(), b(z, {
|
|
1014
|
+
title: `Restaurant (${(y = F.value) == null ? void 0 : y._id})`,
|
|
932
1015
|
loading: n(t),
|
|
933
|
-
onBack: n(
|
|
1016
|
+
onBack: n(m).back
|
|
934
1017
|
}, {
|
|
935
1018
|
default: I(() => [
|
|
936
1019
|
o(l, {
|
|
937
1020
|
"model-value": n(u),
|
|
938
|
-
"onUpdate:modelValue":
|
|
1021
|
+
"onUpdate:modelValue": v[0] || (v[0] = (x) => B(u) ? u.value = x : null),
|
|
939
1022
|
class: "mb-6",
|
|
940
1023
|
items: e
|
|
941
1024
|
}, null, 8, ["model-value"]),
|
|
942
|
-
n(u) &&
|
|
943
|
-
restaurant:
|
|
1025
|
+
n(u) && F.value ? (g(), b($(V.value), H(Y({ key: 0 }, {
|
|
1026
|
+
restaurant: F.value
|
|
944
1027
|
})), null, 16)) : S("", !0)
|
|
945
1028
|
]),
|
|
946
1029
|
_: 1
|
|
@@ -949,5 +1032,5 @@ const C = {
|
|
|
949
1032
|
}
|
|
950
1033
|
});
|
|
951
1034
|
export {
|
|
952
|
-
|
|
1035
|
+
Ae as default
|
|
953
1036
|
};
|