feat(F-117): completed feature
This commit is contained in:
23
work/artifacts/F-117/implementer.md
Normal file
23
work/artifacts/F-117/implementer.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# F-117 — Title Case en categorías ya en español (F-116 oversight)
|
||||
|
||||
## Bug
|
||||
F-116 dejó en mayúsculas las categorías que ya estaban en español en la lista legacy:
|
||||
- FRUTAS Y VERDURAS
|
||||
- SNACKS
|
||||
- GRANOLA
|
||||
- SUPLEMENTS (sí fue renombrado, pero después en el plan)
|
||||
- Otras más que el rename plan no detectó por el bug `oldLower === newLower`.
|
||||
|
||||
## Fix
|
||||
- `buildRenamePlan` reescrito: si el legacy name (case-insensitive) está en el catálogo y el entry.name (case-sensitive) ≠ nombre traducido, hay que renombrar.
|
||||
- `scripts/seed-legacy-categories.mjs`: añadido segundo UPDATE case-insensitive para entradas cuyo nombre antiguo difiere del nuevo sólo en capitalización. El counter `renamedCount` refleja los rowCount reales (sin contar renames ya aplicados).
|
||||
|
||||
## Aplicación
|
||||
- 9 categorías renombradas al ejecutar el seed (SUPLEMENTS, FRUTAS Y VERDURAS, SNACKS, GRANOLA, FACIAL, CORPORAL, ASEO PERSONAL, HIERBAS MEDICINALES, PROVEEDORES).
|
||||
- Re-ejecución: 0 renames (idempotente).
|
||||
|
||||
## Evidencia
|
||||
- `npm run typecheck` OK.
|
||||
- `npm test`: 172 passed / 0 failed.
|
||||
- `npm run build` OK.
|
||||
- DB: `frutas-y-verduras` ahora "Frutas y Verduras", `snacks` → "Snacks", `granola` → "Granola", `suplements` → "Suplementos".
|
||||
Reference in New Issue
Block a user