feat: Document feature enhancements (#31) #32
Reference in New Issue
Block a user
Delete Branch "issue-31-document-enhancements"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Enhances the documents feature with vehicle associations, full editing capability, and insurance multi-vehicle support.
Changes
Implementation
57debe45dbc17ee558fdf8968cadb71e2cfbdb329f354ce47Architectural Decision
Used hybrid approach for multi-vehicle insurance:
vehicle_idas primary vehicle (backward compatible)shared_vehicle_ids UUID[]array for additional vehiclesTest Plan
Acceptance Criteria
Fixes #31
🤖 Generated with Claude Code
Implemented comprehensive document editing capabilities: 1. Created EditDocumentDialog component: - Responsive MUI Dialog with fullScreen on mobile - Wraps DocumentForm in edit mode - Proper close handlers with refetch 2. Enhanced DocumentForm to support edit mode: - Added mode prop ('create' | 'edit') - Pre-populate all fields from initialValues - Use useUpdateDocument hook when in edit mode - Multi-select for shared vehicles (insurance only) - Vehicle and document type disabled in edit mode - Optional file upload in edit mode - Dynamic button text (Create/Save Changes) 3. Updated DocumentDetailPage: - Added Edit button with proper touch targets - Integrated EditDocumentDialog - Refetch document on successful edit Mobile-first implementation: - All touch targets >= 44px - Dialog goes fullScreen on mobile - Form fields stack on mobile - Shared vehicle checkboxes have min-h-[44px] - Buttons use flex-wrap for mobile overflow Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>