a2n-seattle / a2n-seattle/rms-app
Cart-based checkout flow + one-click row actions for borrow/reserve/return
- Lingua principale
- TypeScript
- Stelle
- 1
- Fork
- 1
- Merge medio
- 27m
- PR unite (30g)
- 4
Descrizione
# 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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Il lavoro riguarda la UI della tabella resources/items nel frontend. Inizia esaminando la tabella esistente, le caselle di selezione delle righe (#354) e il backend del carrello/multi-select della Fase 4 (#336). Cerca i componenti che gestiscono la selezione degli item e le chiamate API borrow/reserve/return. «Done» significa che un utente può aggiungere item a un carrello, vedere un indicatore del conteggio e usare azioni sulla riga con un solo clic, con i test Jest/RTL e Playwright superati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- react
- Ambito
- backend-api-design, frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100