a2n-seattle / a2n-seattle/rms-app
Web redesign Phase 4/8: Resources list + basket-style multi-select borrow/reserve
- Linguagem predominante
- TypeScript
- Estrelas
- 1
- Forks
- 1
- Merge médio
- 27min
- PRs com merge (30d)
- 4
Descrição
# Why?
**As a** user browsing available resources
**I want** a filterable resources table where I can multi-select items across resource types and bulk-borrow or bulk-reserve them, with the ability to pick specific sub-items rather than always taking a whole resource
**So that** borrowing/reserving a batch of items (e.g. 5 chairs) doesn't require repeating a single-item flow 5 times, matching our internal Retool RMS app's basket-style flow.
# What?
Phase 4 of an 8-phase redesign of `web/` modeled after our internal Retool RMS app (`https://a2nseattle.retool.com/p/rms-alpha/main`). Depends on Phase 2 (#334) for the borrow-via-reservation wrapper; does not depend on Phase 3.
Scope:
- Redesign `/browse` into a filterable **Resources** table (filter by name/tags) showing each resource type with its item count, row multi-select, and bulk **"Reserve Selected"** / **"Borrow Selected Items"** actions.
- Resource detail page (`/items/[id]` or similar) shows sub-items with checkboxes, **default all-selected**, individually deselectable, plus a mass select/deselect-all control. Reuses `GetItem`'s existing `{main, items}` response shape — no new backend read needed for this part.
- **Borrowing prompts for a return date**, same as reserving. Internally implemented as create-reservation-then-consume, per the user's stated preference ("if easier, have the UI create reservation, and then borrow that reservation") — reuses the `BorrowFromSchedule` web wrapper built in Phase 3, or builds it here if Phase 3 hasn't landed yet (coordinate with whichever phase implements first).
- **No new or modified reservation write path may skip existing double-booking protection.** `ScheduleTable.create` (`ts-code/src/db/ScheduleTable.ts`) already validates for overlapping windows per item via `validateDate` — any new multi-item reserve/borrow call in this phase must go through `CreateReservation`/`ScheduleTable.create` (or an equally-validated path), never bypass it.
# Testing
- New Jest/RTL tests for the selection-state logic (default-all-selected, individual toggle, mass toggle).
- New Playwright spec covering the multi-select borrow/reserve golden path end-to-end.
- Unit test explicitly asserting overlapping reservation windows are still rejected through this new flow (regression here means silent double-booking).
# Additional context
Part of an 8-phase `web/` redesign series (#333 Phase 1, #334 Phase 2, #335 Phase 3). Phase 6 (room reservations) extends this resource detail UI; Phase 7 (batched return) extends the borrow grouping this phase creates.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.