Skip to content

[FE-11] Build Check-in / Check-out page — borrow assets with due dates and return flow #948

Description

@yusuftomilola

Overview

A dedicated page for managing temporary asset borrowing. Users can check out an asset (set a return date), and check it back in (record condition on return). Also shows active checkouts and overdue items. Depends on BE-30.

Context

  • Route: frontend/app/(dashboard)/checkouts/page.tsx (needs to be created)
  • API endpoints (from BE-30): POST /assets/:id/checkout, POST /assets/:id/checkin, GET /assets/checkouts/active, GET /assets/checkouts/overdue
  • Add "Checkouts" to the sidebar navigation

Acceptance Criteria

  • Create frontend/app/(dashboard)/checkouts/page.tsx with two tabs: "Active Checkouts" and "Overdue"
  • Active Checkouts tab: table of all checked-out assets with columns: Asset Name, Asset ID, Checked Out By, Checked Out Date, Expected Return Date, action button
  • Overdue tab: same table filtered to assets past their return date, with a warning colour on the return date
  • "Check In" button on each row opens a modal: condition selector (AssetCondition dropdown), optional notes, confirm button — calls POST /assets/:id/checkin
  • "Check Out" CTA on this page opens a modal: asset search/select, expected return date picker, purpose note field — calls POST /assets/:id/checkout
  • Overdue rows highlighted in red/amber
  • Create React Query hooks: useActiveCheckouts(), useOverdueCheckouts(), useCheckoutAsset(), useCheckinAsset()

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions