a2n-seattle / a2n-seattle/rms-app
Add a UI flow for creating batches
- 主要语言
- TypeScript
- 星标
- 1
- 派生
- 1
- 平均合并
- 27 分钟
- 30 天内合并 PR
- 4
描述
# 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.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。