@feedmepos/mf-payment 1.5.23 → 1.5.25-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-Cy1BbWNh.js} +2 -2
- package/dist/{Chargeback-Bds2iEV5.js → Chargeback-Dl4rSQ5U.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-BgL6Nuvr.js → DocumentViewer.vue_vue_type_script_setup_true_lang-KCfloaC1.js} +1 -1
- package/dist/{OnboardForm-Cnv60Ug0.js → OnboardForm-C5e22OaA.js} +5 -5
- package/dist/{OnboardForm-CrwU-8cC.js → OnboardForm-DepiUIOr.js} +5 -5
- package/dist/{OnboardSubmission-CBXLX9vB.js → OnboardSubmission-BB6qLr3p.js} +5 -5
- package/dist/{OnboardSubmission-CNjQNirx.js → OnboardSubmission-V8jeo8Za.js} +2 -2
- package/dist/{PayoutAccount-mroN1DFZ.js → PayoutAccount-BeC2YgKa.js} +5 -5
- package/dist/{PayoutAccount-BNOa327i.js → PayoutAccount-BmA6yq1q.js} +4 -4
- package/dist/{PayoutAccountSetting-CUJtxE8n.js → PayoutAccountSetting-DtFbOHVm.js} +4 -4
- package/dist/{Restaurant-DVSk4KFB.js → Restaurant-DlQV3dot.js} +4 -4
- package/dist/{RestaurantSetting-CPa7CFaW.js → RestaurantSetting-Yb9S8Wfg.js} +245 -155
- package/dist/{Settlement-CMEBmvhn.js → Settlement-CpmdJ84I.js} +3 -3
- package/dist/{Settlement-BOS0NVhn.js → Settlement-jznt2FLc.js} +3 -3
- package/dist/{SettlementTransactions-BwVjsFCT.js → SettlementTransactions-Bm7D3JZu.js} +4 -4
- package/dist/{SettlementTransactions-BKCPfMDs.js → SettlementTransactions-DLVFBcdV.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-BiTeDpBk.js → Status.vue_vue_type_script_setup_true_lang-DnWFKNCZ.js} +1 -1
- package/dist/{Terminal-DJSDtUUp.js → Terminal-B6wzbr0C.js} +5 -5
- package/dist/{TerminalSetting-CGGpemW8.js → TerminalSetting-BV1Uh1OM.js} +3 -3
- package/dist/{Transaction-DA3HSvt8.js → Transaction-BAKFOtrH.js} +9 -9
- package/dist/{Transaction-BASuO5u4.js → Transaction-DL0_I7Ez.js} +6 -6
- package/dist/{TransactionOld-CmjVUkD9.js → TransactionOld-CDKLMs5_.js} +6 -6
- package/dist/{app-6-k7t6QY.js → app-BI2iqyvj.js} +152 -143
- package/dist/app.js +1 -1
- package/dist/{assets-BqyjGcBE.js → assets-DvPzXLhl.js} +20 -19
- package/dist/{grafana-DecAHDp-.js → grafana-DwrmpEec.js} +1 -1
- package/dist/{index-BKXccERQ.js → index-2-UOiJfz.js} +1 -1
- package/dist/{index-DklLFCf5.js → index-BPKJne1Q.js} +1 -1
- package/dist/{index-pBoJWBgh.js → index-Ci4uxsSz.js} +2 -2
- package/dist/{index-DQany4ND.js → index-DRKoa7dT.js} +13 -3
- package/dist/{index-lkMlxXDI.js → index-DcB4capd.js} +1 -1
- package/dist/{index-DtIipWj2.js → index-OA39241x.js} +1 -1
- package/dist/{index-CylkiU8i.js → index-ey7xefKL.js} +1 -1
- package/dist/{index-B5j5U-Da.js → index-zMl6AuFw.js} +1 -1
- package/dist/{index-HvRabCwb.js → index-zvJkckUa.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-0YY23afw.js → index.vue_vue_type_script_setup_true_lang-BYTNfOkc.js} +1 -1
- package/dist/package.json +3 -3
- package/dist/{payout-account-CfSZK23P.js → payout-account-Th15UywB.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +24 -24
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +24 -24
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +30 -30
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +30 -30
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +24 -24
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +24 -24
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +30 -30
- 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/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +52 -0
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +4 -4
- 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/dist/views/payout-account/PayoutAccountTable.vue.d.ts +48 -48
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +24 -24
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +12 -12
- package/package.json +2 -2
|
@@ -1,24 +1,24 @@
|
|
|
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-DRKoa7dT.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-zMl6AuFw.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-BPKJne1Q.js";
|
|
11
|
+
const A = {
|
|
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
19
|
async upsert(a, m) {
|
|
20
20
|
return q(
|
|
21
|
-
await
|
|
21
|
+
await M().post(
|
|
22
22
|
`restaurants/${a}/payment-gateway`,
|
|
23
23
|
{ data: m }
|
|
24
24
|
)
|
|
@@ -26,14 +26,14 @@ const C = {
|
|
|
26
26
|
},
|
|
27
27
|
async delete(a, m) {
|
|
28
28
|
return q(
|
|
29
|
-
await
|
|
29
|
+
await M().delete(
|
|
30
30
|
`restaurants/${a}/payment-gateway/${m}`
|
|
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,8 +55,8 @@ const C = {
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
setup(a) {
|
|
58
|
-
var
|
|
59
|
-
const m = a, u =
|
|
58
|
+
var c, i;
|
|
59
|
+
const m = a, u = w(((c = m.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
60
60
|
((i = m.gateway) == null ? void 0 : i.config) || {
|
|
61
61
|
merchantId: "",
|
|
62
62
|
uniqueId: "",
|
|
@@ -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,8 +152,8 @@ const C = {
|
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
setup(a) {
|
|
155
|
-
var
|
|
156
|
-
const m = a, u =
|
|
155
|
+
var c, i;
|
|
156
|
+
const m = a, u = w(((c = m.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
157
157
|
((i = m.gateway) == null ? void 0 : i.config) || {
|
|
158
158
|
storeId: "",
|
|
159
159
|
clientId: "",
|
|
@@ -161,9 +161,9 @@ const C = {
|
|
|
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 m = a, u =
|
|
237
|
+
var c, i;
|
|
238
|
+
const m = a, u = w(((c = m.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
239
239
|
((i = m.gateway) == null ? void 0 : i.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,8 +311,8 @@ const C = {
|
|
|
311
311
|
}
|
|
312
312
|
},
|
|
313
313
|
setup(a) {
|
|
314
|
-
var
|
|
315
|
-
const m = a, u =
|
|
314
|
+
var c, i;
|
|
315
|
+
const m = a, u = w(((c = m.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
316
316
|
((i = m.gateway) == null ? void 0 : i.config) || {
|
|
317
317
|
merchantId: "",
|
|
318
318
|
merchantName: "",
|
|
@@ -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,19 +402,19 @@ const C = {
|
|
|
402
402
|
},
|
|
403
403
|
setup(a) {
|
|
404
404
|
var V, d;
|
|
405
|
-
const m = J(), { isLoading: u, startAsyncCall: t } =
|
|
405
|
+
const m = J(), { isLoading: u, startAsyncCall: t } = O(), c = E(), i = a, F = w(((V = i.gateway) == null ? void 0 : V.active) ?? !1), e = w(
|
|
406
406
|
((d = i.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 A.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, m.open({
|
|
418
418
|
type: "success",
|
|
419
419
|
title: "Grab Setting sync successfully, you will still need to save the changes."
|
|
420
420
|
});
|
|
@@ -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"), _ = 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",
|
|
@@ -460,13 +460,13 @@ const C = {
|
|
|
460
460
|
_: 1
|
|
461
461
|
})
|
|
462
462
|
]),
|
|
463
|
-
o(
|
|
464
|
-
modelValue:
|
|
465
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
463
|
+
o(_, {
|
|
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",
|
|
@@ -502,16 +502,16 @@ const C = {
|
|
|
502
502
|
}
|
|
503
503
|
},
|
|
504
504
|
setup(a) {
|
|
505
|
-
var
|
|
506
|
-
const m = a, u =
|
|
505
|
+
var c, i;
|
|
506
|
+
const m = a, u = w(((c = m.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
507
507
|
((i = m.gateway) == null ? void 0 : i.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,13 +521,13 @@ 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,
|
|
@@ -535,7 +535,7 @@ const C = {
|
|
|
535
535
|
label: "Is Active"
|
|
536
536
|
}, null, 8, ["modelValue"]),
|
|
537
537
|
T("div", me, [
|
|
538
|
-
a.gateway ? (g(),
|
|
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 m = a, u =
|
|
574
|
+
var c, i;
|
|
575
|
+
const m = a, u = w(((c = m.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
576
576
|
((i = m.gateway) == null ? void 0 : i.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,8 +633,8 @@ const C = {
|
|
|
633
633
|
}
|
|
634
634
|
},
|
|
635
635
|
setup(a) {
|
|
636
|
-
var
|
|
637
|
-
const m = a, u =
|
|
636
|
+
var c, i;
|
|
637
|
+
const m = a, u = w(((c = m.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
638
638
|
((i = m.gateway) == null ? void 0 : i.config) || {
|
|
639
639
|
merchantAccount: "",
|
|
640
640
|
username: "",
|
|
@@ -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 m = a, u =
|
|
725
|
+
var c, i;
|
|
726
|
+
const m = a, u = w(((c = m.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
727
727
|
((i = m.gateway) == null ? void 0 : i.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,113 @@ 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
|
+
type: "submit",
|
|
767
|
+
class: "flex-1",
|
|
768
|
+
variant: "primary",
|
|
769
|
+
label: "Save"
|
|
770
|
+
})
|
|
771
|
+
])
|
|
772
|
+
]),
|
|
773
|
+
_: 1
|
|
774
|
+
}, 512);
|
|
775
|
+
};
|
|
776
|
+
}
|
|
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, i;
|
|
795
|
+
const m = a, u = w(((c = m.gateway) == null ? void 0 : c.active) ?? !1), t = w(
|
|
796
|
+
((i = m.gateway) == null ? void 0 : i.config) || {
|
|
797
|
+
clientId: "",
|
|
798
|
+
clientSecret: "",
|
|
799
|
+
merchantId: "",
|
|
800
|
+
terminalId: ""
|
|
801
|
+
}
|
|
802
|
+
);
|
|
803
|
+
return (F, e) => {
|
|
804
|
+
const s = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
|
805
|
+
return g(), b(v, {
|
|
806
|
+
ref: "form",
|
|
807
|
+
class: "flex flex-col gap-16",
|
|
808
|
+
onValidationSuccess: e[5] || (e[5] = () => a.onUpdate(u.value, t.value))
|
|
809
|
+
}, {
|
|
810
|
+
default: I(() => [
|
|
811
|
+
o(s, {
|
|
812
|
+
modelValue: t.value.clientId,
|
|
813
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.clientId = l),
|
|
814
|
+
label: "Client ID",
|
|
815
|
+
rules: n(p)(n(f).string())
|
|
816
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
817
|
+
o(s, {
|
|
818
|
+
modelValue: t.value.clientSecret,
|
|
819
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.clientSecret = l),
|
|
820
|
+
label: "Client Secret",
|
|
821
|
+
rules: n(p)(n(f).string())
|
|
822
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
823
|
+
o(s, {
|
|
824
|
+
modelValue: t.value.merchantId,
|
|
825
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.merchantId = l),
|
|
826
|
+
label: "Merchant ID (Client Ref ID)",
|
|
827
|
+
rules: n(p)(n(f).string())
|
|
828
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
829
|
+
o(s, {
|
|
830
|
+
modelValue: t.value.terminalId,
|
|
831
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.terminalId = l),
|
|
832
|
+
label: "Terminal ID",
|
|
833
|
+
"label-mark": "optional"
|
|
834
|
+
}, null, 8, ["modelValue"]),
|
|
835
|
+
o(V, {
|
|
836
|
+
modelValue: u.value,
|
|
837
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => u.value = l),
|
|
838
|
+
label: "Is Active"
|
|
839
|
+
}, null, 8, ["modelValue"]),
|
|
840
|
+
T("div", Fe, [
|
|
841
|
+
a.gateway ? (g(), b(d, {
|
|
842
|
+
key: 0,
|
|
843
|
+
class: "flex-1",
|
|
844
|
+
variant: "secondary",
|
|
845
|
+
label: "Delete",
|
|
846
|
+
onclick: () => a.onDelete(a.gateway)
|
|
847
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
|
848
|
+
o(d, {
|
|
766
849
|
type: "submit",
|
|
767
850
|
class: "flex-1",
|
|
768
851
|
variant: "primary",
|
|
@@ -774,10 +857,10 @@ const C = {
|
|
|
774
857
|
}, 512);
|
|
775
858
|
};
|
|
776
859
|
}
|
|
777
|
-
}),
|
|
860
|
+
}), Ve = {
|
|
778
861
|
key: 0,
|
|
779
862
|
class: "flex items-center justify-center min-h-[80vh]"
|
|
780
|
-
},
|
|
863
|
+
}, be = /* @__PURE__ */ D({
|
|
781
864
|
__name: "PaymentGateway",
|
|
782
865
|
props: {
|
|
783
866
|
restaurant: {
|
|
@@ -840,55 +923,62 @@ const C = {
|
|
|
840
923
|
value: "ADYEN",
|
|
841
924
|
form: ye,
|
|
842
925
|
region: [U.F_COUNTRY.enum.MY, U.F_COUNTRY.enum.SG]
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
label: "Maybank",
|
|
929
|
+
value: "MAYBANK_QR",
|
|
930
|
+
form: ge,
|
|
931
|
+
region: [U.F_COUNTRY.enum.MY]
|
|
843
932
|
}
|
|
844
|
-
], u = a, t = E(), { isLoading:
|
|
933
|
+
], u = a, t = E(), { isLoading: c, startAsyncCall: i } = O(), { activeGateway: F } = P({
|
|
845
934
|
activeGateway: ""
|
|
846
|
-
}), e =
|
|
935
|
+
}), e = w([]);
|
|
847
936
|
async function s(x, k) {
|
|
848
937
|
await i(async () => {
|
|
849
|
-
const
|
|
850
|
-
paymentGateway:
|
|
938
|
+
const _ = {
|
|
939
|
+
paymentGateway: F.value,
|
|
851
940
|
config: k,
|
|
852
941
|
active: x
|
|
853
942
|
};
|
|
854
|
-
await
|
|
943
|
+
await A.upsert(u.restaurant._id, _), e.value = [...await A.get(u.restaurant._id)];
|
|
855
944
|
});
|
|
856
945
|
}
|
|
857
946
|
async function V(x) {
|
|
858
947
|
await i(async () => {
|
|
859
|
-
await
|
|
948
|
+
await A.delete(u.restaurant._id, x._id), e.value = [...await A.get(u.restaurant._id)];
|
|
860
949
|
});
|
|
861
950
|
}
|
|
862
|
-
const d =
|
|
951
|
+
const d = G(() => m.filter(
|
|
863
952
|
(x) => x.region.includes(t.currentCountry.value ?? U.F_COUNTRY.enum.MY)
|
|
864
953
|
));
|
|
865
|
-
function
|
|
954
|
+
function v() {
|
|
866
955
|
i(async () => {
|
|
867
|
-
e.value = await
|
|
956
|
+
e.value = await A.get(u.restaurant._id), d.value.length > 0 && (F.value = d.value[0].value);
|
|
868
957
|
});
|
|
869
958
|
}
|
|
870
|
-
|
|
871
|
-
const l =
|
|
959
|
+
N(v);
|
|
960
|
+
const l = G(() => {
|
|
872
961
|
var x;
|
|
873
|
-
return (x = m.find((k) => k.value ===
|
|
874
|
-
}),
|
|
962
|
+
return (x = m.find((k) => k.value === F.value)) == null ? void 0 : x.form;
|
|
963
|
+
}), y = G(() => e.value.find((x) => x.paymentGateway === F.value));
|
|
875
964
|
return (x, k) => {
|
|
876
|
-
var
|
|
877
|
-
const
|
|
878
|
-
return g(),
|
|
879
|
-
n(
|
|
880
|
-
o(
|
|
965
|
+
var C;
|
|
966
|
+
const _ = r("FmCircularProgress"), K = r("FmTabs");
|
|
967
|
+
return g(), R(L, null, [
|
|
968
|
+
n(c) ? (g(), R("div", Ve, [
|
|
969
|
+
o(_, { size: "xxl" })
|
|
881
970
|
])) : S("", !0),
|
|
882
|
-
o(
|
|
971
|
+
o(K, {
|
|
883
972
|
class: "mb-6",
|
|
884
|
-
"model-value": n(
|
|
885
|
-
"onUpdate:modelValue": k[0] || (k[0] = (j) => B(
|
|
886
|
-
items: d.value
|
|
973
|
+
"model-value": n(F),
|
|
974
|
+
"onUpdate:modelValue": k[0] || (k[0] = (j) => B(F) ? F.value = j : null),
|
|
975
|
+
items: d.value,
|
|
976
|
+
showMoreAt: 8
|
|
887
977
|
}, null, 8, ["model-value", "items"]),
|
|
888
|
-
n(
|
|
889
|
-
key: (
|
|
978
|
+
n(F) ? (g(), b($(l.value), Y({
|
|
979
|
+
key: (C = y.value) == null ? void 0 : C._id
|
|
890
980
|
}, {
|
|
891
|
-
gateway:
|
|
981
|
+
gateway: y.value,
|
|
892
982
|
onDelete: V,
|
|
893
983
|
onUpdate: s
|
|
894
984
|
}), null, 16)) : S("", !0)
|
|
@@ -904,43 +994,43 @@ const C = {
|
|
|
904
994
|
}
|
|
905
995
|
},
|
|
906
996
|
setup(a) {
|
|
907
|
-
const m = a, { tab: u } =
|
|
997
|
+
const m = a, { tab: u } = P({
|
|
908
998
|
tab: "payment-gateway"
|
|
909
|
-
}), { isLoading: t, startAsyncCall:
|
|
999
|
+
}), { isLoading: t, startAsyncCall: c } = O(!0), i = Q(), F = w(), e = [
|
|
910
1000
|
{
|
|
911
1001
|
label: "Payment Gateway",
|
|
912
1002
|
value: "payment-gateway",
|
|
913
1003
|
icon: "assured_workload",
|
|
914
|
-
render:
|
|
1004
|
+
render: be
|
|
915
1005
|
}
|
|
916
1006
|
];
|
|
917
1007
|
function s() {
|
|
918
|
-
|
|
919
|
-
|
|
1008
|
+
c(async () => {
|
|
1009
|
+
F.value = await W.readRestaurantById(m.restaurantId);
|
|
920
1010
|
});
|
|
921
1011
|
}
|
|
922
|
-
|
|
923
|
-
const V =
|
|
1012
|
+
N(s);
|
|
1013
|
+
const V = G(() => {
|
|
924
1014
|
var d;
|
|
925
|
-
return (d = e.find((
|
|
1015
|
+
return (d = e.find((v) => v.value === u.value)) == null ? void 0 : d.render;
|
|
926
1016
|
});
|
|
927
|
-
return (d,
|
|
928
|
-
var
|
|
1017
|
+
return (d, v) => {
|
|
1018
|
+
var y;
|
|
929
1019
|
const l = r("FmTabs");
|
|
930
|
-
return g(),
|
|
931
|
-
title: `Restaurant (${(
|
|
1020
|
+
return g(), b(z, {
|
|
1021
|
+
title: `Restaurant (${(y = F.value) == null ? void 0 : y._id})`,
|
|
932
1022
|
loading: n(t),
|
|
933
1023
|
onBack: n(i).back
|
|
934
1024
|
}, {
|
|
935
1025
|
default: I(() => [
|
|
936
1026
|
o(l, {
|
|
937
1027
|
"model-value": n(u),
|
|
938
|
-
"onUpdate:modelValue":
|
|
1028
|
+
"onUpdate:modelValue": v[0] || (v[0] = (x) => B(u) ? u.value = x : null),
|
|
939
1029
|
class: "mb-6",
|
|
940
1030
|
items: e
|
|
941
1031
|
}, null, 8, ["model-value"]),
|
|
942
|
-
n(u) &&
|
|
943
|
-
restaurant:
|
|
1032
|
+
n(u) && F.value ? (g(), b($(V.value), H(Y({ key: 0 }, {
|
|
1033
|
+
restaurant: F.value
|
|
944
1034
|
})), null, 16)) : S("", !0)
|
|
945
1035
|
]),
|
|
946
1036
|
_: 1
|