00f3d141b6
Dates were raw ISO on printed slips and time-only in the UI (a session from two days ago showed just "10:48"). Make them human and day-relative. Also fix a latent toggle bug surfaced while testing. Dates: - Printed tickets/receipts/subscription cards now show "19 Qershor 2026 10:48:25" (Albanian month, 24h with seconds) instead of YYYY-MM-DD HH:MM. stamp() exported as formatStampSq so the shift Z-report shares it. - Shift Z-report is now Albanian (Operatori/Nga/Deri/Para në dorë/Arka…), was English-only with ISO dates. - Web sessions/logs/history show relative days: "Sot 10:48" / "Dje 17:33" / "17 Qershor 10:48" via formatRelativeDateTime(). Month names come from the i18n catalog (common.months), NOT Intl — the appliance browser's ICU lacks Albanian locale data and Intl silently falls back to English month names. Toggle fix: - The language + theme toggles read the active value from the TanStack Router context `user`, which is captured at route-resolution time and does not re-render on setUser. After one switch the highlight froze and the equality guard blocked switching back until a page refresh. Drive them off live state instead: language from i18n.language (useTranslation subscribes to languageChanged), theme from local useState. (Bug dated to 040c0ff.) Claude-Session: https://claude.ai/code/session_01Xcm6ikLgGoCxxHrxtjkk5V
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
// @parking/devices — device-agnostic adapters + the driver registry that lets
|
|
// an admin select between supported devices at first-run setup.
|
|
//
|
|
// See wiki/concepts/device-adapter-pattern.md and device-registry.md.
|
|
|
|
export * from "./interfaces.js";
|
|
export * from "./registry.js";
|
|
export { setDeviceLogSink, type DeviceLogSink } from "./drivers/common.js";
|
|
// Built-in drivers: the registrar plus the individual driver objects (used by
|
|
// hardware test scripts and any direct/programmatic device access).
|
|
export {
|
|
registerBuiltinDrivers,
|
|
dingtianDriver,
|
|
stubAccessDriver,
|
|
wiegandReaderDriver,
|
|
tcpipReaderDriver,
|
|
geeQrReaderDriver,
|
|
hikvisionDriver,
|
|
dahuaDriver,
|
|
rongtaDriver,
|
|
cashinoDriver,
|
|
} from "./drivers/index.js";
|
|
export { isPrinter, type PrinterRole } from "./drivers/printer-rongta.js";
|
|
// Albanian human date/time for printed slips (receipts, tickets, shift Z-report),
|
|
// kept in one place so all printed output formats dates identically.
|
|
export { stamp as formatStampSq } from "./drivers/printer-escpos.js";
|
|
export {
|
|
orderForRole,
|
|
printWithFailover,
|
|
NoPrinterAvailableError,
|
|
type PrinterInstance,
|
|
} from "./printer-routing.js";
|