30 lines
649 B
Svelte
30 lines
649 B
Svelte
<script>
|
|
import {t} from '../translations.svelte.js';
|
|
|
|
let {
|
|
task,
|
|
onSelect = (task) => {}
|
|
} = $props();
|
|
</script>
|
|
|
|
<div>
|
|
<div title={'task_'+task.id}>
|
|
{#if task.estimated_time}
|
|
<span class="estimate" onclick={() => onSelect(task)}>
|
|
{task.estimated_time} {t(task.estimated_time != 1 ? 'hours' : 'hour')}
|
|
</span>
|
|
{/if}
|
|
{task.name}
|
|
</div>
|
|
<div>
|
|
{@html task.description.rendered}
|
|
</div>
|
|
{#if task.children}
|
|
<ul>
|
|
{#each task.children as child,tid}
|
|
<svelte:self task={child} />
|
|
{/each}
|
|
</ul>
|
|
{/if}
|
|
|
|
</div> |