feat: Admin User Management - Vehicle Display Features #17

Merged
egullickson merged 2 commits from issue-11-admin-vehicle-display into main 2026-01-04 19:35:02 +00:00
Owner

Summary

  • Add Total Vehicles widget to admin dashboard (next to Total Users)
  • Add expandable vehicle rows in admin user management (Year/Make/Model only for privacy)
  • Add My Vehicles section to user profile page (desktop and mobile)
  • Full mobile + desktop responsive implementation

Changes

Backend

  • GET /api/admin/stats - Returns totalUsers and totalVehicles for dashboard widgets
  • GET /api/admin/users/:auth0Sub/vehicles - Returns user's vehicles for admin view (Year/Make/Model only)
  • Defense-in-depth admin checks in both endpoints

Frontend Desktop

  • AdminUsersPage: Total Vehicles stat widget + expandable vehicle rows with MUI Collapse
  • SettingsPage: My Vehicles Card section showing user's own vehicles

Frontend Mobile

  • AdminUsersMobileScreen: Stats header with user/vehicle counts + expandable vehicle list per user
  • MobileSettingsScreen: My Vehicles section with vehicle list

Documentation

  • Updated admin/README.md with new endpoints documentation

Test plan

  • Verify Total Vehicles widget displays correct count on admin dashboard
  • Verify clicking user row with vehicles expands to show vehicle list
  • Verify vehicle list shows only Year/Make/Model (privacy)
  • Verify My Vehicles section appears on profile page (desktop + mobile)
  • Verify non-admin users cannot access admin endpoints
  • Verify mobile touch targets are at least 44x44px
  • Test on mobile viewport (320px), tablet (768px), desktop (1920px)

Fixes #11

🤖 Generated with Claude Code

## Summary - Add Total Vehicles widget to admin dashboard (next to Total Users) - Add expandable vehicle rows in admin user management (Year/Make/Model only for privacy) - Add My Vehicles section to user profile page (desktop and mobile) - Full mobile + desktop responsive implementation ## Changes ### Backend - `GET /api/admin/stats` - Returns totalUsers and totalVehicles for dashboard widgets - `GET /api/admin/users/:auth0Sub/vehicles` - Returns user's vehicles for admin view (Year/Make/Model only) - Defense-in-depth admin checks in both endpoints ### Frontend Desktop - AdminUsersPage: Total Vehicles stat widget + expandable vehicle rows with MUI Collapse - SettingsPage: My Vehicles Card section showing user's own vehicles ### Frontend Mobile - AdminUsersMobileScreen: Stats header with user/vehicle counts + expandable vehicle list per user - MobileSettingsScreen: My Vehicles section with vehicle list ### Documentation - Updated admin/README.md with new endpoints documentation ## Test plan - [ ] Verify Total Vehicles widget displays correct count on admin dashboard - [ ] Verify clicking user row with vehicles expands to show vehicle list - [ ] Verify vehicle list shows only Year/Make/Model (privacy) - [ ] Verify My Vehicles section appears on profile page (desktop + mobile) - [ ] Verify non-admin users cannot access admin endpoints - [ ] Verify mobile touch targets are at least 44x44px - [ ] Test on mobile viewport (320px), tablet (768px), desktop (1920px) Fixes #11 🤖 Generated with [Claude Code](https://claude.com/claude-code)
egullickson added 1 commit 2026-01-04 19:19:04 +00:00
feat: Add admin vehicle management and profile vehicles display (refs #11)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 4m34s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 37s
Deploy to Staging / Verify Staging (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
4fc5b391e1
- Add GET /api/admin/stats endpoint for Total Vehicles widget
- Add GET /api/admin/users/:auth0Sub/vehicles endpoint for user vehicle list
- Update AdminUsersPage with Total Vehicles stat and expandable vehicle rows
- Add My Vehicles section to SettingsPage (desktop) and MobileSettingsScreen
- Update AdminUsersMobileScreen with stats header and vehicle expansion
- Add defense-in-depth admin checks and error handling
- Update admin README documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
egullickson added 1 commit 2026-01-04 19:28:39 +00:00
fix: My Vehicles manage button navigates to vehicles page (refs #11)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 2m39s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 27s
Deploy to Staging / Verify Staging (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 5s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
19203aa2b5
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
egullickson merged commit 6a79246eeb into main 2026-01-04 19:35:02 +00:00
egullickson deleted branch issue-11-admin-vehicle-display 2026-01-04 19:35:03 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: egullickson/motovaultpro#17