a2n-seattle / a2n-seattle/rms-app
Cart-based checkout flow + one-click row actions for borrow/reserve/return
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 27 min
- PR fusionados (30 d)
- 4
Descripción
# Why?
**As a** user selecting items to borrow or reserve
**I want** an add-to-cart style flow with a persistent cart indicator, plus one-click quick actions per row
**So that** I can build up a multi-item borrow/reserve across the resources table naturally, and also handle the common single-item case with one click without leaving the table.
# What?
Two related but separable UI patterns for the resources/items table:
1. **Cart-based checkout.** Selecting items (via the table's row checkboxes / the tri-state header checkbox from #354) adds them to a cart; a small persistent cart indicator appears in the bottom-right of the screen showing the current cart count. Clicking the cart opens a prompt asking:
- Borrow or Reserve?
- The time details for the chosen action (borrow time/return-by, or reservation start/end) — reusing the defaults from #355.
- Submits as a single multi-item borrow-via-reservation or reserve call (reusing the existing basket/multi-select backend wiring from Phase 4/#336).
2. **One-click row actions.** On the right side of each row in the items table, quick-action icon(s) for Borrow / Reserve / Return on that single item, opening a small prompt for just that item's time details (same defaults/validation as the cart flow) rather than requiring the user to select the row and go through the cart.
These can likely share the same underlying prompt/modal component (single-item vs. multi-item cart just differ in what's pre-populated).
# Testing
Jest/RTL tests for cart state management (add/remove/count) and the one-click action prompts. Playwright e2e covering: add multiple items to cart → checkout as a reservation; one-click borrow on a single row.
# Additional context
Depends on the resources table and basket-style borrow/reserve backend wiring from Phase 4 (#336), and the time defaults from #355.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
El trabajo se realiza en la UI de la tabla de recursos/items del frontend. Empieza revisando la tabla existente, las casillas de selección de las filas (#354) y el backend de cesta/multi-select de la Fase 4 (#336). Busca componentes que gestionen la selección de items y las llamadas a la API de borrow/reserve/return. «Done» significa que un usuario puede añadir items a un carrito, ver un indicador de cantidad y usar acciones de fila con un solo clic, con los tests de Jest/RTL y Playwright pasando.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- react
- Área
- backend-api-design, frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100