965 B
965 B
F-091 — Implementer evidence
Changes
project/src/modules/catalog/domain/errors.tsnow records whether a duplicate variant code isskuorean.project/src/modules/catalog/infrastructure/pg-variant-repository.tsmaps 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 varianteorEl EAN ya existe en otra variantefor 409 conflicts instead of genericError.
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.