From 5dbe4aa09d3ed97a6929ad7f8e7469afe496fed7 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Wed, 29 Oct 2025 08:41:03 +0100 Subject: [PATCH] added button to task/xx/view, that allows temporarily display of subtasks Signed-off-by: Stephan Richter --- frontend/src/routes/task/View.svelte | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/task/View.svelte b/frontend/src/routes/task/View.svelte index 193eeb9..835d71e 100644 --- a/frontend/src/routes/task/View.svelte +++ b/frontend/src/routes/task/View.svelte @@ -24,6 +24,7 @@ let project = $state(null); const router = useTinyRouter(); let showSettings = $state(router.fullPath.endsWith('/edit')); + let show_closed = $state(false); let task = $state(null); $effect(() => updateOn(id)); @@ -79,7 +80,7 @@ const url = api('task/list'); const data = { parent_task_id : +task.id, - show_closed : task.show_closed + show_closed : show_closed }; const resp = await fetch(url,{ credentials : 'include', @@ -108,10 +109,11 @@ const url = api(`task/${id}`); const resp = await fetch(url,{credentials:'include'}); if (resp.ok){ - task = await resp.json(); yikes(); + task = await resp.json(); project = null; children = null; + if (task.show_closed) show_closed = true; loadChildren(); if (task.project_id) loadProject(); if (task.parent_task_id) loadParent(); @@ -131,6 +133,13 @@ } } + function showClosed(){ + show_closed = !show_closed; + children = null; + loadChildren(); + } + + function showPrjFiles(){ var url = `/files/project/${project.id}`; window.open(url, '_blank').focus(); @@ -292,6 +301,9 @@
{t('subtasks')} + {#if !show_closed} + + {/if}
{#if children}