tweaking project list

This commit is contained in:
2025-09-01 17:22:02 +02:00
parent 6031bb4445
commit 7478a8bdae
4 changed files with 21 additions and 14 deletions

View File

@@ -103,8 +103,11 @@
}
}
function openTask(){
router.navigate(`/task/${task.id}/view`);
function openTask(e){
e.preventDefault();
let href = e.target.getAttribute('href');
if (href) router.navigate(href);
return false;
}
async function patchTask(changeset){
@@ -143,7 +146,7 @@
{#if !deleted}
<li draggable="true" {ondrop} ondragover={e => e.preventDefault()} {ondragstart} class="task {states[task.status]?.toLowerCase()}">
<LineEditor bind:value={task.name} onclick={openTask} editable={true} onSet={setName} type="a" />
<LineEditor bind:value={task.name} onclick={openTask} editable={true} onSet={setName} type="a" href={`/task/${task.id}/view`} />
{#if task.estimated_time}
<span class="estimated_time">({+task.estimated_time}&nbsp;h)</span>
{/if}