fix: version 2.11.3 -- badges de Comentarios/Documentos de actividad no se actualizaban en vivo
CommentsPanel/AttachmentsPanel ya soportaban un onChanged opcional (agregado en 2.11.1 para el nivel de proyecto), pero ActivityDetailPanel.jsx no se lo pasaba -- el badge de su propia pestaña se quedaba con el numero viejo hasta cambiar de pestaña y volver (que es lo unico que dispara el refetch de comments/attachments ahi). Se conecta reloadComments/reloadAttachments como onChanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
# Changelog - project.linkedcorp.net
|
# Changelog - project.linkedcorp.net
|
||||||
|
|
||||||
|
## [2.11.3] - 2026-10-14
|
||||||
|
### Fixed
|
||||||
|
- Popup de actividad: los badges de "Comentarios" y "Documentos" se quedaban pegados en el
|
||||||
|
número viejo al agregar/borrar algo estando parado en esa misma pestaña (recién se
|
||||||
|
actualizaban al cambiar de pestaña y volver). Mismo fix que ya se había aplicado al nivel de
|
||||||
|
proyecto, pendiente de aplicar aquí también.
|
||||||
|
|
||||||
## [2.11.2] - 2026-10-14
|
## [2.11.2] - 2026-10-14
|
||||||
### Changed
|
### Changed
|
||||||
- Badge "Tareas" del popup de actividad: pasa de mostrar pendientes/total (ej. "3/4") a
|
- Badge "Tareas" del popup de actividad: pasa de mostrar pendientes/total (ej. "3/4") a
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "project-linkedcorp-backend",
|
"name": "project-linkedcorp-backend",
|
||||||
"version": "2.11.2",
|
"version": "2.11.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "src/server.js",
|
"main": "src/server.js",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "project-linkedcorp-frontend",
|
"name": "project-linkedcorp-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.11.2",
|
"version": "2.11.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -43,10 +43,11 @@ export default function ActivityDetailPanel({ activity, projectId, siblingActivi
|
|||||||
});
|
});
|
||||||
|
|
||||||
const [tab, setTab] = useState(initialTab || 'detail');
|
const [tab, setTab] = useState(initialTab || 'detail');
|
||||||
// Recargadas al cambiar de pestaña (listas livianas) para que los contadores de las pestañas
|
// Se recargan al cambiar de pestaña, y ademas CommentsPanel/AttachmentsPanel avisan via
|
||||||
// se mantengan al dia sin necesidad de que CommentsPanel/AttachmentsPanel avisen al padre.
|
// onChanged cuando se agrega/borra algo estando ya parado en esa pestaña (si no, el badge se
|
||||||
const { data: comments } = useAsync(() => listComments('activity', activity.id), [activity.id, tab]);
|
// quedaba pegado en el numero viejo hasta cambiar de pestaña y volver).
|
||||||
const { data: attachments } = useAsync(() => listAttachments('activity', activity.id), [activity.id, tab]);
|
const { data: comments, reload: reloadComments } = useAsync(() => listComments('activity', activity.id), [activity.id, tab]);
|
||||||
|
const { data: attachments, reload: reloadAttachments } = useAsync(() => listAttachments('activity', activity.id), [activity.id, tab]);
|
||||||
const [editing, setEditing] = useState(false);
|
const [editing, setEditing] = useState(false);
|
||||||
const [form, setForm] = useState(() => toForm(activity));
|
const [form, setForm] = useState(() => toForm(activity));
|
||||||
const [newTask, setNewTask] = useState('');
|
const [newTask, setNewTask] = useState('');
|
||||||
@@ -305,8 +306,8 @@ export default function ActivityDetailPanel({ activity, projectId, siblingActivi
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{tab === 'comments' && <CommentsPanel entityType="activity" entityId={activity.id} />}
|
{tab === 'comments' && <CommentsPanel entityType="activity" entityId={activity.id} onChanged={reloadComments} />}
|
||||||
{tab === 'documents' && <AttachmentsPanel entityType="activity" entityId={activity.id} />}
|
{tab === 'documents' && <AttachmentsPanel entityType="activity" entityId={activity.id} onChanged={reloadAttachments} />}
|
||||||
|
|
||||||
<DetailPopup
|
<DetailPopup
|
||||||
open={!!promoting}
|
open={!!promoting}
|
||||||
|
|||||||
Reference in New Issue
Block a user