@feedmepos/mf-order-setting 0.0.102 → 0.0.103
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-jnt6letY.js → DisplaySystemView-BBiZqcWq.js} +1497 -1468
- package/dist/{FoodCourtInvitationsView-DoynqFWB.js → FoodCourtInvitationsView-DwOkVs9m.js} +4 -4
- package/dist/{FoodCourtOrderSettingsView-DYZLhTHy.js → FoodCourtOrderSettingsView-C9Ag5Bsg.js} +1 -1
- package/dist/FoodCourtOrdersView-y4EwK3sn.js +1173 -0
- package/dist/{FoodCourtStallsView-CRMTt5BB.js → FoodCourtStallsView-Bi8H-yR7.js} +2 -2
- package/dist/{FoodCourtStatusView-C-b-eI-8.js → FoodCourtStatusView-jugAzTKg.js} +1 -1
- package/dist/KioskDevicesView-CYiew4X5.js +4 -0
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-BCvbeo7R.js +1497 -0
- package/dist/KioskSettingView-AKBiij9a.js +1124 -0
- package/dist/KioskView-zKB6mC8I.js +765 -0
- package/dist/{OrderSettingsView-BBCnekaj.js → OrderSettingsView-CoV_yX3m.js} +22064 -21635
- package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-DjoTyV6m.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-KSMU_jGl.js} +1 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/{app-Dvk30CIa.js → app-CmuI6uSl.js} +3589 -2902
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DUFHhM7O.js → dayjs.min-B3MssMma.js} +1 -1
- package/dist/{featureFlag-BvcirzHS.js → featureFlag-CWvkPOBY.js} +123 -130
- package/dist/frontend/mf-order/src/api/food-court/index.d.ts +51 -0
- package/dist/frontend/mf-order/src/api/kiosk/index.d.ts +4 -0
- package/dist/frontend/mf-order/src/api/payment/index.d.ts +8 -0
- package/dist/frontend/mf-order/src/api/queue/index.d.ts +13 -0
- package/dist/frontend/mf-order/src/api/restaurant-setting/index.d.ts +9 -1
- package/dist/frontend/mf-order/src/app.d.ts +687 -0
- package/dist/frontend/mf-order/src/main.d.ts +687 -0
- package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +5 -0
- package/dist/frontend/mf-order/src/modules/kiosk/interface.d.ts +4 -0
- package/dist/frontend/mf-order/src/modules/kiosk/license.d.ts +92 -0
- package/dist/frontend/mf-order/src/modules/kiosk/outletLoad.d.ts +15 -0
- package/dist/frontend/mf-order/src/modules/kiosk/settingsSections.d.ts +24 -0
- package/dist/frontend/mf-order/src/modules/kiosk/useKioskSettings.d.ts +29 -0
- package/dist/frontend/mf-order/src/modules/payment/paymentDevice.d.ts +58 -0
- package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +67 -1
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +19 -10
- package/dist/frontend/mf-order/src/stores/payment/index.d.ts +59 -1
- package/dist/frontend/mf-order/src/views/food-court/food-court-export.d.ts +38 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDeviceCard.vue.d.ts +3 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDevicesView.vue.d.ts +7 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicenseSummary.vue.d.ts +7 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicensesView.vue.d.ts +6 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskOtpDialog.vue.d.ts +3 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskPaymentDeviceCard.vue.d.ts +17 -0
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskSettingView.vue.d.ts +5 -2
- package/dist/frontend/mf-order/src/views/order-settings/pickup/PickUpSettingDialogContent.vue.d.ts +0 -9
- package/dist/frontend/mf-order/src/views/order-settings/pos-status/PosOrderingStatus.vue.d.ts +17 -0
- package/dist/frontend/mf-order/src/views/order-settings/pos-status/pos-status.d.ts +44 -0
- package/dist/frontend/mf-order/src/views/order-settings/queue/called-message.d.ts +1 -0
- package/dist/frontend/mf-order/src/views/order-settings/queue/phone-join-mode.d.ts +25 -0
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-C4n5H7t3.js → index-BQa8AudZ.js} +3 -3
- package/dist/index-CMOvrim4.js +147 -0
- package/dist/{index-CW4VlFWz.js → index-D5qh2_4b.js} +1 -1
- package/dist/{index-C5n6lil6.js → index-Dup6kWLX.js} +6 -6
- package/dist/{index-CGxCWKHB.js → index-wuFIsXHT.js} +188 -179
- package/dist/{order.dto-Cb_gh3iB.js → order.dto-BD9raQG5.js} +2782 -2735
- package/dist/package/entity/display/blocks.d.ts +12 -2
- package/dist/package/entity/marketing/marketing.dto.d.ts +18 -18
- package/dist/package/entity/order-platform/external/reconciliation/external-reconciliation.do.d.ts +24 -24
- package/dist/package/entity/order-platform/menu.dto.d.ts +20 -20
- package/dist/package/entity/order-setting/order-setting.do.d.ts +10 -0
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +26 -0
- package/dist/package/entity/order-setting/queue/queue.do.d.ts +23 -0
- package/dist/package/entity/order-setting/queue/queue.dto.d.ts +14 -0
- package/dist/package/entity/queue/queue.do.d.ts +153 -0
- package/dist/package/entity/queue/queue.dto.d.ts +221 -2
- package/dist/package/entity/queue/queue.enum.d.ts +5 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +20 -0
- package/dist/style.css +1 -1
- package/dist/{index-ILnighyU.js → useInternalUser-CHtaur9A.js} +93 -81
- package/package.json +2 -1
- package/src/api/food-court/index.ts +63 -0
- package/src/api/kiosk/index.ts +8 -0
- package/src/api/payment/index.ts +18 -1
- package/src/api/queue/index.ts +39 -0
- package/src/api/restaurant-setting/index.ts +14 -0
- package/src/locales/en-US.json +197 -26
- package/src/locales/ja-JP.json +193 -23
- package/src/locales/th-TH.json +193 -21
- package/src/locales/zh-CN.json +197 -23
- package/src/modules/display-system/interface.spec.ts +26 -1
- package/src/modules/display-system/interface.ts +20 -0
- package/src/modules/kiosk/interface.ts +4 -0
- package/src/modules/kiosk/license.spec.ts +167 -0
- package/src/modules/kiosk/license.ts +175 -0
- package/src/modules/kiosk/outletLoad.spec.ts +25 -0
- package/src/modules/kiosk/outletLoad.ts +19 -0
- package/src/modules/kiosk/settingsSections.spec.ts +85 -0
- package/src/modules/kiosk/settingsSections.ts +82 -0
- package/src/modules/kiosk/useKioskSettings.spec.ts +157 -0
- package/src/modules/kiosk/useKioskSettings.ts +61 -0
- package/src/modules/payment/paymentDevice.spec.ts +175 -0
- package/src/modules/payment/paymentDevice.ts +156 -0
- package/src/stores/kiosk/index.ts +16 -1
- package/src/stores/kiosk/mapper.ts +2 -0
- package/src/stores/order-setting/index.spec.ts +83 -0
- package/src/stores/order-setting/index.ts +49 -27
- package/src/stores/payment/index.spec.ts +86 -0
- package/src/stores/payment/index.ts +48 -2
- package/src/views/display-system/DisplayInspector.vue +17 -8
- package/src/views/display-system/DisplayTemplateEditor.vue +3 -1
- package/src/views/food-court/FoodCourtOrdersView.vue +46 -1
- package/src/views/food-court/food-court-export.spec.ts +151 -0
- package/src/views/food-court/food-court-export.ts +283 -0
- package/src/views/kiosk/KioskStatePanel.vue +2 -2
- package/src/views/kiosk/KioskView.vue +219 -82
- package/src/views/kiosk/devices/KioskDeviceCard.vue +148 -23
- package/src/views/kiosk/devices/KioskDevicesView.vue +48 -10
- package/src/views/kiosk/devices/KioskLicenseSummary.vue +79 -0
- package/src/views/kiosk/devices/KioskLicensesView.vue +152 -0
- package/src/views/kiosk/devices/KioskOtpDialog.vue +41 -1
- package/src/views/kiosk/devices/KioskPaymentDeviceCard.spec.ts +97 -0
- package/src/views/kiosk/devices/KioskPaymentDeviceCard.vue +221 -0
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +1 -1
- package/src/views/kiosk/settings/KioskSettingView.vue +702 -419
- package/src/views/order-settings/delivery/DeliverySetting.vue +4 -0
- package/src/views/order-settings/dine-in/DineInSetting.vue +4 -0
- package/src/views/order-settings/pickup/PickUpSetting.vue +4 -4
- package/src/views/order-settings/pickup/PickUpSettingDialogContent.vue +0 -23
- package/src/views/order-settings/pos-status/PosOrderingStatus.spec.ts +207 -0
- package/src/views/order-settings/pos-status/PosOrderingStatus.vue +209 -0
- package/src/views/order-settings/pos-status/pos-status.spec.ts +103 -0
- package/src/views/order-settings/pos-status/pos-status.ts +86 -0
- package/src/views/order-settings/queue/QueueSetting.source.spec.ts +43 -0
- package/src/views/order-settings/queue/QueueSetting.vue +289 -15
- package/src/views/order-settings/queue/called-message.spec.ts +29 -1
- package/src/views/order-settings/queue/called-message.ts +18 -0
- package/src/views/order-settings/queue/phone-join-mode.spec.ts +90 -0
- package/src/views/order-settings/queue/phone-join-mode.ts +49 -0
- package/dist/FoodCourtOrdersView-CAPOycT3.js +0 -544
- package/dist/KioskDevicesView-B0U9JxRl.js +0 -4
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-V3ai4FVI.js +0 -937
- package/dist/KioskSettingView-rdom_aS8.js +0 -880
- package/dist/KioskView-DOON9zR6.js +0 -516
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskDisplayStandSection.vue.d.ts +0 -10
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskInstructionSection.vue.d.ts +0 -15
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPickAtCounterSection.vue.d.ts +0 -10
- package/dist/index-CaHG3M7C.js +0 -135
- package/src/views/kiosk/settings/KioskDisplayStandSection.vue +0 -189
- package/src/views/kiosk/settings/KioskInstructionSection.vue +0 -40
- package/src/views/kiosk/settings/KioskPickAtCounterSection.vue +0 -68
|
@@ -1,937 +0,0 @@
|
|
|
1
|
-
import { ref as C, defineComponent as Q, resolveComponent as x, openBlock as l, createElementBlock as m, createElementVNode as a, toDisplayString as d, unref as s, createVNode as v, computed as _, createBlock as M, withCtx as K, createCommentVNode as D, Fragment as q, renderList as G, watch as he, normalizeClass as $e, createTextVNode as te, renderSlot as Me } from "vue";
|
|
2
|
-
import { useI18n as ne, useCoreStore as Ve } from "@feedmepos/mf-common";
|
|
3
|
-
import { defineStore as ge } from "pinia";
|
|
4
|
-
import { r as J, g as ue, a as Be, p as Re } from "./index-C4n5H7t3.js";
|
|
5
|
-
import "./order.dto-Cb_gh3iB.js";
|
|
6
|
-
import { useDialog as Oe, useSnackbar as Le } from "@feedmepos/ui-library";
|
|
7
|
-
import { d as ce } from "./dayjs.min-DUFHhM7O.js";
|
|
8
|
-
import { c as Ne, g as Ke, a as xe } from "./app-Dvk30CIa.js";
|
|
9
|
-
import { s as be } from "./index-ILnighyU.js";
|
|
10
|
-
async function Ue() {
|
|
11
|
-
const t = await J().get("/kiosk/otp");
|
|
12
|
-
return ue(t);
|
|
13
|
-
}
|
|
14
|
-
async function qe() {
|
|
15
|
-
const t = await J().get("/kiosk/devices");
|
|
16
|
-
return ue(t);
|
|
17
|
-
}
|
|
18
|
-
async function ze(t) {
|
|
19
|
-
await J().delete(`/kiosk/unbind/${t}`);
|
|
20
|
-
}
|
|
21
|
-
async function je(t, e) {
|
|
22
|
-
await J().put(`/kiosk/updateDevicePin/${e}`, { pinInfo: t });
|
|
23
|
-
}
|
|
24
|
-
async function He(t, e) {
|
|
25
|
-
await J().put(`/kiosk/updateDevicePin/${e}`, { remarkInfo: t });
|
|
26
|
-
}
|
|
27
|
-
const Y = {
|
|
28
|
-
requestOtp: Ue,
|
|
29
|
-
getDevices: qe,
|
|
30
|
-
unbind: ze,
|
|
31
|
-
updateDevicePin: je,
|
|
32
|
-
updateDeviceRemark: He
|
|
33
|
-
}, We = (t) => ({
|
|
34
|
-
name: t.name ?? "N/A",
|
|
35
|
-
machineId: t.machineId,
|
|
36
|
-
config: {
|
|
37
|
-
scannerInfo: t.scannerInfo ?? void 0,
|
|
38
|
-
printerInfo: t.printerInfo ?? void 0,
|
|
39
|
-
terminalInfo: t.terminalInfo ?? void 0
|
|
40
|
-
},
|
|
41
|
-
activatedAt: Ye(t.token),
|
|
42
|
-
deviceAppType: t.deviceAppType ?? void 0,
|
|
43
|
-
remarkInfo: t.remarkInfo ?? void 0,
|
|
44
|
-
slotInfo: t.slotInfo ?? void 0,
|
|
45
|
-
pinInfo: t.pinInfo ?? void 0,
|
|
46
|
-
deviceAppVersion: t.deviceAppVersion ?? void 0,
|
|
47
|
-
deviceAppOTAVersion: t.deviceAppOTAVersion ?? void 0,
|
|
48
|
-
webviewVersion: t.webviewVersion ?? void 0,
|
|
49
|
-
operatingSystem: t.operatingSystem ?? void 0,
|
|
50
|
-
osVersion: t.osVersion ?? void 0,
|
|
51
|
-
lastStartup: t.lastStartup ? new Date(t.lastStartup) : void 0
|
|
52
|
-
});
|
|
53
|
-
function Ye(t) {
|
|
54
|
-
const e = t.substring(0, 8), u = parseInt(e, 16);
|
|
55
|
-
return new Date(u * 1e3);
|
|
56
|
-
}
|
|
57
|
-
const Ge = {
|
|
58
|
-
toMfKioskDevice: We
|
|
59
|
-
}, Qe = ge("kiosk", () => {
|
|
60
|
-
const t = C({
|
|
61
|
-
otp: "",
|
|
62
|
-
devices: []
|
|
63
|
-
});
|
|
64
|
-
async function e() {
|
|
65
|
-
const p = await Y.requestOtp();
|
|
66
|
-
t.value.otp = p.otp;
|
|
67
|
-
}
|
|
68
|
-
async function u() {
|
|
69
|
-
const p = await Y.getDevices();
|
|
70
|
-
t.value.devices = p.map((k) => Ge.toMfKioskDevice(k));
|
|
71
|
-
}
|
|
72
|
-
async function h(p) {
|
|
73
|
-
await Y.unbind(p), await u();
|
|
74
|
-
}
|
|
75
|
-
async function f(p, k) {
|
|
76
|
-
await Y.updateDevicePin(p, k), await u();
|
|
77
|
-
}
|
|
78
|
-
async function c(p, k) {
|
|
79
|
-
await Y.updateDeviceRemark(p, k), await u();
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
state: t.value,
|
|
83
|
-
requestOtp: e,
|
|
84
|
-
getDevices: u,
|
|
85
|
-
unbind: h,
|
|
86
|
-
updateDevicePin: f,
|
|
87
|
-
updateDeviceRemark: c
|
|
88
|
-
};
|
|
89
|
-
});
|
|
90
|
-
var de = { exports: {} }, ke;
|
|
91
|
-
function Je() {
|
|
92
|
-
return ke || (ke = 1, function(t, e) {
|
|
93
|
-
(function(u, h) {
|
|
94
|
-
t.exports = h();
|
|
95
|
-
})(Ne, function() {
|
|
96
|
-
return function(u, h, f) {
|
|
97
|
-
u = u || {};
|
|
98
|
-
var c = h.prototype, p = { 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" };
|
|
99
|
-
function k(r, n, b, T) {
|
|
100
|
-
return c.fromToBase(r, n, b, T);
|
|
101
|
-
}
|
|
102
|
-
f.en.relativeTime = p, c.fromToBase = function(r, n, b, T, S) {
|
|
103
|
-
for (var y, F, E, B = b.$locale().relativeTime || p, R = u.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" }], oe = R.length, V = 0; V < oe; V += 1) {
|
|
104
|
-
var $ = R[V];
|
|
105
|
-
$.d && (y = T ? f(r).diff(b, $.d, !0) : b.diff(r, $.d, !0));
|
|
106
|
-
var O = (u.rounding || Math.round)(Math.abs(y));
|
|
107
|
-
if (E = y > 0, O <= $.r || !$.r) {
|
|
108
|
-
O <= 1 && V > 0 && ($ = R[V - 1]);
|
|
109
|
-
var z = B[$.l];
|
|
110
|
-
S && (O = S("" + O)), F = typeof z == "string" ? z.replace("%d", O) : z(O, n, $.l, E);
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (n) return F;
|
|
115
|
-
var N = E ? B.future : B.past;
|
|
116
|
-
return typeof N == "function" ? N(F) : N.replace("%s", F);
|
|
117
|
-
}, c.to = function(r, n) {
|
|
118
|
-
return k(r, n, this, !0);
|
|
119
|
-
}, c.from = function(r, n) {
|
|
120
|
-
return k(r, n, this);
|
|
121
|
-
};
|
|
122
|
-
var i = function(r) {
|
|
123
|
-
return r.$u ? f.utc() : f();
|
|
124
|
-
};
|
|
125
|
-
c.toNow = function(r) {
|
|
126
|
-
return this.to(i(this), r);
|
|
127
|
-
}, c.fromNow = function(r) {
|
|
128
|
-
return this.from(i(this), r);
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
});
|
|
132
|
-
}(de)), de.exports;
|
|
133
|
-
}
|
|
134
|
-
var Xe = Je();
|
|
135
|
-
const Ze = /* @__PURE__ */ Ke(Xe), et = /* @__PURE__ */ Q({
|
|
136
|
-
__name: "KioskUnbindConfirm",
|
|
137
|
-
props: {
|
|
138
|
-
machineId: {}
|
|
139
|
-
},
|
|
140
|
-
emits: ["update:modelValue"],
|
|
141
|
-
setup(t, { emit: e }) {
|
|
142
|
-
const { t: u } = ne(), h = e, f = C("");
|
|
143
|
-
function c(p) {
|
|
144
|
-
h("update:modelValue", p);
|
|
145
|
-
}
|
|
146
|
-
return (p, k) => {
|
|
147
|
-
const i = x("FmTextField");
|
|
148
|
-
return l(), m("div", null, [
|
|
149
|
-
a("span", null, d(s(u)("order.unbindKioskDeviceWarning", { machineId: t.machineId })), 1),
|
|
150
|
-
v(i, {
|
|
151
|
-
"model-value": f.value,
|
|
152
|
-
"onUpdate:modelValue": c,
|
|
153
|
-
placeholder: t.machineId
|
|
154
|
-
}, null, 8, ["model-value", "placeholder"])
|
|
155
|
-
]);
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
}), tt = {
|
|
159
|
-
key: 0,
|
|
160
|
-
class: "flex items-center gap-2 py-1 fm-typo-en-body-sm-400 text-fm-color-system-error-300"
|
|
161
|
-
}, nt = {
|
|
162
|
-
key: 0,
|
|
163
|
-
class: "flex items-center gap-2 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
164
|
-
}, ot = { class: "grid grid-cols-1 gap-4" }, at = /* @__PURE__ */ Q({
|
|
165
|
-
__name: "KioskPaymentCheckoutList",
|
|
166
|
-
props: {
|
|
167
|
-
checkouts: {},
|
|
168
|
-
loadError: { default: null }
|
|
169
|
-
},
|
|
170
|
-
setup(t) {
|
|
171
|
-
const { t: e } = ne(), u = t;
|
|
172
|
-
function h(i) {
|
|
173
|
-
return (i.action ?? "").replace(/[^a-z]/gi, "").toLowerCase();
|
|
174
|
-
}
|
|
175
|
-
function f(i) {
|
|
176
|
-
return i.type === "ecr" && h(i).includes("scanpay");
|
|
177
|
-
}
|
|
178
|
-
function c(i) {
|
|
179
|
-
return i.type === "ecr_qr" || i.type === "ecr" && h(i).includes("qr");
|
|
180
|
-
}
|
|
181
|
-
function p(i) {
|
|
182
|
-
const r = h(i);
|
|
183
|
-
return i.type === "ecr" && (r.includes("card") || r.includes("softpos"));
|
|
184
|
-
}
|
|
185
|
-
const k = _(() => {
|
|
186
|
-
const i = (n) => u.checkouts.some(n);
|
|
187
|
-
return [
|
|
188
|
-
{
|
|
189
|
-
key: "card",
|
|
190
|
-
label: e("order.bankCard"),
|
|
191
|
-
present: i((n) => n.type === "card")
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
key: "terminal-card",
|
|
195
|
-
label: e("order.terminalCard"),
|
|
196
|
-
present: i(p)
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
key: "qr-pay",
|
|
200
|
-
label: e("order.qrPay"),
|
|
201
|
-
present: i((n) => n.type === "qr")
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
key: "scan-pay",
|
|
205
|
-
label: e("order.scanPay"),
|
|
206
|
-
present: i((n) => n.type === "scanpay")
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
key: "terminal-scan-pay",
|
|
210
|
-
label: e("order.terminalScanPay"),
|
|
211
|
-
present: i(f)
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
key: "terminal-qr-pay",
|
|
215
|
-
label: e("order.terminalQrPay"),
|
|
216
|
-
present: i(c)
|
|
217
|
-
}
|
|
218
|
-
];
|
|
219
|
-
});
|
|
220
|
-
return (i, r) => {
|
|
221
|
-
const n = x("FmIcon"), b = x("FmCheckbox"), T = x("FmCardSection"), S = x("FmCard");
|
|
222
|
-
return t.loadError ? (l(), m("div", tt, [
|
|
223
|
-
v(n, {
|
|
224
|
-
name: "error_outline",
|
|
225
|
-
size: "sm",
|
|
226
|
-
class: "shrink-0"
|
|
227
|
-
}),
|
|
228
|
-
a("span", null, d(s(e)("order.paymentCheckoutLoadErrorTitle")), 1)
|
|
229
|
-
])) : (l(), M(S, {
|
|
230
|
-
key: 1,
|
|
231
|
-
variant: "outlined"
|
|
232
|
-
}, {
|
|
233
|
-
default: K(() => [
|
|
234
|
-
v(T, { class: "flex flex-col gap-3" }, {
|
|
235
|
-
default: K(() => [
|
|
236
|
-
t.checkouts.length === 0 ? (l(), m("div", nt, [
|
|
237
|
-
v(n, {
|
|
238
|
-
name: "credit_card_off",
|
|
239
|
-
size: "sm",
|
|
240
|
-
class: "shrink-0"
|
|
241
|
-
}),
|
|
242
|
-
a("span", null, d(s(e)("order.noPaymentCheckoutsTitle")), 1)
|
|
243
|
-
])) : D("", !0),
|
|
244
|
-
a("div", ot, [
|
|
245
|
-
(l(!0), m(q, null, G(k.value, (y) => (l(), M(b, {
|
|
246
|
-
key: y.key,
|
|
247
|
-
"model-value": y.present,
|
|
248
|
-
value: y.key,
|
|
249
|
-
label: y.label,
|
|
250
|
-
disabled: ""
|
|
251
|
-
}, null, 8, ["model-value", "value", "label"]))), 128))
|
|
252
|
-
])
|
|
253
|
-
]),
|
|
254
|
-
_: 1
|
|
255
|
-
})
|
|
256
|
-
]),
|
|
257
|
-
_: 1
|
|
258
|
-
}));
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
}), rt = (t) => `/portal/restaurants/${t}/kiosks`;
|
|
262
|
-
async function st() {
|
|
263
|
-
const t = Be.getRestaurantId();
|
|
264
|
-
if (!t) throw new Error("Invalid restaurant");
|
|
265
|
-
const e = await Re().get(rt(t));
|
|
266
|
-
return ue(e).filter((u) => !!u.deviceId).map((u) => ({
|
|
267
|
-
terminalId: u._id,
|
|
268
|
-
terminalName: u.name,
|
|
269
|
-
deviceId: u.deviceId,
|
|
270
|
-
checkouts: u.paymentCheckouts ?? []
|
|
271
|
-
}));
|
|
272
|
-
}
|
|
273
|
-
const it = {
|
|
274
|
-
listTerminalCheckouts: st
|
|
275
|
-
};
|
|
276
|
-
function lt(t, e) {
|
|
277
|
-
return `${t}-${e}`;
|
|
278
|
-
}
|
|
279
|
-
const ct = ge("payment", () => {
|
|
280
|
-
const t = C({
|
|
281
|
-
terminals: [],
|
|
282
|
-
loadError: null
|
|
283
|
-
});
|
|
284
|
-
async function e() {
|
|
285
|
-
t.value.loadError = null;
|
|
286
|
-
try {
|
|
287
|
-
const h = await it.listTerminalCheckouts();
|
|
288
|
-
t.value.terminals = h.map((f) => ({
|
|
289
|
-
...f,
|
|
290
|
-
checkouts: [...f.checkouts].sort((c, p) => c.sortOrder - p.sortOrder)
|
|
291
|
-
}));
|
|
292
|
-
} catch {
|
|
293
|
-
t.value.terminals = [], t.value.loadError = "error";
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
function u(h, f) {
|
|
297
|
-
const c = lt(h, f);
|
|
298
|
-
return t.value.terminals.find((p) => p.deviceId === c) ?? null;
|
|
299
|
-
}
|
|
300
|
-
return {
|
|
301
|
-
state: t.value,
|
|
302
|
-
loadCheckouts: e,
|
|
303
|
-
terminalForDevice: u
|
|
304
|
-
};
|
|
305
|
-
}), dt = { class: "border fm-corner-radius-lg p-12 hover:bg-fm-color-neutral-gray-50 transition-colors" }, ut = { class: "flex items-center justify-between mb-2" }, pt = { class: "flex items-center gap-2" }, mt = { class: "px-2 py-1 fm-corner-radius-md fm-typo-en-body-sm-600 uppercase bg-fm-color-neutral-gray-200 text-fm-color-typo-secondary" }, vt = {
|
|
306
|
-
key: 0,
|
|
307
|
-
class: "fm-typo-en-body-md-600 text-fm-color-typo-primary"
|
|
308
|
-
}, ft = { class: "flex items-center gap-1" }, yt = {
|
|
309
|
-
key: 0,
|
|
310
|
-
class: "py-[0.5rem] flex flex-col gap-[1.5rem] pr-2"
|
|
311
|
-
}, ht = {
|
|
312
|
-
key: 0,
|
|
313
|
-
class: "w-full border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4"
|
|
314
|
-
}, bt = { class: "fm-typo-en-title-sm-600 mb-3" }, kt = { class: "grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4" }, _t = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, gt = { class: "flex flex-col gap-2" }, xt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, It = { class: "flex items-center justify-between gap-2" }, Tt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, wt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, Pt = {
|
|
315
|
-
key: 1,
|
|
316
|
-
class: "w-full border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4"
|
|
317
|
-
}, At = { class: "fm-typo-en-title-sm-600" }, Ct = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Dt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, St = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary break-all" }, Ft = {
|
|
318
|
-
key: 2,
|
|
319
|
-
class: "w-full border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4"
|
|
320
|
-
}, Et = { class: "fm-typo-en-title-sm-600" }, $t = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Mt = { key: 1 }, Vt = { class: "py-[1rem] flex flex-col gap-6 text-center items-center" }, Bt = { class: "flex flex-col gap-1 mb-2" }, Rt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ot = { class: "mt-5 block" }, Lt = ["title"], Nt = ["title"], Kt = ["title"], Ut = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary font-mono" }, qt = { class: "flex items-center gap-3 flex-wrap fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, zt = { class: "flex items-center gap-1" }, jt = {
|
|
321
|
-
key: 0,
|
|
322
|
-
class: "flex items-center gap-1"
|
|
323
|
-
}, Ht = { class: "flex items-center gap-1" }, Wt = ["title"], Yt = /* @__PURE__ */ Q({
|
|
324
|
-
__name: "KioskDeviceCard",
|
|
325
|
-
props: {
|
|
326
|
-
device: {}
|
|
327
|
-
},
|
|
328
|
-
setup(t) {
|
|
329
|
-
ce.extend(Ze);
|
|
330
|
-
const { t: e } = ne(), { canManageDevices: u, canBindDevice: h } = xe(), f = Oe(), c = Le(), p = Qe(), k = Ve(), i = ct(), r = C(!1), n = t, b = C(""), T = _(
|
|
331
|
-
() => n.device.deviceAppType === "KIOSK_APP" && be.gte(be.coerce(n.device.deviceAppVersion ?? "") ?? "0.0.0", "2.4.0")
|
|
332
|
-
), S = _(
|
|
333
|
-
() => {
|
|
334
|
-
var o;
|
|
335
|
-
return i.terminalForDevice(
|
|
336
|
-
((o = k.currentRestaurant.value) == null ? void 0 : o._id) ?? "",
|
|
337
|
-
n.device.machineId
|
|
338
|
-
);
|
|
339
|
-
}
|
|
340
|
-
), y = _(() => {
|
|
341
|
-
var o;
|
|
342
|
-
return ((o = n.device) == null ? void 0 : o.deviceAppType) === "TABLET_APP" ? e("order.tabletOnly") : e("order.kioskOnly");
|
|
343
|
-
}), F = _(() => {
|
|
344
|
-
const o = [], g = B(), w = R();
|
|
345
|
-
return g.length > 0 && o.push({
|
|
346
|
-
key: "scannerInfo",
|
|
347
|
-
title: e("order.scannerInfo"),
|
|
348
|
-
entries: g
|
|
349
|
-
}), w.length > 0 && o.push({
|
|
350
|
-
key: "printerInfo",
|
|
351
|
-
title: e("order.printerInfo"),
|
|
352
|
-
entries: w
|
|
353
|
-
}), o;
|
|
354
|
-
}), E = _(() => F.value.length > 0);
|
|
355
|
-
function B() {
|
|
356
|
-
var w;
|
|
357
|
-
const o = n.device.config.scannerInfo;
|
|
358
|
-
if (!o || n.device.deviceAppType === "TABLET_APP")
|
|
359
|
-
return [];
|
|
360
|
-
const g = [
|
|
361
|
-
{
|
|
362
|
-
label: "Type",
|
|
363
|
-
value: oe(o.type)
|
|
364
|
-
}
|
|
365
|
-
];
|
|
366
|
-
return o.type === "CAPACITOR" && o.lensFacing && g.push({
|
|
367
|
-
label: "Lens Facing",
|
|
368
|
-
value: o.lensFacing === "FRONT" ? "Front" : "Back"
|
|
369
|
-
}), o.type === "SUNMI" && g.push({
|
|
370
|
-
label: "Connection",
|
|
371
|
-
value: ((w = o.connection) == null ? void 0 : w.type) ?? "-"
|
|
372
|
-
}), g;
|
|
373
|
-
}
|
|
374
|
-
function R() {
|
|
375
|
-
var H, ee;
|
|
376
|
-
const o = n.device.config.printerInfo;
|
|
377
|
-
if (!o)
|
|
378
|
-
return [];
|
|
379
|
-
const g = ((H = o.id) == null ? void 0 : H.trim()) ?? "", w = ((ee = o.name) == null ? void 0 : ee.trim()) ?? "";
|
|
380
|
-
if (!g || !w)
|
|
381
|
-
return [];
|
|
382
|
-
const I = [
|
|
383
|
-
{ label: "Name", value: w },
|
|
384
|
-
{ label: "Printer ID", value: g }
|
|
385
|
-
], P = o.hardware;
|
|
386
|
-
switch (I.push({ label: "Connection Type", value: P.connection.type }), P.connection.type) {
|
|
387
|
-
case "IP":
|
|
388
|
-
case "BLUETOOTH":
|
|
389
|
-
case "DRIVER":
|
|
390
|
-
I.push({ label: "Path", value: P.connection.path });
|
|
391
|
-
break;
|
|
392
|
-
case "STAR":
|
|
393
|
-
I.push({ label: "Port Name", value: P.connection.portName }), I.push({ label: "Emulation Mode", value: P.connection.emulationMode });
|
|
394
|
-
break;
|
|
395
|
-
case "USB":
|
|
396
|
-
I.push({ label: "Vendor ID", value: P.connection.vendorId }), I.push({ label: "Product ID", value: P.connection.productId });
|
|
397
|
-
break;
|
|
398
|
-
}
|
|
399
|
-
return I.push({ label: "Encoder Type", value: P.encoderConfig.type }), I.push({ label: "DPI", value: String(P.encoderConfig.dpi) }), I.push({ label: "Paper Width (mm)", value: String(P.encoderConfig.paperWidthInMm) }), P.encoderConfig.type === "TSPL" && I.push({ label: "Paper Height (mm)", value: String(P.encoderConfig.paperHeightInMm) }), o.backup && (I.push({ label: "Backup Type", value: o.backup.type }), o.backup.type === "PRINTER_ID" && I.push({ label: "Backup Printer ID", value: o.backup.printerId })), I;
|
|
400
|
-
}
|
|
401
|
-
function oe(o) {
|
|
402
|
-
switch (o) {
|
|
403
|
-
case "IMIN":
|
|
404
|
-
return "IMIN";
|
|
405
|
-
case "SUNMI":
|
|
406
|
-
return "SUNMI";
|
|
407
|
-
case "CAPACITOR":
|
|
408
|
-
return "Camera (Capacitor)";
|
|
409
|
-
case "KEYBOARD":
|
|
410
|
-
return "Keyboard";
|
|
411
|
-
default:
|
|
412
|
-
return o;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
const V = _(() => {
|
|
416
|
-
var o;
|
|
417
|
-
return ((o = n.device) == null ? void 0 : o.deviceAppType) === "TABLET_APP";
|
|
418
|
-
}), $ = _(() => {
|
|
419
|
-
const o = n.device.machineId;
|
|
420
|
-
return !o || o.length <= 16 ? o : `${o.slice(0, 8)}...${o.slice(-4)}`;
|
|
421
|
-
});
|
|
422
|
-
async function O() {
|
|
423
|
-
try {
|
|
424
|
-
await navigator.clipboard.writeText(n.device.machineId), c.open({
|
|
425
|
-
type: "success",
|
|
426
|
-
message: e("order.machineIdCopied"),
|
|
427
|
-
position: "bottom"
|
|
428
|
-
});
|
|
429
|
-
} catch {
|
|
430
|
-
c.open({
|
|
431
|
-
type: "error",
|
|
432
|
-
message: e("order.copyFailed"),
|
|
433
|
-
position: "bottom"
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
function z(o) {
|
|
438
|
-
return ce(o).fromNow();
|
|
439
|
-
}
|
|
440
|
-
function N(o) {
|
|
441
|
-
return ce(o).format("DD MMM YYYY HH:mm:ss");
|
|
442
|
-
}
|
|
443
|
-
function Ie() {
|
|
444
|
-
b.value = "", f.open({
|
|
445
|
-
title: e("order.unbindKioskDevice"),
|
|
446
|
-
contentComponent: et,
|
|
447
|
-
contentComponentProps: {
|
|
448
|
-
machineId: n.device.machineId,
|
|
449
|
-
"onUpdate:modelValue": (o) => {
|
|
450
|
-
b.value = o;
|
|
451
|
-
}
|
|
452
|
-
},
|
|
453
|
-
dismissAway: !1,
|
|
454
|
-
primaryActions: {
|
|
455
|
-
text: e("order.unbind"),
|
|
456
|
-
variant: "destructive",
|
|
457
|
-
close: !1
|
|
458
|
-
},
|
|
459
|
-
secondaryActions: {
|
|
460
|
-
text: e("order.cancel"),
|
|
461
|
-
variant: "tertiary",
|
|
462
|
-
close: !0
|
|
463
|
-
}
|
|
464
|
-
}).onPrimary(async () => {
|
|
465
|
-
b.value == n.device.machineId ? (await Ee(), c.open({
|
|
466
|
-
type: "success",
|
|
467
|
-
message: e("order.unbindSuccess"),
|
|
468
|
-
position: "bottom"
|
|
469
|
-
}), f.close()) : c.open({
|
|
470
|
-
type: "warning",
|
|
471
|
-
message: e("order.unbindWarning"),
|
|
472
|
-
position: "bottom"
|
|
473
|
-
});
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
const pe = _(() => {
|
|
477
|
-
var o;
|
|
478
|
-
return (o = n.device) == null ? void 0 : o.pinInfo;
|
|
479
|
-
}), Te = _(() => U.value ? e("order.reEnterNewPin") : e("order.enterNewPin")), U = C(!1), X = C(), ae = C(), re = C(!1), j = C(n.device.remarkInfo ?? ""), L = C("app"), we = _(() => {
|
|
480
|
-
const o = [
|
|
481
|
-
{
|
|
482
|
-
label: e("order.deviceAppInfo"),
|
|
483
|
-
value: "app"
|
|
484
|
-
}
|
|
485
|
-
];
|
|
486
|
-
return T.value && o.push({
|
|
487
|
-
label: e("order.paymentGateway"),
|
|
488
|
-
value: "payment-gateway"
|
|
489
|
-
}), E.value && o.push({
|
|
490
|
-
label: e("order.other"),
|
|
491
|
-
value: "other"
|
|
492
|
-
}), o;
|
|
493
|
-
}), Z = _(() => {
|
|
494
|
-
var o;
|
|
495
|
-
return ((o = n.device.remarkInfo) == null ? void 0 : o.trim()) ?? "";
|
|
496
|
-
}), Pe = _(() => {
|
|
497
|
-
const o = [
|
|
498
|
-
{
|
|
499
|
-
label: e("order.deviceType"),
|
|
500
|
-
value: y.value
|
|
501
|
-
},
|
|
502
|
-
{
|
|
503
|
-
label: e("order.machineId"),
|
|
504
|
-
value: n.device.machineId,
|
|
505
|
-
isMono: !0
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
label: e("order.version"),
|
|
509
|
-
value: n.device.deviceAppVersion ?? "Below 0.0.42"
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
label: e("order.deviceOtaVersion"),
|
|
513
|
-
value: n.device.deviceAppOTAVersion ?? e("order.notSet")
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
label: e("order.devicePinCode"),
|
|
517
|
-
value: pe.value ? e("order.pinSet") : e("order.noPin")
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
label: e("order.activatedDate"),
|
|
521
|
-
value: N(n.device.activatedAt)
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
label: e("order.webviewVersion"),
|
|
525
|
-
value: n.device.webviewVersion || e("order.notSet")
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
label: e("order.operatingSystem"),
|
|
529
|
-
value: n.device.operatingSystem || e("order.notSet")
|
|
530
|
-
},
|
|
531
|
-
{
|
|
532
|
-
label: e("order.osVersion"),
|
|
533
|
-
value: n.device.osVersion || e("order.notSet")
|
|
534
|
-
}
|
|
535
|
-
];
|
|
536
|
-
return V.value && o.push({
|
|
537
|
-
label: e("order.deviceSlot"),
|
|
538
|
-
value: n.device.slotInfo || e("order.notSet")
|
|
539
|
-
}), n.device.lastStartup && o.push({
|
|
540
|
-
label: e("order.lastStartupAt"),
|
|
541
|
-
value: N(n.device.lastStartup)
|
|
542
|
-
}), o;
|
|
543
|
-
}), se = _(() => j.value.trim()), me = _(() => se.value !== Z.value);
|
|
544
|
-
he(
|
|
545
|
-
() => n.device.remarkInfo,
|
|
546
|
-
(o) => {
|
|
547
|
-
j.value = o ?? "";
|
|
548
|
-
}
|
|
549
|
-
), he(
|
|
550
|
-
() => E.value,
|
|
551
|
-
(o) => {
|
|
552
|
-
!o && L.value === "other" && (L.value = "app");
|
|
553
|
-
}
|
|
554
|
-
);
|
|
555
|
-
function Ae() {
|
|
556
|
-
r.value = !0;
|
|
557
|
-
}
|
|
558
|
-
function ie() {
|
|
559
|
-
U.value = !1, X.value = null, ae.value = null, r.value = !1, L.value = "app";
|
|
560
|
-
}
|
|
561
|
-
function ve(o) {
|
|
562
|
-
U.value ? (ae.value = o, Ce()) : (X.value = o, U.value = !0);
|
|
563
|
-
}
|
|
564
|
-
async function Ce() {
|
|
565
|
-
X.value === ae.value ? (await Fe(), c.open({
|
|
566
|
-
type: "success",
|
|
567
|
-
message: "Successfuly update device PIN",
|
|
568
|
-
position: "top"
|
|
569
|
-
})) : c.open({
|
|
570
|
-
type: "error",
|
|
571
|
-
message: "Entered PIN not the same, please try again",
|
|
572
|
-
position: "top"
|
|
573
|
-
}), ie();
|
|
574
|
-
}
|
|
575
|
-
function De(o) {
|
|
576
|
-
j.value = o.slice(0, 50);
|
|
577
|
-
}
|
|
578
|
-
async function Se() {
|
|
579
|
-
if (me.value) {
|
|
580
|
-
re.value = !0;
|
|
581
|
-
try {
|
|
582
|
-
await p.updateDeviceRemark(se.value === "" ? null : se.value, n.device.machineId), c.open({
|
|
583
|
-
type: "success",
|
|
584
|
-
message: e("order.deviceRemarkUpdated"),
|
|
585
|
-
position: "top"
|
|
586
|
-
});
|
|
587
|
-
} catch {
|
|
588
|
-
c.open({
|
|
589
|
-
type: "error",
|
|
590
|
-
message: e("order.deviceRemarkUpdateFailed"),
|
|
591
|
-
position: "top"
|
|
592
|
-
});
|
|
593
|
-
} finally {
|
|
594
|
-
re.value = !1;
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
async function Fe() {
|
|
599
|
-
await p.updateDevicePin(X.value, n.device.machineId);
|
|
600
|
-
}
|
|
601
|
-
async function Ee() {
|
|
602
|
-
await p.unbind(n.device.machineId);
|
|
603
|
-
}
|
|
604
|
-
return (o, g) => {
|
|
605
|
-
const w = x("FmButton"), I = x("FmTabs"), P = x("FmTextField"), H = x("FmPinField"), ee = x("FmSideSheet"), W = x("FmIcon");
|
|
606
|
-
return l(), m("div", dt, [
|
|
607
|
-
a("div", ut, [
|
|
608
|
-
a("div", pt, [
|
|
609
|
-
a("span", mt, d(V.value ? "Tablet" : "Kiosk"), 1),
|
|
610
|
-
V.value && t.device.slotInfo ? (l(), m("span", vt, d(t.device.slotInfo), 1)) : D("", !0)
|
|
611
|
-
]),
|
|
612
|
-
a("div", ft, [
|
|
613
|
-
v(ee, {
|
|
614
|
-
header: t.device.name,
|
|
615
|
-
"dismiss-away": "",
|
|
616
|
-
maxWidth: 700,
|
|
617
|
-
"onOn:clickedAway": ie
|
|
618
|
-
}, {
|
|
619
|
-
"side-sheet-button": K(() => [
|
|
620
|
-
v(w, {
|
|
621
|
-
variant: "tertiary",
|
|
622
|
-
icon: "more_vert"
|
|
623
|
-
})
|
|
624
|
-
]),
|
|
625
|
-
default: K(() => {
|
|
626
|
-
var fe, ye;
|
|
627
|
-
return [
|
|
628
|
-
r.value ? (l(), m("div", Mt, [
|
|
629
|
-
a("div", Vt, [
|
|
630
|
-
a("div", Bt, [
|
|
631
|
-
a("span", Rt, d(Te.value), 1),
|
|
632
|
-
a("span", Ot, [
|
|
633
|
-
U.value ? D("", !0) : (l(), M(H, {
|
|
634
|
-
key: 0,
|
|
635
|
-
length: 4,
|
|
636
|
-
onComplete: g[1] || (g[1] = (A) => ve(A))
|
|
637
|
-
})),
|
|
638
|
-
U.value ? (l(), M(H, {
|
|
639
|
-
key: 1,
|
|
640
|
-
length: 4,
|
|
641
|
-
onComplete: g[2] || (g[2] = (A) => ve(A))
|
|
642
|
-
})) : D("", !0)
|
|
643
|
-
])
|
|
644
|
-
]),
|
|
645
|
-
v(w, {
|
|
646
|
-
class: "w-1/3",
|
|
647
|
-
variant: "secondary",
|
|
648
|
-
label: s(e)("order.cancelResetPin"),
|
|
649
|
-
onClick: ie
|
|
650
|
-
}, null, 8, ["label"])
|
|
651
|
-
])
|
|
652
|
-
])) : (l(), m("div", yt, [
|
|
653
|
-
a("div", null, [
|
|
654
|
-
v(I, {
|
|
655
|
-
"model-value": L.value,
|
|
656
|
-
"onUpdate:modelValue": g[0] || (g[0] = (A) => L.value = A),
|
|
657
|
-
items: we.value,
|
|
658
|
-
showMoreAt: 99
|
|
659
|
-
}, null, 8, ["model-value", "items"])
|
|
660
|
-
]),
|
|
661
|
-
L.value === "app" ? (l(), m("div", ht, [
|
|
662
|
-
a("span", bt, d(s(e)("order.deviceAppInfo")), 1),
|
|
663
|
-
a("div", kt, [
|
|
664
|
-
(l(!0), m(q, null, G(Pe.value, (A) => (l(), m("div", {
|
|
665
|
-
key: A.label,
|
|
666
|
-
class: "flex flex-col gap-1"
|
|
667
|
-
}, [
|
|
668
|
-
a("span", _t, d(A.label), 1),
|
|
669
|
-
a("span", {
|
|
670
|
-
class: $e(["fm-typo-en-body-md-600 text-fm-color-typo-primary break-all", A.isMono ? "font-mono text-sm" : ""])
|
|
671
|
-
}, d(A.value), 3)
|
|
672
|
-
]))), 128))
|
|
673
|
-
]),
|
|
674
|
-
a("div", gt, [
|
|
675
|
-
a("span", xt, d(s(e)("order.deviceRemark")), 1),
|
|
676
|
-
v(P, {
|
|
677
|
-
"model-value": j.value,
|
|
678
|
-
placeholder: s(e)("order.deviceRemarkPlaceholder"),
|
|
679
|
-
"onUpdate:modelValue": De
|
|
680
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
681
|
-
a("div", It, [
|
|
682
|
-
a("span", Tt, d(j.value.length) + "/50 ", 1),
|
|
683
|
-
v(w, {
|
|
684
|
-
class: "w-auto",
|
|
685
|
-
variant: "secondary",
|
|
686
|
-
label: s(e)("order.saveDeviceRemark"),
|
|
687
|
-
disabled: !me.value || re.value,
|
|
688
|
-
onClick: Se
|
|
689
|
-
}, null, 8, ["label", "disabled"])
|
|
690
|
-
]),
|
|
691
|
-
a("span", wt, d(s(e)("order.current")) + ": " + d(Z.value || s(e)("order.notSet")), 1)
|
|
692
|
-
]),
|
|
693
|
-
s(u) ? (l(), M(w, {
|
|
694
|
-
key: 0,
|
|
695
|
-
class: "w-full",
|
|
696
|
-
variant: "primary",
|
|
697
|
-
label: (fe = t.device) != null && fe.pinInfo ? s(e)("order.resetDevicePin") : s(e)("order.setDevicePin"),
|
|
698
|
-
onClick: Ae
|
|
699
|
-
}, null, 8, ["label"])) : D("", !0)
|
|
700
|
-
])) : L.value === "other" && E.value ? (l(), m("div", Pt, [
|
|
701
|
-
a("span", At, d(s(e)("order.other")), 1),
|
|
702
|
-
(l(!0), m(q, null, G(F.value, (A) => (l(), m("div", {
|
|
703
|
-
key: A.key,
|
|
704
|
-
class: "flex flex-col gap-2"
|
|
705
|
-
}, [
|
|
706
|
-
a("span", Ct, d(A.title), 1),
|
|
707
|
-
(l(!0), m(q, null, G(A.entries, (le) => (l(), m("div", {
|
|
708
|
-
key: le.label,
|
|
709
|
-
class: "flex flex-col gap-1"
|
|
710
|
-
}, [
|
|
711
|
-
a("span", Dt, d(le.label), 1),
|
|
712
|
-
a("span", St, d(le.value), 1)
|
|
713
|
-
]))), 128))
|
|
714
|
-
]))), 128))
|
|
715
|
-
])) : L.value === "payment-gateway" && T.value ? (l(), m("div", Ft, [
|
|
716
|
-
a("span", Et, d(s(e)("order.paymentGateway")), 1),
|
|
717
|
-
a("span", $t, d(s(e)("order.availablePaymentMethodsHint")), 1),
|
|
718
|
-
v(at, {
|
|
719
|
-
checkouts: ((ye = S.value) == null ? void 0 : ye.checkouts) ?? [],
|
|
720
|
-
"load-error": s(i).state.loadError
|
|
721
|
-
}, null, 8, ["checkouts", "load-error"])
|
|
722
|
-
])) : D("", !0)
|
|
723
|
-
]))
|
|
724
|
-
];
|
|
725
|
-
}),
|
|
726
|
-
_: 1
|
|
727
|
-
}, 8, ["header"]),
|
|
728
|
-
s(h) ? (l(), M(w, {
|
|
729
|
-
key: 0,
|
|
730
|
-
variant: "plain",
|
|
731
|
-
icon: "link_off",
|
|
732
|
-
class: "text-fm-color-system-error-300",
|
|
733
|
-
onClick: Ie
|
|
734
|
-
})) : D("", !0)
|
|
735
|
-
])
|
|
736
|
-
]),
|
|
737
|
-
a("div", {
|
|
738
|
-
class: "fm-typo-en-body-md-600 text-fm-color-typo-primary mb-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
739
|
-
title: t.device.name
|
|
740
|
-
}, d(t.device.name), 9, Lt),
|
|
741
|
-
a("div", {
|
|
742
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mb-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
743
|
-
title: Z.value || s(e)("order.notSet")
|
|
744
|
-
}, d(s(e)("order.deviceRemark")) + ": " + d(Z.value || s(e)("order.notSet")), 9, Nt),
|
|
745
|
-
a("div", {
|
|
746
|
-
class: "flex items-center gap-1 mb-2 cursor-pointer group",
|
|
747
|
-
onClick: O,
|
|
748
|
-
title: s(e)("order.clickToCopy")
|
|
749
|
-
}, [
|
|
750
|
-
a("span", Ut, d($.value), 1),
|
|
751
|
-
v(W, {
|
|
752
|
-
name: "content_copy",
|
|
753
|
-
class: "text-fm-color-typo-tertiary opacity-0 group-hover:opacity-100 transition-opacity"
|
|
754
|
-
})
|
|
755
|
-
], 8, Kt),
|
|
756
|
-
a("div", qt, [
|
|
757
|
-
a("span", zt, [
|
|
758
|
-
v(W, { name: "smartphone" }),
|
|
759
|
-
te(" v" + d(t.device.deviceAppVersion ?? "?"), 1)
|
|
760
|
-
]),
|
|
761
|
-
t.device.deviceAppOTAVersion ? (l(), m("span", jt, [
|
|
762
|
-
v(W, { name: "system_update" }),
|
|
763
|
-
te(" " + d(t.device.deviceAppOTAVersion), 1)
|
|
764
|
-
])) : D("", !0),
|
|
765
|
-
a("span", Ht, [
|
|
766
|
-
v(W, { name: "lock" }),
|
|
767
|
-
te(" " + d(pe.value ? s(e)("order.pinSet") : s(e)("order.noPin")), 1)
|
|
768
|
-
]),
|
|
769
|
-
t.device.lastStartup ? (l(), m("span", {
|
|
770
|
-
key: 1,
|
|
771
|
-
class: "flex items-center gap-1",
|
|
772
|
-
title: N(t.device.lastStartup)
|
|
773
|
-
}, [
|
|
774
|
-
v(W, { name: "schedule" }),
|
|
775
|
-
te(" " + d(z(t.device.lastStartup)), 1)
|
|
776
|
-
], 8, Wt)) : D("", !0)
|
|
777
|
-
])
|
|
778
|
-
]);
|
|
779
|
-
};
|
|
780
|
-
}
|
|
781
|
-
}), Gt = { class: "flex flex-col items-center justify-center gap-3 py-16 text-center col-span-2" }, Qt = { class: "flex items-center justify-center w-16 h-16 rounded-full bg-fm-color-surface-secondary" }, Jt = { class: "fm-typo-en-title-sm-600 block" }, Xt = { class: "fm-typo-en-body-md-400 block text-fm-color-typo-tertiary max-w-[360px]" }, Zt = {
|
|
782
|
-
key: 0,
|
|
783
|
-
class: "pt-2"
|
|
784
|
-
}, _e = /* @__PURE__ */ Q({
|
|
785
|
-
__name: "KioskStatePanel",
|
|
786
|
-
props: {
|
|
787
|
-
title: {},
|
|
788
|
-
message: {},
|
|
789
|
-
icon: { default: "info" }
|
|
790
|
-
},
|
|
791
|
-
setup(t) {
|
|
792
|
-
return (e, u) => {
|
|
793
|
-
const h = x("FmIcon");
|
|
794
|
-
return l(), m("div", Gt, [
|
|
795
|
-
a("div", Qt, [
|
|
796
|
-
v(h, {
|
|
797
|
-
name: t.icon,
|
|
798
|
-
size: "xl",
|
|
799
|
-
class: "text-fm-color-typo-tertiary"
|
|
800
|
-
}, null, 8, ["name"])
|
|
801
|
-
]),
|
|
802
|
-
a("span", Jt, d(t.title), 1),
|
|
803
|
-
a("span", Xt, d(t.message), 1),
|
|
804
|
-
e.$slots.default ? (l(), m("div", Zt, [
|
|
805
|
-
Me(e.$slots, "default")
|
|
806
|
-
])) : D("", !0)
|
|
807
|
-
]);
|
|
808
|
-
};
|
|
809
|
-
}
|
|
810
|
-
}), en = { class: "flex flex-col gap-4" }, tn = { class: "flex items-center justify-between" }, nn = { class: "flex flex-col gap-2" }, on = { class: "fm-typo-en-title-sm-600 block" }, an = { class: "fm-typo-en-body-md-400 block" }, rn = { class: "flex items-center gap-3 flex-wrap" }, sn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, ln = { class: "grid grid-cols-2 gap-2 py-8" }, cn = {
|
|
811
|
-
key: 0,
|
|
812
|
-
class: "text-center py-8 text-fm-color-typo-tertiary fm-typo-en-body-md-400 col-span-2"
|
|
813
|
-
}, dn = {
|
|
814
|
-
key: 1,
|
|
815
|
-
class: "text-center py-8 text-fm-color-typo-tertiary fm-typo-en-body-md-400 col-span-2"
|
|
816
|
-
}, _n = /* @__PURE__ */ Q({
|
|
817
|
-
__name: "KioskDevicesView",
|
|
818
|
-
props: {
|
|
819
|
-
devices: {},
|
|
820
|
-
loadError: { default: null }
|
|
821
|
-
},
|
|
822
|
-
emits: ["requestOtp", "retry"],
|
|
823
|
-
setup(t) {
|
|
824
|
-
const { t: e } = ne(), { canBindDevice: u } = xe(), h = t, f = C(""), c = C("all"), p = _(() => {
|
|
825
|
-
switch (c.value) {
|
|
826
|
-
case "tablet":
|
|
827
|
-
return e("order.tabletOnly");
|
|
828
|
-
case "kiosk":
|
|
829
|
-
return e("order.kioskOnly");
|
|
830
|
-
default:
|
|
831
|
-
return e("order.allTypes");
|
|
832
|
-
}
|
|
833
|
-
}), k = _(() => {
|
|
834
|
-
let i = h.devices;
|
|
835
|
-
c.value === "tablet" ? i = i.filter((n) => n.deviceAppType === "TABLET_APP") : c.value === "kiosk" && (i = i.filter((n) => n.deviceAppType !== "TABLET_APP"));
|
|
836
|
-
const r = f.value.toLowerCase().trim();
|
|
837
|
-
return r && (i = i.filter((n) => {
|
|
838
|
-
var F, E, B, R;
|
|
839
|
-
const b = ((F = n.name) == null ? void 0 : F.toLowerCase()) || "", T = ((E = n.machineId) == null ? void 0 : E.toLowerCase()) || "", S = ((B = n.slotInfo) == null ? void 0 : B.toLowerCase()) || "", y = ((R = n.remarkInfo) == null ? void 0 : R.toLowerCase()) || "";
|
|
840
|
-
return b.includes(r) || T.includes(r) || S.includes(r) || y.includes(r);
|
|
841
|
-
})), i.sort((n, b) => n.deviceAppType === "TABLET_APP" && b.deviceAppType !== "TABLET_APP" ? -1 : n.deviceAppType !== "TABLET_APP" && b.deviceAppType === "TABLET_APP" ? 1 : n.deviceAppType === "TABLET_APP" && b.deviceAppType === "TABLET_APP" ? (n.slotInfo || "").localeCompare(b.slotInfo || "") : (n.name || "").localeCompare(b.name || ""));
|
|
842
|
-
});
|
|
843
|
-
return (i, r) => {
|
|
844
|
-
const n = x("FmButton"), b = x("FmSearch"), T = x("FmMenuItem"), S = x("FmMenu");
|
|
845
|
-
return l(), m("div", null, [
|
|
846
|
-
a("div", en, [
|
|
847
|
-
a("div", tn, [
|
|
848
|
-
a("div", nn, [
|
|
849
|
-
a("span", on, d(s(e)("order.kioskDisplay")), 1),
|
|
850
|
-
a("span", an, d(s(e)("order.kioskDisplayDescription")), 1)
|
|
851
|
-
]),
|
|
852
|
-
s(u) ? (l(), M(n, {
|
|
853
|
-
key: 0,
|
|
854
|
-
variant: "primary",
|
|
855
|
-
label: s(e)("order.bindDevice"),
|
|
856
|
-
size: "md",
|
|
857
|
-
"prepend-icon": "link",
|
|
858
|
-
onClick: r[0] || (r[0] = (y) => i.$emit("requestOtp"))
|
|
859
|
-
}, null, 8, ["label"])) : D("", !0)
|
|
860
|
-
]),
|
|
861
|
-
t.loadError === "forbidden" ? (l(), M(_e, {
|
|
862
|
-
key: 0,
|
|
863
|
-
icon: "lock",
|
|
864
|
-
title: s(e)("order.deviceAccessDeniedTitle"),
|
|
865
|
-
message: s(e)("order.deviceAccessDeniedMessage")
|
|
866
|
-
}, null, 8, ["title", "message"])) : t.loadError === "error" ? (l(), M(_e, {
|
|
867
|
-
key: 1,
|
|
868
|
-
icon: "error",
|
|
869
|
-
title: s(e)("order.deviceLoadErrorTitle"),
|
|
870
|
-
message: s(e)("order.deviceLoadErrorMessage")
|
|
871
|
-
}, {
|
|
872
|
-
default: K(() => [
|
|
873
|
-
v(n, {
|
|
874
|
-
variant: "secondary",
|
|
875
|
-
label: s(e)("order.retry"),
|
|
876
|
-
"prepend-icon": "refresh",
|
|
877
|
-
onClick: r[1] || (r[1] = (y) => i.$emit("retry"))
|
|
878
|
-
}, null, 8, ["label"])
|
|
879
|
-
]),
|
|
880
|
-
_: 1
|
|
881
|
-
}, 8, ["title", "message"])) : (l(), m(q, { key: 2 }, [
|
|
882
|
-
a("div", rn, [
|
|
883
|
-
v(b, {
|
|
884
|
-
"model-value": f.value,
|
|
885
|
-
"onUpdate:modelValue": r[2] || (r[2] = (y) => f.value = y),
|
|
886
|
-
class: "flex-1 min-w-[200px] max-w-[400px]",
|
|
887
|
-
placeholder: s(e)("order.searchDevices")
|
|
888
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
889
|
-
v(S, null, {
|
|
890
|
-
"menu-button": K(() => [
|
|
891
|
-
v(n, {
|
|
892
|
-
variant: "tertiary",
|
|
893
|
-
"prepend-icon": "filter_list",
|
|
894
|
-
label: p.value,
|
|
895
|
-
class: "fm-typo-en-body-md-600"
|
|
896
|
-
}, null, 8, ["label"])
|
|
897
|
-
]),
|
|
898
|
-
default: K(() => [
|
|
899
|
-
v(T, {
|
|
900
|
-
"model-value": c.value === "all",
|
|
901
|
-
label: s(e)("order.allTypes"),
|
|
902
|
-
onClick: r[3] || (r[3] = (y) => c.value = "all")
|
|
903
|
-
}, null, 8, ["model-value", "label"]),
|
|
904
|
-
v(T, {
|
|
905
|
-
"model-value": c.value === "tablet",
|
|
906
|
-
label: s(e)("order.tabletOnly"),
|
|
907
|
-
onClick: r[4] || (r[4] = (y) => c.value = "tablet")
|
|
908
|
-
}, null, 8, ["model-value", "label"]),
|
|
909
|
-
v(T, {
|
|
910
|
-
"model-value": c.value === "kiosk",
|
|
911
|
-
label: s(e)("order.kioskOnly"),
|
|
912
|
-
onClick: r[5] || (r[5] = (y) => c.value = "kiosk")
|
|
913
|
-
}, null, 8, ["model-value", "label"])
|
|
914
|
-
]),
|
|
915
|
-
_: 1
|
|
916
|
-
}),
|
|
917
|
-
a("span", sn, d(s(e)("order.showingDevices", { count: k.value.length, total: t.devices.length })), 1)
|
|
918
|
-
]),
|
|
919
|
-
a("div", ln, [
|
|
920
|
-
(l(!0), m(q, null, G(k.value, (y) => (l(), M(Yt, {
|
|
921
|
-
key: y.machineId,
|
|
922
|
-
device: y
|
|
923
|
-
}, null, 8, ["device"]))), 128)),
|
|
924
|
-
k.value.length === 0 && t.devices.length > 0 ? (l(), m("div", cn, d(s(e)("order.noDevicesMatch")), 1)) : D("", !0),
|
|
925
|
-
t.devices.length === 0 ? (l(), m("div", dn, d(s(e)("order.noDevicesBound")), 1)) : D("", !0)
|
|
926
|
-
])
|
|
927
|
-
], 64))
|
|
928
|
-
])
|
|
929
|
-
]);
|
|
930
|
-
};
|
|
931
|
-
}
|
|
932
|
-
});
|
|
933
|
-
export {
|
|
934
|
-
_n as _,
|
|
935
|
-
ct as a,
|
|
936
|
-
Qe as u
|
|
937
|
-
};
|