fix: Wire up Add Maintenance button on vehicle detail page (#194) #195

Merged
egullickson merged 1 commits from issue-194-fix-add-maintenance-button into main 2026-02-15 16:09:53 +00:00
Owner

Fixes #194

Summary

  • Renamed "Schedule Maintenance" to "Add Maintenance" on desktop and mobile vehicle detail pages
  • Changed button style to variant="contained" on desktop to match "Add Fuel Log"
  • Wired button to open an inline dialog with MaintenanceRecordForm (same pattern as Add Fuel Log)
  • Added onSuccess callback prop to MaintenanceRecordForm for dialog close + query invalidation
  • Mobile dialog opens fullscreen; desktop dialog is responsive with fullScreen at small breakpoints

Files Changed

  • frontend/src/features/vehicles/pages/VehicleDetailPage.tsx - Desktop button + dialog
  • frontend/src/features/vehicles/mobile/VehicleDetailMobile.tsx - Mobile button + dialog
  • frontend/src/features/maintenance/components/MaintenanceRecordForm.tsx - Added onSuccess prop

Test Plan

  • Click "Add Maintenance" on desktop vehicle detail page - dialog opens with form
  • Submit maintenance record - dialog closes, toast confirms success
  • Click "Add Maintenance" on mobile vehicle detail page - fullscreen dialog opens
  • Submit maintenance record on mobile - dialog closes, toast confirms success
  • Verify "Add Maintenance" button matches "Add Fuel Log" styling on desktop
Fixes #194 ## Summary - Renamed "Schedule Maintenance" to "Add Maintenance" on desktop and mobile vehicle detail pages - Changed button style to `variant="contained"` on desktop to match "Add Fuel Log" - Wired button to open an inline dialog with `MaintenanceRecordForm` (same pattern as Add Fuel Log) - Added `onSuccess` callback prop to `MaintenanceRecordForm` for dialog close + query invalidation - Mobile dialog opens fullscreen; desktop dialog is responsive with `fullScreen` at small breakpoints ## Files Changed - `frontend/src/features/vehicles/pages/VehicleDetailPage.tsx` - Desktop button + dialog - `frontend/src/features/vehicles/mobile/VehicleDetailMobile.tsx` - Mobile button + dialog - `frontend/src/features/maintenance/components/MaintenanceRecordForm.tsx` - Added `onSuccess` prop ## Test Plan - [ ] Click "Add Maintenance" on desktop vehicle detail page - dialog opens with form - [ ] Submit maintenance record - dialog closes, toast confirms success - [ ] Click "Add Maintenance" on mobile vehicle detail page - fullscreen dialog opens - [ ] Submit maintenance record on mobile - dialog closes, toast confirms success - [ ] Verify "Add Maintenance" button matches "Add Fuel Log" styling on desktop
egullickson added 1 commit 2026-02-15 16:01:53 +00:00
fix: wire up Add Maintenance button on vehicle detail page (refs #194)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 3m24s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 52s
Deploy to Staging / Verify Staging (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
7140c7e8d4
Rename "Schedule Maintenance" to "Add Maintenance", match contained
button style to "Add Fuel Log", and open inline MaintenanceRecordForm
dialog on click. Applied to both desktop and mobile views.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
egullickson merged commit 963c17014c into main 2026-02-15 16:09:53 +00:00
egullickson deleted branch issue-194-fix-add-maintenance-button 2026-02-15 16:09:53 +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#195