implemented timetracking as kanban drag target
Build Docker Image / Docker-Build (push) Successful in 4m1s
Build Docker Image / Clean-Registry (push) Successful in 7s

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-07-19 23:47:53 +02:00
parent a752cd0ae8
commit 8d93dbfc11
2 changed files with 42 additions and 5 deletions
+6 -1
View File
@@ -207,6 +207,11 @@
return false;
}
function ondragstart(ev, task){
dragged = task;
ev.dataTransfer.setData("task",task.id);
}
function openTask(task_id){
window.open(`/task/${task_id}/view`, '_blank').focus();
}
@@ -306,7 +311,7 @@
<div class={['state_'+state, is_custom(state) ? '':'state_custom' ,highlight.user == u.id && highlight.state == state ? 'highlight':'']} ondragover={ev => hover(ev,u.id,state)} ondragleave={e => delete highlight.user} ondrop={ev => drop(u.id,state)} >
{#each Object.values(tasks[u.id][state]).sort(byName) as task}
{#if !filter || task.name.toLowerCase().includes(filter) || (task.tags && task.tags.filter(tag => tag.toLowerCase().includes(filter)).length)}
<Card onclick={e => openTask(task.id)} ondragstart={ev => dragged=task} {task} tag_colors={project.tag_colors} />
<Card onclick={e => openTask(task.id)} ondragstart={ev => ondragstart(ev,task)} {task} tag_colors={project.tag_colors} />
{/if}
{/each}
<div class="add_task" onclick={ev => show_task_form(project.id,u.id,+state)}>