Skip to content

feat: add advanced dashboard and power dashboard#412

Open
tomas-goncalves wants to merge 9 commits intosc0v:masterfrom
tomas-goncalves:rewrite/advanced-dashboard
Open

feat: add advanced dashboard and power dashboard#412
tomas-goncalves wants to merge 9 commits intosc0v:masterfrom
tomas-goncalves:rewrite/advanced-dashboard

Conversation

@tomas-goncalves
Copy link
Copy Markdown
Contributor

Summary

Implements two new operator interfaces for tool/lift/queue management, rewritten from the advanced-dashboard/* branch series.

  • /dashboard — step-by-step wizard driven by URL params. Supports checkin, checkout, lift checkin/checkout/renew, queue add/remove, and participant lookup flows with undo, confirmation, and a result page for partial checkouts.
  • /power-dashboard — session-based command UI with a single text input. Operators type commands (checkin, checkout, add, electrical add <note>, etc.), get autocomplete suggestions with keyboard navigation, and confirm destructive actions before execution.

Key additions

  • 17 action handlers under app/services/dashboard/actions/ (tools, lifts, queues, cart, session)
  • Shared service layer: FlowState, SessionState, ActionRegistry, ActionExecutor, ReceiptBuilder, ScanResolver, ShowContextBuilder
  • PowerDashboard::ActionParser and AutocompleteSuggestions for the command surface
  • DashboardHelper merging both UI helpers
  • Stimulus controllers: auto_submit, power_dashboard_autocomplete (keyboard nav, pre-selects first result), power_dashboard_focus
  • Shared resource partials under app/views/shared/resources/

@tomas-goncalves tomas-goncalves force-pushed the rewrite/advanced-dashboard branch 2 times, most recently from 156b22c to bc34f65 Compare March 26, 2026 07:37
- Add participant_signed_waiver, participant_belongs_to_org, and
  not_already_checked_in validations to Checkout model
- Add checkin instance method
- Add checkout_batch class method (map/partition style matching ScissorLiftCheckout)
- Update Tools::CheckoutsController to use checkout_batch and checkin
- Update Applets::PPECollectionController to use checkin
- Update Applets::PPEDistributionController to use find_by and fix double create+save
Implements two new operator interfaces for tool/lift/queue management:

- `/dashboard` — URL-param-driven step wizard for checkin, checkout,
  lift operations, queue management, and participant lookup flows
- `/power-dashboard` — session-based command UI with text input,
  autocomplete (keyboard navigation, pre-selects first result),
  confirmation flow, and cart management

Includes a shared service layer (17 action handlers, flow state,
session state, action registry, receipt builder, scan resolver) and
merged DashboardHelper covering both surfaces. Org resource card shows
Tools, Hardhats, and Radios counts separately.
@tomas-goncalves tomas-goncalves force-pushed the rewrite/advanced-dashboard branch from c7c101e to 184fddd Compare March 26, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant