Includes all work to date: - local_backend: FastAPI backend with products, orders, tables, shifts, cloud sync - manager_dashboard: React manager UI with product/category management, reports, settings - waiter_pwa: React PWA for waiter devices - Category reparent endpoint and UI - Waiter domain: local_ip sent on heartbeat, waiter_domain persisted from cloud response - QR code modal in AppInfoTab for waiter domain - Product form: number input spinners removed, category pre-selected on new product - Category row: count badge moved to far right Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
454 B
Python
15 lines
454 B
Python
from datetime import datetime
|
|
from typing import Annotated
|
|
from pydantic import PlainSerializer
|
|
|
|
# SQLite strips tzinfo on read-back, so naive datetimes from DB are actually UTC.
|
|
# This serializer appends "Z" so browsers parse them correctly as UTC.
|
|
UTCDatetime = Annotated[
|
|
datetime,
|
|
PlainSerializer(
|
|
lambda dt: (dt.isoformat() + "Z") if dt.tzinfo is None else dt.isoformat(),
|
|
return_type=str,
|
|
when_used="json",
|
|
),
|
|
]
|