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