implemented (temporary) display of closed tasks in project list
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
let router = useTinyRouter();
|
||||
let showSettings = $state(false);
|
||||
let tasks = $state(null);
|
||||
let show_closed = $state(false);
|
||||
|
||||
let new_state = $state({code:null,name:null})
|
||||
let state_available=$derived(new_state.name && new_state.code && !project.allowed_states[new_state.code]);
|
||||
@@ -139,6 +140,11 @@
|
||||
update({members:members});
|
||||
}
|
||||
|
||||
function showClosed(){
|
||||
show_closed = !show_closed;
|
||||
loadTasks();
|
||||
}
|
||||
|
||||
onMount(loadProject);
|
||||
</script>
|
||||
|
||||
@@ -252,10 +258,11 @@
|
||||
<th>
|
||||
{t('tasks')}
|
||||
<button onclick={addTask}>{t('add_object',{object:t('task')})}</button>
|
||||
<button onclick={showClosed}>{t('display_closed')}</button>
|
||||
</th>
|
||||
<td class="tasks">
|
||||
{#if tasks}
|
||||
<TaskList {tasks} {estimated_time} states={project?.allowed_states} show_closed={project.show_closed} />
|
||||
<TaskList {tasks} {estimated_time} states={project?.allowed_states} show_closed={show_closed || project.show_closed} />
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
{#each sortedTasks as task}
|
||||
<ListTask {states} {task} siblings={tasks} {estimated_time} show_closed={show_closed || task.show_closed} />
|
||||
{/each}
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user