6 Commits

Author SHA1 Message Date
shawn 064740ef2e feat: config-driven environments (env vars + start scripts)
Add env var overrides matching main app pattern:
- CANTEEN_IMPORT_PORT — port override (default 8091)
- CANTEEN_IMPORT_DB_PATH — database path override
- CANTEEN_IMPORT_SEED_DIR — seed data directory override
- CANTEEN_IMPORT_UPLOAD_DIR — upload directory override

Create start scripts in repo:
- start.sh — production (default port 8091)
- start-dev.sh — development (port 8093, assets.dev.db)

Fix: dev clone now pulls from Gitea (not local prod dir)
2026-05-25 00:29:56 -04:00
shawn a0b0c7abac Add Push-to-Main-App button to seed import UI
- New card with Dev/Prod target selector + dry-run toggle
- Auto-refreshes target status (exists/not found)
- Results grid: assets created/updated/skipped, customers, locations
- Sample actions and error display
- Calls existing /api/sync endpoint
2026-05-25 00:11:58 -04:00
shawn bd3bfea37c Add sync module: push seed data to main app DB (dev/prod)
- New sync.py: reads seed import's 39-col schema, maps to main app's
  customers/locations/assets schema with foreign keys
- New POST /api/sync endpoint (target=dev|prod, dry_run=true/false)
- New GET /api/sync/targets endpoint
- Category mapping: Bev→Beverage, Snack→Snack, Food→Food, etc.
- Automatically creates customers and locations from company/place
- Idempotent: updates existing assets by machine_id
- Dry-run mode: preview changes without writing
2026-05-25 00:04:43 -04:00
shawn 0205866e7a feat: add disney_area column and resort area mapping
- Add DISNEY_AREA_MAP in parser.py mapping 40+ Disney properties to 8 resort areas
- Add disney_area to parse_customer() output, resolver after disney_park
- Update db_writer.py schema: ORDERED_COLUMNS, AUTO_COLUMNS, COLUMN_TYPES
- Add /api/status endpoint query for by_disney_area distribution
- Add area row to web dashboard UI
- Auto-migration adds column to existing databases
2026-05-24 23:36:41 -04:00
shawn be9c34f51d Add GPS-only backup/restore and database wipe
- Fix backup.py PRESERVED_FIELDS column names (lat/lng -> latitude/longitude)
  to match actual DB schema (pre-existing bug)
- Add backup_gps() and restore_gps() dedicated GPS-only functions
- Add /api/gps/backup and /api/gps/restore API endpoints
- Add /api/gps/restore/upload for restoring from uploaded backup files
- Add /api/db/wipe endpoint to clear all asset records
- Update UI with GPS-only Backup button, Restore GPS from File picker,
  and Wipe All Assets with double-confirmation dialog
- Fix backup listing to scan both seed-data/ and project root
2026-05-24 23:07:12 -04:00
shawn 724104b750 Add web UX with dashboard, import wizard, backup management
- SPA frontend (static/index.html): 4-step wizard flow
  (Upload → Review → Import → Report) + Dashboard bar + Backup UI
- FastAPI server (server.py) with 14 API endpoints
- New endpoints: /api/status, /api/backups, /api/backup/restore
- Updated README with web UX usage
- Added web deps: fastapi, uvicorn, python-multipart
2026-05-24 22:57:11 -04:00