14 Commits

Author SHA1 Message Date
shawn 9ae0f271ea chore: remove accidentally committed gps backup file 2026-05-29 23:17:53 -04:00
shawn 17b870e4cc feat: wire vision/OCR results back into asset records
- Auto-save photo_path to matched assets when photo uploaded via /api/ocr
- Auto-extract and save serial_number from OCR text to blank-serial matched assets
- Add _extract_serial_from_text helper for serial number pattern matching
- Create scripts/backfill_vision_photos.py for batch-processing unlinked photos
- Add docs/OCR_PIPELINE.md documenting the full OCR/vision pipeline
- Fix test DB schema: add connect_id, equipment_id, barcode, customer_name
- Fix OCR test assertions to match actual endpoint behavior
2026-05-29 10:03:51 -04:00
shawn faacf0bce9 Rename 'Add Asset' tab to 'Add / Find Asset' across nav + tabs
- Drawer nav: 'Add Asset' → 'Add / Find Asset'
- Bottom tab bar: 'Add Asset' → 'Add / Find Asset'
- Updated e2e_browser_test.py assertions to match
2026-05-25 23:14:52 -04:00
shawn 4ebe3a5076 feat: add dex_report_date to AssetCreate model + test for no_dex_days filter
- Add dex_report_date field to AssetCreate Pydantic model
- Include dex_report_date in _build_asset_insert columns/values
- Add test_list_assets_filter_no_dex_days test (11/11 pass)
2026-05-23 17:29:37 -04:00
shawn a0e6f627f4 Revert "Add clear GPS endpoint + frontend button"
This reverts commit ca77a29d7d.
2026-05-22 23:32:51 -04:00
shawn ca77a29d7d Add clear GPS endpoint + frontend button
- DELETE /api/assets/{id}/gps sets lat/lng to NULL
- Detail view shows 'Clear GPS' button when asset has GPS coords
- Confirmation modal before clearing
- Tests: 204 success + 404 not found
2026-05-22 23:30:07 -04:00
shawn 25da436bba Fix: seed admin/changeme user for frontend E2E tests
The test suite login as 'admin'/'changeme' but only 'shawn' was seeded.
Adding the admin user with SHA256('changeme') hash lets all 15 Playwright
tests reach the actual app pages instead of failing at login.
2026-05-22 15:08:39 -04:00
shawn 9a1a5d9caa docs: add admin.canteen.ourpad.casa proxy config to PROJECT.md
NPMPlus proxy ID 20, cert ID 21, backend 192.168.0.127:8901
Cloudflare DNS A record grey cloud, Let's Encrypt SSL

Closes gitea issue #26
2026-05-21 17:18:21 -04:00
shawn c8973337c8 Clean up accidental db-shm/db-wal commit, add to gitignore 2026-05-21 07:45:35 -04:00
shawn 14687e7ba6 Fix Nav tab infinite recursion (pre-UX-sweep bug)
The reverted code had two bugs in the tab switching logic:
1. closeNavigate() called switchTab() -> infinite recursion since
   switchTab() calls closeNavigate() when leaving tabNavigate
2. currentTab was updated AFTER closeNavigate(), so the recursive
   call hit the same condition over and over

Fix: move currentTab assignment before cleanup, use a wasNavigating
flag to track the old tab state, and make closeNavigate() only reset
nav UI (caller handles tab transition).
2026-05-21 07:45:16 -04:00
shawn d844429f56 Fix: test_map_api.py DB isolation — set CANTEEN_DB_PATH inside client fixture
Previously relied on module-level env var which got overwritten
when frontend tests' conftest.py test_db_path fixture ran first.
Now explicitly sets env var inside client fixture + invalidates
caches before import. Also fixed importlib order.
2026-05-20 19:57:39 -04:00
shawn ffe9090668 Fix: move GPS geocode block outside payload object literal
The F2 auto-populate address block was accidentally inserted inside
the payload={} object literal, causing a JS syntax error that
broke the entire script and prevented the login screen from showing.
2026-05-20 18:35:23 -04:00
shawn b20998e8e3 fix: OCR last-5-digits extraction, barcode 1D-only scanning, auto-checkin on create
- OCR: Extract only last 5 digits from Connect ID (XXXXX-XXXXXX → last 5)
- Barcode: Switch to decodeFromVideoDevice with 1D-only format hints
  (Code 128/39/EAN/UPC/ITF/Codabar), TRY_HARDER, 50ms scan interval
- Auto check-in: New assets auto-checkin with GPS on creation via
  all three entry modes (barcode, OCR, manual)
- Tests: Updated e2e tests for login wait and API flow
2026-05-20 15:03:20 -04:00
shawn 7da3f28c6a Initial commit: Canteen Asset Geolocation Tool v2 2026-05-17 18:55:28 -04:00