feat: implement item detail page and form components

- Created ItemForm component with fields for all metadata (priority, due date, tags, notes)
- Created ItemDetail component to display all item information
- Built /list/[id]/item/[itemId] page for viewing full item details
- Built /list/[id]/item/[itemId]/edit page for editing items
- Added form validation for item inputs (title required, length limits)
- Created DeleteItemButton and ToggleItemButton helper components
- Enhanced createItem action to support full metadata on creation
- Added getItem action to fetch individual items with list data

Requirements: 1.1, 1.2, 5.1, 5.2, 5.3, 5.4
This commit is contained in:
2025-12-01 19:16:37 +00:00
parent 3aedfb0954
commit 282a0295ec
11 changed files with 1309 additions and 4 deletions

View File

@@ -33,7 +33,7 @@
- **Property 10: List rename preserves items**
- **Validates: Requirements 2.5**
- [ ] 3. Implement search functionality
- [x] 3. Implement search functionality
- Create searchItems server action that searches across title, description, notes, and tags
- Add support for list-scoped search vs global search
- Implement text highlighting utility function
@@ -51,7 +51,7 @@
- **Property 24: Search scope correctness**
- **Validates: Requirements 8.5**
- [ ] 4. Implement filtering and sorting
- [x] 4. Implement filtering and sorting
- Create getItemsByFilter server action with support for priority, completed, tags, and due date filters
- Implement compound filter logic (AND conditions)
- Add sorting by createdAt, dueDate, priority, and title
@@ -74,7 +74,7 @@
- **Property 19: Null due date sorting**
- **Validates: Requirements 6.5**
- [ ] 5. Create item detail page and form components
- [x] 5. Create item detail page and form components
- Build /list/[id]/item/[itemId] page for viewing full item details
- Create ItemForm component with fields for all metadata (priority, due date, tags, notes)
- Create ItemDetail component to display all item information