working on grid display for most important content
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
async function testGuard({to, from, next}){
|
async function testGuard({to, from, next}){
|
||||||
await checkUser();
|
await checkUser();
|
||||||
|
window.scrollTo(0,0);
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,12 +91,12 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="taglist">
|
<div class="taglist">
|
||||||
<span class="tag editor">
|
|
||||||
<input type="text" bind:value={newTag} onkeyup={typed} />
|
|
||||||
</span>
|
|
||||||
{#each tags as tag,idx}
|
{#each tags as tag,idx}
|
||||||
<span class="tag">
|
<span class="tag">
|
||||||
<span onclick={() => show(tag)}>{tag}</span> <button onclick={() => drop(tag)} class="symbol"></button>
|
<span onclick={() => show(tag)}>{tag}</span> <button onclick={() => drop(tag)} class="symbol"></button>
|
||||||
</span>
|
</span>
|
||||||
{/each}
|
{/each}
|
||||||
|
<span class="tag editor">
|
||||||
|
<input type="text" bind:value={newTag} onkeyup={typed} />
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -181,161 +181,112 @@
|
|||||||
<span class="error">{error}</span>
|
<span class="error">{error}</span>
|
||||||
{/if}
|
{/if}
|
||||||
{#if task}
|
{#if task}
|
||||||
<table class="task">
|
<div class="task grid2">
|
||||||
<tbody>
|
{#if project}
|
||||||
{#if project}
|
<div>{t('project')}</div>
|
||||||
<tr>
|
<div class="project">
|
||||||
<th>{t('project')}</th>
|
<a href="#" onclick={gotoProject}>{project.name}</a>
|
||||||
<td class="project">
|
</div>
|
||||||
<a href="#" onclick={gotoProject}>{project.name}</a>
|
{/if}
|
||||||
</td>
|
{#if task.parent}
|
||||||
</tr>
|
<div>{t('parent_task')}</div>
|
||||||
{/if}
|
<div class="parent">
|
||||||
{#if task.parent}
|
<a href="#" onclick={gotoParent}>{task.parent.name}</a>
|
||||||
<tr>
|
</div>
|
||||||
<th>{t('parent_task')}</th>
|
{/if}
|
||||||
<td class="parent">
|
<div>{t('task')}</div>
|
||||||
<a href="#" onclick={gotoParent}>{task.parent.name}</a>
|
<div class="name">
|
||||||
</td>
|
<LineEditor bind:value={task.name} editable={true} onSet={val => update({name:val})} />
|
||||||
</tr>
|
<button class="symbol" title={t('settings')} onclick={toggleSettings}></button>
|
||||||
{/if}
|
<button class="symbol" title={t('timetracking')} onclick={addTime}></button>
|
||||||
<tr>
|
</div>
|
||||||
<th>{t('task')}</th>
|
<div>{t('state')}</div>
|
||||||
<td class="name">
|
<div>
|
||||||
<LineEditor bind:value={task.name} editable={true} onSet={val => update({name:val})} />
|
<StateSelector selected={task.status} onchange={val => update({status:val})} {project} />
|
||||||
<button class="symbol" title={t('settings')} onclick={toggleSettings}></button>
|
</div>
|
||||||
<button class="symbol" title={t('timetracking')} onclick={addTime}></button>
|
{#if task.description}
|
||||||
|
<div>{t('description')}</div>
|
||||||
|
<div class="description">
|
||||||
|
<MarkdownEditor bind:value={task.description} editable={true} onSet={val => update({description:val})} />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{#if task.start_date}
|
||||||
|
<div>{t('start_date')}</div>
|
||||||
|
<div class="start date">{task.start_date}</div>
|
||||||
|
{/if}
|
||||||
|
{#if task.due_date}
|
||||||
|
<div>{t('due_date')}</div>
|
||||||
|
<div class="due date">{task.due_date}</div>
|
||||||
|
{/if}
|
||||||
|
{#if task.estimated_time}
|
||||||
|
<div>{t('estimated_time')}</div>
|
||||||
|
<div class="estimated time">{task.estimated_time} h</div>
|
||||||
|
{/if}
|
||||||
|
<div>{t('members')}</div>
|
||||||
|
<div class="members">
|
||||||
|
<ul>
|
||||||
|
{#each Object.values(task.members) as member}
|
||||||
|
<li>{member.user.name} ({t('permission_'+member.permission.name.toLowerCase())})</li>
|
||||||
|
{/each}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{#if showSettings}
|
||||||
|
<div>{t('extended_settings')}</div>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" bind:checked={task.show_closed} onchange={updateClosed} />
|
||||||
|
{t('display_closed_tasks')}
|
||||||
|
</label>
|
||||||
|
|
||||||
</td>
|
<div></div>
|
||||||
</tr>
|
<label>
|
||||||
<tr>
|
<input type="checkbox" bind:checked={task.no_index} onchange={updateNoIndex} />
|
||||||
<th>{t('state')}</th>
|
{t('hide_on_index_page')}
|
||||||
<td>
|
</label>
|
||||||
<StateSelector selected={task.status} onchange={val => update({status:val})} {project} />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{#if task.description}
|
|
||||||
<tr>
|
|
||||||
<th>{t('description')}</th>
|
|
||||||
<td class="description">
|
|
||||||
<MarkdownEditor bind:value={task.description} editable={true} onSet={val => update({description:val})} />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if task.start_date}
|
<div>{t('members')}</div>
|
||||||
<tr>
|
<div>
|
||||||
<th>{t('start_date')}</th>
|
<PermissionEditor members={task.members} {updatePermission} {addMember} {dropMember} {getCandidates} />
|
||||||
<td class="start date">{task.start_date}</td>
|
</div>
|
||||||
</tr>
|
|
||||||
|
<div>{t('start_date')}</div>
|
||||||
|
<div>
|
||||||
|
<input type="date" bind:value={task.start_date} onchange={() => update({start_date:task.start_date})} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>{t('due_date')}</div>
|
||||||
|
<div>
|
||||||
|
<input type="date" bind:value={task.due_date} onchange={() => update({due_date:task.due_date})} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>{t('estimated_time')}</div>
|
||||||
|
<div>
|
||||||
|
<input type="number" bind:value={task.estimated_time} onchange={() => update({estimated_time:task.estimated_time})} /> h
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>{t('depends_on')}</div>
|
||||||
|
<div>
|
||||||
|
<RequiredTasks {task} />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{t('subtasks')}
|
||||||
|
<button onclick={addChild} >{t('add_object',{object:t('subtask')})}</button>
|
||||||
|
</div>
|
||||||
|
<div class="children">
|
||||||
|
{#if children}
|
||||||
|
<TaskList states={project?.allowed_states} tasks={children} {estimated_time} show_closed={task.show_closed} />
|
||||||
{/if}
|
{/if}
|
||||||
{#if task.due_date}
|
</div>
|
||||||
<tr>
|
|
||||||
<th>{t('due_date')}</th>
|
<div>{t('tags')}</div>
|
||||||
<td class="due date">{task.due_date}</td>
|
<div class="tags">
|
||||||
</tr>
|
<TagList module="task" {id} user_list={Object.keys(task.members).map(id => +id)} />
|
||||||
{/if}
|
</div>
|
||||||
{#if task.estimated_time}
|
|
||||||
<tr>
|
|
||||||
<th>{t('estimated_time')}</th>
|
|
||||||
<td class="estimated time">{task.estimated_time} h</td>
|
|
||||||
</tr>
|
|
||||||
{/if}
|
|
||||||
<tr>
|
|
||||||
<th>{t('members')}</th>
|
|
||||||
<td class="members">
|
|
||||||
<ul>
|
|
||||||
{#each Object.values(task.members) as member}
|
|
||||||
<li>{member.user.name} ({t('permission_'+member.permission.name.toLowerCase())})</li>
|
|
||||||
{/each}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{#if showSettings}
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('extended_settings')}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" bind:checked={task.show_closed} onchange={updateClosed} />
|
|
||||||
{t('display_closed_tasks')}
|
|
||||||
</label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" bind:checked={task.no_index} onchange={updateNoIndex} />
|
|
||||||
{t('hide_on_index_page')}
|
|
||||||
</label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('members')}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<PermissionEditor members={task.members} {updatePermission} {addMember} {dropMember} {getCandidates} />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('start_date')}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<input type="date" bind:value={task.start_date} onchange={() => update({start_date:task.start_date})} />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('due_date')}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<input type="date" bind:value={task.due_date} onchange={() => update({due_date:task.due_date})} />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('estimated_time')}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<input type="number" bind:value={task.estimated_time} onchange={() => update({estimated_time:task.estimated_time})} /> h
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('depends_on')}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<RequiredTasks {task} />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/if}
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('subtasks')}
|
|
||||||
<button onclick={addChild} >{t('add_object',{object:t('subtask')})}</button>
|
|
||||||
</th>
|
|
||||||
<td class="children">
|
|
||||||
{#if children}
|
|
||||||
<TaskList states={project?.allowed_states} tasks={children} {estimated_time} show_closed={task.show_closed} />
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('tags')}
|
|
||||||
</th>
|
|
||||||
<td class="tags">
|
|
||||||
<TagList module="task" {id} user_list={Object.keys(task.members).map(id => +id)} />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{/if}
|
|
||||||
<div class="notes">
|
|
||||||
<h3>{t('notes')}</h3>
|
<h3>{t('notes')}</h3>
|
||||||
|
<div>
|
||||||
<Notes module="task" entity_id={id} />
|
<Notes module="task" entity_id={id} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user