Skip to content

[FE-95] Asset photo gallery with drag-and-drop ordering #1194

Description

@yusuftomilola

Overview

@dnd-kit (core, sortable, modifiers, utilities) is installed but unused. Photos matter for asset identification and condition records, and ordering them is a natural drag-and-drop use case.

Tasks

  • Add a photo gallery to the asset detail page with multi-file upload via react-dropzone.
  • Support drag-to-reorder with @dnd-kit/sortable, persisting the order.
  • Let the user set a primary image used as the thumbnail in list views.
  • Add a lightbox for full-size viewing with keyboard navigation.
  • Delete with confirmation; show upload progress and per-file errors.
  • Use next/image with correct sizing and lazy loading.
  • Ensure drag-and-drop has a keyboard-accessible alternative — @dnd-kit supports this, but it must be wired up.

Acceptance Criteria

  • Photos upload, reorder, and persist their order.
  • The primary image appears as the thumbnail in the assets list.
  • Reordering is achievable by keyboard alone.

Dependencies

Backend from [BE-90] and [BE-106].

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions