@feedmepos/mf-order-setting 0.0.105 → 0.0.106
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/DisplaySystemView-aLqc6lz9.js +9068 -0
- package/dist/{FoodCourtInvitationsView-Bo174yfB.js → FoodCourtInvitationsView-B30qld2i.js} +4 -4
- package/dist/{FoodCourtOrderSettingsView-uUe53O0Z.js → FoodCourtOrderSettingsView-CWmaKgbe.js} +1 -1
- package/dist/{FoodCourtOrdersView-CxC5oGp2.js → FoodCourtOrdersView-FfrganVo.js} +4 -4
- package/dist/{FoodCourtStallsView-BEpRBmSL.js → FoodCourtStallsView-CpGZNP6p.js} +2 -2
- package/dist/{FoodCourtStatusView-DA7mdsuf.js → FoodCourtStatusView-ljQUwIwk.js} +1 -1
- package/dist/{KioskDevicesView-BY9Egk75.js → KioskDevicesView-BwDAYIhX.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-CxroxD-b.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-VidDJfGG.js} +487 -473
- package/dist/KioskSettingView-mfhi9vuf.js +1240 -0
- package/dist/{KioskView-BYL0u6kj.js → KioskView-6p5h92fk.js} +173 -167
- package/dist/{OrderSettingsView-BBHAhgE9.js → OrderSettingsView-Cf_Ye9U_.js} +11 -11
- package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang--9bdtLE1.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-TJJ3PBlq.js} +1 -1
- package/dist/{app-BV2USn83.js → app-BorqCaJT.js} +6965 -6415
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-Bp4Kgnt_.js → dayjs.min-CTTY2vkL.js} +1 -1
- package/dist/display-preview/assets/{BandBoard-DIcfXsNV.js → BandBoard-BLwgs3WX.js} +1 -1
- package/dist/display-preview/assets/{CarouselBlock-XAhTyEWB.js → CarouselBlock-CUrVSbQp.js} +1 -1
- package/dist/display-preview/assets/{CategoryBoard-DBKe18hv.js → CategoryBoard-BkvpcxHR.js} +1 -1
- package/dist/display-preview/assets/{ImageBlock-BCbnYSHq.js → ImageBlock-0UYDHTm0.js} +1 -1
- package/dist/display-preview/assets/{PickupMode-Df_TPCh8.js → PickupMode-BY4iL0BH.js} +1 -1
- package/dist/display-preview/assets/{StatusBoard-28z3bPOf.js → StatusBoard-DGEZ6hvH.js} +1 -1
- package/dist/display-preview/assets/{TextBlock-CvJKITtx.js → TextBlock-CxKwtqoO.js} +1 -1
- package/dist/display-preview/assets/{VideoBlock-Dop43wDv.js → VideoBlock-BKkxdLAd.js} +1 -1
- package/dist/display-preview/assets/{index-cqMoOpSN.js → index-B1olKQmQ.js} +2 -2
- package/dist/display-preview/assets/{pickupView-DRMVXqrc.js → pickupView-CB9fV5jD.js} +1 -1
- package/dist/display-preview/images/feedme-bg-left-image.png +0 -0
- package/dist/display-preview/index.html +1 -1
- package/dist/{featureFlag-C1uGG7u6.js → featureFlag-DFenoxmg.js} +1 -1
- package/dist/frontend/mf-order/src/api/display-system/index.d.ts +2 -2
- package/dist/frontend/mf-order/src/app.d.ts +118 -12
- package/dist/frontend/mf-order/src/composables/useDisplaySystemPermission.d.ts +5 -0
- package/dist/frontend/mf-order/src/main.d.ts +118 -12
- package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +9 -11
- package/dist/frontend/mf-order/src/modules/display-system/legacy-ods/convert.d.ts +10 -0
- package/dist/frontend/mf-order/src/modules/kiosk/deviceCount.d.ts +18 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +12 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/tableNumberHint.d.ts +33 -0
- package/dist/frontend/mf-order/src/stores/display-system/index.d.ts +10 -70
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +51 -0
- package/dist/frontend/mf-order/src/views/display-system/DisplayTemplateEditor.vue.d.ts +2 -0
- package/dist/frontend/mf-order/src/views/display-system/legacy-ods/LegacyOdsTemplateList.vue.d.ts +11 -2
- package/dist/frontend/mf-order/src/views/display-system/view-selection.d.ts +1 -2
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-0GuybwuA.js → index-BZkJr7iu.js} +1 -1
- package/dist/{index-HF3qh9qG.js → index-C4Isv-r7.js} +1 -1
- package/dist/{index-CRNutZC_.js → index-DuJOWWP8.js} +4 -4
- package/dist/{index-D0ZIByef.js → index-nUvyt9Wm.js} +1 -1
- package/dist/{index-KWOCCun9.js → index-tLkJL436.js} +2 -2
- package/dist/{order.dto-GQaBESZq.js → order.dto-nVwtcdX2.js} +6049 -5992
- package/dist/package/entity/display/mediaHosts.d.ts +4 -0
- package/dist/package/entity/food-court/order-v2.do.d.ts +667 -0
- package/dist/package/entity/food-court/order-v2.dto.d.ts +262 -0
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +16 -0
- package/dist/package/entity/order-platform/menu.dto.d.ts +44 -44
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +52 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +293 -0
- package/dist/package/entity/order-setting/order-setting.do.d.ts +42 -0
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +174 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +42 -0
- package/dist/package/entity/websocket/websocket.dto.d.ts +92 -0
- package/dist/style.css +1 -1
- package/dist/{useInternalUser-C39xpsBU.js → useInternalUser-HhxjbzGl.js} +1 -1
- package/package.json +3 -3
- package/src/api/display-system/index.ts +2 -2
- package/src/composables/useDisplaySystemPermission.spec.ts +27 -0
- package/src/composables/useDisplaySystemPermission.ts +16 -0
- package/src/locales/en-US.json +51 -17
- package/src/locales/ja-JP.json +26 -11
- package/src/locales/th-TH.json +32 -17
- package/src/locales/zh-CN.json +51 -17
- package/src/modules/display-system/interface.spec.ts +1 -32
- package/src/modules/display-system/interface.ts +7 -24
- package/src/modules/display-system/legacy-ods/convert.spec.ts +65 -0
- package/src/modules/display-system/legacy-ods/convert.ts +95 -0
- package/src/modules/display-system/legacy-ods/media.spec.ts +16 -0
- package/src/modules/kiosk/deviceCount.spec.ts +23 -0
- package/src/modules/kiosk/deviceCount.ts +21 -0
- package/src/modules/order-setting/kiosk/interface.ts +13 -0
- package/src/modules/order-setting/kiosk/tableNumberHint.spec.ts +68 -0
- package/src/modules/order-setting/kiosk/tableNumberHint.ts +71 -0
- package/src/router/display-system-permission.spec.ts +13 -0
- package/src/router/routes.ts +2 -1
- package/src/stores/display-system/index.spec.ts +104 -0
- package/src/stores/display-system/index.ts +18 -7
- package/src/stores/order-setting/mapper.ts +11 -2
- package/src/views/display-system/DisplayInspector.vue +3 -0
- package/src/views/display-system/DisplayModulePickerDialog.vue +8 -0
- package/src/views/display-system/DisplaySystemView.conversion.spec.ts +164 -0
- package/src/views/display-system/DisplaySystemView.vue +72 -26
- package/src/views/display-system/DisplayTemplateEditor.spec.ts +18 -0
- package/src/views/display-system/DisplayTemplateEditor.vue +8 -2
- package/src/views/display-system/legacy-ods/LegacyOdsTemplateList.spec.ts +44 -4
- package/src/views/display-system/legacy-ods/LegacyOdsTemplateList.vue +12 -4
- package/src/views/display-system/view-selection.spec.ts +4 -17
- package/src/views/display-system/view-selection.ts +3 -4
- package/src/views/kiosk/devices/KioskDevicesView.vue +6 -2
- package/src/views/kiosk/devices/KioskLicenseSummary.spec.ts +45 -0
- package/src/views/kiosk/devices/KioskLicenseSummary.vue +9 -2
- package/src/views/kiosk/settings/KioskSettingView.vue +140 -6
- package/vitest.config.ts +1 -0
- package/dist/DisplaySystemView-CFr9DnaD.js +0 -8926
- package/dist/KioskSettingView-DPaQ7YFV.js +0 -1124
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as M, defineComponent as H, resolveComponent as T, openBlock as i, createElementBlock as u, createElementVNode as r, toDisplayString as l, unref as o, createVNode as h, computed as g, createBlock as C, withCtx as Y, createCommentVNode as k, Fragment as F, renderList as q, createTextVNode as K, watch as Pe, normalizeClass as $e, renderSlot as nt } from "vue";
|
|
2
2
|
import { useI18n as Z, useCoreStore as at } from "@feedmepos/mf-common";
|
|
3
3
|
import { defineStore as Le } from "pinia";
|
|
4
|
-
import { r as ee, g as oe, S as Fe, p as Ke } from "./index-
|
|
5
|
-
import "./order.dto-
|
|
4
|
+
import { r as ee, g as oe, S as Fe, p as Ke } from "./index-C4Isv-r7.js";
|
|
5
|
+
import "./order.dto-nVwtcdX2.js";
|
|
6
6
|
import { useSnackbar as Me, useDialog as ot } from "@feedmepos/ui-library";
|
|
7
|
-
import { d as G } from "./dayjs.min-
|
|
8
|
-
import { c as rt, g as st, a as Be } from "./app-
|
|
9
|
-
import { s as Se, u as it } from "./useInternalUser-
|
|
7
|
+
import { d as G } from "./dayjs.min-CTTY2vkL.js";
|
|
8
|
+
import { c as rt, g as st, a as Be } from "./app-BorqCaJT.js";
|
|
9
|
+
import { s as Se, u as it } from "./useInternalUser-HhxjbzGl.js";
|
|
10
10
|
async function lt() {
|
|
11
11
|
const e = await ee().get("/kiosk/otp");
|
|
12
12
|
return oe(e);
|
|
@@ -58,91 +58,91 @@ const J = {
|
|
|
58
58
|
licenseExpiredAt: e.expiredAt ? new Date(e.expiredAt) : void 0
|
|
59
59
|
});
|
|
60
60
|
function vt(e) {
|
|
61
|
-
const t = e.substring(0, 8),
|
|
62
|
-
return new Date(
|
|
61
|
+
const t = e.substring(0, 8), s = parseInt(t, 16);
|
|
62
|
+
return new Date(s * 1e3);
|
|
63
63
|
}
|
|
64
64
|
const ft = {
|
|
65
65
|
toMfKioskDevice: yt
|
|
66
66
|
}, ht = Le("kiosk", () => {
|
|
67
|
-
const e =
|
|
67
|
+
const e = M({
|
|
68
68
|
otp: "",
|
|
69
69
|
devices: [],
|
|
70
70
|
licenses: null
|
|
71
71
|
});
|
|
72
72
|
async function t() {
|
|
73
|
-
const
|
|
74
|
-
e.value.otp =
|
|
73
|
+
const d = await J.requestOtp();
|
|
74
|
+
e.value.otp = d.otp;
|
|
75
75
|
}
|
|
76
|
-
async function
|
|
77
|
-
const
|
|
78
|
-
e.value.devices =
|
|
76
|
+
async function s() {
|
|
77
|
+
const d = await J.getDevices();
|
|
78
|
+
e.value.devices = d.map((c) => ft.toMfKioskDevice(c));
|
|
79
79
|
}
|
|
80
80
|
async function v() {
|
|
81
81
|
try {
|
|
82
82
|
e.value.licenses = await J.getLicenses();
|
|
83
|
-
} catch (
|
|
84
|
-
throw e.value.licenses = null,
|
|
83
|
+
} catch (d) {
|
|
84
|
+
throw e.value.licenses = null, d;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
async function m(
|
|
88
|
-
await J.unbind(
|
|
87
|
+
async function m(d) {
|
|
88
|
+
await J.unbind(d), await Promise.all([s(), v().catch(() => {
|
|
89
89
|
})]);
|
|
90
90
|
}
|
|
91
|
-
async function f(
|
|
92
|
-
await J.updateDevicePin(
|
|
91
|
+
async function f(d, c) {
|
|
92
|
+
await J.updateDevicePin(d, c), await s();
|
|
93
93
|
}
|
|
94
|
-
async function
|
|
95
|
-
await J.updateDeviceRemark(
|
|
94
|
+
async function x(d, c) {
|
|
95
|
+
await J.updateDeviceRemark(d, c), await s();
|
|
96
96
|
}
|
|
97
97
|
return {
|
|
98
98
|
state: e.value,
|
|
99
99
|
requestOtp: t,
|
|
100
|
-
getDevices:
|
|
100
|
+
getDevices: s,
|
|
101
101
|
getLicenses: v,
|
|
102
102
|
unbind: m,
|
|
103
103
|
updateDevicePin: f,
|
|
104
|
-
updateDeviceRemark:
|
|
104
|
+
updateDeviceRemark: x
|
|
105
105
|
};
|
|
106
106
|
});
|
|
107
107
|
var he = { exports: {} }, Ce;
|
|
108
108
|
function bt() {
|
|
109
109
|
return Ce || (Ce = 1, function(e, t) {
|
|
110
|
-
(function(
|
|
110
|
+
(function(s, v) {
|
|
111
111
|
e.exports = v();
|
|
112
112
|
})(rt, function() {
|
|
113
|
-
return function(
|
|
114
|
-
|
|
115
|
-
var f = v.prototype,
|
|
116
|
-
function
|
|
117
|
-
return f.fromToBase(
|
|
113
|
+
return function(s, v, m) {
|
|
114
|
+
s = s || {};
|
|
115
|
+
var f = v.prototype, x = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
|
|
116
|
+
function d(y, n, p, b) {
|
|
117
|
+
return f.fromToBase(y, n, p, b);
|
|
118
118
|
}
|
|
119
|
-
m.en.relativeTime =
|
|
120
|
-
for (var
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
var te =
|
|
127
|
-
|
|
119
|
+
m.en.relativeTime = x, f.fromToBase = function(y, n, p, b, w) {
|
|
120
|
+
for (var I, A, _, N = p.$locale().relativeTime || x, B = s.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], z = B.length, R = 0; R < z; R += 1) {
|
|
121
|
+
var P = B[R];
|
|
122
|
+
P.d && (I = b ? m(y).diff(p, P.d, !0) : p.diff(y, P.d, !0));
|
|
123
|
+
var V = (s.rounding || Math.round)(Math.abs(I));
|
|
124
|
+
if (_ = I > 0, V <= P.r || !P.r) {
|
|
125
|
+
V <= 1 && R > 0 && (P = B[R - 1]);
|
|
126
|
+
var te = N[P.l];
|
|
127
|
+
w && (V = w("" + V)), A = typeof te == "string" ? te.replace("%d", V) : te(V, n, P.l, _);
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
if (n) return
|
|
132
|
-
var W =
|
|
133
|
-
return typeof W == "function" ? W(
|
|
134
|
-
}, f.to = function(
|
|
135
|
-
return
|
|
136
|
-
}, f.from = function(
|
|
137
|
-
return
|
|
131
|
+
if (n) return A;
|
|
132
|
+
var W = _ ? N.future : N.past;
|
|
133
|
+
return typeof W == "function" ? W(A) : W.replace("%s", A);
|
|
134
|
+
}, f.to = function(y, n) {
|
|
135
|
+
return d(y, n, this, !0);
|
|
136
|
+
}, f.from = function(y, n) {
|
|
137
|
+
return d(y, n, this);
|
|
138
138
|
};
|
|
139
|
-
var
|
|
140
|
-
return
|
|
139
|
+
var c = function(y) {
|
|
140
|
+
return y.$u ? m.utc() : m();
|
|
141
141
|
};
|
|
142
|
-
f.toNow = function(
|
|
143
|
-
return this.to(
|
|
144
|
-
}, f.fromNow = function(
|
|
145
|
-
return this.from(
|
|
142
|
+
f.toNow = function(y) {
|
|
143
|
+
return this.to(c(this), y);
|
|
144
|
+
}, f.fromNow = function(y) {
|
|
145
|
+
return this.from(c(this), y);
|
|
146
146
|
};
|
|
147
147
|
};
|
|
148
148
|
});
|
|
@@ -156,15 +156,15 @@ const kt = /* @__PURE__ */ st(gt), xt = /* @__PURE__ */ H({
|
|
|
156
156
|
},
|
|
157
157
|
emits: ["update:modelValue"],
|
|
158
158
|
setup(e, { emit: t }) {
|
|
159
|
-
const { t:
|
|
160
|
-
function f(
|
|
161
|
-
v("update:modelValue",
|
|
159
|
+
const { t: s } = Z(), v = t, m = M("");
|
|
160
|
+
function f(x) {
|
|
161
|
+
v("update:modelValue", x);
|
|
162
162
|
}
|
|
163
|
-
return (
|
|
164
|
-
const
|
|
163
|
+
return (x, d) => {
|
|
164
|
+
const c = T("FmTextField");
|
|
165
165
|
return i(), u("div", null, [
|
|
166
|
-
|
|
167
|
-
h(
|
|
166
|
+
r("span", null, l(o(s)("order.unbindKioskDeviceWarning", { machineId: e.machineId })), 1),
|
|
167
|
+
h(c, {
|
|
168
168
|
"model-value": m.value,
|
|
169
169
|
"onUpdate:modelValue": f,
|
|
170
170
|
placeholder: e.machineId
|
|
@@ -185,85 +185,85 @@ const kt = /* @__PURE__ */ st(gt), xt = /* @__PURE__ */ H({
|
|
|
185
185
|
loadError: { default: null }
|
|
186
186
|
},
|
|
187
187
|
setup(e) {
|
|
188
|
-
const { t } = Z(),
|
|
189
|
-
function v(
|
|
190
|
-
return (
|
|
188
|
+
const { t } = Z(), s = e;
|
|
189
|
+
function v(c) {
|
|
190
|
+
return (c.action ?? "").replace(/[^a-z]/gi, "").toLowerCase();
|
|
191
191
|
}
|
|
192
|
-
function m(
|
|
193
|
-
return
|
|
192
|
+
function m(c) {
|
|
193
|
+
return c.type === "ecr" && v(c).includes("scanpay");
|
|
194
194
|
}
|
|
195
|
-
function f(
|
|
196
|
-
return
|
|
195
|
+
function f(c) {
|
|
196
|
+
return c.type === "ecr_qr" || c.type === "ecr" && v(c).includes("qr");
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
const
|
|
200
|
-
return
|
|
198
|
+
function x(c) {
|
|
199
|
+
const y = v(c);
|
|
200
|
+
return c.type === "ecr" && (y.includes("card") || y.includes("softpos"));
|
|
201
201
|
}
|
|
202
|
-
const
|
|
203
|
-
const
|
|
202
|
+
const d = g(() => {
|
|
203
|
+
const c = (n) => s.checkouts.some(n);
|
|
204
204
|
return [
|
|
205
205
|
{
|
|
206
206
|
key: "card",
|
|
207
207
|
label: t("order.bankCard"),
|
|
208
|
-
present:
|
|
208
|
+
present: c((n) => n.type === "card")
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
key: "terminal-card",
|
|
212
212
|
label: t("order.terminalCard"),
|
|
213
|
-
present:
|
|
213
|
+
present: c(x)
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
key: "qr-pay",
|
|
217
217
|
label: t("order.qrPay"),
|
|
218
|
-
present:
|
|
218
|
+
present: c((n) => n.type === "qr")
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
221
|
key: "scan-pay",
|
|
222
222
|
label: t("order.scanPay"),
|
|
223
|
-
present:
|
|
223
|
+
present: c((n) => n.type === "scanpay")
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
key: "terminal-scan-pay",
|
|
227
227
|
label: t("order.terminalScanPay"),
|
|
228
|
-
present:
|
|
228
|
+
present: c(m)
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
key: "terminal-qr-pay",
|
|
232
232
|
label: t("order.terminalQrPay"),
|
|
233
|
-
present:
|
|
233
|
+
present: c(f)
|
|
234
234
|
}
|
|
235
235
|
];
|
|
236
236
|
});
|
|
237
|
-
return (
|
|
238
|
-
const n =
|
|
237
|
+
return (c, y) => {
|
|
238
|
+
const n = T("FmIcon"), p = T("FmCheckbox"), b = T("FmCardSection"), w = T("FmCard");
|
|
239
239
|
return e.loadError ? (i(), u("div", _t, [
|
|
240
240
|
h(n, {
|
|
241
241
|
name: "error_outline",
|
|
242
242
|
size: "sm",
|
|
243
243
|
class: "shrink-0"
|
|
244
244
|
}),
|
|
245
|
-
|
|
246
|
-
])) : (i(),
|
|
245
|
+
r("span", null, l(o(t)("order.paymentCheckoutLoadErrorTitle")), 1)
|
|
246
|
+
])) : (i(), C(w, {
|
|
247
247
|
key: 1,
|
|
248
248
|
variant: "outlined"
|
|
249
249
|
}, {
|
|
250
|
-
default:
|
|
251
|
-
h(
|
|
252
|
-
default:
|
|
250
|
+
default: Y(() => [
|
|
251
|
+
h(b, { class: "flex flex-col gap-3" }, {
|
|
252
|
+
default: Y(() => [
|
|
253
253
|
e.checkouts.length === 0 ? (i(), u("div", It, [
|
|
254
254
|
h(n, {
|
|
255
255
|
name: "credit_card_off",
|
|
256
256
|
size: "sm",
|
|
257
257
|
class: "shrink-0"
|
|
258
258
|
}),
|
|
259
|
-
|
|
260
|
-
])) :
|
|
261
|
-
|
|
262
|
-
(i(!0), u(
|
|
263
|
-
key:
|
|
264
|
-
"model-value":
|
|
265
|
-
value:
|
|
266
|
-
label:
|
|
259
|
+
r("span", null, l(o(t)("order.noPaymentCheckoutsTitle")), 1)
|
|
260
|
+
])) : k("", !0),
|
|
261
|
+
r("div", Dt, [
|
|
262
|
+
(i(!0), u(F, null, q(d.value, (I) => (i(), C(p, {
|
|
263
|
+
key: I.key,
|
|
264
|
+
"model-value": I.present,
|
|
265
|
+
value: I.key,
|
|
266
|
+
label: I.label,
|
|
267
267
|
disabled: ""
|
|
268
268
|
}, null, 8, ["model-value", "value", "label"]))), 128))
|
|
269
269
|
])
|
|
@@ -279,35 +279,35 @@ const kt = /* @__PURE__ */ st(gt), xt = /* @__PURE__ */ H({
|
|
|
279
279
|
function ke(e) {
|
|
280
280
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function O(e) {
|
|
283
283
|
return typeof e == "string" && e.trim() !== "" ? e : null;
|
|
284
284
|
}
|
|
285
285
|
function Re(e) {
|
|
286
286
|
return Array.isArray(e) ? e.filter(ke) : [];
|
|
287
287
|
}
|
|
288
288
|
function be(e) {
|
|
289
|
-
const t = Re(e).map((
|
|
289
|
+
const t = Re(e).map((s) => O(s.gateway)).filter((s) => s !== null);
|
|
290
290
|
return [...new Set(t)];
|
|
291
291
|
}
|
|
292
292
|
function wt(e) {
|
|
293
|
-
const t =
|
|
293
|
+
const t = O(e.gateway);
|
|
294
294
|
if (!t) return null;
|
|
295
|
-
const
|
|
295
|
+
const s = ke(e.config) ? e.config : {};
|
|
296
296
|
return {
|
|
297
297
|
gateway: t,
|
|
298
|
-
merchantId:
|
|
298
|
+
merchantId: O(s.merchantId),
|
|
299
299
|
// FeedMe and GHL use terminalId; Beam and BRI use externalTerminalId.
|
|
300
|
-
terminalId:
|
|
300
|
+
terminalId: O(s.terminalId) ?? O(s.externalTerminalId)
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
303
|
function At(e) {
|
|
304
304
|
if (!ke(e)) return null;
|
|
305
|
-
const t =
|
|
306
|
-
return !t || !
|
|
305
|
+
const t = O(e._id), s = O(e.deviceId);
|
|
306
|
+
return !t || !s ? null : {
|
|
307
307
|
id: t,
|
|
308
|
-
name:
|
|
309
|
-
deviceId:
|
|
310
|
-
status:
|
|
308
|
+
name: O(e.name),
|
|
309
|
+
deviceId: s,
|
|
310
|
+
status: O(e.status),
|
|
311
311
|
softPosGateways: be(e.gateways),
|
|
312
312
|
ecrs: Re(e.ecrs).map(wt).filter((v) => v !== null),
|
|
313
313
|
ecrIntegrations: be(e.ecrIntegrations),
|
|
@@ -317,16 +317,16 @@ function At(e) {
|
|
|
317
317
|
function Pt(e) {
|
|
318
318
|
return Array.isArray(e) ? e.map(At).filter((t) => t !== null) : [];
|
|
319
319
|
}
|
|
320
|
-
function $t(e, t,
|
|
320
|
+
function $t(e, t, s) {
|
|
321
321
|
const v = new URL(
|
|
322
322
|
`/payment/admin/terminal/kiosk/${encodeURIComponent(t)}`,
|
|
323
323
|
e
|
|
324
324
|
);
|
|
325
|
-
return
|
|
325
|
+
return s.country && v.searchParams.set("country", s.country), s.businessId && v.searchParams.set("businessId", s.businessId), s.restaurantId && v.searchParams.set("restaurantId", s.restaurantId), v.toString();
|
|
326
326
|
}
|
|
327
327
|
function St(e, t) {
|
|
328
328
|
return !e || !t ? !1 : !t.ecrs.some(
|
|
329
|
-
(
|
|
329
|
+
(s) => s.gateway.toLowerCase().startsWith("ghl") && s.merchantId === e.merchantId && s.terminalId === e.terminalId
|
|
330
330
|
);
|
|
331
331
|
}
|
|
332
332
|
const Ct = {
|
|
@@ -369,16 +369,16 @@ const Ct = {
|
|
|
369
369
|
},
|
|
370
370
|
emits: ["retry"],
|
|
371
371
|
setup(e, { emit: t }) {
|
|
372
|
-
const
|
|
373
|
-
function
|
|
374
|
-
const
|
|
375
|
-
return n.merchantId &&
|
|
372
|
+
const s = e, v = t, { t: m } = Z(), f = Me();
|
|
373
|
+
function x(n) {
|
|
374
|
+
const p = [n.gateway];
|
|
375
|
+
return n.merchantId && p.push(`${m("order.paymentDeviceMerchantId")} ${n.merchantId}`), n.terminalId && p.push(`${m("order.paymentDeviceTerminalId")} ${n.terminalId}`), p.join(" · ");
|
|
376
376
|
}
|
|
377
|
-
const
|
|
378
|
-
const n =
|
|
377
|
+
const d = g(() => {
|
|
378
|
+
const n = s.paymentDevice;
|
|
379
379
|
return n ? [
|
|
380
380
|
{ key: "softpos", label: m("order.paymentDeviceSoftPos"), values: n.softPosGateways },
|
|
381
|
-
{ key: "ecr", label: m("order.paymentDeviceEcr"), values: n.ecrs.map(
|
|
381
|
+
{ key: "ecr", label: m("order.paymentDeviceEcr"), values: n.ecrs.map(x) },
|
|
382
382
|
{
|
|
383
383
|
key: "ecr-integrations",
|
|
384
384
|
label: m("order.paymentDeviceEcrIntegrations"),
|
|
@@ -386,10 +386,10 @@ const Ct = {
|
|
|
386
386
|
},
|
|
387
387
|
{ key: "qr", label: m("order.paymentDeviceQr"), values: n.qrGateways }
|
|
388
388
|
] : [];
|
|
389
|
-
}),
|
|
390
|
-
() => St(
|
|
389
|
+
}), c = g(
|
|
390
|
+
() => St(s.reported, s.paymentDevice)
|
|
391
391
|
);
|
|
392
|
-
async function
|
|
392
|
+
async function y(n) {
|
|
393
393
|
try {
|
|
394
394
|
await navigator.clipboard.writeText(n), f.open({
|
|
395
395
|
type: "success",
|
|
@@ -404,64 +404,64 @@ const Ct = {
|
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
return (n,
|
|
408
|
-
const
|
|
407
|
+
return (n, p) => {
|
|
408
|
+
const b = T("FmIcon"), w = T("FmButton"), I = T("FmChip");
|
|
409
409
|
return i(), u("div", Ct, [
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
410
|
+
r("div", Et, [
|
|
411
|
+
r("span", Lt, l(o(m)("order.paymentDevice")), 1),
|
|
412
|
+
r("span", Ft, l(o(m)("order.paymentDeviceStaffOnly")), 1)
|
|
413
413
|
]),
|
|
414
414
|
e.loading ? (i(), u("div", Kt, l(o(m)("order.paymentDeviceLoading")), 1)) : e.loadError ? (i(), u("div", Mt, [
|
|
415
|
-
|
|
416
|
-
h(
|
|
415
|
+
r("span", Bt, [
|
|
416
|
+
h(b, {
|
|
417
417
|
name: "error_outline",
|
|
418
418
|
size: "sm",
|
|
419
419
|
class: "shrink-0"
|
|
420
420
|
}),
|
|
421
|
-
|
|
421
|
+
K(" " + l(o(m)("order.paymentDeviceLoadError")), 1)
|
|
422
422
|
]),
|
|
423
|
-
h(
|
|
423
|
+
h(w, {
|
|
424
424
|
variant: "tertiary",
|
|
425
425
|
size: "md",
|
|
426
426
|
label: o(m)("order.retry"),
|
|
427
|
-
onClick:
|
|
427
|
+
onClick: p[0] || (p[0] = (A) => v("retry"))
|
|
428
428
|
}, null, 8, ["label"])
|
|
429
|
-
])) : e.paymentDevice ? (i(), u(
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
h(
|
|
429
|
+
])) : e.paymentDevice ? (i(), u(F, { key: 3 }, [
|
|
430
|
+
r("div", Yt, [
|
|
431
|
+
r("div", qt, [
|
|
432
|
+
r("span", zt, l(o(m)("order.paymentDeviceStatus")), 1),
|
|
433
|
+
r("span", null, [
|
|
434
|
+
h(I, {
|
|
435
435
|
compact: "",
|
|
436
436
|
variant: e.paymentDevice.status === "Active" ? "success" : "plain",
|
|
437
437
|
label: e.paymentDevice.status ?? o(m)("order.notSet")
|
|
438
438
|
}, null, 8, ["variant", "label"])
|
|
439
439
|
])
|
|
440
440
|
]),
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
r("div", jt, [
|
|
442
|
+
r("span", Gt, l(o(m)("order.paymentDeviceName")), 1),
|
|
443
|
+
r("span", Ht, l(e.paymentDevice.name ?? o(m)("order.notSet")), 1)
|
|
444
444
|
]),
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
r("div", Wt, [
|
|
446
|
+
r("span", Qt, l(o(m)("order.paymentDeviceId")), 1),
|
|
447
|
+
r("span", Xt, l(e.paymentDevice.id), 1)
|
|
448
448
|
]),
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
449
|
+
r("div", Jt, [
|
|
450
|
+
r("span", Zt, l(o(m)("order.paymentDeviceDeviceId")), 1),
|
|
451
|
+
r("span", en, l(e.paymentDevice.deviceId), 1)
|
|
452
452
|
])
|
|
453
453
|
]),
|
|
454
|
-
|
|
455
|
-
(i(!0), u(
|
|
456
|
-
key:
|
|
454
|
+
r("div", tn, [
|
|
455
|
+
(i(!0), u(F, null, q(d.value, (A) => (i(), u("div", {
|
|
456
|
+
key: A.key,
|
|
457
457
|
class: "flex flex-col gap-1"
|
|
458
458
|
}, [
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
(i(!0), u(
|
|
462
|
-
key:
|
|
459
|
+
r("span", nn, l(A.label), 1),
|
|
460
|
+
A.values.length === 0 ? (i(), u("span", an, l(o(m)("order.paymentDeviceNone")), 1)) : k("", !0),
|
|
461
|
+
(i(!0), u(F, null, q(A.values, (_) => (i(), u("span", {
|
|
462
|
+
key: _,
|
|
463
463
|
class: "fm-typo-en-body-md-600 text-fm-color-typo-primary break-all"
|
|
464
|
-
}, l(
|
|
464
|
+
}, l(_), 1))), 128))
|
|
465
465
|
]))), 128))
|
|
466
466
|
]),
|
|
467
467
|
e.portalUrl ? (i(), u("a", {
|
|
@@ -472,31 +472,31 @@ const Ct = {
|
|
|
472
472
|
class: "self-start flex items-center gap-1 fm-typo-en-body-md-600 text-fm-color-primary underline",
|
|
473
473
|
"data-testid": "payment-device-portal-link"
|
|
474
474
|
}, [
|
|
475
|
-
|
|
476
|
-
h(
|
|
475
|
+
K(l(o(m)("order.paymentDeviceOpenPortal")) + " ", 1),
|
|
476
|
+
h(b, {
|
|
477
477
|
name: "open_in_new",
|
|
478
478
|
size: "sm"
|
|
479
479
|
})
|
|
480
|
-
], 8, on)) :
|
|
480
|
+
], 8, on)) : k("", !0)
|
|
481
481
|
], 64)) : (i(), u("div", Rt, [
|
|
482
|
-
|
|
483
|
-
h(
|
|
482
|
+
r("span", Ot, [
|
|
483
|
+
h(b, {
|
|
484
484
|
name: "link_off",
|
|
485
485
|
size: "sm",
|
|
486
486
|
class: "shrink-0 text-fm-color-typo-secondary"
|
|
487
487
|
}),
|
|
488
|
-
|
|
488
|
+
K(" " + l(o(m)("order.paymentDeviceNotLinked")), 1)
|
|
489
489
|
]),
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
490
|
+
r("div", Nt, [
|
|
491
|
+
r("span", Vt, l(o(m)("order.paymentDeviceExpectedId")), 1),
|
|
492
|
+
r("button", {
|
|
493
493
|
type: "button",
|
|
494
494
|
class: "text-left fm-typo-en-body-md-600 text-fm-color-typo-primary font-mono text-sm break-all flex items-center gap-1 group",
|
|
495
495
|
title: o(m)("order.clickToCopy"),
|
|
496
|
-
onClick:
|
|
496
|
+
onClick: p[1] || (p[1] = (A) => y(e.expectedDeviceId))
|
|
497
497
|
}, [
|
|
498
|
-
|
|
499
|
-
h(
|
|
498
|
+
K(l(e.expectedDeviceId) + " ", 1),
|
|
499
|
+
h(b, {
|
|
500
500
|
name: "content_copy",
|
|
501
501
|
size: "sm",
|
|
502
502
|
class: "shrink-0 text-fm-color-typo-tertiary opacity-0 group-hover:opacity-100 transition-opacity"
|
|
@@ -505,18 +505,18 @@ const Ct = {
|
|
|
505
505
|
])
|
|
506
506
|
])),
|
|
507
507
|
e.reported ? (i(), u("div", rn, [
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
h(
|
|
508
|
+
r("span", sn, l(o(m)("order.paymentDeviceReportedByKiosk")), 1),
|
|
509
|
+
r("span", ln, l(x({ gateway: e.reported.gateway, merchantId: e.reported.merchantId, terminalId: e.reported.terminalId })), 1),
|
|
510
|
+
c.value ? (i(), u("span", cn, [
|
|
511
|
+
h(I, {
|
|
512
512
|
compact: "",
|
|
513
513
|
variant: "warning",
|
|
514
514
|
icon: "warning",
|
|
515
515
|
label: o(m)("order.paymentDeviceReportedDiffers"),
|
|
516
516
|
"data-testid": "payment-device-reported-differs"
|
|
517
517
|
}, null, 8, ["label"])
|
|
518
|
-
])) :
|
|
519
|
-
])) :
|
|
518
|
+
])) : k("", !0)
|
|
519
|
+
])) : k("", !0)
|
|
520
520
|
]);
|
|
521
521
|
};
|
|
522
522
|
}
|
|
@@ -525,11 +525,11 @@ async function mn() {
|
|
|
525
525
|
const e = Fe.getRestaurantId();
|
|
526
526
|
if (!e) throw new Error("Invalid restaurant");
|
|
527
527
|
const t = await Ke().get(un(e));
|
|
528
|
-
return oe(t).filter((
|
|
529
|
-
terminalId:
|
|
530
|
-
terminalName:
|
|
531
|
-
deviceId:
|
|
532
|
-
checkouts:
|
|
528
|
+
return oe(t).filter((s) => !!s.deviceId).map((s) => ({
|
|
529
|
+
terminalId: s._id,
|
|
530
|
+
terminalName: s.name,
|
|
531
|
+
deviceId: s.deviceId,
|
|
532
|
+
checkouts: s.paymentCheckouts ?? []
|
|
533
533
|
}));
|
|
534
534
|
}
|
|
535
535
|
async function pn() {
|
|
@@ -549,7 +549,7 @@ function ge(e, t) {
|
|
|
549
549
|
return `${e}-${t}`;
|
|
550
550
|
}
|
|
551
551
|
const yn = Le("payment", () => {
|
|
552
|
-
const e =
|
|
552
|
+
const e = M({
|
|
553
553
|
terminals: [],
|
|
554
554
|
loadError: null,
|
|
555
555
|
paymentDevices: null,
|
|
@@ -559,57 +559,57 @@ const yn = Le("payment", () => {
|
|
|
559
559
|
async function t() {
|
|
560
560
|
e.value.loadError = null;
|
|
561
561
|
try {
|
|
562
|
-
const
|
|
563
|
-
e.value.terminals =
|
|
564
|
-
...
|
|
565
|
-
checkouts: [...
|
|
562
|
+
const d = await Ee.listTerminalCheckouts();
|
|
563
|
+
e.value.terminals = d.map((c) => ({
|
|
564
|
+
...c,
|
|
565
|
+
checkouts: [...c.checkouts].sort((y, n) => y.sortOrder - n.sortOrder)
|
|
566
566
|
}));
|
|
567
567
|
} catch {
|
|
568
568
|
e.value.terminals = [], e.value.loadError = "error";
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
function
|
|
572
|
-
const
|
|
573
|
-
return e.value.terminals.find((n) => n.deviceId ===
|
|
571
|
+
function s(d, c) {
|
|
572
|
+
const y = ge(d, c);
|
|
573
|
+
return e.value.terminals.find((n) => n.deviceId === y) ?? null;
|
|
574
574
|
}
|
|
575
575
|
let v = 0;
|
|
576
576
|
async function m() {
|
|
577
|
-
const
|
|
577
|
+
const d = ++v;
|
|
578
578
|
e.value.paymentDevices = null, e.value.paymentDevicesLoadError = null, e.value.paymentDevicesLoading = !0;
|
|
579
579
|
try {
|
|
580
|
-
const
|
|
581
|
-
if (
|
|
582
|
-
e.value.paymentDevices =
|
|
580
|
+
const c = await Ee.listKioskPaymentDevices();
|
|
581
|
+
if (d !== v) return;
|
|
582
|
+
e.value.paymentDevices = c;
|
|
583
583
|
} catch {
|
|
584
|
-
if (
|
|
584
|
+
if (d !== v) return;
|
|
585
585
|
e.value.paymentDevicesLoadError = "error";
|
|
586
586
|
} finally {
|
|
587
|
-
|
|
587
|
+
d === v && (e.value.paymentDevicesLoading = !1);
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
590
|
function f() {
|
|
591
591
|
v++, e.value.paymentDevices = null, e.value.paymentDevicesLoading = !1, e.value.paymentDevicesLoadError = null;
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function x(d, c) {
|
|
594
594
|
var n;
|
|
595
|
-
const
|
|
596
|
-
return ((n = e.value.paymentDevices) == null ? void 0 : n.find((
|
|
595
|
+
const y = ge(d, c);
|
|
596
|
+
return ((n = e.value.paymentDevices) == null ? void 0 : n.find((p) => p.deviceId === y)) ?? null;
|
|
597
597
|
}
|
|
598
598
|
return {
|
|
599
599
|
state: e.value,
|
|
600
600
|
loadCheckouts: t,
|
|
601
|
-
terminalForDevice:
|
|
601
|
+
terminalForDevice: s,
|
|
602
602
|
loadPaymentDevices: m,
|
|
603
603
|
clearPaymentDevices: f,
|
|
604
|
-
paymentDeviceFor:
|
|
604
|
+
paymentDeviceFor: x
|
|
605
605
|
};
|
|
606
606
|
}), vn = 30, fn = 24 * 60 * 60 * 1e3;
|
|
607
607
|
function Oe(e, t = /* @__PURE__ */ new Date()) {
|
|
608
608
|
if (!e.licenseId || !e.expiredAt) return { kind: "none" };
|
|
609
|
-
const
|
|
610
|
-
if (v <= 0) return { kind: "expired", expiredAt:
|
|
609
|
+
const s = e.expiredAt, v = s.getTime() - t.getTime();
|
|
610
|
+
if (v <= 0) return { kind: "expired", expiredAt: s };
|
|
611
611
|
const m = Math.ceil(v / fn);
|
|
612
|
-
return m <= vn ? { kind: "expiring", expiredAt:
|
|
612
|
+
return m <= vn ? { kind: "expiring", expiredAt: s, daysLeft: m } : { kind: "active", expiredAt: s };
|
|
613
613
|
}
|
|
614
614
|
function hn(e, t) {
|
|
615
615
|
switch (e.kind) {
|
|
@@ -631,7 +631,7 @@ function hn(e, t) {
|
|
|
631
631
|
return { variant: "plain", labelKey: "order.licenseNone", params: {} };
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function qa(e, t = /* @__PURE__ */ new Date()) {
|
|
635
635
|
return e.status === "EXPIRED" ? { variant: "critical", labelKey: "order.licenseExpired", params: {} } : e.status === "FREE" ? { variant: "info", labelKey: "order.licenseFree", params: {} } : Oe(
|
|
636
636
|
{ licenseId: e.id, expiredAt: new Date(e.expiredAt) },
|
|
637
637
|
t
|
|
@@ -639,21 +639,21 @@ function Ua(e, t = /* @__PURE__ */ new Date()) {
|
|
|
639
639
|
}
|
|
640
640
|
function bn(e, t) {
|
|
641
641
|
if (!t) return null;
|
|
642
|
-
const
|
|
643
|
-
return
|
|
642
|
+
const s = e === "TABLET_APP";
|
|
643
|
+
return s && t === "KIOSK" ? "order.licenseUsesKioskLicense" : !s && t === "TABLET" ? "order.licenseUsesTabletLicense" : null;
|
|
644
644
|
}
|
|
645
645
|
function le(e, t) {
|
|
646
|
-
const
|
|
647
|
-
const
|
|
648
|
-
return !f ||
|
|
646
|
+
const s = e.filter((f) => f.type === t && f.status !== "EXPIRED"), v = s.filter((f) => f.status === "IN_USE").length, m = s.reduce((f, x) => {
|
|
647
|
+
const d = new Date(x.expiredAt);
|
|
648
|
+
return !f || d < f ? d : f;
|
|
649
649
|
}, null);
|
|
650
|
-
return { type: t, total:
|
|
650
|
+
return { type: t, total: s.length, used: v, free: s.length - v, nextExpiry: m };
|
|
651
651
|
}
|
|
652
|
-
function
|
|
653
|
-
const t = le(e.licenses, "KIOSK").free,
|
|
652
|
+
function za(e) {
|
|
653
|
+
const t = le(e.licenses, "KIOSK").free, s = le(e.licenses, "TABLET").free;
|
|
654
654
|
return {
|
|
655
655
|
kiosk: t > 0 ? "KIOSK" : "none",
|
|
656
|
-
tablet:
|
|
656
|
+
tablet: s > 0 ? "TABLET" : e.tabletMayUseKioskLicense && t > 0 ? "KIOSK" : "none"
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
659
|
function gn(e) {
|
|
@@ -688,7 +688,7 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
688
688
|
},
|
|
689
689
|
setup(e) {
|
|
690
690
|
G.extend(kt);
|
|
691
|
-
const { t } = Z(), { canManageDevices:
|
|
691
|
+
const { t } = Z(), { canManageDevices: s, canBindDevice: v } = Be(), m = ot(), f = Me(), x = ht(), d = at(), c = yn(), y = M(!1), n = e, p = g(
|
|
692
692
|
() => hn(
|
|
693
693
|
Oe({
|
|
694
694
|
licenseId: n.device.licenseId,
|
|
@@ -696,104 +696,104 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
696
696
|
}),
|
|
697
697
|
(a) => G(a).format("DD MMM YYYY")
|
|
698
698
|
)
|
|
699
|
-
),
|
|
699
|
+
), b = g(
|
|
700
700
|
() => bn(n.device.deviceAppType, n.licenseType)
|
|
701
701
|
);
|
|
702
|
-
function
|
|
702
|
+
function w(a) {
|
|
703
703
|
return a === "TABLET" ? t("order.licenseTypeTablet") : a === "KIOSK" ? t("order.licenseTypeKiosk") : "-";
|
|
704
704
|
}
|
|
705
|
-
const
|
|
705
|
+
const I = M(""), A = g(
|
|
706
706
|
() => n.device.deviceAppType === "KIOSK_APP" && Se.gte(Se.coerce(n.device.deviceAppVersion ?? "") ?? "0.0.0", "2.4.0")
|
|
707
|
-
),
|
|
707
|
+
), _ = g(
|
|
708
708
|
() => {
|
|
709
709
|
var a;
|
|
710
|
-
return
|
|
711
|
-
((a =
|
|
710
|
+
return c.terminalForDevice(
|
|
711
|
+
((a = d.currentRestaurant.value) == null ? void 0 : a._id) ?? "",
|
|
712
712
|
n.device.machineId
|
|
713
713
|
);
|
|
714
714
|
}
|
|
715
|
-
), { isInternal:
|
|
716
|
-
() =>
|
|
717
|
-
),
|
|
715
|
+
), { isInternal: N } = it(), B = g(
|
|
716
|
+
() => N.value && n.device.deviceAppType === "KIOSK_APP"
|
|
717
|
+
), z = g(() => A.value || B.value), R = g(
|
|
718
718
|
() => {
|
|
719
719
|
var a;
|
|
720
|
-
return ge(((a =
|
|
720
|
+
return ge(((a = d.currentRestaurant.value) == null ? void 0 : a._id) ?? "", n.device.machineId);
|
|
721
721
|
}
|
|
722
|
-
),
|
|
722
|
+
), P = g(
|
|
723
723
|
() => {
|
|
724
724
|
var a;
|
|
725
|
-
return
|
|
726
|
-
((a =
|
|
725
|
+
return c.paymentDeviceFor(
|
|
726
|
+
((a = d.currentRestaurant.value) == null ? void 0 : a._id) ?? "",
|
|
727
727
|
n.device.machineId
|
|
728
728
|
);
|
|
729
729
|
}
|
|
730
|
-
),
|
|
731
|
-
var a,
|
|
732
|
-
return
|
|
733
|
-
country:
|
|
734
|
-
businessId: (a =
|
|
735
|
-
restaurantId: (
|
|
730
|
+
), V = g(() => {
|
|
731
|
+
var a, D;
|
|
732
|
+
return P.value ? $t(window.location.origin, P.value.id, {
|
|
733
|
+
country: d.currentCountry.value,
|
|
734
|
+
businessId: (a = d.currentBusiness.value) == null ? void 0 : a._id,
|
|
735
|
+
restaurantId: (D = d.currentRestaurant.value) == null ? void 0 : D._id
|
|
736
736
|
}) : null;
|
|
737
|
-
}), te =
|
|
737
|
+
}), te = g(() => {
|
|
738
738
|
var a;
|
|
739
739
|
return ((a = n.device) == null ? void 0 : a.deviceAppType) === "TABLET_APP" ? t("order.licenseTypeTablet") : t("order.licenseTypeKiosk");
|
|
740
|
-
}), W =
|
|
741
|
-
const a = [],
|
|
742
|
-
return
|
|
740
|
+
}), W = g(() => {
|
|
741
|
+
const a = [], D = Ne(), E = Ve();
|
|
742
|
+
return D.length > 0 && a.push({
|
|
743
743
|
key: "scannerInfo",
|
|
744
744
|
title: t("order.scannerInfo"),
|
|
745
|
-
entries:
|
|
746
|
-
}),
|
|
745
|
+
entries: D
|
|
746
|
+
}), E.length > 0 && a.push({
|
|
747
747
|
key: "printerInfo",
|
|
748
748
|
title: t("order.printerInfo"),
|
|
749
|
-
entries:
|
|
749
|
+
entries: E
|
|
750
750
|
}), a;
|
|
751
|
-
}), ce =
|
|
751
|
+
}), ce = g(() => W.value.length > 0);
|
|
752
752
|
function Ne() {
|
|
753
|
-
var
|
|
753
|
+
var E;
|
|
754
754
|
const a = n.device.config.scannerInfo;
|
|
755
755
|
if (!a || n.device.deviceAppType === "TABLET_APP")
|
|
756
756
|
return [];
|
|
757
|
-
const
|
|
757
|
+
const D = [
|
|
758
758
|
{
|
|
759
759
|
label: "Type",
|
|
760
760
|
value: Ue(a.type)
|
|
761
761
|
}
|
|
762
762
|
];
|
|
763
|
-
return a.type === "CAPACITOR" && a.lensFacing &&
|
|
763
|
+
return a.type === "CAPACITOR" && a.lensFacing && D.push({
|
|
764
764
|
label: "Lens Facing",
|
|
765
765
|
value: a.lensFacing === "FRONT" ? "Front" : "Back"
|
|
766
|
-
}), a.type === "SUNMI" &&
|
|
766
|
+
}), a.type === "SUNMI" && D.push({
|
|
767
767
|
label: "Connection",
|
|
768
|
-
value: ((
|
|
769
|
-
}),
|
|
768
|
+
value: ((E = a.connection) == null ? void 0 : E.type) ?? "-"
|
|
769
|
+
}), D;
|
|
770
770
|
}
|
|
771
771
|
function Ve() {
|
|
772
772
|
var ae, se;
|
|
773
773
|
const a = n.device.config.printerInfo;
|
|
774
774
|
if (!a)
|
|
775
775
|
return [];
|
|
776
|
-
const
|
|
777
|
-
if (!
|
|
776
|
+
const D = ((ae = a.id) == null ? void 0 : ae.trim()) ?? "", E = ((se = a.name) == null ? void 0 : se.trim()) ?? "";
|
|
777
|
+
if (!D || !E)
|
|
778
778
|
return [];
|
|
779
|
-
const
|
|
780
|
-
{ label: "Name", value:
|
|
781
|
-
{ label: "Printer ID", value:
|
|
782
|
-
],
|
|
783
|
-
switch (
|
|
779
|
+
const $ = [
|
|
780
|
+
{ label: "Name", value: E },
|
|
781
|
+
{ label: "Printer ID", value: D }
|
|
782
|
+
], L = a.hardware;
|
|
783
|
+
switch ($.push({ label: "Connection Type", value: L.connection.type }), L.connection.type) {
|
|
784
784
|
case "IP":
|
|
785
785
|
case "BLUETOOTH":
|
|
786
786
|
case "DRIVER":
|
|
787
|
-
|
|
787
|
+
$.push({ label: "Path", value: L.connection.path });
|
|
788
788
|
break;
|
|
789
789
|
case "STAR":
|
|
790
|
-
|
|
790
|
+
$.push({ label: "Port Name", value: L.connection.portName }), $.push({ label: "Emulation Mode", value: L.connection.emulationMode });
|
|
791
791
|
break;
|
|
792
792
|
case "USB":
|
|
793
|
-
|
|
793
|
+
$.push({ label: "Vendor ID", value: L.connection.vendorId }), $.push({ label: "Product ID", value: L.connection.productId });
|
|
794
794
|
break;
|
|
795
795
|
}
|
|
796
|
-
return
|
|
796
|
+
return $.push({ label: "Encoder Type", value: L.encoderConfig.type }), $.push({ label: "DPI", value: String(L.encoderConfig.dpi) }), $.push({ label: "Paper Width (mm)", value: String(L.encoderConfig.paperWidthInMm) }), L.encoderConfig.type === "TSPL" && $.push({ label: "Paper Height (mm)", value: String(L.encoderConfig.paperHeightInMm) }), a.backup && ($.push({ label: "Backup Type", value: a.backup.type }), a.backup.type === "PRINTER_ID" && $.push({ label: "Backup Printer ID", value: a.backup.printerId })), $;
|
|
797
797
|
}
|
|
798
798
|
function Ue(a) {
|
|
799
799
|
switch (a) {
|
|
@@ -809,10 +809,10 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
809
809
|
return a;
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
|
-
const de =
|
|
812
|
+
const de = g(() => {
|
|
813
813
|
var a;
|
|
814
814
|
return ((a = n.device) == null ? void 0 : a.deviceAppType) === "TABLET_APP";
|
|
815
|
-
}), Ye =
|
|
815
|
+
}), Ye = g(() => {
|
|
816
816
|
const a = n.device.machineId;
|
|
817
817
|
return !a || a.length <= 16 ? a : `${a.slice(0, 8)}...${a.slice(-4)}`;
|
|
818
818
|
});
|
|
@@ -838,13 +838,13 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
838
838
|
return G(a).format("DD MMM YYYY HH:mm:ss");
|
|
839
839
|
}
|
|
840
840
|
function je() {
|
|
841
|
-
|
|
841
|
+
I.value = "", m.open({
|
|
842
842
|
title: t("order.unbindKioskDevice"),
|
|
843
843
|
contentComponent: xt,
|
|
844
844
|
contentComponentProps: {
|
|
845
845
|
machineId: n.device.machineId,
|
|
846
846
|
"onUpdate:modelValue": (a) => {
|
|
847
|
-
|
|
847
|
+
I.value = a;
|
|
848
848
|
}
|
|
849
849
|
},
|
|
850
850
|
dismissAway: !1,
|
|
@@ -859,7 +859,7 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
859
859
|
close: !0
|
|
860
860
|
}
|
|
861
861
|
}).onPrimary(async () => {
|
|
862
|
-
|
|
862
|
+
I.value == n.device.machineId ? (await tt(), f.open({
|
|
863
863
|
type: "success",
|
|
864
864
|
message: t("order.unbindSuccess"),
|
|
865
865
|
position: "bottom"
|
|
@@ -870,27 +870,27 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
870
870
|
});
|
|
871
871
|
});
|
|
872
872
|
}
|
|
873
|
-
const xe =
|
|
873
|
+
const xe = g(() => {
|
|
874
874
|
var a;
|
|
875
875
|
return (a = n.device) == null ? void 0 : a.pinInfo;
|
|
876
|
-
}), Ge =
|
|
876
|
+
}), Ge = g(() => Q.value ? t("order.reEnterNewPin") : t("order.enterNewPin")), Q = M(!1), re = M(), me = M(), pe = M(!1), ne = M(n.device.remarkInfo ?? ""), U = M("app"), He = g(() => {
|
|
877
877
|
const a = [
|
|
878
878
|
{
|
|
879
879
|
label: t("order.deviceAppInfo"),
|
|
880
880
|
value: "app"
|
|
881
881
|
}
|
|
882
882
|
];
|
|
883
|
-
return
|
|
883
|
+
return z.value && a.push({
|
|
884
884
|
label: t("order.paymentGateway"),
|
|
885
885
|
value: "payment-gateway"
|
|
886
886
|
}), ce.value && a.push({
|
|
887
887
|
label: t("order.other"),
|
|
888
888
|
value: "other"
|
|
889
889
|
}), a;
|
|
890
|
-
}), j =
|
|
890
|
+
}), j = g(() => {
|
|
891
891
|
var a;
|
|
892
892
|
return ((a = n.device.remarkInfo) == null ? void 0 : a.trim()) ?? "";
|
|
893
|
-
}), We =
|
|
893
|
+
}), We = g(() => {
|
|
894
894
|
const a = [
|
|
895
895
|
{
|
|
896
896
|
label: t("order.deviceType"),
|
|
@@ -939,16 +939,16 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
939
939
|
}), n.device.licenseId ? a.push(
|
|
940
940
|
{
|
|
941
941
|
label: t("order.licenseType"),
|
|
942
|
-
value:
|
|
942
|
+
value: w(n.licenseType)
|
|
943
943
|
},
|
|
944
944
|
{ label: t("order.licenseId"), value: gn(n.device.licenseId), isMono: !0 },
|
|
945
945
|
{
|
|
946
946
|
label: t("order.licenseExpiry"),
|
|
947
947
|
// The chip text already carries the date when the licence is simply active.
|
|
948
|
-
value: n.device.licenseExpiredAt ?
|
|
948
|
+
value: n.device.licenseExpiredAt ? p.value.variant === "success" ? G(n.device.licenseExpiredAt).format("DD MMM YYYY") : `${G(n.device.licenseExpiredAt).format("DD MMM YYYY")} · ${t(p.value.labelKey, p.value.params)}` : t("order.notSet")
|
|
949
949
|
}
|
|
950
950
|
) : a.push({ label: t("order.licenseType"), value: t("order.licenseNoneDetail") }), a;
|
|
951
|
-
}), ye =
|
|
951
|
+
}), ye = g(() => ne.value.trim()), _e = g(() => ye.value !== j.value);
|
|
952
952
|
Pe(
|
|
953
953
|
() => n.device.remarkInfo,
|
|
954
954
|
(a) => {
|
|
@@ -957,14 +957,14 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
957
957
|
), Pe(
|
|
958
958
|
() => ce.value,
|
|
959
959
|
(a) => {
|
|
960
|
-
!a &&
|
|
960
|
+
!a && U.value === "other" && (U.value = "app");
|
|
961
961
|
}
|
|
962
962
|
);
|
|
963
963
|
function Qe() {
|
|
964
|
-
|
|
964
|
+
y.value = !0;
|
|
965
965
|
}
|
|
966
966
|
function ve() {
|
|
967
|
-
Q.value = !1, re.value = null, me.value = null,
|
|
967
|
+
Q.value = !1, re.value = null, me.value = null, y.value = !1, U.value = "app";
|
|
968
968
|
}
|
|
969
969
|
function Ie(a) {
|
|
970
970
|
Q.value ? (me.value = a, Xe()) : (re.value = a, Q.value = !0);
|
|
@@ -987,7 +987,7 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
987
987
|
if (_e.value) {
|
|
988
988
|
pe.value = !0;
|
|
989
989
|
try {
|
|
990
|
-
await
|
|
990
|
+
await x.updateDeviceRemark(ye.value === "" ? null : ye.value, n.device.machineId), f.open({
|
|
991
991
|
type: "success",
|
|
992
992
|
message: t("order.deviceRemarkUpdated"),
|
|
993
993
|
position: "top"
|
|
@@ -1004,55 +1004,55 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
1006
|
async function et() {
|
|
1007
|
-
await
|
|
1007
|
+
await x.updateDevicePin(re.value, n.device.machineId);
|
|
1008
1008
|
}
|
|
1009
1009
|
async function tt() {
|
|
1010
|
-
await
|
|
1010
|
+
await x.unbind(n.device.machineId);
|
|
1011
1011
|
}
|
|
1012
|
-
return (a,
|
|
1012
|
+
return (a, D) => {
|
|
1013
1013
|
var Te;
|
|
1014
|
-
const
|
|
1014
|
+
const E = T("FmButton"), $ = T("FmTabs"), L = T("FmTextField"), ae = T("FmPinField"), se = T("FmSideSheet"), X = T("FmIcon"), De = T("FmChip");
|
|
1015
1015
|
return i(), u("div", kn, [
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
de.value && e.device.slotInfo ? (i(), u("span", Dn, l(e.device.slotInfo), 1)) :
|
|
1016
|
+
r("div", xn, [
|
|
1017
|
+
r("div", _n, [
|
|
1018
|
+
r("span", In, l(de.value ? o(t)("order.licenseTypeTablet") : o(t)("order.licenseTypeKiosk")), 1),
|
|
1019
|
+
de.value && e.device.slotInfo ? (i(), u("span", Dn, l(e.device.slotInfo), 1)) : k("", !0)
|
|
1020
1020
|
]),
|
|
1021
|
-
|
|
1021
|
+
r("div", Tn, [
|
|
1022
1022
|
h(se, {
|
|
1023
1023
|
header: j.value || e.device.name,
|
|
1024
1024
|
"dismiss-away": "",
|
|
1025
1025
|
maxWidth: 700,
|
|
1026
1026
|
"onOn:clickedAway": ve
|
|
1027
1027
|
}, {
|
|
1028
|
-
"side-sheet-button":
|
|
1029
|
-
h(
|
|
1028
|
+
"side-sheet-button": Y(() => [
|
|
1029
|
+
h(E, {
|
|
1030
1030
|
variant: "tertiary",
|
|
1031
1031
|
size: "md",
|
|
1032
1032
|
label: o(t)("order.deviceDetails")
|
|
1033
1033
|
}, null, 8, ["label"])
|
|
1034
1034
|
]),
|
|
1035
|
-
default:
|
|
1035
|
+
default: Y(() => {
|
|
1036
1036
|
var we, Ae;
|
|
1037
1037
|
return [
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
Q.value ?
|
|
1038
|
+
y.value ? (i(), u("div", qn, [
|
|
1039
|
+
r("div", zn, [
|
|
1040
|
+
r("div", jn, [
|
|
1041
|
+
r("span", Gn, l(Ge.value), 1),
|
|
1042
|
+
r("span", Hn, [
|
|
1043
|
+
Q.value ? k("", !0) : (i(), C(ae, {
|
|
1044
1044
|
key: 0,
|
|
1045
1045
|
length: 4,
|
|
1046
|
-
onComplete:
|
|
1046
|
+
onComplete: D[2] || (D[2] = (S) => Ie(S))
|
|
1047
1047
|
})),
|
|
1048
|
-
Q.value ? (i(),
|
|
1048
|
+
Q.value ? (i(), C(ae, {
|
|
1049
1049
|
key: 1,
|
|
1050
1050
|
length: 4,
|
|
1051
|
-
onComplete:
|
|
1052
|
-
})) :
|
|
1051
|
+
onComplete: D[3] || (D[3] = (S) => Ie(S))
|
|
1052
|
+
})) : k("", !0)
|
|
1053
1053
|
])
|
|
1054
1054
|
]),
|
|
1055
|
-
h(
|
|
1055
|
+
h(E, {
|
|
1056
1056
|
class: "w-1/3",
|
|
1057
1057
|
variant: "secondary",
|
|
1058
1058
|
label: o(t)("order.cancelResetPin"),
|
|
@@ -1060,37 +1060,37 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
1060
1060
|
}, null, 8, ["label"])
|
|
1061
1061
|
])
|
|
1062
1062
|
])) : (i(), u("div", wn, [
|
|
1063
|
-
|
|
1064
|
-
h(
|
|
1065
|
-
"model-value":
|
|
1066
|
-
"onUpdate:modelValue":
|
|
1063
|
+
r("div", null, [
|
|
1064
|
+
h($, {
|
|
1065
|
+
"model-value": U.value,
|
|
1066
|
+
"onUpdate:modelValue": D[0] || (D[0] = (S) => U.value = S),
|
|
1067
1067
|
items: He.value,
|
|
1068
1068
|
showMoreAt: 99
|
|
1069
1069
|
}, null, 8, ["model-value", "items"])
|
|
1070
1070
|
]),
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
(i(!0), u(
|
|
1075
|
-
key:
|
|
1071
|
+
U.value === "app" ? (i(), u("div", An, [
|
|
1072
|
+
r("span", Pn, l(o(t)("order.deviceAppInfo")), 1),
|
|
1073
|
+
r("div", $n, [
|
|
1074
|
+
(i(!0), u(F, null, q(We.value, (S) => (i(), u("div", {
|
|
1075
|
+
key: S.label,
|
|
1076
1076
|
class: "flex flex-col gap-1"
|
|
1077
1077
|
}, [
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
class: $e(["fm-typo-en-body-md-600 text-fm-color-typo-primary break-all",
|
|
1081
|
-
}, l(
|
|
1078
|
+
r("span", Sn, l(S.label), 1),
|
|
1079
|
+
r("span", {
|
|
1080
|
+
class: $e(["fm-typo-en-body-md-600 text-fm-color-typo-primary break-all", S.isMono ? "font-mono text-sm" : ""])
|
|
1081
|
+
}, l(S.value), 3)
|
|
1082
1082
|
]))), 128))
|
|
1083
1083
|
]),
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
h(
|
|
1084
|
+
r("div", Cn, [
|
|
1085
|
+
r("span", En, l(o(t)("order.deviceRemark")), 1),
|
|
1086
|
+
h(L, {
|
|
1087
1087
|
"model-value": ne.value,
|
|
1088
1088
|
placeholder: o(t)("order.deviceRemarkPlaceholder"),
|
|
1089
1089
|
"onUpdate:modelValue": Je
|
|
1090
1090
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
h(
|
|
1091
|
+
r("div", Ln, [
|
|
1092
|
+
r("span", Fn, l(ne.value.length) + "/50 ", 1),
|
|
1093
|
+
h(E, {
|
|
1094
1094
|
class: "w-auto",
|
|
1095
1095
|
variant: "secondary",
|
|
1096
1096
|
label: o(t)("order.saveDeviceRemark"),
|
|
@@ -1098,56 +1098,56 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
1098
1098
|
onClick: Ze
|
|
1099
1099
|
}, null, 8, ["label", "disabled"])
|
|
1100
1100
|
]),
|
|
1101
|
-
|
|
1101
|
+
r("span", Kn, l(o(t)("order.current")) + ": " + l(j.value || o(t)("order.notSet")), 1)
|
|
1102
1102
|
]),
|
|
1103
|
-
o(
|
|
1103
|
+
o(s) ? (i(), C(E, {
|
|
1104
1104
|
key: 0,
|
|
1105
1105
|
class: "w-full",
|
|
1106
1106
|
variant: "primary",
|
|
1107
1107
|
label: (we = e.device) != null && we.pinInfo ? o(t)("order.resetDevicePin") : o(t)("order.setDevicePin"),
|
|
1108
1108
|
onClick: Qe
|
|
1109
|
-
}, null, 8, ["label"])) :
|
|
1110
|
-
])) :
|
|
1111
|
-
|
|
1112
|
-
(i(!0), u(
|
|
1113
|
-
key:
|
|
1109
|
+
}, null, 8, ["label"])) : k("", !0)
|
|
1110
|
+
])) : U.value === "other" && ce.value ? (i(), u("div", Mn, [
|
|
1111
|
+
r("span", Bn, l(o(t)("order.other")), 1),
|
|
1112
|
+
(i(!0), u(F, null, q(W.value, (S) => (i(), u("div", {
|
|
1113
|
+
key: S.key,
|
|
1114
1114
|
class: "flex flex-col gap-2"
|
|
1115
1115
|
}, [
|
|
1116
|
-
|
|
1117
|
-
(i(!0), u(
|
|
1116
|
+
r("span", Rn, l(S.title), 1),
|
|
1117
|
+
(i(!0), u(F, null, q(S.entries, (fe) => (i(), u("div", {
|
|
1118
1118
|
key: fe.label,
|
|
1119
1119
|
class: "flex flex-col gap-1"
|
|
1120
1120
|
}, [
|
|
1121
|
-
|
|
1122
|
-
|
|
1121
|
+
r("span", On, l(fe.label), 1),
|
|
1122
|
+
r("span", Nn, l(fe.value), 1)
|
|
1123
1123
|
]))), 128))
|
|
1124
1124
|
]))), 128))
|
|
1125
|
-
])) :
|
|
1126
|
-
B.value ? (i(),
|
|
1125
|
+
])) : U.value === "payment-gateway" && z.value ? (i(), u(F, { key: 2 }, [
|
|
1126
|
+
B.value ? (i(), C(dn, {
|
|
1127
1127
|
key: 0,
|
|
1128
|
-
"payment-device":
|
|
1129
|
-
loading: o(
|
|
1130
|
-
"load-error": o(
|
|
1131
|
-
"expected-device-id":
|
|
1132
|
-
"portal-url":
|
|
1128
|
+
"payment-device": P.value,
|
|
1129
|
+
loading: o(c).state.paymentDevicesLoading,
|
|
1130
|
+
"load-error": o(c).state.paymentDevicesLoadError !== null,
|
|
1131
|
+
"expected-device-id": R.value,
|
|
1132
|
+
"portal-url": V.value,
|
|
1133
1133
|
reported: e.device.config.terminalInfo ?? null,
|
|
1134
|
-
onRetry:
|
|
1135
|
-
}, null, 8, ["payment-device", "loading", "load-error", "expected-device-id", "portal-url", "reported"])) :
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1134
|
+
onRetry: D[1] || (D[1] = (S) => o(c).loadPaymentDevices())
|
|
1135
|
+
}, null, 8, ["payment-device", "loading", "load-error", "expected-device-id", "portal-url", "reported"])) : k("", !0),
|
|
1136
|
+
A.value ? (i(), u("div", Vn, [
|
|
1137
|
+
r("span", Un, l(o(t)("order.paymentGateway")), 1),
|
|
1138
|
+
r("span", Yn, l(o(t)("order.availablePaymentMethodsHint")), 1),
|
|
1139
1139
|
h(Tt, {
|
|
1140
|
-
checkouts: ((Ae =
|
|
1141
|
-
"load-error": o(
|
|
1140
|
+
checkouts: ((Ae = _.value) == null ? void 0 : Ae.checkouts) ?? [],
|
|
1141
|
+
"load-error": o(c).state.loadError
|
|
1142
1142
|
}, null, 8, ["checkouts", "load-error"])
|
|
1143
|
-
])) :
|
|
1144
|
-
], 64)) :
|
|
1143
|
+
])) : k("", !0)
|
|
1144
|
+
], 64)) : k("", !0)
|
|
1145
1145
|
]))
|
|
1146
1146
|
];
|
|
1147
1147
|
}),
|
|
1148
1148
|
_: 1
|
|
1149
1149
|
}, 8, ["header"]),
|
|
1150
|
-
o(v) ? (i(),
|
|
1150
|
+
o(v) ? (i(), C(E, {
|
|
1151
1151
|
key: 0,
|
|
1152
1152
|
variant: "plain",
|
|
1153
1153
|
icon: "link_off",
|
|
@@ -1155,46 +1155,46 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
1155
1155
|
"aria-label": o(t)("order.unbindKioskDevice"),
|
|
1156
1156
|
title: o(t)("order.unbindKioskDevice"),
|
|
1157
1157
|
onClick: je
|
|
1158
|
-
}, null, 8, ["aria-label", "title"])) :
|
|
1158
|
+
}, null, 8, ["aria-label", "title"])) : k("", !0)
|
|
1159
1159
|
])
|
|
1160
1160
|
]),
|
|
1161
|
-
|
|
1161
|
+
r("div", {
|
|
1162
1162
|
class: "fm-typo-en-body-md-600 text-fm-color-typo-primary mb-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
1163
1163
|
title: j.value || e.device.name
|
|
1164
1164
|
}, l(j.value || e.device.name), 9, Wn),
|
|
1165
|
-
|
|
1165
|
+
r("div", {
|
|
1166
1166
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mb-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
1167
1167
|
title: j.value ? e.device.name : o(t)("order.notSet")
|
|
1168
1168
|
}, [
|
|
1169
|
-
j.value ? (i(), u(
|
|
1170
|
-
|
|
1171
|
-
], 64)) : (i(), u(
|
|
1172
|
-
|
|
1169
|
+
j.value ? (i(), u(F, { key: 0 }, [
|
|
1170
|
+
K(l(e.device.name), 1)
|
|
1171
|
+
], 64)) : (i(), u(F, { key: 1 }, [
|
|
1172
|
+
K(l(o(t)("order.deviceRemark")) + ": " + l(o(t)("order.notSet")), 1)
|
|
1173
1173
|
], 64))
|
|
1174
1174
|
], 8, Qn),
|
|
1175
|
-
|
|
1175
|
+
r("div", {
|
|
1176
1176
|
class: "flex items-center gap-1 mb-2 cursor-pointer group",
|
|
1177
1177
|
onClick: qe,
|
|
1178
1178
|
title: o(t)("order.clickToCopy")
|
|
1179
1179
|
}, [
|
|
1180
|
-
|
|
1180
|
+
r("span", Jn, l(Ye.value), 1),
|
|
1181
1181
|
h(X, {
|
|
1182
1182
|
name: "content_copy",
|
|
1183
1183
|
class: "text-fm-color-typo-tertiary opacity-0 group-hover:opacity-100 transition-opacity"
|
|
1184
1184
|
})
|
|
1185
1185
|
], 8, Xn),
|
|
1186
|
-
|
|
1187
|
-
|
|
1186
|
+
r("div", Zn, [
|
|
1187
|
+
r("span", ea, [
|
|
1188
1188
|
h(X, { name: "smartphone" }),
|
|
1189
|
-
|
|
1189
|
+
K(" v" + l(e.device.deviceAppVersion ?? "?"), 1)
|
|
1190
1190
|
]),
|
|
1191
1191
|
e.device.deviceAppOTAVersion ? (i(), u("span", ta, [
|
|
1192
1192
|
h(X, { name: "system_update" }),
|
|
1193
|
-
|
|
1194
|
-
])) :
|
|
1195
|
-
|
|
1193
|
+
K(" " + l(e.device.deviceAppOTAVersion), 1)
|
|
1194
|
+
])) : k("", !0),
|
|
1195
|
+
r("span", na, [
|
|
1196
1196
|
h(X, { name: "lock" }),
|
|
1197
|
-
|
|
1197
|
+
K(" " + l(xe.value ? o(t)("order.pinSet") : o(t)("order.noPin")), 1)
|
|
1198
1198
|
]),
|
|
1199
1199
|
e.device.lastStartup ? (i(), u("span", {
|
|
1200
1200
|
key: 1,
|
|
@@ -1202,36 +1202,36 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
1202
1202
|
title: ue(e.device.lastStartup)
|
|
1203
1203
|
}, [
|
|
1204
1204
|
h(X, { name: "schedule" }),
|
|
1205
|
-
|
|
1206
|
-
], 8, aa)) :
|
|
1205
|
+
K(" " + l(ze(e.device.lastStartup)), 1)
|
|
1206
|
+
], 8, aa)) : k("", !0)
|
|
1207
1207
|
]),
|
|
1208
|
-
|
|
1209
|
-
|
|
1208
|
+
r("div", oa, [
|
|
1209
|
+
r("span", ra, l(o(t)("order.licenseLabel")), 1),
|
|
1210
1210
|
h(De, {
|
|
1211
1211
|
compact: "",
|
|
1212
|
-
variant:
|
|
1213
|
-
label: o(t)(
|
|
1212
|
+
variant: p.value.variant,
|
|
1213
|
+
label: o(t)(p.value.labelKey, p.value.params)
|
|
1214
1214
|
}, null, 8, ["variant", "label"]),
|
|
1215
|
-
|
|
1215
|
+
b.value ? (i(), C(De, {
|
|
1216
1216
|
key: 0,
|
|
1217
1217
|
compact: "",
|
|
1218
1218
|
variant: "warning",
|
|
1219
1219
|
icon: "warning",
|
|
1220
|
-
label: o(t)(
|
|
1221
|
-
}, null, 8, ["label"])) :
|
|
1220
|
+
label: o(t)(b.value)
|
|
1221
|
+
}, null, 8, ["label"])) : k("", !0)
|
|
1222
1222
|
]),
|
|
1223
|
-
B.value && o(
|
|
1223
|
+
B.value && o(c).state.paymentDevices ? (i(), u("div", {
|
|
1224
1224
|
key: 0,
|
|
1225
|
-
class: $e(["flex items-center gap-1 mt-2 fm-typo-en-body-sm-400",
|
|
1225
|
+
class: $e(["flex items-center gap-1 mt-2 fm-typo-en-body-sm-400", P.value ? "text-fm-color-typo-secondary" : "text-fm-color-system-warning-300"]),
|
|
1226
1226
|
"data-testid": "device-payment-line"
|
|
1227
1227
|
}, [
|
|
1228
1228
|
h(X, {
|
|
1229
|
-
name:
|
|
1229
|
+
name: P.value ? "point_of_sale" : "link_off",
|
|
1230
1230
|
size: "sm"
|
|
1231
1231
|
}, null, 8, ["name"]),
|
|
1232
|
-
|
|
1233
|
-
(Te =
|
|
1234
|
-
], 2)) :
|
|
1232
|
+
r("span", null, l(P.value ? o(t)("order.paymentDeviceLinked") : o(t)("order.paymentDeviceMissingShort")), 1),
|
|
1233
|
+
(Te = P.value) != null && Te.status && P.value.status !== "Active" ? (i(), u("span", sa, "· " + l(P.value.status), 1)) : k("", !0)
|
|
1234
|
+
], 2)) : k("", !0)
|
|
1235
1235
|
]);
|
|
1236
1236
|
};
|
|
1237
1237
|
}
|
|
@@ -1246,63 +1246,67 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
1246
1246
|
}, ua = {
|
|
1247
1247
|
key: 2,
|
|
1248
1248
|
class: "grid grid-cols-2 xs:grid-cols-1 gap-8"
|
|
1249
|
-
}, ma = ["data-testid"], pa = { class: "flex items-center gap-2" }, ya = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, va = { class: "fm-typo-en-body-md-400 text-fm-color-typo-
|
|
1249
|
+
}, ma = ["data-testid"], pa = { class: "flex items-center gap-2" }, ya = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, va = ["data-testid"], fa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ha = {
|
|
1250
1250
|
key: 0,
|
|
1251
1251
|
class: "fm-typo-en-body-sm-400 text-fm-color-system-warning-400"
|
|
1252
|
-
},
|
|
1252
|
+
}, ba = {
|
|
1253
1253
|
key: 3,
|
|
1254
1254
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
1255
|
-
},
|
|
1255
|
+
}, ga = /* @__PURE__ */ H({
|
|
1256
1256
|
__name: "KioskLicenseSummary",
|
|
1257
1257
|
props: {
|
|
1258
1258
|
licenses: {}
|
|
1259
1259
|
},
|
|
1260
1260
|
setup(e) {
|
|
1261
|
-
const { t } = Z(),
|
|
1262
|
-
() =>
|
|
1263
|
-
le(
|
|
1264
|
-
le(
|
|
1261
|
+
const { t } = Z(), s = e, v = g(
|
|
1262
|
+
() => s.licenses ? [
|
|
1263
|
+
le(s.licenses.licenses, "KIOSK"),
|
|
1264
|
+
le(s.licenses.licenses, "TABLET")
|
|
1265
1265
|
] : []
|
|
1266
1266
|
);
|
|
1267
1267
|
function m(f) {
|
|
1268
1268
|
return G(f).format("DD MMM YYYY");
|
|
1269
1269
|
}
|
|
1270
|
-
return (f,
|
|
1271
|
-
var
|
|
1272
|
-
const
|
|
1270
|
+
return (f, x) => {
|
|
1271
|
+
var c;
|
|
1272
|
+
const d = T("FmIcon");
|
|
1273
1273
|
return i(), u("div", la, [
|
|
1274
1274
|
!e.licenses || !e.licenses.verified ? (i(), u("div", ca, [
|
|
1275
|
-
h(
|
|
1276
|
-
|
|
1275
|
+
h(d, { name: "info" }),
|
|
1276
|
+
K(" " + l(o(t)("order.licenseLoadError")), 1)
|
|
1277
1277
|
])) : e.licenses.unlimited ? (i(), u("div", da, [
|
|
1278
|
-
h(
|
|
1279
|
-
|
|
1278
|
+
h(d, { name: "all_inclusive" }),
|
|
1279
|
+
K(" " + l(o(t)("order.licenseSummaryUnlimited")), 1)
|
|
1280
1280
|
])) : (i(), u("div", ua, [
|
|
1281
|
-
(i(!0), u(
|
|
1282
|
-
key:
|
|
1281
|
+
(i(!0), u(F, null, q(v.value, (y) => (i(), u("div", {
|
|
1282
|
+
key: y.type,
|
|
1283
1283
|
class: "border fm-corner-radius-lg p-12 flex flex-col gap-1",
|
|
1284
|
-
"data-testid": `license-summary-${
|
|
1284
|
+
"data-testid": `license-summary-${y.type.toLowerCase()}`
|
|
1285
1285
|
}, [
|
|
1286
|
-
|
|
1287
|
-
h(
|
|
1288
|
-
name:
|
|
1286
|
+
r("div", pa, [
|
|
1287
|
+
h(d, {
|
|
1288
|
+
name: y.type === "TABLET" ? "tablet" : "point_of_sale"
|
|
1289
1289
|
}, null, 8, ["name"]),
|
|
1290
|
-
|
|
1290
|
+
r("span", ya, l(o(t)(y.type === "TABLET" ? "order.licenseSummaryTablet" : "order.licenseSummaryKiosk")), 1)
|
|
1291
1291
|
]),
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1292
|
+
r("span", {
|
|
1293
|
+
class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary",
|
|
1294
|
+
"data-testid": `license-summary-${y.type.toLowerCase()}-usage`
|
|
1295
|
+
}, l(o(t)("order.licenseSummaryInUse", { used: y.used, total: y.total })), 9, va),
|
|
1296
|
+
r("span", fa, [
|
|
1297
|
+
K(l(o(t)("order.licenseSummaryFree", { free: y.free })) + " ", 1),
|
|
1298
|
+
y.nextExpiry ? (i(), u(F, { key: 0 }, [
|
|
1299
|
+
K(" · " + l(o(t)("order.licenseSummaryNextExpiry", { date: m(y.nextExpiry) })), 1)
|
|
1300
|
+
], 64)) : k("", !0)
|
|
1297
1301
|
]),
|
|
1298
|
-
|
|
1302
|
+
y.free === 0 ? (i(), u("span", ha, l(o(t)("order.licenseSummaryNoFree")), 1)) : k("", !0)
|
|
1299
1303
|
], 8, ma))), 128))
|
|
1300
1304
|
])),
|
|
1301
|
-
(
|
|
1305
|
+
(c = e.licenses) != null && c.verified && !e.licenses.unlimited ? (i(), u("span", ba, l(o(t)("order.licenseSharedNote")), 1)) : k("", !0)
|
|
1302
1306
|
]);
|
|
1303
1307
|
};
|
|
1304
1308
|
}
|
|
1305
|
-
}),
|
|
1309
|
+
}), ka = { class: "flex flex-col items-center justify-center gap-3 py-16 text-center col-span-full" }, xa = { class: "flex items-center justify-center w-16 h-16 rounded-full bg-fm-color-surface-secondary" }, _a = { class: "fm-typo-en-title-sm-600 block" }, Ia = { class: "fm-typo-en-body-md-400 block text-fm-color-typo-secondary max-w-[360px]" }, Da = {
|
|
1306
1310
|
key: 0,
|
|
1307
1311
|
class: "pt-2"
|
|
1308
1312
|
}, ie = /* @__PURE__ */ H({
|
|
@@ -1313,28 +1317,38 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
1313
1317
|
icon: { default: "info" }
|
|
1314
1318
|
},
|
|
1315
1319
|
setup(e) {
|
|
1316
|
-
return (t,
|
|
1317
|
-
const v =
|
|
1318
|
-
return i(), u("div",
|
|
1319
|
-
|
|
1320
|
+
return (t, s) => {
|
|
1321
|
+
const v = T("FmIcon");
|
|
1322
|
+
return i(), u("div", ka, [
|
|
1323
|
+
r("div", xa, [
|
|
1320
1324
|
h(v, {
|
|
1321
1325
|
name: e.icon,
|
|
1322
1326
|
size: "xl",
|
|
1323
1327
|
class: "text-fm-color-typo-tertiary"
|
|
1324
1328
|
}, null, 8, ["name"])
|
|
1325
1329
|
]),
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
t.$slots.default ? (i(), u("div",
|
|
1330
|
+
r("span", _a, l(e.title), 1),
|
|
1331
|
+
r("span", Ia, l(e.message), 1),
|
|
1332
|
+
t.$slots.default ? (i(), u("div", Da, [
|
|
1329
1333
|
nt(t.$slots, "default")
|
|
1330
|
-
])) :
|
|
1334
|
+
])) : k("", !0)
|
|
1331
1335
|
]);
|
|
1332
1336
|
};
|
|
1333
1337
|
}
|
|
1334
|
-
})
|
|
1338
|
+
});
|
|
1339
|
+
function Ta(e, t) {
|
|
1340
|
+
return {
|
|
1341
|
+
key: e < t ? "order.showingDevices" : "order.devicesAtOutlet",
|
|
1342
|
+
params: { count: e, total: t }
|
|
1343
|
+
};
|
|
1344
|
+
}
|
|
1345
|
+
const wa = { class: "flex flex-col gap-4" }, Aa = { class: "flex flex-row items-center justify-between gap-12 xs:flex-col xs:items-start" }, Pa = { class: "flex flex-col gap-2" }, $a = { class: "fm-typo-en-title-sm-600 block" }, Sa = { class: "fm-typo-en-body-md-400 block text-fm-color-typo-secondary" }, Ca = { class: "flex items-center gap-3 flex-wrap" }, Ea = {
|
|
1346
|
+
class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary",
|
|
1347
|
+
"data-testid": "device-count"
|
|
1348
|
+
}, La = { class: "grid grid-cols-2 xs:grid-cols-1 gap-8 py-8" }, Fa = {
|
|
1335
1349
|
key: 0,
|
|
1336
1350
|
class: "text-center py-8 text-fm-color-typo-secondary fm-typo-en-body-md-400 col-span-full"
|
|
1337
|
-
},
|
|
1351
|
+
}, ja = /* @__PURE__ */ H({
|
|
1338
1352
|
__name: "KioskDevicesView",
|
|
1339
1353
|
props: {
|
|
1340
1354
|
devices: {},
|
|
@@ -1344,15 +1358,15 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
1344
1358
|
},
|
|
1345
1359
|
emits: ["requestOtp", "retry"],
|
|
1346
1360
|
setup(e) {
|
|
1347
|
-
const { t } = Z(), { canBindDevice:
|
|
1361
|
+
const { t } = Z(), { canBindDevice: s } = Be(), v = e, m = g(
|
|
1348
1362
|
() => {
|
|
1349
|
-
var
|
|
1363
|
+
var n;
|
|
1350
1364
|
return new Map(
|
|
1351
|
-
(((
|
|
1365
|
+
(((n = v.licenses) == null ? void 0 : n.licenses) ?? []).map((p) => [p.id, p.type])
|
|
1352
1366
|
);
|
|
1353
1367
|
}
|
|
1354
|
-
), f =
|
|
1355
|
-
switch (
|
|
1368
|
+
), f = g(() => Ta(y.value.length, v.devices.length)), x = M(""), d = M("all"), c = g(() => {
|
|
1369
|
+
switch (d.value) {
|
|
1356
1370
|
case "tablet":
|
|
1357
1371
|
return t("order.tabletOnly");
|
|
1358
1372
|
case "kiosk":
|
|
@@ -1360,123 +1374,123 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
1360
1374
|
default:
|
|
1361
1375
|
return t("order.allTypes");
|
|
1362
1376
|
}
|
|
1363
|
-
}),
|
|
1364
|
-
let
|
|
1365
|
-
|
|
1366
|
-
const
|
|
1367
|
-
return
|
|
1368
|
-
var
|
|
1369
|
-
const
|
|
1370
|
-
return
|
|
1371
|
-
})),
|
|
1377
|
+
}), y = g(() => {
|
|
1378
|
+
let n = v.devices;
|
|
1379
|
+
d.value === "tablet" ? n = n.filter((b) => b.deviceAppType === "TABLET_APP") : d.value === "kiosk" && (n = n.filter((b) => b.deviceAppType !== "TABLET_APP"));
|
|
1380
|
+
const p = x.value.toLowerCase().trim();
|
|
1381
|
+
return p && (n = n.filter((b) => {
|
|
1382
|
+
var N, B, z, R;
|
|
1383
|
+
const w = ((N = b.name) == null ? void 0 : N.toLowerCase()) || "", I = ((B = b.machineId) == null ? void 0 : B.toLowerCase()) || "", A = ((z = b.slotInfo) == null ? void 0 : z.toLowerCase()) || "", _ = ((R = b.remarkInfo) == null ? void 0 : R.toLowerCase()) || "";
|
|
1384
|
+
return w.includes(p) || I.includes(p) || A.includes(p) || _.includes(p);
|
|
1385
|
+
})), n.sort((b, w) => b.deviceAppType === "TABLET_APP" && w.deviceAppType !== "TABLET_APP" ? -1 : b.deviceAppType !== "TABLET_APP" && w.deviceAppType === "TABLET_APP" ? 1 : b.deviceAppType === "TABLET_APP" && w.deviceAppType === "TABLET_APP" ? (b.slotInfo || "").localeCompare(w.slotInfo || "") : (b.name || "").localeCompare(w.name || ""));
|
|
1372
1386
|
});
|
|
1373
|
-
return (
|
|
1374
|
-
const
|
|
1387
|
+
return (n, p) => {
|
|
1388
|
+
const b = T("FmButton"), w = T("FmSearch"), I = T("FmMenuItem"), A = T("FmMenu");
|
|
1375
1389
|
return i(), u("div", null, [
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1390
|
+
r("div", wa, [
|
|
1391
|
+
r("div", Aa, [
|
|
1392
|
+
r("div", Pa, [
|
|
1393
|
+
r("span", $a, l(o(t)("order.kioskDisplay")), 1),
|
|
1394
|
+
r("span", Sa, l(o(t)("order.kioskDisplayDescription")), 1)
|
|
1381
1395
|
]),
|
|
1382
|
-
o(
|
|
1396
|
+
o(s) ? (i(), C(b, {
|
|
1383
1397
|
key: 0,
|
|
1384
1398
|
class: "shrink-0",
|
|
1385
1399
|
variant: "primary",
|
|
1386
1400
|
label: o(t)("order.bindDevice"),
|
|
1387
1401
|
size: "md",
|
|
1388
1402
|
"prepend-icon": "link",
|
|
1389
|
-
onClick:
|
|
1390
|
-
}, null, 8, ["label"])) :
|
|
1403
|
+
onClick: p[0] || (p[0] = (_) => n.$emit("requestOtp"))
|
|
1404
|
+
}, null, 8, ["label"])) : k("", !0)
|
|
1391
1405
|
]),
|
|
1392
|
-
e.loadError === "forbidden" ? (i(),
|
|
1406
|
+
e.loadError === "forbidden" ? (i(), C(ie, {
|
|
1393
1407
|
key: 0,
|
|
1394
1408
|
icon: "lock",
|
|
1395
1409
|
title: o(t)("order.deviceAccessDeniedTitle"),
|
|
1396
1410
|
message: o(t)("order.deviceAccessDeniedMessage")
|
|
1397
|
-
}, null, 8, ["title", "message"])) : e.loading && e.devices.length === 0 ? (i(),
|
|
1411
|
+
}, null, 8, ["title", "message"])) : e.loading && e.devices.length === 0 ? (i(), C(ie, {
|
|
1398
1412
|
key: 1,
|
|
1399
1413
|
icon: "hourglass_empty",
|
|
1400
1414
|
title: o(t)("order.devicesLoading"),
|
|
1401
1415
|
message: ""
|
|
1402
|
-
}, null, 8, ["title"])) : e.loadError === "error" ? (i(),
|
|
1416
|
+
}, null, 8, ["title"])) : e.loadError === "error" ? (i(), C(ie, {
|
|
1403
1417
|
key: 2,
|
|
1404
1418
|
icon: "error",
|
|
1405
1419
|
title: o(t)("order.deviceLoadErrorTitle"),
|
|
1406
1420
|
message: o(t)("order.deviceLoadErrorMessage")
|
|
1407
1421
|
}, {
|
|
1408
|
-
default:
|
|
1409
|
-
h(
|
|
1422
|
+
default: Y(() => [
|
|
1423
|
+
h(b, {
|
|
1410
1424
|
variant: "secondary",
|
|
1411
1425
|
label: o(t)("order.retry"),
|
|
1412
1426
|
"prepend-icon": "refresh",
|
|
1413
|
-
onClick:
|
|
1427
|
+
onClick: p[1] || (p[1] = (_) => n.$emit("retry"))
|
|
1414
1428
|
}, null, 8, ["label"])
|
|
1415
1429
|
]),
|
|
1416
1430
|
_: 1
|
|
1417
|
-
}, 8, ["title", "message"])) : (i(), u(
|
|
1418
|
-
h(
|
|
1419
|
-
|
|
1420
|
-
h(
|
|
1421
|
-
"model-value":
|
|
1422
|
-
"onUpdate:modelValue":
|
|
1431
|
+
}, 8, ["title", "message"])) : (i(), u(F, { key: 3 }, [
|
|
1432
|
+
h(ga, { licenses: e.licenses }, null, 8, ["licenses"]),
|
|
1433
|
+
r("div", Ca, [
|
|
1434
|
+
h(w, {
|
|
1435
|
+
"model-value": x.value,
|
|
1436
|
+
"onUpdate:modelValue": p[2] || (p[2] = (_) => x.value = _),
|
|
1423
1437
|
class: "flex-1 min-w-[200px] max-w-[400px]",
|
|
1424
1438
|
placeholder: o(t)("order.searchDevices")
|
|
1425
1439
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1426
|
-
h(
|
|
1427
|
-
"menu-button":
|
|
1428
|
-
h(
|
|
1440
|
+
h(A, null, {
|
|
1441
|
+
"menu-button": Y(() => [
|
|
1442
|
+
h(b, {
|
|
1429
1443
|
variant: "tertiary",
|
|
1430
1444
|
"prepend-icon": "filter_list",
|
|
1431
|
-
label:
|
|
1445
|
+
label: c.value,
|
|
1432
1446
|
class: "fm-typo-en-body-md-600"
|
|
1433
1447
|
}, null, 8, ["label"])
|
|
1434
1448
|
]),
|
|
1435
|
-
default:
|
|
1436
|
-
h(
|
|
1437
|
-
"model-value":
|
|
1449
|
+
default: Y(() => [
|
|
1450
|
+
h(I, {
|
|
1451
|
+
"model-value": d.value === "all",
|
|
1438
1452
|
label: o(t)("order.allTypes"),
|
|
1439
|
-
onClick:
|
|
1453
|
+
onClick: p[3] || (p[3] = (_) => d.value = "all")
|
|
1440
1454
|
}, null, 8, ["model-value", "label"]),
|
|
1441
|
-
h(
|
|
1442
|
-
"model-value":
|
|
1455
|
+
h(I, {
|
|
1456
|
+
"model-value": d.value === "tablet",
|
|
1443
1457
|
label: o(t)("order.tabletOnly"),
|
|
1444
|
-
onClick:
|
|
1458
|
+
onClick: p[4] || (p[4] = (_) => d.value = "tablet")
|
|
1445
1459
|
}, null, 8, ["model-value", "label"]),
|
|
1446
|
-
h(
|
|
1447
|
-
"model-value":
|
|
1460
|
+
h(I, {
|
|
1461
|
+
"model-value": d.value === "kiosk",
|
|
1448
1462
|
label: o(t)("order.kioskOnly"),
|
|
1449
|
-
onClick:
|
|
1463
|
+
onClick: p[5] || (p[5] = (_) => d.value = "kiosk")
|
|
1450
1464
|
}, null, 8, ["model-value", "label"])
|
|
1451
1465
|
]),
|
|
1452
1466
|
_: 1
|
|
1453
1467
|
}),
|
|
1454
|
-
|
|
1468
|
+
r("span", Ea, l(o(t)(f.value.key, f.value.params)), 1)
|
|
1455
1469
|
]),
|
|
1456
|
-
|
|
1457
|
-
(i(!0), u(
|
|
1458
|
-
key:
|
|
1459
|
-
device:
|
|
1460
|
-
"license-type":
|
|
1470
|
+
r("div", La, [
|
|
1471
|
+
(i(!0), u(F, null, q(y.value, (_) => (i(), C(ia, {
|
|
1472
|
+
key: _.machineId,
|
|
1473
|
+
device: _,
|
|
1474
|
+
"license-type": _.licenseId ? m.value.get(_.licenseId) : void 0
|
|
1461
1475
|
}, null, 8, ["device", "license-type"]))), 128)),
|
|
1462
|
-
|
|
1463
|
-
e.devices.length === 0 ? (i(),
|
|
1476
|
+
y.value.length === 0 && e.devices.length > 0 ? (i(), u("div", Fa, l(o(t)("order.noDevicesMatch")), 1)) : k("", !0),
|
|
1477
|
+
e.devices.length === 0 ? (i(), C(ie, {
|
|
1464
1478
|
key: 1,
|
|
1465
1479
|
icon: "devices",
|
|
1466
1480
|
title: o(t)("order.noDevicesBoundTitle"),
|
|
1467
1481
|
message: o(t)("order.noDevicesBound")
|
|
1468
1482
|
}, {
|
|
1469
|
-
default:
|
|
1470
|
-
o(
|
|
1483
|
+
default: Y(() => [
|
|
1484
|
+
o(s) ? (i(), C(b, {
|
|
1471
1485
|
key: 0,
|
|
1472
1486
|
variant: "primary",
|
|
1473
1487
|
label: o(t)("order.bindDevice"),
|
|
1474
1488
|
"prepend-icon": "link",
|
|
1475
|
-
onClick:
|
|
1476
|
-
}, null, 8, ["label"])) :
|
|
1489
|
+
onClick: p[6] || (p[6] = (_) => n.$emit("requestOtp"))
|
|
1490
|
+
}, null, 8, ["label"])) : k("", !0)
|
|
1477
1491
|
]),
|
|
1478
1492
|
_: 1
|
|
1479
|
-
}, 8, ["title", "message"])) :
|
|
1493
|
+
}, 8, ["title", "message"])) : k("", !0)
|
|
1480
1494
|
])
|
|
1481
1495
|
], 64))
|
|
1482
1496
|
])
|
|
@@ -1485,13 +1499,13 @@ const kn = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-g
|
|
|
1485
1499
|
}
|
|
1486
1500
|
});
|
|
1487
1501
|
export {
|
|
1488
|
-
|
|
1502
|
+
ga as _,
|
|
1489
1503
|
bn as a,
|
|
1490
|
-
|
|
1504
|
+
za as b,
|
|
1491
1505
|
yn as c,
|
|
1492
|
-
|
|
1506
|
+
ja as d,
|
|
1493
1507
|
ie as e,
|
|
1494
|
-
|
|
1508
|
+
qa as l,
|
|
1495
1509
|
gn as s,
|
|
1496
1510
|
ht as u
|
|
1497
1511
|
};
|