18 lines
965 B
Markdown
18 lines
965 B
Markdown
# F-091 — Implementer evidence
|
|
|
|
## Changes
|
|
|
|
- `project/src/modules/catalog/domain/errors.ts` now records whether a duplicate variant code is `sku` or `ean`.
|
|
- `project/src/modules/catalog/infrastructure/pg-variant-repository.ts` maps PostgreSQL unique constraints (`*_sku_key`, `*_ean_key`) to that field while preserving the 409 uniqueness rule.
|
|
- `project/apps/admin/src/features/products/components/sections/InventorySection.tsx`
|
|
- Guards each SKU/EAN variant save with an in-flight key so Enter followed by blur cannot submit duplicate PATCH requests.
|
|
- Shows `El SKU ya existe en otra variante` or `El EAN ya existe en otra variante` for 409 conflicts instead of generic `Error`.
|
|
|
|
## Validation
|
|
|
|
- Root `npm run typecheck` → exit 0
|
|
- Root `npm test -- --run` → 133 passed, 56 skipped
|
|
- Admin `npx tsc --noEmit` → exit 0
|
|
- Admin ESLint on `InventorySection.tsx` → exit 0
|
|
- SKU/EAN uniqueness remains enforced by the existing database constraints.
|