2a2d40bec9
UX rework — recipe assignment modal on /admin/stations
- Replace the single "select recipe + Assegna" dropdown with a two-
column layout: Ricette disponibili (left) and Assegnate alla
stazione (right), each row with an inline action button. Top search
filter narrows both columns at once. Empty states explain *why* the
list is empty (no recipes in system, all already assigned, no match
for the filter).
- Rationale: the old dropdown silently hid every option once a recipe
was assigned, leaving the user unable to tell whether the system
was broken or simply out of unassigned recipes.
Apostrophe regressions
- /admin/stations alert/errorMsg literals reworded with double-quoted
outer JS strings ("Errore nella eliminazione" / "...assegnazione").
- /admin/users toggle confirm modal: x-text expression contained
'{{ _('… l\'utente') }}'. Inside a Jinja-rendered HTML attribute,
the apostrophe in "l'utente" closed the JS literal early, killing
the binding. Fixed by using " as the JS string delimiter so
the inner apostrophe is harmless.
Alpine x-if templates can't host nested templates
- Replaced two nested-template empty-state blocks with x-text bound
to computed getters (unassignedEmptyMessage,
assignedEmptyMessage). Alpine errored with
"Cannot set properties of null (setting '_x_dataStack')" when the
outer template's child wasn't a single root element.
Test guard widened
- src/frontend/flask_app/tests/test_template_js_syntax.py now also
parses every Alpine attribute (x-*, @*, :*) on the rendered HTML
and runs `node --check` on each expression wrapped in `void (…)`.
Previously it only inspected inline <script> bodies, which is why
the x-text bug on /admin/users slipped through. Verified the
extended test catches the original l'utente regression by reverting
+ running + restoring.
Layout regression — UPLOAD_DIR defaulted to server/uploads
- The previous .env.example shipped UPLOAD_DIR=server/uploads, which
matched the V1.x layout but pointed outside the new project tree.
Updated to UPLOAD_DIR=uploads so files land in the project-root
uploads/ volume that src/backend/config.py.upload_path resolves.
- Added uploads/general/ to .gitignore (per-user uploads, not source).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.2 KiB
Bash
46 lines
1.2 KiB
Bash
# ===========================
|
|
# TieMeasureFlow Configuration
|
|
# ===========================
|
|
|
|
# --- Database ---
|
|
DB_HOST=localhost
|
|
DB_PORT=3306
|
|
DB_NAME=tiemeasureflow
|
|
DB_USER=tmflow
|
|
DB_PASSWORD=change_me_in_production
|
|
|
|
# --- Server ---
|
|
SERVER_HOST=0.0.0.0
|
|
SERVER_PORT=8000
|
|
SERVER_SECRET_KEY=change-this-to-a-random-secret-key
|
|
SERVER_CORS_ORIGINS=http://localhost:5000
|
|
|
|
# --- Client ---
|
|
CLIENT_HOST=0.0.0.0
|
|
CLIENT_PORT=5000
|
|
CLIENT_SECRET_KEY=change-this-to-another-random-secret-key
|
|
API_SERVER_URL=http://localhost:8000
|
|
# Station code this client container belongs to (e.g. ST-001).
|
|
# Each physical tablet/PC deployment must set this unique per-station value.
|
|
# Leave empty only for a single-station all-in-one demo using ST-DEFAULT.
|
|
STATION_CODE=ST-DEFAULT
|
|
|
|
# --- File Storage ---
|
|
# Resolved against the project root in src/backend/config.py.
|
|
# Default "uploads" maps to <project_root>/uploads, mounted as a Docker
|
|
# volume in production.
|
|
UPLOAD_DIR=uploads
|
|
MAX_UPLOAD_SIZE_MB=50
|
|
|
|
# --- Setup Page ---
|
|
SETUP_PASSWORD= # Password per /api/setup, vuoto = disabilitato
|
|
|
|
# --- Docker ---
|
|
DB_ROOT_PASSWORD=root_password_change_me
|
|
NGINX_PORT=80
|
|
NGINX_SSL_PORT=443
|
|
|
|
# --- HTTPS (Production) ---
|
|
# SSL_CERTFILE=/path/to/cert.pem
|
|
# SSL_KEYFILE=/path/to/key.pem
|