@feedmepos/mf-payment 1.2.16 → 1.2.18
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-CvMczmij.js → PayoutAccount-BDTAihoB.js} +6 -6
- package/dist/{PayoutAccount-bF6506mg.js → PayoutAccount-BlvYGFmj.js} +5 -5
- package/dist/{PayoutAccountSetting-Di_Rohl7.js → PayoutAccountSetting-BZ_dtEzF.js} +3 -3
- package/dist/{Restaurant-BgfJ4kMh.js → Restaurant-IvTxzEEg.js} +4 -4
- package/dist/{RestaurantSetting-DLB_GBbu.js → RestaurantSetting-CYkbYnib.js} +210 -200
- package/dist/{Settlement-Mf5XJrXc.js → Settlement-CgQP9j_O.js} +3 -3
- package/dist/{Settlement-DqwyJFk-.js → Settlement-Wbsxz3c3.js} +3 -3
- package/dist/{SettlementTransactions-DvzbSvA9.js → SettlementTransactions-CDrPZEsp.js} +3 -3
- package/dist/{SettlementTransactions-6vkA8-4o.js → SettlementTransactions-TULTM98h.js} +3 -3
- package/dist/{Terminal-DC6alAxg.js → Terminal-Kbwkii3s.js} +5 -5
- package/dist/{TerminalSetting-BE9fFg4j.js → TerminalSetting-APSwdYlY.js} +3 -3
- package/dist/{Transaction-BXynWN9l.js → Transaction-CP5nDC93.js} +5 -5
- package/dist/{Transaction-BPVSJWdM.js → Transaction-DHBP5DBt.js} +7 -7
- package/dist/{TransactionOld-aJqwnMYJ.js → TransactionOld-CZTpxwtD.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-CX5eNJPx.js → TransactionTable.vue_vue_type_script_setup_true_lang-DQLCyJE1.js} +3 -3
- package/dist/{app-l69fYMyZ.js → app-DxcyIR9L.js} +360 -360
- package/dist/app.js +1 -1
- package/dist/{assets-CRA5IzdW.js → assets-BPRFwA_x.js} +2 -2
- package/dist/{grafana-AnUnO24M.js → grafana-C6rWA8aV.js} +1 -1
- package/dist/{index-k7EwR1PN.js → index-BasV9ckt.js} +1 -1
- package/dist/{index-DmI9Gt5s.js → index-CFcmWPUa.js} +2003 -2003
- package/dist/{index-8V-GavUD.js → index-CV4mrBvQ.js} +1 -1
- package/dist/{index-BrtYLN-t.js → index-Cl3iKnij.js} +1 -1
- package/dist/{index-DayhN_i6.js → index-CqxWxkx3.js} +1 -1
- package/dist/{index-Cer_6J8b.js → index-dd-QHobb.js} +1 -1
- package/dist/{index-34hQY02y.js → index-pcbXwdTo.js} +2 -2
- package/dist/{index.vue_vue_type_script_setup_true_lang-BZvBvJ7L.js → index.vue_vue_type_script_setup_true_lang-BcbAchQx.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-HJH4ybUc.js → payout-account-Bwm4cqox.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +5 -4
- package/package.json +1 -1
@@ -1,40 +1,40 @@
|
|
1
|
-
import { defineComponent as _, ref as b, resolveComponent as
|
2
|
-
import { g as q, b as
|
1
|
+
import { defineComponent as _, ref as b, resolveComponent as r, openBlock as F, createBlock as w, withCtx as U, createVNode as o, unref as n, createElementVNode as D, createCommentVNode as S, computed as O, onMounted as $, createElementBlock as N, Fragment as L, isRef as B, resolveDynamicComponent as P, normalizeProps as K, mergeProps as Y } from "vue";
|
2
|
+
import { g as q, b as A, u as R, e as I } from "./index-CFcmWPUa.js";
|
3
3
|
import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
4
4
|
import { useRouter as H } from "vue-router";
|
5
|
-
import { u as E } from "./index-
|
5
|
+
import { u as E } from "./index-dd-QHobb.js";
|
6
6
|
import { z as f, a as g } from "./validator-D5jtpt9A.js";
|
7
7
|
import { useCoreStore as j } 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 J } from "./index-
|
10
|
+
import { r as J } from "./index-BasV9ckt.js";
|
11
11
|
const G = {
|
12
|
-
async get(
|
12
|
+
async get(l) {
|
13
13
|
return q(
|
14
|
-
await
|
15
|
-
`restaurants/${
|
14
|
+
await A().get(
|
15
|
+
`restaurants/${l}/payment-gateway`
|
16
16
|
)
|
17
17
|
);
|
18
18
|
},
|
19
|
-
async upsert(
|
19
|
+
async upsert(l, m) {
|
20
20
|
return q(
|
21
|
-
await
|
22
|
-
`restaurants/${
|
23
|
-
{ data:
|
21
|
+
await A().post(
|
22
|
+
`restaurants/${l}/payment-gateway`,
|
23
|
+
{ data: m }
|
24
24
|
)
|
25
25
|
);
|
26
26
|
},
|
27
|
-
async delete(
|
27
|
+
async delete(l, m) {
|
28
28
|
return q(
|
29
|
-
await
|
30
|
-
`restaurants/${
|
29
|
+
await A().delete(
|
30
|
+
`restaurants/${l}/payment-gateway/${m}`
|
31
31
|
)
|
32
32
|
);
|
33
33
|
},
|
34
|
-
async grabSync(
|
34
|
+
async grabSync(l) {
|
35
35
|
return q(
|
36
|
-
await
|
37
|
-
`restaurants/${
|
36
|
+
await A().post(
|
37
|
+
`restaurants/${l}/payment-gateway/grab/sync`
|
38
38
|
)
|
39
39
|
);
|
40
40
|
}
|
@@ -54,9 +54,9 @@ const G = {
|
|
54
54
|
required: !0
|
55
55
|
}
|
56
56
|
},
|
57
|
-
setup(
|
58
|
-
var
|
59
|
-
const
|
57
|
+
setup(l) {
|
58
|
+
var p, c;
|
59
|
+
const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((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 =
|
69
|
-
return
|
67
|
+
return (y, e) => {
|
68
|
+
const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
69
|
+
return F(), w(v, {
|
70
70
|
ref: "form",
|
71
71
|
class: "flex flex-col gap-16",
|
72
|
-
onValidationSuccess: e[7] || (e[7] = () =>
|
72
|
+
onValidationSuccess: e[7] || (e[7] = () => l.onUpdate(u.value, t.value))
|
73
73
|
}, {
|
74
74
|
default: U(() => [
|
75
75
|
o(i, {
|
76
76
|
modelValue: t.value.merchantId,
|
77
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
77
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.merchantId = a),
|
78
78
|
label: "Merchant ID",
|
79
|
-
rules:
|
79
|
+
rules: n(f)(n(g).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] = (a) => t.value.uniqueId = a),
|
84
84
|
label: "Unique ID",
|
85
|
-
rules:
|
85
|
+
rules: n(f)(n(g).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] = (a) => t.value.verifyKey = a),
|
90
90
|
label: "Verify Key",
|
91
|
-
rules:
|
91
|
+
rules: n(f)(n(g).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] = (a) => t.value.secretKey = a),
|
96
96
|
label: "Secret Key",
|
97
|
-
rules:
|
97
|
+
rules: n(f)(n(g).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] = (a) => t.value.applicationCode = a),
|
102
102
|
label: "Application Code ( Offline )",
|
103
|
-
rules:
|
103
|
+
rules: n(f)(n(g).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] = (a) => t.value.offlineSecret = a),
|
108
108
|
label: "Offline Secret ( Offline )",
|
109
|
-
rules:
|
109
|
+
rules: n(f)(n(g).string())
|
110
110
|
}, null, 8, ["modelValue", "rules"]),
|
111
|
-
o(
|
111
|
+
o(V, {
|
112
112
|
modelValue: u.value,
|
113
|
-
"onUpdate:modelValue": e[6] || (e[6] = (
|
113
|
+
"onUpdate:modelValue": e[6] || (e[6] = (a) => u.value = a),
|
114
114
|
label: "Is Active"
|
115
115
|
}, null, 8, ["modelValue"]),
|
116
116
|
D("div", W, [
|
117
|
-
|
117
|
+
l.gateway ? (F(), w(d, {
|
118
118
|
key: 0,
|
119
119
|
class: "flex-1",
|
120
120
|
variant: "secondary",
|
121
121
|
label: "Delete",
|
122
|
-
onclick: () =>
|
122
|
+
onclick: () => l.onDelete(l.gateway)
|
123
123
|
}, null, 8, ["onclick"])) : S("", !0),
|
124
|
-
o(
|
124
|
+
o(d, {
|
125
125
|
type: "submit",
|
126
126
|
class: "flex-1",
|
127
127
|
variant: "primary",
|
@@ -149,59 +149,59 @@ const G = {
|
|
149
149
|
required: !0
|
150
150
|
}
|
151
151
|
},
|
152
|
-
setup(
|
153
|
-
var
|
154
|
-
const
|
152
|
+
setup(l) {
|
153
|
+
var p, c;
|
154
|
+
const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((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 =
|
162
|
-
return
|
160
|
+
return (y, e) => {
|
161
|
+
const i = r("FmTextField"), V = r("FmTextarea"), d = r("FmSwitch"), v = r("FmButton"), a = r("FmForm");
|
162
|
+
return F(), w(a, {
|
163
163
|
ref: "form",
|
164
164
|
class: "flex flex-col gap-16",
|
165
|
-
onValidationSuccess: e[5] || (e[5] = () =>
|
165
|
+
onValidationSuccess: e[5] || (e[5] = () => l.onUpdate(u.value, t.value))
|
166
166
|
}, {
|
167
167
|
default: U(() => [
|
168
168
|
o(i, {
|
169
169
|
modelValue: t.value.storeId,
|
170
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
170
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => t.value.storeId = s),
|
171
171
|
label: "Store ID",
|
172
|
-
rules:
|
172
|
+
rules: n(f)(n(g).string())
|
173
173
|
}, null, 8, ["modelValue", "rules"]),
|
174
174
|
o(i, {
|
175
175
|
modelValue: t.value.clientId,
|
176
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
176
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => t.value.clientId = s),
|
177
177
|
label: "Client ID",
|
178
|
-
rules:
|
178
|
+
rules: n(f)(n(g).string())
|
179
179
|
}, null, 8, ["modelValue", "rules"]),
|
180
180
|
o(i, {
|
181
181
|
modelValue: t.value.clientSecret,
|
182
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
182
|
+
"onUpdate:modelValue": e[2] || (e[2] = (s) => t.value.clientSecret = s),
|
183
183
|
label: "Client Secret",
|
184
|
-
rules:
|
184
|
+
rules: n(f)(n(g).string())
|
185
185
|
}, null, 8, ["modelValue", "rules"]),
|
186
|
-
o(
|
186
|
+
o(V, {
|
187
187
|
modelValue: t.value.clientPrivateKey,
|
188
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
188
|
+
"onUpdate:modelValue": e[3] || (e[3] = (s) => t.value.clientPrivateKey = s),
|
189
189
|
label: "Client Private Key"
|
190
190
|
}, null, 8, ["modelValue"]),
|
191
|
-
o(
|
191
|
+
o(d, {
|
192
192
|
modelValue: u.value,
|
193
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
193
|
+
"onUpdate:modelValue": e[4] || (e[4] = (s) => u.value = s),
|
194
194
|
label: "Is Active"
|
195
195
|
}, null, 8, ["modelValue"]),
|
196
196
|
D("div", h, [
|
197
|
-
|
197
|
+
l.gateway ? (F(), w(v, {
|
198
198
|
key: 0,
|
199
199
|
class: "flex-1",
|
200
200
|
variant: "secondary",
|
201
201
|
label: "Delete",
|
202
|
-
onclick: () =>
|
202
|
+
onclick: () => l.onDelete(l.gateway)
|
203
203
|
}, null, 8, ["onclick"])) : S("", !0),
|
204
|
-
o(
|
204
|
+
o(v, {
|
205
205
|
type: "submit",
|
206
206
|
class: "flex-1",
|
207
207
|
variant: "primary",
|
@@ -229,54 +229,54 @@ const G = {
|
|
229
229
|
required: !0
|
230
230
|
}
|
231
231
|
},
|
232
|
-
setup(
|
233
|
-
var
|
234
|
-
const
|
232
|
+
setup(l) {
|
233
|
+
var p, c;
|
234
|
+
const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((c = m.gateway) == null ? void 0 : c.config) || {
|
235
235
|
merchantId: "",
|
236
236
|
terminalId: "",
|
237
237
|
privateKey: ""
|
238
238
|
});
|
239
|
-
return (
|
240
|
-
const i =
|
241
|
-
return
|
239
|
+
return (y, e) => {
|
240
|
+
const i = r("FmTextField"), V = r("FmTextarea"), d = r("FmSwitch"), v = r("FmButton"), a = r("FmForm");
|
241
|
+
return F(), w(a, {
|
242
242
|
ref: "form",
|
243
243
|
class: "flex flex-col gap-16",
|
244
|
-
onValidationSuccess: e[4] || (e[4] = () =>
|
244
|
+
onValidationSuccess: e[4] || (e[4] = () => l.onUpdate(u.value, t.value))
|
245
245
|
}, {
|
246
246
|
default: U(() => [
|
247
247
|
o(i, {
|
248
248
|
modelValue: t.value.merchantId,
|
249
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
249
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => t.value.merchantId = s),
|
250
250
|
label: "Merchant ID",
|
251
|
-
rules:
|
251
|
+
rules: n(f)(n(g).string())
|
252
252
|
}, null, 8, ["modelValue", "rules"]),
|
253
253
|
o(i, {
|
254
254
|
modelValue: t.value.terminalId,
|
255
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
255
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => t.value.terminalId = s),
|
256
256
|
label: "Terminal ID",
|
257
|
-
rules:
|
257
|
+
rules: n(f)(n(g).string())
|
258
258
|
}, null, 8, ["modelValue", "rules"]),
|
259
|
-
o(
|
259
|
+
o(V, {
|
260
260
|
id: "ghl_pkey",
|
261
261
|
modelValue: t.value.privateKey,
|
262
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
262
|
+
"onUpdate:modelValue": e[2] || (e[2] = (s) => t.value.privateKey = s),
|
263
263
|
label: "Private Key",
|
264
|
-
rules:
|
264
|
+
rules: n(f)(n(g).string())
|
265
265
|
}, null, 8, ["modelValue", "rules"]),
|
266
|
-
o(
|
266
|
+
o(d, {
|
267
267
|
modelValue: u.value,
|
268
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
268
|
+
"onUpdate:modelValue": e[3] || (e[3] = (s) => u.value = s),
|
269
269
|
label: "Is Active"
|
270
270
|
}, null, 8, ["modelValue"]),
|
271
271
|
D("div", te, [
|
272
|
-
|
272
|
+
l.gateway ? (F(), w(v, {
|
273
273
|
key: 0,
|
274
274
|
class: "flex-1",
|
275
275
|
variant: "secondary",
|
276
276
|
label: "Delete",
|
277
|
-
onclick: () =>
|
277
|
+
onclick: () => l.onDelete(l.gateway)
|
278
278
|
}, null, 8, ["onclick"])) : S("", !0),
|
279
|
-
o(
|
279
|
+
o(v, {
|
280
280
|
type: "submit",
|
281
281
|
class: "flex-1",
|
282
282
|
variant: "primary",
|
@@ -304,67 +304,67 @@ const G = {
|
|
304
304
|
required: !0
|
305
305
|
}
|
306
306
|
},
|
307
|
-
setup(
|
308
|
-
var
|
309
|
-
const
|
307
|
+
setup(l) {
|
308
|
+
var p, c;
|
309
|
+
const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((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 =
|
318
|
-
return
|
316
|
+
return (y, e) => {
|
317
|
+
const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
318
|
+
return F(), w(v, {
|
319
319
|
ref: "form",
|
320
320
|
class: "flex flex-col gap-16",
|
321
|
-
onValidationSuccess: e[6] || (e[6] = () =>
|
321
|
+
onValidationSuccess: e[6] || (e[6] = () => l.onUpdate(u.value, t.value))
|
322
322
|
}, {
|
323
323
|
default: U(() => [
|
324
324
|
o(i, {
|
325
325
|
modelValue: t.value.merchantId,
|
326
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
326
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.merchantId = a),
|
327
327
|
label: "Merchant ID",
|
328
|
-
rules:
|
328
|
+
rules: n(f)(n(g).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] = (a) => t.value.merchantName = a),
|
333
333
|
label: "Merchant Name",
|
334
|
-
rules:
|
334
|
+
rules: n(f)(n(g).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] = (a) => t.value.merchantCategoryCode = a),
|
339
339
|
label: "Merchant MCC",
|
340
|
-
rules:
|
340
|
+
rules: n(f)(n(g).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] = (a) => t.value.storeID = a),
|
345
345
|
label: "Store ID",
|
346
|
-
rules:
|
346
|
+
rules: n(f)(n(g).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] = (a) => t.value.storeName = a),
|
351
351
|
label: "Store Name",
|
352
|
-
rules:
|
352
|
+
rules: n(f)(n(g).string())
|
353
353
|
}, null, 8, ["modelValue", "rules"]),
|
354
|
-
o(
|
354
|
+
o(V, {
|
355
355
|
modelValue: u.value,
|
356
|
-
"onUpdate:modelValue": e[5] || (e[5] = (
|
356
|
+
"onUpdate:modelValue": e[5] || (e[5] = (a) => u.value = a),
|
357
357
|
label: "Is Active"
|
358
358
|
}, null, 8, ["modelValue"]),
|
359
359
|
D("div", le, [
|
360
|
-
|
360
|
+
l.gateway ? (F(), w(d, {
|
361
361
|
key: 0,
|
362
362
|
class: "flex-1",
|
363
363
|
variant: "secondary",
|
364
364
|
label: "Delete",
|
365
|
-
onclick: () =>
|
365
|
+
onclick: () => l.onDelete(l.gateway)
|
366
366
|
}, null, 8, ["onclick"])) : S("", !0),
|
367
|
-
o(
|
367
|
+
o(d, {
|
368
368
|
type: "submit",
|
369
369
|
class: "flex-1",
|
370
370
|
variant: "primary",
|
@@ -392,43 +392,43 @@ const G = {
|
|
392
392
|
required: !0
|
393
393
|
}
|
394
394
|
},
|
395
|
-
setup(
|
396
|
-
var
|
397
|
-
const
|
395
|
+
setup(l) {
|
396
|
+
var V, d;
|
397
|
+
const m = Z(), { isLoading: u, startAsyncCall: t } = R(), p = j(), c = l, y = b(((V = c.gateway) == null ? void 0 : V.active) ?? !1), e = b(((d = c.gateway) == null ? void 0 : d.config) || {
|
398
398
|
merchantId: ""
|
399
399
|
});
|
400
400
|
async function i() {
|
401
401
|
t(async () => {
|
402
|
-
var
|
402
|
+
var v;
|
403
403
|
try {
|
404
|
-
const { merchantID:
|
405
|
-
e.value.merchantId =
|
404
|
+
const { merchantID: a } = await G.grabSync(((v = p.currentRestaurant.value) == null ? void 0 : v._id) ?? "");
|
405
|
+
e.value.merchantId = a, y.value = !0, m.open({
|
406
406
|
type: "success",
|
407
407
|
title: "Grab Setting sync succesfully, you will still need to save the changes."
|
408
408
|
});
|
409
|
-
} catch (
|
410
|
-
|
409
|
+
} catch (a) {
|
410
|
+
m.open({
|
411
411
|
type: "error",
|
412
412
|
title: "Error occurs when sync ordering settings",
|
413
|
-
message: Q(
|
413
|
+
message: Q(a)
|
414
414
|
});
|
415
415
|
}
|
416
416
|
});
|
417
417
|
}
|
418
|
-
return (
|
419
|
-
const
|
420
|
-
return
|
418
|
+
return (v, a) => {
|
419
|
+
const s = r("FmTextField"), x = r("FmButton"), C = r("FmTooltip"), T = r("FmSwitch"), k = r("FmForm");
|
420
|
+
return F(), w(k, {
|
421
421
|
ref: "form",
|
422
422
|
class: "flex flex-col gap-16",
|
423
|
-
onValidationSuccess:
|
423
|
+
onValidationSuccess: a[2] || (a[2] = () => l.onUpdate(y.value, e.value))
|
424
424
|
}, {
|
425
425
|
default: U(() => [
|
426
426
|
D("div", oe, [
|
427
|
-
o(
|
427
|
+
o(s, {
|
428
428
|
modelValue: e.value.merchantId,
|
429
|
-
"onUpdate:modelValue":
|
429
|
+
"onUpdate:modelValue": a[0] || (a[0] = (M) => e.value.merchantId = M),
|
430
430
|
label: "Merchant ID",
|
431
|
-
rules:
|
431
|
+
rules: n(f)(n(g).string())
|
432
432
|
}, null, 8, ["modelValue", "rules"]),
|
433
433
|
o(C, {
|
434
434
|
variant: "plain",
|
@@ -441,7 +441,7 @@ const G = {
|
|
441
441
|
type: "button",
|
442
442
|
variant: "primary",
|
443
443
|
icon: "sync",
|
444
|
-
loading:
|
444
|
+
loading: n(u),
|
445
445
|
onclick: () => i()
|
446
446
|
}, null, 8, ["loading", "onclick"])
|
447
447
|
]),
|
@@ -449,17 +449,17 @@ const G = {
|
|
449
449
|
})
|
450
450
|
]),
|
451
451
|
o(T, {
|
452
|
-
modelValue:
|
453
|
-
"onUpdate:modelValue":
|
452
|
+
modelValue: y.value,
|
453
|
+
"onUpdate:modelValue": a[1] || (a[1] = (M) => y.value = M),
|
454
454
|
label: "Is Active"
|
455
455
|
}, null, 8, ["modelValue"]),
|
456
456
|
D("div", ue, [
|
457
|
-
|
457
|
+
l.gateway ? (F(), w(x, {
|
458
458
|
key: 0,
|
459
459
|
class: "flex-1",
|
460
460
|
variant: "secondary",
|
461
461
|
label: "Delete",
|
462
|
-
onclick: () =>
|
462
|
+
onclick: () => l.onDelete(l.gateway)
|
463
463
|
}, null, 8, ["onclick"])) : S("", !0),
|
464
464
|
o(x, {
|
465
465
|
type: "submit",
|
@@ -489,41 +489,46 @@ const G = {
|
|
489
489
|
required: !0
|
490
490
|
}
|
491
491
|
},
|
492
|
-
setup(
|
493
|
-
var
|
494
|
-
const
|
492
|
+
setup(l) {
|
493
|
+
var p, c;
|
494
|
+
const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((c = m.gateway) == null ? void 0 : c.config) || {
|
495
495
|
mid: "",
|
496
496
|
tid: ""
|
497
497
|
});
|
498
|
-
return (
|
499
|
-
const i =
|
500
|
-
return
|
498
|
+
return (y, e) => {
|
499
|
+
const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
500
|
+
return F(), w(v, {
|
501
501
|
ref: "form",
|
502
502
|
class: "flex flex-col gap-16",
|
503
|
-
onValidationSuccess: e[
|
503
|
+
onValidationSuccess: e[3] || (e[3] = () => l.onUpdate(u.value, t.value))
|
504
504
|
}, {
|
505
505
|
default: U(() => [
|
506
506
|
o(i, {
|
507
507
|
modelValue: t.value.mid,
|
508
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
508
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.mid = a),
|
509
509
|
label: "MID",
|
510
|
-
rules:
|
510
|
+
rules: n(f)(n(g).string())
|
511
511
|
}, null, 8, ["modelValue", "rules"]),
|
512
512
|
o(i, {
|
513
513
|
modelValue: t.value.tid,
|
514
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
514
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => t.value.tid = a),
|
515
515
|
label: "TID",
|
516
|
-
rules:
|
516
|
+
rules: n(f)(n(g).string())
|
517
517
|
}, null, 8, ["modelValue", "rules"]),
|
518
|
+
o(V, {
|
519
|
+
modelValue: u.value,
|
520
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => u.value = a),
|
521
|
+
label: "Is Active"
|
522
|
+
}, null, 8, ["modelValue"]),
|
518
523
|
D("div", se, [
|
519
|
-
|
524
|
+
l.gateway ? (F(), w(d, {
|
520
525
|
key: 0,
|
521
526
|
class: "flex-1",
|
522
527
|
variant: "secondary",
|
523
528
|
label: "Delete",
|
524
|
-
onclick: () =>
|
529
|
+
onclick: () => l.onDelete(l.gateway)
|
525
530
|
}, null, 8, ["onclick"])) : S("", !0),
|
526
|
-
o(
|
531
|
+
o(d, {
|
527
532
|
type: "submit",
|
528
533
|
class: "flex-1",
|
529
534
|
variant: "primary",
|
@@ -551,34 +556,39 @@ const G = {
|
|
551
556
|
required: !0
|
552
557
|
}
|
553
558
|
},
|
554
|
-
setup(
|
555
|
-
var
|
556
|
-
const u = b(((
|
559
|
+
setup(l) {
|
560
|
+
var p, c;
|
561
|
+
const m = l, u = b(((p = m.gateway) == null ? void 0 : p.active) ?? !1), t = b(((c = m.gateway) == null ? void 0 : c.config) || {
|
557
562
|
merchantId: ""
|
558
563
|
});
|
559
|
-
return (
|
560
|
-
const
|
561
|
-
return
|
564
|
+
return (y, e) => {
|
565
|
+
const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
566
|
+
return F(), w(v, {
|
562
567
|
ref: "form",
|
563
568
|
class: "flex flex-col gap-16",
|
564
|
-
onValidationSuccess:
|
569
|
+
onValidationSuccess: e[2] || (e[2] = () => l.onUpdate(u.value, t.value))
|
565
570
|
}, {
|
566
571
|
default: U(() => [
|
567
|
-
o(
|
568
|
-
modelValue:
|
569
|
-
"onUpdate:modelValue":
|
572
|
+
o(i, {
|
573
|
+
modelValue: t.value.merchantId,
|
574
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.merchantId = a),
|
570
575
|
label: "Merchant ID",
|
571
|
-
rules:
|
576
|
+
rules: n(f)(n(g).string())
|
572
577
|
}, null, 8, ["modelValue", "rules"]),
|
578
|
+
o(V, {
|
579
|
+
modelValue: u.value,
|
580
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => u.value = a),
|
581
|
+
label: "Is Active"
|
582
|
+
}, null, 8, ["modelValue"]),
|
573
583
|
D("div", me, [
|
574
|
-
|
584
|
+
l.gateway ? (F(), w(d, {
|
575
585
|
key: 0,
|
576
586
|
class: "flex-1",
|
577
587
|
variant: "secondary",
|
578
588
|
label: "Delete",
|
579
|
-
onclick: () =>
|
589
|
+
onclick: () => l.onDelete(l.gateway)
|
580
590
|
}, null, 8, ["onclick"])) : S("", !0),
|
581
|
-
o(
|
591
|
+
o(d, {
|
582
592
|
type: "submit",
|
583
593
|
class: "flex-1",
|
584
594
|
variant: "primary",
|
@@ -601,8 +611,8 @@ const G = {
|
|
601
611
|
required: !0
|
602
612
|
}
|
603
613
|
},
|
604
|
-
setup(
|
605
|
-
const
|
614
|
+
setup(l) {
|
615
|
+
const m = [
|
606
616
|
{
|
607
617
|
label: "Fiuu",
|
608
618
|
value: "RAZER_MERCHANT_SERVICE",
|
@@ -645,52 +655,52 @@ const G = {
|
|
645
655
|
form: ce,
|
646
656
|
region: [I.F_COUNTRY.enum.TH]
|
647
657
|
}
|
648
|
-
], u =
|
658
|
+
], u = l, t = j(), { isLoading: p, startAsyncCall: c } = R(), { activeGateway: y } = E({
|
649
659
|
activeGateway: ""
|
650
660
|
}), e = b([]);
|
651
|
-
async function i(
|
652
|
-
await
|
661
|
+
async function i(s, x) {
|
662
|
+
await c(async () => {
|
653
663
|
const C = {
|
654
664
|
_id: "",
|
655
665
|
_rev: "",
|
656
|
-
paymentGateway:
|
666
|
+
paymentGateway: y.value,
|
657
667
|
config: x,
|
658
|
-
active:
|
659
|
-
}, T = e.value.find((k) => k.paymentGateway ===
|
668
|
+
active: s
|
669
|
+
}, T = e.value.find((k) => k.paymentGateway === y.value);
|
660
670
|
T && (C._id = T._id, C._rev = T._rev), await G.upsert(u.restaurant._id, C), e.value = await G.get(u.restaurant._id);
|
661
671
|
});
|
662
672
|
}
|
663
|
-
async function
|
664
|
-
|
665
|
-
await G.delete(u.restaurant._id,
|
673
|
+
async function V(s) {
|
674
|
+
c(async () => {
|
675
|
+
await G.delete(u.restaurant._id, s._id), e.value = await G.get(u.restaurant._id);
|
666
676
|
});
|
667
677
|
}
|
668
|
-
const
|
669
|
-
function
|
670
|
-
|
671
|
-
e.value = await G.get(u.restaurant._id),
|
678
|
+
const d = O(() => m.filter((s) => s.region.includes(t.currentCountry.value ?? I.F_COUNTRY.enum.MY)));
|
679
|
+
function v() {
|
680
|
+
c(async () => {
|
681
|
+
e.value = await G.get(u.restaurant._id), d.value.length > 0 && (y.value = d.value[0].value);
|
672
682
|
});
|
673
683
|
}
|
674
|
-
$(
|
675
|
-
const
|
676
|
-
var
|
677
|
-
return (
|
684
|
+
$(v);
|
685
|
+
const a = O(() => {
|
686
|
+
var s;
|
687
|
+
return (s = m.find((x) => x.value === y.value)) == null ? void 0 : s.form;
|
678
688
|
});
|
679
|
-
return (
|
680
|
-
const C =
|
681
|
-
return
|
682
|
-
|
689
|
+
return (s, x) => {
|
690
|
+
const C = r("FmCircularProgress"), T = r("FmTabs");
|
691
|
+
return F(), N(L, null, [
|
692
|
+
n(p) ? (F(), N("div", de, [
|
683
693
|
o(C, { size: "xxl" })
|
684
694
|
])) : S("", !0),
|
685
695
|
o(T, {
|
686
696
|
class: "mb-6",
|
687
|
-
"model-value":
|
688
|
-
"onUpdate:modelValue": x[0] || (x[0] = (k) => B(
|
689
|
-
items:
|
697
|
+
"model-value": n(y),
|
698
|
+
"onUpdate:modelValue": x[0] || (x[0] = (k) => B(y) ? y.value = k : null),
|
699
|
+
items: d.value
|
690
700
|
}, null, 8, ["model-value", "items"]),
|
691
|
-
|
692
|
-
gateway: e.value.find((k) => k.paymentGateway ===
|
693
|
-
onDelete:
|
701
|
+
n(y) ? (F(), w(P(a.value), K(Y({ key: 1 }, {
|
702
|
+
gateway: e.value.find((k) => k.paymentGateway === n(y)),
|
703
|
+
onDelete: V,
|
694
704
|
onUpdate: i
|
695
705
|
})), null, 16)) : S("", !0)
|
696
706
|
], 64);
|
@@ -704,10 +714,10 @@ const G = {
|
|
704
714
|
required: !0
|
705
715
|
}
|
706
716
|
},
|
707
|
-
setup(
|
708
|
-
const
|
717
|
+
setup(l) {
|
718
|
+
const m = l, { tab: u } = E({
|
709
719
|
tab: "payment-gateway"
|
710
|
-
}), { isLoading: t, startAsyncCall:
|
720
|
+
}), { isLoading: t, startAsyncCall: p } = R(!0), c = H(), y = b(), e = [
|
711
721
|
{
|
712
722
|
label: "Payment Gateway",
|
713
723
|
value: "payment-gateway",
|
@@ -716,32 +726,32 @@ const G = {
|
|
716
726
|
}
|
717
727
|
];
|
718
728
|
function i() {
|
719
|
-
|
720
|
-
|
729
|
+
p(async () => {
|
730
|
+
y.value = await J.readRestaurantById(m.restaurantId);
|
721
731
|
});
|
722
732
|
}
|
723
733
|
$(i);
|
724
|
-
const
|
725
|
-
var
|
726
|
-
return (
|
734
|
+
const V = O(() => {
|
735
|
+
var d;
|
736
|
+
return (d = e.find((v) => v.value === u.value)) == null ? void 0 : d.render;
|
727
737
|
});
|
728
|
-
return (
|
729
|
-
var
|
730
|
-
const
|
731
|
-
return
|
732
|
-
title: `Restaurant (${(
|
733
|
-
loading:
|
734
|
-
onBack:
|
738
|
+
return (d, v) => {
|
739
|
+
var s;
|
740
|
+
const a = r("FmTabs");
|
741
|
+
return F(), w(z, {
|
742
|
+
title: `Restaurant (${(s = y.value) == null ? void 0 : s._id})`,
|
743
|
+
loading: n(t),
|
744
|
+
onBack: n(c).back
|
735
745
|
}, {
|
736
746
|
default: U(() => [
|
737
|
-
o(
|
738
|
-
"model-value":
|
739
|
-
"onUpdate:modelValue":
|
747
|
+
o(a, {
|
748
|
+
"model-value": n(u),
|
749
|
+
"onUpdate:modelValue": v[0] || (v[0] = (x) => B(u) ? u.value = x : null),
|
740
750
|
class: "mb-6",
|
741
751
|
items: e
|
742
752
|
}, null, 8, ["model-value"]),
|
743
|
-
|
744
|
-
restaurant:
|
753
|
+
n(u) && y.value ? (F(), w(P(V.value), K(Y({ key: 0 }, {
|
754
|
+
restaurant: y.value
|
745
755
|
})), null, 16)) : S("", !0)
|
746
756
|
]),
|
747
757
|
_: 1
|