diff --git a/script.js b/script.js index d95b957..90eb028 100644 --- a/script.js +++ b/script.js @@ -4052,6 +4052,14 @@ async function updateTaskField(id, field, value) { if (field === 'status') await apiCall('todo_status', 'POST', { id, status: value }); if (field === 'assigned') await apiCall('todo_assign', 'POST', { id, assigned_to: value }); await loadTodos(); + // Päivitä lukunäkymä jos auki + const taskReadView = document.getElementById('task-read-view'); + const featureReadView = document.getElementById('feature-read-view'); + if (taskReadView && taskReadView.style.display !== 'none') { + await openTaskRead(id); + } else if (featureReadView && featureReadView.style.display !== 'none') { + await openFeatureRead(id); + } } catch (e) { alert(e.message); } }