@feedmepos/mf-payment 1.3.3 → 1.3.5
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/OnboardForm-DRfkDYKa.js +752 -0
- package/dist/{OnboardForm-C5nUtZO_.js → OnboardForm-DkQnOOE4.js} +4 -4
- package/dist/{OnboardSubmission-8tkTVlht.js → OnboardSubmission-CiSHMUCb.js} +5 -5
- package/dist/{OnboardSubmission-xPnZcrmA.js → OnboardSubmission-caChZGCD.js} +2 -2
- package/dist/{PayoutAccount-tO_wZfTt.js → PayoutAccount-DDJZLp5n.js} +5 -5
- package/dist/{PayoutAccount-CSOKcgIP.js → PayoutAccount-jRFibLN6.js} +5 -5
- package/dist/{PayoutAccountSetting-DfGw639O.js → PayoutAccountSetting-DcuumyW4.js} +3 -3
- package/dist/{Restaurant-BdDDrAsq.js → Restaurant-C8lLkTRk.js} +4 -4
- package/dist/RestaurantSetting-IW965gti.js +764 -0
- package/dist/{Settlement-Cfhafc8m.js → Settlement-BQPbR8m-.js} +3 -3
- package/dist/{Settlement-8RYgvfzf.js → Settlement-D18xsXRd.js} +3 -3
- package/dist/{SettlementTransactions-Bb54OlAj.js → SettlementTransactions-BQmJ_nZS.js} +3 -3
- package/dist/{SettlementTransactions-DrA8PAyd.js → SettlementTransactions-DhKWeuuo.js} +3 -3
- package/dist/{Status.vue_vue_type_script_setup_true_lang-BumKpo4s.js → Status.vue_vue_type_script_setup_true_lang-Cp3akQew.js} +1 -1
- package/dist/{Terminal-DoTJw-hl.js → Terminal-tg7f8Wue.js} +5 -5
- package/dist/TerminalSetting-B5VdUivg.js +1080 -0
- package/dist/{Transaction-C5DXkIjl.js → Transaction-CQF5lDAd.js} +5 -5
- package/dist/{Transaction-qKhaX4qv.js → Transaction-DFxizbZ7.js} +6 -6
- package/dist/{TransactionOld-DAoWcstb.js → TransactionOld-uFMnygUK.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-C5cEFUs2.js → TransactionTable.vue_vue_type_script_setup_true_lang-CFr-DduC.js} +3 -3
- package/dist/api/payment-gateway/index.d.ts +1 -3
- package/dist/{app-T_M9ajBn.js → app-JzZOIyxw.js} +22 -22
- package/dist/app.js +1 -1
- package/dist/{assets-C_H0OeWB.js → assets-R7Pf2tcC.js} +1 -1
- package/dist/{grafana-BK_sYlee.js → grafana-DLVFFmRO.js} +1 -1
- package/dist/{index-jsEyizHG.js → index-BRcPRBkm.js} +1 -1
- package/dist/{index-D4_YGL4B.js → index-BUXnw6w4.js} +1 -1
- package/dist/{index-BjqwgRyA.js → index-C4T0m6DM.js} +1 -1
- package/dist/{index-sgLhHJjg.js → index-C5B1WFHO.js} +2 -2
- package/dist/index-C_4l0JZj.js +58590 -0
- package/dist/{index-GsQWAnBk.js → index-Cpsfcvcu.js} +1 -1
- package/dist/{index-Dogc22BO.js → index-D7GUIvIW.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CIxp2j06.js → index.vue_vue_type_script_setup_true_lang-BIGL3hMd.js} +1 -1
- package/dist/package.json +3 -3
- package/dist/{payout-account-59dfXB3Z.js → payout-account-BBRdCd9Q.js} +3 -3
- package/dist/{plugins-BTjb8IwB.js → plugins-DTPqcD09.js} +1 -1
- package/dist/stores/payoutAccount.d.ts +16 -16
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +24 -24
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +20 -20
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +20 -20
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +20 -20
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +92 -8
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +174 -0
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +92 -8
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +174 -0
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +92 -8
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +92 -8
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +174 -0
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +174 -0
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +174 -0
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +174 -0
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +174 -0
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +174 -0
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +174 -0
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +92 -8
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +32 -32
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +4 -4
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +2 -2
- package/package.json +3 -3
- package/dist/OnboardForm-DTRmaj9L.js +0 -708
- package/dist/RestaurantSetting-C-16ifI3.js +0 -834
- package/dist/TerminalSetting-DpePQHKW.js +0 -572
- package/dist/index-eNSd1RuW.js +0 -57995
- package/dist/views/admin/restaurant/tabs/LocalIntegration.vue.d.ts +0 -803
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +0 -90
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +0 -92
@@ -1,572 +0,0 @@
|
|
1
|
-
import { defineComponent as S, openBlock as f, createElementBlock as V, Fragment as D, createElementVNode as F, createTextVNode as M, toDisplayString as R, toRef as K, ref as w, watch as P, onMounted as G, computed as q, resolveComponent as y, unref as k, createVNode as v, createBlock as T, withCtx as B, createCommentVNode as x, isRef as L, resolveDynamicComponent as h, normalizeProps as j, mergeProps as A } from "vue";
|
2
|
-
import { u as Y, e as _ } from "./index-eNSd1RuW.js";
|
3
|
-
import { useRouter as Q } from "vue-router";
|
4
|
-
import { t as N } from "./index-Dogc22BO.js";
|
5
|
-
import { _ as W } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
6
|
-
import { u as E } from "./index-BjqwgRyA.js";
|
7
|
-
import { useSnackbar as z } from "@feedmepos/ui-library";
|
8
|
-
import { u as X } from "./error-K1CakhA9.js";
|
9
|
-
import { z as Z, a as ee } from "./validator-D5jtpt9A.js";
|
10
|
-
import { useCoreStore as H } from "@feedmepos/mf-common";
|
11
|
-
const ae = /* @__PURE__ */ S({
|
12
|
-
__name: "Information",
|
13
|
-
props: {
|
14
|
-
terminal: {
|
15
|
-
type: Object,
|
16
|
-
required: !0
|
17
|
-
}
|
18
|
-
},
|
19
|
-
setup(I) {
|
20
|
-
return (c, e) => (f(), V(D, null, [
|
21
|
-
e[0] || (e[0] = F("b", null, "Name", -1)),
|
22
|
-
M(": " + R(I.terminal.name), 1),
|
23
|
-
e[1] || (e[1] = F("br", null, null, -1)),
|
24
|
-
e[2] || (e[2] = F("b", null, "Status", -1)),
|
25
|
-
M(": " + R(I.terminal.status), 1),
|
26
|
-
e[3] || (e[3] = F("br", null, null, -1)),
|
27
|
-
e[4] || (e[4] = F("b", null, "Device ID", -1)),
|
28
|
-
M(": " + R(I.terminal.deviceId ?? "-"), 1),
|
29
|
-
e[5] || (e[5] = F("br", null, null, -1)),
|
30
|
-
e[6] || (e[6] = F("b", null, "Device Type", -1)),
|
31
|
-
M(": " + R(I.terminal.deviceType ?? "-"), 1),
|
32
|
-
e[7] || (e[7] = F("br", null, null, -1))
|
33
|
-
], 64));
|
34
|
-
}
|
35
|
-
}), te = {
|
36
|
-
key: 0,
|
37
|
-
class: "flex items-center justify-center min-h-[80vh]"
|
38
|
-
}, ne = { class: "flex mt-6 space-x-6" }, le = /* @__PURE__ */ S({
|
39
|
-
__name: "TerminalGateway",
|
40
|
-
props: {
|
41
|
-
terminal: {
|
42
|
-
type: Object,
|
43
|
-
required: !0
|
44
|
-
},
|
45
|
-
onUpdate: {
|
46
|
-
type: Function,
|
47
|
-
required: !0
|
48
|
-
}
|
49
|
-
},
|
50
|
-
setup(I) {
|
51
|
-
const { isLoading: c, startAsyncCall: e } = Y(), p = I, a = K(() => p.terminal), i = w(), t = w(), r = w(-1), o = w({
|
52
|
-
terminalId: ""
|
53
|
-
}), d = () => {
|
54
|
-
o.value.terminalId = "", r.value = -1;
|
55
|
-
}, u = () => {
|
56
|
-
if (e(async () => {
|
57
|
-
i.value = await N.getRestaurantTerminals(p.terminal.referenceId);
|
58
|
-
}), !p.terminal.ecrs)
|
59
|
-
return d();
|
60
|
-
const n = p.terminal.ecrs.findIndex((s) => s && s.gateway && s.gateway === "FeedMe");
|
61
|
-
if (n === -1)
|
62
|
-
return d();
|
63
|
-
r.value = n;
|
64
|
-
const l = p.terminal.ecrs.at(n);
|
65
|
-
l.gateway === "FeedMe" && l.config && (o.value = {
|
66
|
-
terminalId: l.config.terminalId
|
67
|
-
});
|
68
|
-
};
|
69
|
-
P(a, u), G(u);
|
70
|
-
const g = q(() => (i.value ?? []).map((n) => ({
|
71
|
-
label: n.name ?? n._id,
|
72
|
-
value: n._id
|
73
|
-
})));
|
74
|
-
async function m(n) {
|
75
|
-
var l;
|
76
|
-
(l = p.terminal.ecrs) == null || l.splice(n, 1), p.onUpdate(p.terminal);
|
77
|
-
}
|
78
|
-
return (n, l) => {
|
79
|
-
const s = y("FmCircularProgress"), C = y("FmSelect"), U = y("FmButton"), O = y("FmForm");
|
80
|
-
return k(c) ? (f(), V("div", te, [
|
81
|
-
v(s, { size: "xxl" })
|
82
|
-
])) : (f(), T(O, {
|
83
|
-
key: 1,
|
84
|
-
ref: t.value,
|
85
|
-
class: "flex flex-col gap-16 w-[500px]",
|
86
|
-
onValidationSuccess: l[1] || (l[1] = () => {
|
87
|
-
r.value > -1 ? a.value.ecrs[r.value] = { gateway: "FeedMe", config: o.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "FeedMe", config: o.value })), p.onUpdate(a.value);
|
88
|
-
})
|
89
|
-
}, {
|
90
|
-
default: B(() => [
|
91
|
-
v(C, {
|
92
|
-
modelValue: o.value.terminalId,
|
93
|
-
"onUpdate:modelValue": l[0] || (l[0] = (b) => o.value.terminalId = b),
|
94
|
-
label: "Terminal ID",
|
95
|
-
items: g.value,
|
96
|
-
rules: k(Z)(k(ee).string())
|
97
|
-
}, null, 8, ["modelValue", "items", "rules"]),
|
98
|
-
F("div", ne, [
|
99
|
-
r.value > -1 ? (f(), T(U, {
|
100
|
-
key: 0,
|
101
|
-
class: "flex-1",
|
102
|
-
variant: "secondary",
|
103
|
-
label: "Delete",
|
104
|
-
onclick: () => m(r.value)
|
105
|
-
}, null, 8, ["onclick"])) : x("", !0),
|
106
|
-
v(U, {
|
107
|
-
type: "submit",
|
108
|
-
class: "flex-1",
|
109
|
-
variant: "primary",
|
110
|
-
label: "Save"
|
111
|
-
})
|
112
|
-
])
|
113
|
-
]),
|
114
|
-
_: 1
|
115
|
-
}, 512));
|
116
|
-
};
|
117
|
-
}
|
118
|
-
}), oe = { class: "flex mt-6 space-x-6" }, re = /* @__PURE__ */ S({
|
119
|
-
__name: "GhlGateway",
|
120
|
-
props: {
|
121
|
-
terminal: {
|
122
|
-
type: Object,
|
123
|
-
required: !0
|
124
|
-
},
|
125
|
-
onUpdate: {
|
126
|
-
type: Function,
|
127
|
-
required: !0
|
128
|
-
}
|
129
|
-
},
|
130
|
-
setup(I) {
|
131
|
-
const c = I, e = K(() => c.terminal), p = w(), a = w(-1), i = w({
|
132
|
-
merchantId: "",
|
133
|
-
terminalId: "",
|
134
|
-
privateKey: ""
|
135
|
-
}), t = () => {
|
136
|
-
i.value.merchantId = "", i.value.terminalId = "", i.value.privateKey = "", a.value = -1;
|
137
|
-
}, r = () => {
|
138
|
-
if (!e.value.ecrs)
|
139
|
-
return t();
|
140
|
-
const d = e.value.ecrs.findIndex((g) => g && g.gateway && g.gateway === "Ghl");
|
141
|
-
if (d === -1)
|
142
|
-
return t();
|
143
|
-
a.value = d;
|
144
|
-
const u = e.value.ecrs.at(d);
|
145
|
-
u.gateway === "Ghl" && u.config && (i.value = {
|
146
|
-
merchantId: u.config.merchantId,
|
147
|
-
terminalId: u.config.terminalId,
|
148
|
-
privateKey: u.config.privateKey
|
149
|
-
});
|
150
|
-
};
|
151
|
-
P(e, r), G(r);
|
152
|
-
async function o(d) {
|
153
|
-
var u;
|
154
|
-
(u = e.value.ecrs) == null || u.splice(d, 1), c.onUpdate(e.value);
|
155
|
-
}
|
156
|
-
return (d, u) => {
|
157
|
-
const g = y("FmTextField"), m = y("FmTextarea"), n = y("FmButton"), l = y("FmForm");
|
158
|
-
return f(), T(l, {
|
159
|
-
ref: p.value,
|
160
|
-
class: "flex flex-col gap-16 w-[500px]",
|
161
|
-
onValidationSuccess: u[3] || (u[3] = () => {
|
162
|
-
a.value > -1 ? e.value.ecrs[a.value] = { gateway: "Ghl", config: i.value } : (e.value.ecrs || (e.value.ecrs = []), e.value.ecrs.push({ gateway: "Ghl", config: i.value })), c.onUpdate(e.value);
|
163
|
-
})
|
164
|
-
}, {
|
165
|
-
default: B(() => [
|
166
|
-
v(g, {
|
167
|
-
modelValue: i.value.merchantId,
|
168
|
-
"onUpdate:modelValue": u[0] || (u[0] = (s) => i.value.merchantId = s),
|
169
|
-
label: "Merchant ID"
|
170
|
-
}, null, 8, ["modelValue"]),
|
171
|
-
v(g, {
|
172
|
-
modelValue: i.value.terminalId,
|
173
|
-
"onUpdate:modelValue": u[1] || (u[1] = (s) => i.value.terminalId = s),
|
174
|
-
label: "Terminal ID"
|
175
|
-
}, null, 8, ["modelValue"]),
|
176
|
-
v(m, {
|
177
|
-
modelValue: i.value.privateKey,
|
178
|
-
"onUpdate:modelValue": u[2] || (u[2] = (s) => i.value.privateKey = s),
|
179
|
-
label: "Private Key"
|
180
|
-
}, null, 8, ["modelValue"]),
|
181
|
-
F("div", oe, [
|
182
|
-
a.value > -1 ? (f(), T(n, {
|
183
|
-
key: 0,
|
184
|
-
class: "flex-1",
|
185
|
-
variant: "secondary",
|
186
|
-
label: "Delete",
|
187
|
-
onclick: () => o(a.value)
|
188
|
-
}, null, 8, ["onclick"])) : x("", !0),
|
189
|
-
v(n, {
|
190
|
-
type: "submit",
|
191
|
-
class: "flex-1",
|
192
|
-
variant: "primary",
|
193
|
-
label: "Save"
|
194
|
-
})
|
195
|
-
])
|
196
|
-
]),
|
197
|
-
_: 1
|
198
|
-
}, 512);
|
199
|
-
};
|
200
|
-
}
|
201
|
-
}), ue = { key: 0 }, se = { class: "mt-6 space-x-6" }, ie = /* @__PURE__ */ S({
|
202
|
-
__name: "KioskMode",
|
203
|
-
props: {
|
204
|
-
terminal: {
|
205
|
-
type: Object,
|
206
|
-
required: !0
|
207
|
-
}
|
208
|
-
},
|
209
|
-
setup(I) {
|
210
|
-
const { isLoading: c, startAsyncCall: e } = Y(!1), p = z(), a = w({
|
211
|
-
enable: !1,
|
212
|
-
password: []
|
213
|
-
}), i = I;
|
214
|
-
function t() {
|
215
|
-
return a.value.enable && a.value.password.filter((r) => !!r).length !== 6 ? p.open({
|
216
|
-
type: "error",
|
217
|
-
message: "Unlock PIN is required when setting up kiosk mode for terminal."
|
218
|
-
}) : e(async () => {
|
219
|
-
const r = { enable: a.value.enable };
|
220
|
-
r.enable && Object.assign(r, {
|
221
|
-
password: a.value.password.join("")
|
222
|
-
});
|
223
|
-
const o = await N.kioskModeRequest(i.terminal._id, r);
|
224
|
-
if (o === "OK")
|
225
|
-
return p.open({ type: "info", message: "Kiosk mode applied successfully." });
|
226
|
-
let d = o;
|
227
|
-
return o === "client_not_connected" && (d = "Terminal not connected to the websocket server."), o.startsWith("terminal: ") && (d = o.replaceAll("terminal: ", "")), p.open({
|
228
|
-
type: "error",
|
229
|
-
message: d
|
230
|
-
});
|
231
|
-
});
|
232
|
-
}
|
233
|
-
return (r, o) => {
|
234
|
-
const d = y("FmSwitch"), u = y("FmPinField"), g = y("FmButton");
|
235
|
-
return f(), V(D, null, [
|
236
|
-
v(d, {
|
237
|
-
modelValue: a.value.enable,
|
238
|
-
"onUpdate:modelValue": o[0] || (o[0] = (m) => a.value.enable = m),
|
239
|
-
label: "Enable Kiosk Mode?"
|
240
|
-
}, null, 8, ["modelValue"]),
|
241
|
-
a.value.enable ? (f(), V("div", ue, [
|
242
|
-
o[2] || (o[2] = F("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
243
|
-
v(u, {
|
244
|
-
modelValue: a.value.password,
|
245
|
-
"onUpdate:modelValue": o[1] || (o[1] = (m) => a.value.password = m)
|
246
|
-
}, null, 8, ["modelValue"])
|
247
|
-
])) : x("", !0),
|
248
|
-
F("div", se, [
|
249
|
-
v(g, {
|
250
|
-
variant: "primary",
|
251
|
-
label: "Send",
|
252
|
-
icon: "send",
|
253
|
-
loading: k(c),
|
254
|
-
onclick: t
|
255
|
-
}, null, 8, ["loading"])
|
256
|
-
])
|
257
|
-
], 64);
|
258
|
-
};
|
259
|
-
}
|
260
|
-
}), me = /* @__PURE__ */ S({
|
261
|
-
__name: "SettingRequest",
|
262
|
-
props: {
|
263
|
-
terminal: {
|
264
|
-
type: Object,
|
265
|
-
required: !0
|
266
|
-
}
|
267
|
-
},
|
268
|
-
setup(I) {
|
269
|
-
const { settingTab: c } = E({
|
270
|
-
settingTab: "kiosk_mode"
|
271
|
-
}), e = [
|
272
|
-
{
|
273
|
-
label: "Kiosk Mode",
|
274
|
-
value: "kiosk_mode",
|
275
|
-
render: ie
|
276
|
-
}
|
277
|
-
], p = I, a = q(() => e.find((i) => i.value === c.value));
|
278
|
-
return (i, t) => {
|
279
|
-
var o;
|
280
|
-
const r = y("FmTabs");
|
281
|
-
return f(), V(D, null, [
|
282
|
-
t[1] || (t[1] = F("p", { className: "mt-1 my-6 text-gray-600" }, [
|
283
|
-
F("b", null, "Note: "),
|
284
|
-
M(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
285
|
-
], -1)),
|
286
|
-
v(r, {
|
287
|
-
"model-value": k(c),
|
288
|
-
"onUpdate:modelValue": t[0] || (t[0] = (d) => L(c) ? c.value = d : null),
|
289
|
-
class: "mb-6",
|
290
|
-
items: e
|
291
|
-
}, null, 8, ["model-value"]),
|
292
|
-
k(c) ? (f(), T(h((o = a.value) == null ? void 0 : o.render), j(A({ key: 0 }, { terminal: p.terminal })), null, 16)) : x("", !0)
|
293
|
-
], 64);
|
294
|
-
};
|
295
|
-
}
|
296
|
-
}), ce = {
|
297
|
-
key: 0,
|
298
|
-
class: "text-sm text-gray-500"
|
299
|
-
}, de = { class: "flex mt-6 space-x-6" }, pe = /* @__PURE__ */ S({
|
300
|
-
__name: "SoftposGateway",
|
301
|
-
props: {
|
302
|
-
terminal: {
|
303
|
-
type: Object,
|
304
|
-
required: !0
|
305
|
-
},
|
306
|
-
onUpdate: {
|
307
|
-
type: Function,
|
308
|
-
required: !0
|
309
|
-
}
|
310
|
-
},
|
311
|
-
setup(I) {
|
312
|
-
const c = I, e = H().currentCountry, p = [
|
313
|
-
{
|
314
|
-
label: "Fiuu Malaysia",
|
315
|
-
value: "cc.feedme.payment.rms",
|
316
|
-
region: _.F_COUNTRY.enum.MY,
|
317
|
-
gateway: "Fiuu",
|
318
|
-
isLegacy: !0,
|
319
|
-
isOutdated: !0
|
320
|
-
},
|
321
|
-
{
|
322
|
-
label: "Fiuu Malaysia V2",
|
323
|
-
value: "cc.feedme.payment.fiuu_my",
|
324
|
-
region: _.F_COUNTRY.enum.MY,
|
325
|
-
gateway: "Fiuu",
|
326
|
-
isLegacy: !0
|
327
|
-
},
|
328
|
-
{
|
329
|
-
label: "Fiuu Singapore",
|
330
|
-
value: "cc.feedme.payment.fiuu_sg",
|
331
|
-
region: _.F_COUNTRY.enum.SG,
|
332
|
-
gateway: "Fiuu",
|
333
|
-
isLegacy: !0
|
334
|
-
},
|
335
|
-
{
|
336
|
-
label: "Softspace Malaysia",
|
337
|
-
value: "cc.feedme.payment.softspace_my",
|
338
|
-
gateway: "Softspace",
|
339
|
-
region: _.F_COUNTRY.enum.MY
|
340
|
-
},
|
341
|
-
{
|
342
|
-
label: "Digio Thailand",
|
343
|
-
value: "cc.feedme.payment.digio_th",
|
344
|
-
gateway: "Digio",
|
345
|
-
region: _.F_COUNTRY.enum.TH
|
346
|
-
}
|
347
|
-
], a = K(() => c.terminal), i = w(), t = w({
|
348
|
-
packageId: "",
|
349
|
-
uniqueId: "",
|
350
|
-
developerId: "",
|
351
|
-
isUat: !1
|
352
|
-
}), r = () => {
|
353
|
-
t.value.uniqueId = "", t.value.packageId = "", t.value.developerId = "";
|
354
|
-
}, o = () => {
|
355
|
-
if (!a.value.gateways || a.value.gateways.length === 0)
|
356
|
-
return r();
|
357
|
-
const m = a.value.gateways[0];
|
358
|
-
if (!m.config)
|
359
|
-
return r();
|
360
|
-
switch (m.gateway) {
|
361
|
-
case "Fiuu":
|
362
|
-
t.value = {
|
363
|
-
packageId: m.config.packageId,
|
364
|
-
uniqueId: m.config.uniqueId,
|
365
|
-
developerId: "",
|
366
|
-
isUat: !1
|
367
|
-
};
|
368
|
-
break;
|
369
|
-
case "Softspace":
|
370
|
-
case "Digio":
|
371
|
-
const n = JSON.parse(m.config.uniqueId);
|
372
|
-
t.value = {
|
373
|
-
packageId: m.config.packageId,
|
374
|
-
uniqueId: n.uniqueId,
|
375
|
-
developerId: n.developerId,
|
376
|
-
isUat: n.isUat
|
377
|
-
};
|
378
|
-
return;
|
379
|
-
}
|
380
|
-
};
|
381
|
-
P(a, o), G(o);
|
382
|
-
async function d(m) {
|
383
|
-
var n;
|
384
|
-
(n = a.value.gateways) == null || n.splice(m, 1), c.onUpdate(a.value);
|
385
|
-
}
|
386
|
-
const u = q(() => p.filter((m) => m.region === e.value)), g = q(() => u.value.find((m) => m.value === t.value.packageId));
|
387
|
-
return (m, n) => {
|
388
|
-
const l = y("FmSelect"), s = y("FmTextField"), C = y("FmCheckbox"), U = y("FmButton"), O = y("FmForm");
|
389
|
-
return f(), T(O, {
|
390
|
-
ref: i.value,
|
391
|
-
class: "flex flex-col gap-16 w-[500px]",
|
392
|
-
onValidationSuccess: n[5] || (n[5] = () => {
|
393
|
-
const b = g.value;
|
394
|
-
if (!b)
|
395
|
-
return;
|
396
|
-
let $ = t.value.uniqueId;
|
397
|
-
b.isLegacy || ($ = JSON.stringify({ uniqueId: t.value.uniqueId, developerId: t.value.developerId, isUat: t.value.isUat }));
|
398
|
-
const J = {
|
399
|
-
gateway: b.gateway,
|
400
|
-
config: {
|
401
|
-
packageId: b.value,
|
402
|
-
uniqueId: $
|
403
|
-
}
|
404
|
-
};
|
405
|
-
(!a.value.gateways || a.value.gateways.length > 1) && (a.value.gateways = []), a.value.gateways[0] = J, c.onUpdate(a.value);
|
406
|
-
})
|
407
|
-
}, {
|
408
|
-
default: B(() => [
|
409
|
-
v(l, {
|
410
|
-
modelValue: t.value.packageId,
|
411
|
-
"onUpdate:modelValue": n[0] || (n[0] = (b) => t.value.packageId = b),
|
412
|
-
label: "Package ID",
|
413
|
-
items: u.value
|
414
|
-
}, null, 8, ["modelValue", "items"]),
|
415
|
-
g.value && g.value.isLegacy ? (f(), V(D, { key: 0 }, [
|
416
|
-
v(s, {
|
417
|
-
modelValue: t.value.uniqueId,
|
418
|
-
"onUpdate:modelValue": n[1] || (n[1] = (b) => t.value.uniqueId = b),
|
419
|
-
label: "Unique ID (TID)"
|
420
|
-
}, null, 8, ["modelValue"]),
|
421
|
-
g.value.isOutdated ? (f(), V("span", ce, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : x("", !0)
|
422
|
-
], 64)) : (f(), V(D, { key: 1 }, [
|
423
|
-
v(s, {
|
424
|
-
modelValue: t.value.developerId,
|
425
|
-
"onUpdate:modelValue": n[2] || (n[2] = (b) => t.value.developerId = b),
|
426
|
-
label: "Developer ID (MID)"
|
427
|
-
}, null, 8, ["modelValue"]),
|
428
|
-
v(s, {
|
429
|
-
modelValue: t.value.uniqueId,
|
430
|
-
"onUpdate:modelValue": n[3] || (n[3] = (b) => t.value.uniqueId = b),
|
431
|
-
label: "Unique ID (TID)"
|
432
|
-
}, null, 8, ["modelValue"]),
|
433
|
-
v(C, {
|
434
|
-
modelValue: t.value.isUat,
|
435
|
-
"onUpdate:modelValue": n[4] || (n[4] = (b) => t.value.isUat = b),
|
436
|
-
label: "Is UAT (Test)",
|
437
|
-
value: "1"
|
438
|
-
}, null, 8, ["modelValue"])
|
439
|
-
], 64)),
|
440
|
-
F("div", de, [
|
441
|
-
a.value.gateways && a.value.gateways.length > 0 ? (f(), T(U, {
|
442
|
-
key: 0,
|
443
|
-
class: "flex-1",
|
444
|
-
variant: "secondary",
|
445
|
-
label: "Delete",
|
446
|
-
onclick: () => d(0)
|
447
|
-
}, null, 8, ["onclick"])) : x("", !0),
|
448
|
-
v(U, {
|
449
|
-
type: "submit",
|
450
|
-
class: "flex-1",
|
451
|
-
variant: "primary",
|
452
|
-
label: "Save"
|
453
|
-
})
|
454
|
-
])
|
455
|
-
]),
|
456
|
-
_: 1
|
457
|
-
}, 512);
|
458
|
-
};
|
459
|
-
}
|
460
|
-
}), Te = /* @__PURE__ */ S({
|
461
|
-
__name: "TerminalSetting",
|
462
|
-
props: {
|
463
|
-
terminalId: {
|
464
|
-
type: String,
|
465
|
-
required: !0
|
466
|
-
}
|
467
|
-
},
|
468
|
-
setup(I) {
|
469
|
-
const c = I, { tab: e } = E({
|
470
|
-
tab: "information"
|
471
|
-
}), { isLoading: p, startAsyncCall: a } = Y(!0), i = Q(), t = z(), r = w();
|
472
|
-
async function o(l) {
|
473
|
-
a(async () => {
|
474
|
-
try {
|
475
|
-
await N.updateById(
|
476
|
-
c.terminalId,
|
477
|
-
{
|
478
|
-
name: l.name,
|
479
|
-
status: l.status,
|
480
|
-
ecrs: l.ecrs ?? [],
|
481
|
-
gateways: l.gateways ?? []
|
482
|
-
}
|
483
|
-
), r.value = await N.readById(c.terminalId), t.open({
|
484
|
-
type: "success",
|
485
|
-
message: "Terminal updated successfully"
|
486
|
-
});
|
487
|
-
} catch (s) {
|
488
|
-
t.open({
|
489
|
-
type: "error",
|
490
|
-
title: "Error occurs when update terminal",
|
491
|
-
message: X(s)
|
492
|
-
});
|
493
|
-
}
|
494
|
-
});
|
495
|
-
}
|
496
|
-
const d = [
|
497
|
-
{
|
498
|
-
label: "Information",
|
499
|
-
value: "information",
|
500
|
-
icon: "overview",
|
501
|
-
render: ae
|
502
|
-
},
|
503
|
-
{
|
504
|
-
label: "Setting Request",
|
505
|
-
value: "settings",
|
506
|
-
icon: "settings",
|
507
|
-
render: me,
|
508
|
-
onlyFor: ["TERMINAL"]
|
509
|
-
},
|
510
|
-
{
|
511
|
-
label: "SoftPos Gateway",
|
512
|
-
value: "softpos",
|
513
|
-
icon: "payment",
|
514
|
-
render: pe,
|
515
|
-
region: [_.F_COUNTRY.enum.MY, _.F_COUNTRY.enum.SG, _.F_COUNTRY.enum.TH]
|
516
|
-
},
|
517
|
-
{
|
518
|
-
label: "FeedMe Terminal",
|
519
|
-
value: "terminal",
|
520
|
-
icon: "shopping_cart_checkout",
|
521
|
-
render: le,
|
522
|
-
onlyFor: ["POS", "KIOSK"]
|
523
|
-
},
|
524
|
-
{
|
525
|
-
label: "GHL Terminal (V2)",
|
526
|
-
value: "ghl",
|
527
|
-
icon: "shopping_cart_checkout",
|
528
|
-
render: re,
|
529
|
-
onlyFor: ["POS", "KIOSK"],
|
530
|
-
region: [_.F_COUNTRY.enum.MY]
|
531
|
-
}
|
532
|
-
], u = H().currentCountry, g = q(() => {
|
533
|
-
var l;
|
534
|
-
return (l = d.find((s) => s.value === e.value)) == null ? void 0 : l.render;
|
535
|
-
});
|
536
|
-
async function m() {
|
537
|
-
a(async () => {
|
538
|
-
r.value = await N.readById(c.terminalId);
|
539
|
-
});
|
540
|
-
}
|
541
|
-
const n = q(() => d.filter((l) => {
|
542
|
-
var s;
|
543
|
-
return !l.onlyFor || l.onlyFor.includes(((s = r.value) == null ? void 0 : s.deviceType) ?? "");
|
544
|
-
}).filter((l) => !l.region || l.region.includes(u.value ?? _.F_COUNTRY.enum.MY)));
|
545
|
-
return G(m), (l, s) => {
|
546
|
-
var U;
|
547
|
-
const C = y("FmTabs");
|
548
|
-
return f(), T(W, {
|
549
|
-
title: `Terminal (${(U = r.value) == null ? void 0 : U._id})`,
|
550
|
-
loading: k(p),
|
551
|
-
onBack: k(i).back
|
552
|
-
}, {
|
553
|
-
default: B(() => [
|
554
|
-
v(C, {
|
555
|
-
"model-value": k(e),
|
556
|
-
"onUpdate:modelValue": s[0] || (s[0] = (O) => L(e) ? e.value = O : null),
|
557
|
-
class: "mb-6",
|
558
|
-
items: n.value
|
559
|
-
}, null, 8, ["model-value", "items"]),
|
560
|
-
k(e) ? (f(), T(h(g.value), j(A({ key: 0 }, {
|
561
|
-
terminal: r.value,
|
562
|
-
onUpdate: o
|
563
|
-
})), null, 16)) : x("", !0)
|
564
|
-
]),
|
565
|
-
_: 1
|
566
|
-
}, 8, ["title", "loading", "onBack"]);
|
567
|
-
};
|
568
|
-
}
|
569
|
-
});
|
570
|
-
export {
|
571
|
-
Te as default
|
572
|
-
};
|