Feature/agregar botón de cierre de caso en la vista de detalles - #274
Open
ucabrera wants to merge 3 commits into
Open
Feature/agregar botón de cierre de caso en la vista de detalles#274ucabrera wants to merge 3 commits into
ucabrera wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
El nuevo botón no valida permisos en frontend y hay un camino de error (fallo en getState) que hoy no muestra feedback al usuario.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Este PR agrega la acción de cerrar un caso desde la UI, incorporando un botón con confirmación tanto en la vista de detalle como en la tabla/listado de casos, y centralizando la lógica en un componente reutilizable.
Changes:
- Se incorpora el botón de “Cerrar caso” en la vista de detalle del caso.
- Se reemplaza la implementación previa (modal + lógica en
TableCase) por un componente reutilizableCloseCaseButton. - Se encapsula la transición al estado “solved” (buscando un hijo con
solved=true) y el PATCH de cambio de estado en el nuevo componente.
File summaries
| File | Description |
|---|---|
| frontend/src/views/case/ReadCase.jsx | Agrega el botón de cierre de caso en el header de la vista de detalle. |
| frontend/src/views/case/components/TableCase.jsx | Elimina lógica/modal de cierre embebidos y usa el componente reutilizable. |
| frontend/src/views/case/components/CloseCaseButton.jsx | Nuevo componente compartido que muestra botón + modal y ejecuta la transición a estado resuelto. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Se agrega el botón de cerrar el caso en el detalle de este.
