implemented selecting tasks by estimated time
This commit is contained in:
27
frontend/src/Components/EstimatedTask.svelte
Normal file
27
frontend/src/Components/EstimatedTask.svelte
Normal file
@@ -0,0 +1,27 @@
|
||||
<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 ? 'task.hours' : 'task.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>
|
||||
Reference in New Issue
Block a user