working on task update by event
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user