|
|
|
|
@ -22,7 +22,6 @@
@@ -22,7 +22,6 @@
|
|
|
|
|
let users = {}; |
|
|
|
|
let columns = $derived(project.allowed_states?Object.keys(project.allowed_states).length+1:1); |
|
|
|
|
const controller = new AbortController(); |
|
|
|
|
const signal = controller.signal; |
|
|
|
|
|
|
|
|
|
$effect(() => updateUrl(filter_input)); |
|
|
|
|
|
|
|
|
|
@ -64,7 +63,6 @@
@@ -64,7 +63,6 @@
|
|
|
|
|
let task = dragged; |
|
|
|
|
dragged = null; |
|
|
|
|
highlight = {}; |
|
|
|
|
//console.log(`dropped ${task.name} (of ${task.assignee} /state: ${task.status}) → (uid: ${user_id}/state: ${state})`); |
|
|
|
|
|
|
|
|
|
if (task.assignee == user_id && task.status == state) return; // no change |
|
|
|
|
let patch = {members:{},status:+state} |
|
|
|
|
@ -77,14 +75,12 @@
@@ -77,14 +75,12 @@
|
|
|
|
|
body : JSON.stringify(patch) |
|
|
|
|
}); |
|
|
|
|
if (resp.ok){ |
|
|
|
|
//console.log('task tree before update:',tasks); |
|
|
|
|
delete tasks[task.assignee][task.status][task.id] |
|
|
|
|
if (!tasks[user_id]) tasks[user_id] = {} |
|
|
|
|
if (!tasks[user_id][state]) tasks[user_id][state] = {} |
|
|
|
|
tasks[user_id][state][task.id] = task; |
|
|
|
|
task.assignee = user_id; |
|
|
|
|
task.status = state; |
|
|
|
|
//console.log('task tree after update:',tasks); |
|
|
|
|
error = null; |
|
|
|
|
} else { |
|
|
|
|
error = await resp.text(); |
|
|
|
|
@ -100,10 +96,7 @@
@@ -100,10 +96,7 @@
|
|
|
|
|
|
|
|
|
|
async function loadProject(){ |
|
|
|
|
const url = api(`project/${id}`); |
|
|
|
|
const resp = await fetch(url,{ |
|
|
|
|
credentials:'include', |
|
|
|
|
signal: signal |
|
|
|
|
}); |
|
|
|
|
const resp = await fetch(url,{credentials:'include'}); |
|
|
|
|
if (resp.ok){ |
|
|
|
|
project = await resp.json(); |
|
|
|
|
for (var uid of Object.keys(project.members)){ |
|
|
|
|
@ -123,7 +116,6 @@
@@ -123,7 +116,6 @@
|
|
|
|
|
selector.no_index = true; |
|
|
|
|
var resp = await fetch(url,{ |
|
|
|
|
credentials :'include', |
|
|
|
|
signal : signal, |
|
|
|
|
method : 'POST', |
|
|
|
|
body : JSON.stringify(selector) |
|
|
|
|
}); |
|
|
|
|
@ -152,7 +144,6 @@
@@ -152,7 +144,6 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function hover(ev,user_id,state){ |
|
|
|
|
ev.preventDefault(); |
|
|
|
|
highlight = {user:user_id,state:state}; |
|
|
|
|
|