working on task update by event

This commit is contained in:
2025-12-20 16:35:47 +01:00
parent c05f24cd7c
commit f6813d8a75

View File

@@ -104,8 +104,8 @@
body:JSON.stringify(data) body:JSON.stringify(data)
}); });
if (resp.ok){ if (resp.ok){
children = await resp.json();
yikes(); yikes();
children = await resp.json();
} else { } else {
error(resp); error(resp);
} }
@@ -127,8 +127,6 @@
if (resp.ok){ if (resp.ok){
yikes(); yikes();
task = await resp.json(); task = await resp.json();
project = null;
children = null;
if (task.show_closed) show_closed = true; if (task.show_closed) show_closed = true;
loadChildren(); loadChildren();
if (task.project_id) loadProject(); if (task.project_id) loadProject();
@@ -177,13 +175,6 @@
}); });
if (resp.ok){ if (resp.ok){
yikes(); yikes();
let old_task = task;
task = await resp.json();
if (!task.parent_id){
task.parent = null;
} else {
if (task.parent_id == old_task.parent_id) task.parent = old_task.parent;
}
return true; return true;
} else { } else {
error(resp); error(resp);
@@ -200,7 +191,7 @@
} }
function updateOn(id){ function updateOn(id){
task = null; //task = null;
loadTask(); loadTask();
} }