Skip to content

3.6: Work Item Detail & Edit Page #92

@steilerDev

Description

@steilerDev

As a homeowner, I want to view the full details of a work item and edit all its properties inline so that I can manage each construction task's information in one place.

Parent Epic: #3
Priority: Must Have

Acceptance Criteria

Detail View

  • 1. A work item detail page is accessible at /work-items/:id. It displays all work item properties: title, description, status, start date, end date, duration, "start after" constraint, "start before" constraint, assigned user, tags, notes, subtasks, and timestamps (created/updated).
  • 2. The status is displayed as a color-coded badge (e.g., green for Completed, yellow for In Progress, red for Blocked, gray for Not Started) and can be changed via a dropdown or click-to-cycle interaction.
  • 3. The assigned user is displayed with their name and can be changed via a user selection dropdown that lists all active users. A "None" option allows unassigning.
  • 4. Tags are displayed as colored pills and can be added/removed inline (same interaction pattern as Story 3.3 AC EPIC-09: Dashboard & Project Health Center #9).
  • 5. Notes are displayed in chronological order with the author's name and timestamp. Users can add new notes via an input field. Users can edit/delete their own notes. Admins can edit/delete any note.
  • 6. Subtasks are displayed as a reorderable checklist. Users can: add new subtasks, toggle completion (checkbox), edit subtask titles inline, delete subtasks, and reorder subtasks via drag-and-drop.
  • 7. The page shows a "Delete" action (button or menu option) that prompts for confirmation before deleting the work item. After deletion, the user is redirected to the work items list page.

Create/Edit Form

  • 8. A create form is accessible at /work-items/new. It includes fields for: title (required), description (textarea), status (dropdown), start date (date picker), end date (date picker), duration in days (number input), "start after" constraint (date picker), "start before" constraint (date picker), assigned user (dropdown), and tags (multi-select). Submitting calls POST /api/work-items and redirects to the new work item's detail page on success.
  • 9. Inline editing on the detail page allows modifying title, description, status, dates, duration, constraints, and assigned user without navigating away. Changes are saved via PATCH /api/work-items/:id and the UI updates optimistically or on confirmation.
  • 10. Client-side validation displays errors for: empty title, start date after end date, "start after" after "start before", and invalid date formats. Server-side validation errors from the API are also displayed with field-level detail.
  • 11. Date fields use date picker components that are keyboard accessible and display dates in a human-readable format (e.g., "Feb 16, 2026").

Cross-cutting

  • 12. A "Back to list" navigation element (breadcrumb or back button) is visible and returns to the work items list, preserving the previous filter/sort state.
  • 13. The page is responsive: on desktop it uses a multi-column layout; on tablet/mobile it stacks into a single column.
  • 14. Loading states are shown while fetching work item data. A 404-style message is shown if the work item ID does not exist.

Notes

  • Depends on Story 3.4 (notes and subtasks API) and Story 3.5 (list page for navigation context).
  • This is the most interaction-heavy page in the application — it needs to feel smooth and responsive.
  • Inline editing should use a clear visual pattern (e.g., click-to-edit with a pencil icon, or always-editable fields with auto-save).
  • The drag-and-drop subtask reordering calls PATCH /api/work-items/:workItemId/subtasks/reorder.
  • Dependencies section on this page will be added in Story 3.7.
  • Depends on: 3.4: Work Item Notes & Subtasks API #90 (Story 3.4), 3.5: Work Items List Page #91 (Story 3.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions