|
|
|
|
@ -19,6 +19,8 @@
@@ -19,6 +19,8 @@
|
|
|
|
|
let router = useTinyRouter(); |
|
|
|
|
let states = $state(null); |
|
|
|
|
let tasks = $state({}); |
|
|
|
|
let filter_input = $state(''); |
|
|
|
|
let filter = $derived(filter_input.toLowerCase()); |
|
|
|
|
let users = {}; |
|
|
|
|
|
|
|
|
|
let columns = $derived(states?Object.keys(states).length+1:1); |
|
|
|
|
@ -184,6 +186,10 @@
@@ -184,6 +186,10 @@
|
|
|
|
|
|
|
|
|
|
{#if ready} |
|
|
|
|
<div class="kanban" style="display: grid; grid-template-columns: {`repeat(${columns}, auto)`}"> |
|
|
|
|
<span class="filter"> |
|
|
|
|
<input type="text" bind:value={filter_input} /> |
|
|
|
|
{t('filter')} |
|
|
|
|
</span> |
|
|
|
|
<div class="head">{t('user')}</div> |
|
|
|
|
{#if states} |
|
|
|
|
{#each Object.entries(states) as [sid,state]} |
|
|
|
|
@ -196,7 +202,9 @@
@@ -196,7 +202,9 @@
|
|
|
|
|
<div class={[state, highlight.user == uid && highlight.state == state ? 'highlight':'']} ondragover={ev => hover(ev,uid,state)} ondrop={ev => drop(uid,state)} > |
|
|
|
|
{#if stateList[state]} |
|
|
|
|
{#each Object.values(stateList[state]).sort((a,b) => a.name.localeCompare(b.name)) as task} |
|
|
|
|
{#if !filter || task.name.toLowerCase().includes(filter) || (task.tags && task.tags.filter(tag => tag.toLowerCase().includes(filter)).length)} |
|
|
|
|
<Card onclick={() => router.navigate(`/task/${task.id}/view`)} ondragstart={ev => dragged=task} {task} /> |
|
|
|
|
{/if} |
|
|
|
|
{/each} |
|
|
|
|
{/if} |
|
|
|
|
<div class="add_task"> |
|
|
|
|
|