Skip to content

Implement Asset Detail View with History Timeline #394

@yusuftomilola

Description

@yusuftomilola

Description

Create a detailed asset view page that displays comprehensive asset information, ownership history, maintenance records, and a visual timeline of all asset events.

Requirements

Asset Overview Section:

  • Asset image/photo gallery (with lightbox for full view)
  • All asset details in organized sections (Basic Info, Financial, Assignment, Technical Specs)
  • QR code for asset (downloadable/printable)
  • Edit button (navigates to edit form)
  • Status change dropdown with confirmation

Tabs:

  1. Overview - All basic information
  2. History - Timeline of all asset events
  3. Documents - Uploaded files (invoices, manuals, warranties)
  4. Maintenance - Maintenance schedule and records
  5. Notes - Internal notes and comments

History Timeline:

  • Visual timeline showing all asset lifecycle events
  • Events: Created, Assigned, Transferred, Status Changed, Updated, Maintenance Performed
  • Display date, time, user who performed action, and details
  • Filter by event type
  • Search within history

Action Buttons:

  • Transfer Asset
  • Schedule Maintenance
  • Upload Document
  • Add Note
  • Print Label
  • Delete Asset (with confirmation)

Technical Specifications

  • Use dynamic routing: /assets/[id]
  • Implement breadcrumb navigation
  • Use React Query for data fetching with proper cache invalidation
  • Add image zoom functionality (react-medium-image-zoom)
  • Generate QR code using qrcode.react
  • Implement PDF generation for asset labels (react-pdf)
  • Add real-time updates for collaborative viewing

Acceptance Criteria

  • Page loads asset data correctly
  • All tabs display relevant information
  • Timeline shows events in reverse chronological order
  • QR code is scannable and links to asset detail page
  • All action buttons work correctly
  • Image gallery supports multiple images
  • Page is responsive on all devices
  • 404 page shows for non-existent assets

API Endpoints

  • GET /api/assets/:id - Get asset details
  • GET /api/assets/:id/history - Get asset history
  • GET /api/assets/:id/documents - Get asset documents
  • PUT /api/assets/:id/status - Update asset status

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions