finished project tree update on task edit, added update of task view on task edit

This commit is contained in:
2025-12-20 16:29:16 +01:00
parent 5a1c8e1438
commit c05f24cd7c
4 changed files with 34 additions and 13 deletions
+10
View File
@@ -187,6 +187,16 @@
window.open(`/time?project=${id}`, '_blank').focus();
}
$effect(() => {
if (lastEvent && lastEvent.task) {
if (lastEvent.event == 'delete' || lastEvent.task.parent_task_id){
delete tasks[lastEvent.task.id];
} else {
tasks[lastEvent.task.id] = lastEvent.task;
}
}
});
onMount(load);
onDestroy(() => {
if (eventSource) eventSource.close();