Repository navigation
fix(pedidos): «Corregir precio» solo para el ADMIN, con motivo, confirmación y rastro (#616) - #728
Merged
Merged
Conversation
…rmación y rastro (#616) - POST /api/pedidos/[id]/corregir-precio y el caso de uso solo aceptan ADMIN (403 para el ASISTENTE, sin crear filas); el historial sigue visible para ADMIN y ASISTENTE y las solicitudes PENDIENTE anteriores las resuelve un ADMIN. - Panel: formulario solo para ADMIN, paso de confirmación («¿Aplicar la corrección?»), «Aplicando…» y aviso para el ASISTENTE (maqueta aprobada por el PO). - Pruebas: dominio, panel, integración con Postgres (rastro completo y solicitudes históricas) y E2E; ADR-CIERRE-004 y AGENTS.md. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WV8WE6JoSGSt1gPBuD8Rcf
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…asta validar el corte de guías de agentes) (#616) La documentación de #616 queda en ADR-CIERRE-004 §2. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WV8WE6JoSGSt1gPBuD8Rcf
Owner
Author
|
El check Corrección (commit Generated by Claude Code |
casasleonj
pushed a commit
that referenced
this pull request
Nov 9, 2026
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WV8WE6JoSGSt1gPBuD8Rcf
casasleonj
pushed a commit
that referenced
this pull request
Nov 9, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #616
Objetivo
Decisión del PO (2026-11-08): «Corregir precio» solo para el ADMIN, con motivo obligatorio y rastro, para que no se altere la deuda histórica en silencio. Maqueta de escritorio y móvil aprobada por el PO.
Cambios
POST /api/pedidos/[id]/corregir-precioySolicitarCorreccionPrecioUseCaseaceptan solo ADMIN (puedeSolicitarCorreccion). El ASISTENTE recibe 403 y no se crea ninguna fila. El historial (GET .../correcciones-precio) sigue abierto a ADMIN y ASISTENTE. Las solicitudesPENDIENTEanteriores las sigue resolviendo un ADMIN (PATCH).correccion-precio-panel.tsx): formulario solo para ADMIN, paso de confirmación («¿Aplicar la corrección?», con el efecto en el total y «no se puede borrar»), estado «Aplicando…» y aviso «Solo un administrador puede corregir el precio» para el ASISTENTE.ADR-CIERRE-004§2. (AGENTS.mdno se modifica en este PR: el checkauditlo bloquea hasta validar el corte de guías de agentes.)sembrarSolicitudPendiente) y E2Epedidos-correccion-precio.spec.ts.Validación
npx tsc --noEmitynpx eslintde lo tocado: sin errores.npm run test: 498 archivos, 4.908 pruebas pasan.correccion-precioysaldo-favor-excedente, 46 de 46 pasan.main.Limitaciones conocidas
PENDIENTEcreadas antes por un ASISTENTE siguen existiendo hasta que un ADMIN las autorice o rechace.Checklist de entrega
Closes #616).🤖 Generated with Claude Code
https://claude.ai/code/session_01WV8WE6JoSGSt1gPBuD8Rcf