a2n-seattle / a2n-seattle/rms-app
Add a UI flow for creating batches
- Linguagem predominante
- TypeScript
- Estrelas
- 1
- Forks
- 1
- Merge médio
- 27min
- PRs com merge (30d)
- 4
Descrição
# Why?
**As a** user managing inventory
**I want** a way to create a batch from the web frontend
**So that** batches don't need to be created out-of-band (e.g. directly against DynamoDB or only via the old Retool app).
# What?
The backend already supports batches (`BatchSchema`, `CreateBatch`/`DeleteBatch`/`GetBatch`/`ListBatches` APIs all exist per `ts-code/src/api/` and `ts-code/src/db/Schemas.ts`), and the Batches tab/view already exists as a read view (Phase 5/#337). Add a **create batch** flow to that Batches page:
- A form/modal to create a new batch, wired to the existing `CreateBatch` API.
- Likely also a delete-batch action per row, wired to the existing `DeleteBatch` API, since "add" without any way to remove a mistaken batch is a partial feature.
Clarify during triage the exact fields `CreateBatch` needs from the user (check `ts-code/src/api/CreateBatch.ts`'s input shape) and whether batch creation should let the user assign items to it at creation time or only afterward (via the item edit flow from #363, once that exists).
# Testing
Jest/RTL for the create-batch form. Playwright e2e: create a batch, confirm it appears in the Batches list; delete it, confirm it's removed.
# Additional context
Depends on the Batches view (#337, merged). May overlap with #363 if batch-assignment is done through item editing — worth sequencing after #363 during implementation if so.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Start by examining the existing Batches view from #337 and the API definitions in ts-code/src/api/CreateBatch.ts and ts-code/src/db/Schemas.ts to understand the required fields. The work involves adding a form/modal to the Batches page, wiring it to the CreateBatch API, and adding a delete action. Write Jest/RTL tests for the form and a Playwright e2e test to create and delete a batch, verifying it appears and is removed from the list.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- nodejs, react
- Domínio
- backend-api-design, frontend
- Tipo de issue
- Funcionalidade
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Pouca atividade
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 65/100