Commit Graph

1 Commits

Author SHA1 Message Date
cproudlock
8c198938c2 Complete USB self-hosted mode (app tables, no external cmmc_usb)
"Create the tables here" for USB now actually works. Add selfhosted.py backing
every USB endpoint with the app-owned usbdevices/usbcheckouts tables and
returning the same response shape as the external cmmc_usb path. Each route in
routes.py delegates to it when usb_directory_mode=selfhosted (the default).

- Device status derives from ischeckedout + isactive (retired); check-in/out
  history is synthesized from usbcheckouts rows (check-out + check-in events);
  holder names resolve from the self-hosted employee directory.
- External cmmc_usb mode unchanged, for sites already running that solution.

Verified E2E: create -> list -> checkout -> checkin -> history all correct
against the app tables.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 10:55:48 -04:00