You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
frontend/app/(dashboard)/checkouts/page.tsx(needs to be created)POST /assets/:id/checkout,POST /assets/:id/checkin,GET /assets/checkouts/active,GET /assets/checkouts/overdueAcceptance Criteria
frontend/app/(dashboard)/checkouts/page.tsxwith two tabs: "Active Checkouts" and "Overdue"POST /assets/:id/checkinPOST /assets/:id/checkoutuseActiveCheckouts(),useOverdueCheckouts(),useCheckoutAsset(),useCheckinAsset()