preparing for task list filtering
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import { error, yikes } from '../../warn.svelte';
|
||||
import { t } from '../../translations.svelte.js';
|
||||
|
||||
let filter = $state(null);
|
||||
let projects = $state({});
|
||||
let router = useTinyRouter();
|
||||
let tasks = $state(null);
|
||||
@@ -44,6 +45,10 @@
|
||||
router.navigate(`/task/${tid}/edit`);
|
||||
}
|
||||
|
||||
function filterApplies(task){
|
||||
return true;
|
||||
}
|
||||
|
||||
function go(module, id){
|
||||
router.navigate(`/${module}/${id}/view`);
|
||||
}
|
||||
@@ -103,6 +108,11 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{loading ? t('loading_object',{object:t('task_list')}) : t('task_list')}</legend>
|
||||
<div class="filter">
|
||||
<label>
|
||||
{t('filter')}: <input type="text" bind:value={filter} >
|
||||
</label>
|
||||
</div>
|
||||
{#if tasks}
|
||||
<table>
|
||||
<thead>
|
||||
@@ -117,7 +127,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each tasks as task,idx}
|
||||
{#if task.status > 10 && task.status < 60 && !task.no_index && projects[task.project_id]?.status < 60 && !hidden[task.id]}
|
||||
{#if task.status > 10 && task.status < 60 && !task.no_index && projects[task.project_id]?.status < 60 && !hidden[task.id] && filterApplies(task)}
|
||||
<tr>
|
||||
<td onclick={() => go('task',task.id)}>{task.name}</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user