finished project tree update on task edit, added update of task view on task edit
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
if (resp.ok){
|
||||
deleted = true;
|
||||
} else {
|
||||
error(resp);
|
||||
error(resp);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,8 +76,7 @@
|
||||
body : JSON.stringify({ parent_task_id : task.id})
|
||||
});
|
||||
if (resp.ok) {
|
||||
children[dragged.element.id]=dragged.element;
|
||||
if (dragged.siblings[dragged.element.id]) delete dragged.siblings[dragged.element.id];
|
||||
yikes();
|
||||
} else {
|
||||
error(resp);
|
||||
}
|
||||
@@ -143,13 +142,11 @@
|
||||
}
|
||||
|
||||
$effect(() => {
|
||||
if (lastEvent && lastEvent.task) {
|
||||
if (children && lastEvent.task.parent_task_id == task.id) {
|
||||
if (lastEvent.event == 'delete'){
|
||||
delete children[lastEvent.task.id];
|
||||
} else {
|
||||
children[lastEvent.task.id] = lastEvent.task;
|
||||
}
|
||||
if (children && lastEvent && lastEvent.task) {
|
||||
if (lastEvent.event == 'delete' || lastEvent.task.parent_task_id != task.id){
|
||||
delete children[lastEvent.task.id];
|
||||
} else {
|
||||
children[lastEvent.task.id] = lastEvent.task;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user