@feedmepos/mf-payment 1.2.17 → 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-9M0rbMxQ.js → PayoutAccount-BDTAihoB.js} +6 -6
- package/dist/{PayoutAccount-CLUo0Ulz.js → PayoutAccount-BlvYGFmj.js} +5 -5
- package/dist/{PayoutAccountSetting-CUSnIj68.js → PayoutAccountSetting-BZ_dtEzF.js} +3 -3
- package/dist/{Restaurant-CTLkTgah.js → Restaurant-IvTxzEEg.js} +4 -4
- package/dist/{RestaurantSetting-DujOQvSV.js → RestaurantSetting-CYkbYnib.js} +164 -159
- package/dist/{Settlement-CZb5S23k.js → Settlement-CgQP9j_O.js} +3 -3
- package/dist/{Settlement-BSf_6o6G.js → Settlement-Wbsxz3c3.js} +3 -3
- package/dist/{SettlementTransactions-BjEwIVuM.js → SettlementTransactions-CDrPZEsp.js} +3 -3
- package/dist/{SettlementTransactions-BRCNPglh.js → SettlementTransactions-TULTM98h.js} +3 -3
- package/dist/{Terminal-CvTDdi1v.js → Terminal-Kbwkii3s.js} +5 -5
- package/dist/{TerminalSetting-BcIGtwC6.js → TerminalSetting-APSwdYlY.js} +3 -3
- package/dist/{Transaction-3trhn_Zc.js → Transaction-CP5nDC93.js} +5 -5
- package/dist/{Transaction-BWkIXreZ.js → Transaction-DHBP5DBt.js} +7 -7
- package/dist/{TransactionOld-DLhqBVIl.js → TransactionOld-CZTpxwtD.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-Cup19PFp.js → TransactionTable.vue_vue_type_script_setup_true_lang-DQLCyJE1.js} +3 -3
- package/dist/{app-DAE_5nD5.js → app-DxcyIR9L.js} +330 -330
- package/dist/app.js +1 -1
- package/dist/{assets-B4vtlKYE.js → assets-BPRFwA_x.js} +2 -2
- package/dist/{grafana-DV8B0DQp.js → grafana-C6rWA8aV.js} +1 -1
- package/dist/{index-QlMsszeQ.js → index-BasV9ckt.js} +1 -1
- package/dist/{index-C8dj5wuz.js → index-CFcmWPUa.js} +2003 -2003
- package/dist/{index-BRBuCpqm.js → index-CV4mrBvQ.js} +1 -1
- package/dist/{index-CJPkFMrY.js → index-Cl3iKnij.js} +1 -1
- package/dist/{index-ux7UbRaU.js → index-CqxWxkx3.js} +1 -1
- package/dist/{index-CAkhGbuS.js → index-dd-QHobb.js} +1 -1
- package/dist/{index-BWggDsdo.js → index-pcbXwdTo.js} +2 -2
- package/dist/{index.vue_vue_type_script_setup_true_lang-BSJZOVa7.js → index.vue_vue_type_script_setup_true_lang-BcbAchQx.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-BwypT3rI.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 r, openBlock as F, createBlock as w, withCtx as U, createVNode as o, unref as
|
2
|
-
import { g as q, b as A, u as R, e as I } from "./index-
|
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
14
|
await A().get(
|
15
|
-
`restaurants/${
|
15
|
+
`restaurants/${l}/payment-gateway`
|
16
16
|
)
|
17
17
|
);
|
18
18
|
},
|
19
|
-
async upsert(
|
19
|
+
async upsert(l, m) {
|
20
20
|
return q(
|
21
21
|
await A().post(
|
22
|
-
`restaurants/${
|
23
|
-
{ data:
|
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
29
|
await A().delete(
|
30
|
-
`restaurants/${
|
30
|
+
`restaurants/${l}/payment-gateway/${m}`
|
31
31
|
)
|
32
32
|
);
|
33
33
|
},
|
34
|
-
async grabSync(
|
34
|
+
async grabSync(l) {
|
35
35
|
return q(
|
36
36
|
await A().post(
|
37
|
-
`restaurants/${
|
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 p,
|
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 = r("FmTextField"), V = r("FmSwitch"),
|
67
|
+
return (y, e) => {
|
68
|
+
const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
69
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
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,57 +149,57 @@ const G = {
|
|
149
149
|
required: !0
|
150
150
|
}
|
151
151
|
},
|
152
|
-
setup(
|
153
|
-
var p,
|
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 = r("FmTextField"), V = r("FmTextarea"),
|
162
|
-
return F(), w(
|
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
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
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
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
186
|
o(V, {
|
187
187
|
modelValue: t.value.clientPrivateKey,
|
188
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
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
204
|
o(v, {
|
205
205
|
type: "submit",
|
@@ -229,52 +229,52 @@ const G = {
|
|
229
229
|
required: !0
|
230
230
|
}
|
231
231
|
},
|
232
|
-
setup(
|
233
|
-
var p,
|
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 = r("FmTextField"), V = r("FmTextarea"),
|
241
|
-
return F(), w(
|
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
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
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
259
|
o(V, {
|
260
260
|
id: "ghl_pkey",
|
261
261
|
modelValue: t.value.privateKey,
|
262
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
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
279
|
o(v, {
|
280
280
|
type: "submit",
|
@@ -304,67 +304,67 @@ const G = {
|
|
304
304
|
required: !0
|
305
305
|
}
|
306
306
|
},
|
307
|
-
setup(
|
308
|
-
var p,
|
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 = r("FmTextField"), V = r("FmSwitch"),
|
316
|
+
return (y, e) => {
|
317
|
+
const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
318
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
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 V,
|
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
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 (v,
|
418
|
+
return (v, a) => {
|
419
419
|
const s = r("FmTextField"), x = r("FmButton"), C = r("FmTooltip"), T = r("FmSwitch"), k = r("FmForm");
|
420
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
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,46 +489,46 @@ const G = {
|
|
489
489
|
required: !0
|
490
490
|
}
|
491
491
|
},
|
492
|
-
setup(
|
493
|
-
var p,
|
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 = r("FmTextField"), V = r("FmSwitch"),
|
498
|
+
return (y, e) => {
|
499
|
+
const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
500
500
|
return F(), w(v, {
|
501
501
|
ref: "form",
|
502
502
|
class: "flex flex-col gap-16",
|
503
|
-
onValidationSuccess: e[3] || (e[3] = () =>
|
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
518
|
o(V, {
|
519
519
|
modelValue: u.value,
|
520
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
520
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => u.value = a),
|
521
521
|
label: "Is Active"
|
522
522
|
}, null, 8, ["modelValue"]),
|
523
523
|
D("div", se, [
|
524
|
-
|
524
|
+
l.gateway ? (F(), w(d, {
|
525
525
|
key: 0,
|
526
526
|
class: "flex-1",
|
527
527
|
variant: "secondary",
|
528
528
|
label: "Delete",
|
529
|
-
onclick: () =>
|
529
|
+
onclick: () => l.onDelete(l.gateway)
|
530
530
|
}, null, 8, ["onclick"])) : S("", !0),
|
531
|
-
o(
|
531
|
+
o(d, {
|
532
532
|
type: "submit",
|
533
533
|
class: "flex-1",
|
534
534
|
variant: "primary",
|
@@ -556,34 +556,39 @@ const G = {
|
|
556
556
|
required: !0
|
557
557
|
}
|
558
558
|
},
|
559
|
-
setup(
|
560
|
-
var
|
561
|
-
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) || {
|
562
562
|
merchantId: ""
|
563
563
|
});
|
564
|
-
return (
|
565
|
-
const
|
566
|
-
return F(), w(
|
564
|
+
return (y, e) => {
|
565
|
+
const i = r("FmTextField"), V = r("FmSwitch"), d = r("FmButton"), v = r("FmForm");
|
566
|
+
return F(), w(v, {
|
567
567
|
ref: "form",
|
568
568
|
class: "flex flex-col gap-16",
|
569
|
-
onValidationSuccess:
|
569
|
+
onValidationSuccess: e[2] || (e[2] = () => l.onUpdate(u.value, t.value))
|
570
570
|
}, {
|
571
571
|
default: U(() => [
|
572
|
-
o(
|
573
|
-
modelValue:
|
574
|
-
"onUpdate:modelValue":
|
572
|
+
o(i, {
|
573
|
+
modelValue: t.value.merchantId,
|
574
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.merchantId = a),
|
575
575
|
label: "Merchant ID",
|
576
|
-
rules:
|
576
|
+
rules: n(f)(n(g).string())
|
577
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"]),
|
578
583
|
D("div", me, [
|
579
|
-
|
584
|
+
l.gateway ? (F(), w(d, {
|
580
585
|
key: 0,
|
581
586
|
class: "flex-1",
|
582
587
|
variant: "secondary",
|
583
588
|
label: "Delete",
|
584
|
-
onclick: () =>
|
589
|
+
onclick: () => l.onDelete(l.gateway)
|
585
590
|
}, null, 8, ["onclick"])) : S("", !0),
|
586
|
-
o(
|
591
|
+
o(d, {
|
587
592
|
type: "submit",
|
588
593
|
class: "flex-1",
|
589
594
|
variant: "primary",
|
@@ -606,8 +611,8 @@ const G = {
|
|
606
611
|
required: !0
|
607
612
|
}
|
608
613
|
},
|
609
|
-
setup(
|
610
|
-
const
|
614
|
+
setup(l) {
|
615
|
+
const m = [
|
611
616
|
{
|
612
617
|
label: "Fiuu",
|
613
618
|
value: "RAZER_MERCHANT_SERVICE",
|
@@ -650,51 +655,51 @@ const G = {
|
|
650
655
|
form: ce,
|
651
656
|
region: [I.F_COUNTRY.enum.TH]
|
652
657
|
}
|
653
|
-
], u =
|
658
|
+
], u = l, t = j(), { isLoading: p, startAsyncCall: c } = R(), { activeGateway: y } = E({
|
654
659
|
activeGateway: ""
|
655
660
|
}), e = b([]);
|
656
661
|
async function i(s, x) {
|
657
|
-
await
|
662
|
+
await c(async () => {
|
658
663
|
const C = {
|
659
664
|
_id: "",
|
660
665
|
_rev: "",
|
661
|
-
paymentGateway:
|
666
|
+
paymentGateway: y.value,
|
662
667
|
config: x,
|
663
668
|
active: s
|
664
|
-
}, T = e.value.find((k) => k.paymentGateway ===
|
669
|
+
}, T = e.value.find((k) => k.paymentGateway === y.value);
|
665
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);
|
666
671
|
});
|
667
672
|
}
|
668
673
|
async function V(s) {
|
669
|
-
|
674
|
+
c(async () => {
|
670
675
|
await G.delete(u.restaurant._id, s._id), e.value = await G.get(u.restaurant._id);
|
671
676
|
});
|
672
677
|
}
|
673
|
-
const
|
678
|
+
const d = O(() => m.filter((s) => s.region.includes(t.currentCountry.value ?? I.F_COUNTRY.enum.MY)));
|
674
679
|
function v() {
|
675
|
-
|
676
|
-
e.value = await G.get(u.restaurant._id),
|
680
|
+
c(async () => {
|
681
|
+
e.value = await G.get(u.restaurant._id), d.value.length > 0 && (y.value = d.value[0].value);
|
677
682
|
});
|
678
683
|
}
|
679
684
|
$(v);
|
680
|
-
const
|
685
|
+
const a = O(() => {
|
681
686
|
var s;
|
682
|
-
return (s =
|
687
|
+
return (s = m.find((x) => x.value === y.value)) == null ? void 0 : s.form;
|
683
688
|
});
|
684
689
|
return (s, x) => {
|
685
690
|
const C = r("FmCircularProgress"), T = r("FmTabs");
|
686
691
|
return F(), N(L, null, [
|
687
|
-
|
692
|
+
n(p) ? (F(), N("div", de, [
|
688
693
|
o(C, { size: "xxl" })
|
689
694
|
])) : S("", !0),
|
690
695
|
o(T, {
|
691
696
|
class: "mb-6",
|
692
|
-
"model-value":
|
693
|
-
"onUpdate:modelValue": x[0] || (x[0] = (k) => B(
|
694
|
-
items:
|
697
|
+
"model-value": n(y),
|
698
|
+
"onUpdate:modelValue": x[0] || (x[0] = (k) => B(y) ? y.value = k : null),
|
699
|
+
items: d.value
|
695
700
|
}, null, 8, ["model-value", "items"]),
|
696
|
-
|
697
|
-
gateway: e.value.find((k) => k.paymentGateway ===
|
701
|
+
n(y) ? (F(), w(P(a.value), K(Y({ key: 1 }, {
|
702
|
+
gateway: e.value.find((k) => k.paymentGateway === n(y)),
|
698
703
|
onDelete: V,
|
699
704
|
onUpdate: i
|
700
705
|
})), null, 16)) : S("", !0)
|
@@ -709,10 +714,10 @@ const G = {
|
|
709
714
|
required: !0
|
710
715
|
}
|
711
716
|
},
|
712
|
-
setup(
|
713
|
-
const
|
717
|
+
setup(l) {
|
718
|
+
const m = l, { tab: u } = E({
|
714
719
|
tab: "payment-gateway"
|
715
|
-
}), { isLoading: t, startAsyncCall: p } = R(!0),
|
720
|
+
}), { isLoading: t, startAsyncCall: p } = R(!0), c = H(), y = b(), e = [
|
716
721
|
{
|
717
722
|
label: "Payment Gateway",
|
718
723
|
value: "payment-gateway",
|
@@ -722,31 +727,31 @@ const G = {
|
|
722
727
|
];
|
723
728
|
function i() {
|
724
729
|
p(async () => {
|
725
|
-
|
730
|
+
y.value = await J.readRestaurantById(m.restaurantId);
|
726
731
|
});
|
727
732
|
}
|
728
733
|
$(i);
|
729
734
|
const V = O(() => {
|
730
|
-
var
|
731
|
-
return (
|
735
|
+
var d;
|
736
|
+
return (d = e.find((v) => v.value === u.value)) == null ? void 0 : d.render;
|
732
737
|
});
|
733
|
-
return (
|
738
|
+
return (d, v) => {
|
734
739
|
var s;
|
735
|
-
const
|
740
|
+
const a = r("FmTabs");
|
736
741
|
return F(), w(z, {
|
737
|
-
title: `Restaurant (${(s =
|
738
|
-
loading:
|
739
|
-
onBack:
|
742
|
+
title: `Restaurant (${(s = y.value) == null ? void 0 : s._id})`,
|
743
|
+
loading: n(t),
|
744
|
+
onBack: n(c).back
|
740
745
|
}, {
|
741
746
|
default: U(() => [
|
742
|
-
o(
|
743
|
-
"model-value":
|
747
|
+
o(a, {
|
748
|
+
"model-value": n(u),
|
744
749
|
"onUpdate:modelValue": v[0] || (v[0] = (x) => B(u) ? u.value = x : null),
|
745
750
|
class: "mb-6",
|
746
751
|
items: e
|
747
752
|
}, null, 8, ["model-value"]),
|
748
|
-
|
749
|
-
restaurant:
|
753
|
+
n(u) && y.value ? (F(), w(P(V.value), K(Y({ key: 0 }, {
|
754
|
+
restaurant: y.value
|
750
755
|
})), null, 16)) : S("", !0)
|
751
756
|
]),
|
752
757
|
_: 1
|