|
|
|
@ -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} |
|
|
|
<tr> |
|
|
|
<div>{t('project')}</div> |
|
|
|
<th>{t('project')}</th> |
|
|
|
<div class="project"> |
|
|
|
<td class="project"> |
|
|
|
|
|
|
|
<a href="#" onclick={gotoProject}>{project.name}</a> |
|
|
|
<a href="#" onclick={gotoProject}>{project.name}</a> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
{#if task.parent} |
|
|
|
{#if task.parent} |
|
|
|
<tr> |
|
|
|
<div>{t('parent_task')}</div> |
|
|
|
<th>{t('parent_task')}</th> |
|
|
|
<div class="parent"> |
|
|
|
<td class="parent"> |
|
|
|
|
|
|
|
<a href="#" onclick={gotoParent}>{task.parent.name}</a> |
|
|
|
<a href="#" onclick={gotoParent}>{task.parent.name}</a> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
<tr> |
|
|
|
<div>{t('task')}</div> |
|
|
|
<th>{t('task')}</th> |
|
|
|
<div class="name"> |
|
|
|
<td class="name"> |
|
|
|
|
|
|
|
<LineEditor bind:value={task.name} editable={true} onSet={val => update({name:val})} /> |
|
|
|
<LineEditor bind:value={task.name} editable={true} onSet={val => update({name:val})} /> |
|
|
|
<button class="symbol" title={t('settings')} onclick={toggleSettings}></button> |
|
|
|
<button class="symbol" title={t('settings')} onclick={toggleSettings}></button> |
|
|
|
<button class="symbol" title={t('timetracking')} onclick={addTime}></button> |
|
|
|
<button class="symbol" title={t('timetracking')} onclick={addTime}></button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<div>{t('state')}</div> |
|
|
|
</tr> |
|
|
|
<div> |
|
|
|
<tr> |
|
|
|
|
|
|
|
<th>{t('state')}</th> |
|
|
|
|
|
|
|
<td> |
|
|
|
|
|
|
|
<StateSelector selected={task.status} onchange={val => update({status:val})} {project} /> |
|
|
|
<StateSelector selected={task.status} onchange={val => update({status:val})} {project} /> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
{#if task.description} |
|
|
|
{#if task.description} |
|
|
|
<tr> |
|
|
|
<div>{t('description')}</div> |
|
|
|
<th>{t('description')}</th> |
|
|
|
<div class="description"> |
|
|
|
<td class="description"> |
|
|
|
|
|
|
|
<MarkdownEditor bind:value={task.description} editable={true} onSet={val => update({description:val})} /> |
|
|
|
<MarkdownEditor bind:value={task.description} editable={true} onSet={val => update({description:val})} /> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
|
|
|
|
|
|
|
|
{#if task.start_date} |
|
|
|
{#if task.start_date} |
|
|
|
<tr> |
|
|
|
<div>{t('start_date')}</div> |
|
|
|
<th>{t('start_date')}</th> |
|
|
|
<div class="start date">{task.start_date}</div> |
|
|
|
<td class="start date">{task.start_date}</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
{#if task.due_date} |
|
|
|
{#if task.due_date} |
|
|
|
<tr> |
|
|
|
<div>{t('due_date')}</div> |
|
|
|
<th>{t('due_date')}</th> |
|
|
|
<div class="due date">{task.due_date}</div> |
|
|
|
<td class="due date">{task.due_date}</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
{#if task.estimated_time} |
|
|
|
{#if task.estimated_time} |
|
|
|
<tr> |
|
|
|
<div>{t('estimated_time')}</div> |
|
|
|
<th>{t('estimated_time')}</th> |
|
|
|
<div class="estimated time">{task.estimated_time} h</div> |
|
|
|
<td class="estimated time">{task.estimated_time} h</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
<tr> |
|
|
|
<div>{t('members')}</div> |
|
|
|
<th>{t('members')}</th> |
|
|
|
<div class="members"> |
|
|
|
<td class="members"> |
|
|
|
|
|
|
|
<ul> |
|
|
|
<ul> |
|
|
|
{#each Object.values(task.members) as member} |
|
|
|
{#each Object.values(task.members) as member} |
|
|
|
<li>{member.user.name} ({t('permission_'+member.permission.name.toLowerCase())})</li> |
|
|
|
<li>{member.user.name} ({t('permission_'+member.permission.name.toLowerCase())})</li> |
|
|
|
{/each} |
|
|
|
{/each} |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
{#if showSettings} |
|
|
|
{#if showSettings} |
|
|
|
<tr> |
|
|
|
<div>{t('extended_settings')}</div> |
|
|
|
<th> |
|
|
|
|
|
|
|
{t('extended_settings')} |
|
|
|
|
|
|
|
</th> |
|
|
|
|
|
|
|
<td> |
|
|
|
|
|
|
|
<label> |
|
|
|
<label> |
|
|
|
<input type="checkbox" bind:checked={task.show_closed} onchange={updateClosed} /> |
|
|
|
<input type="checkbox" bind:checked={task.show_closed} onchange={updateClosed} /> |
|
|
|
{t('display_closed_tasks')} |
|
|
|
{t('display_closed_tasks')} |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
<div></div> |
|
|
|
<tr> |
|
|
|
|
|
|
|
<td></td> |
|
|
|
|
|
|
|
<td> |
|
|
|
|
|
|
|
<label> |
|
|
|
<label> |
|
|
|
<input type="checkbox" bind:checked={task.no_index} onchange={updateNoIndex} /> |
|
|
|
<input type="checkbox" bind:checked={task.no_index} onchange={updateNoIndex} /> |
|
|
|
{t('hide_on_index_page')} |
|
|
|
{t('hide_on_index_page')} |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
<div>{t('members')}</div> |
|
|
|
<tr> |
|
|
|
<div> |
|
|
|
<th> |
|
|
|
|
|
|
|
{t('members')} |
|
|
|
|
|
|
|
</th> |
|
|
|
|
|
|
|
<td> |
|
|
|
|
|
|
|
<PermissionEditor members={task.members} {updatePermission} {addMember} {dropMember} {getCandidates} /> |
|
|
|
<PermissionEditor members={task.members} {updatePermission} {addMember} {dropMember} {getCandidates} /> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
<tr> |
|
|
|
<div>{t('start_date')}</div> |
|
|
|
<th> |
|
|
|
<div> |
|
|
|
{t('start_date')} |
|
|
|
|
|
|
|
</th> |
|
|
|
|
|
|
|
<td> |
|
|
|
|
|
|
|
<input type="date" bind:value={task.start_date} onchange={() => update({start_date:task.start_date})} /> |
|
|
|
<input type="date" bind:value={task.start_date} onchange={() => update({start_date:task.start_date})} /> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
<tr> |
|
|
|
<div>{t('due_date')}</div> |
|
|
|
<th> |
|
|
|
<div> |
|
|
|
{t('due_date')} |
|
|
|
|
|
|
|
</th> |
|
|
|
|
|
|
|
<td> |
|
|
|
|
|
|
|
<input type="date" bind:value={task.due_date} onchange={() => update({due_date:task.due_date})} /> |
|
|
|
<input type="date" bind:value={task.due_date} onchange={() => update({due_date:task.due_date})} /> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
<tr> |
|
|
|
<div>{t('estimated_time')}</div> |
|
|
|
<th> |
|
|
|
<div> |
|
|
|
{t('estimated_time')} |
|
|
|
|
|
|
|
</th> |
|
|
|
|
|
|
|
<td> |
|
|
|
|
|
|
|
<input type="number" bind:value={task.estimated_time} onchange={() => update({estimated_time:task.estimated_time})} /> h |
|
|
|
<input type="number" bind:value={task.estimated_time} onchange={() => update({estimated_time:task.estimated_time})} /> h |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
<tr> |
|
|
|
<div>{t('depends_on')}</div> |
|
|
|
<th> |
|
|
|
<div> |
|
|
|
{t('depends_on')} |
|
|
|
|
|
|
|
</th> |
|
|
|
|
|
|
|
<td> |
|
|
|
|
|
|
|
<RequiredTasks {task} /> |
|
|
|
<RequiredTasks {task} /> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
<tr> |
|
|
|
|
|
|
|
<th> |
|
|
|
<div> |
|
|
|
{t('subtasks')} |
|
|
|
{t('subtasks')} |
|
|
|
<button onclick={addChild} >{t('add_object',{object:t('subtask')})}</button> |
|
|
|
<button onclick={addChild} >{t('add_object',{object:t('subtask')})}</button> |
|
|
|
</th> |
|
|
|
</div> |
|
|
|
<td class="children"> |
|
|
|
<div class="children"> |
|
|
|
{#if children} |
|
|
|
{#if children} |
|
|
|
<TaskList states={project?.allowed_states} tasks={children} {estimated_time} show_closed={task.show_closed} /> |
|
|
|
<TaskList states={project?.allowed_states} tasks={children} {estimated_time} show_closed={task.show_closed} /> |
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr> |
|
|
|
|
|
|
|
<tr> |
|
|
|
<div>{t('tags')}</div> |
|
|
|
<th> |
|
|
|
<div class="tags"> |
|
|
|
{t('tags')} |
|
|
|
|
|
|
|
</th> |
|
|
|
|
|
|
|
<td class="tags"> |
|
|
|
|
|
|
|
<TagList module="task" {id} user_list={Object.keys(task.members).map(id => +id)} /> |
|
|
|
<TagList module="task" {id} user_list={Object.keys(task.members).map(id => +id)} /> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</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} |
|
|
|
|
|
|
|
|
|
|
|
|