|
|
|
|
@ -157,117 +157,85 @@
@@ -157,117 +157,85 @@
|
|
|
|
|
{/if} |
|
|
|
|
|
|
|
|
|
{#if project} |
|
|
|
|
<table class="project"> |
|
|
|
|
<tbody> |
|
|
|
|
<tr> |
|
|
|
|
<th> |
|
|
|
|
{t('project')} |
|
|
|
|
<button onclick={kanban}>{t('show_kanban')}</button> |
|
|
|
|
</th> |
|
|
|
|
<td class="name"> |
|
|
|
|
<LineEditor bind:value={project.name} editable={true} onSet={val => update({name:val})} /> |
|
|
|
|
<button onclick={toggleSettings}><span class="symbol"></span> {t('settings')}</button> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<th>{t('state')}</th> |
|
|
|
|
<td> |
|
|
|
|
<StateSelector selected={project.status} onchange={val => update({status:val})} {project} /> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
{#if project.company} |
|
|
|
|
<tr> |
|
|
|
|
<th>{t('company')}</th> |
|
|
|
|
<td class="company">{project.company.name}</td> |
|
|
|
|
</tr> |
|
|
|
|
<div class="project grid2"> |
|
|
|
|
<div>{t('project')}</div> |
|
|
|
|
<div class="name"> |
|
|
|
|
<LineEditor bind:value={project.name} editable={true} onSet={val => update({name:val})} /> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<button onclick={kanban}>{t('show_kanban')}</button> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<button onclick={toggleSettings}><span class="symbol"></span> {t('settings')}</button> |
|
|
|
|
</div> |
|
|
|
|
<div>{t('state')}</div> |
|
|
|
|
<div> |
|
|
|
|
<StateSelector selected={project.status} onchange={val => update({status:val})} {project} /> |
|
|
|
|
</div> |
|
|
|
|
{#if project.company} |
|
|
|
|
<div>{t('company')}</div> |
|
|
|
|
<div class="company">{project.company.name}</div> |
|
|
|
|
{/if} |
|
|
|
|
<div>{t('context')}</div> |
|
|
|
|
<div> |
|
|
|
|
<button>{t('files')}</button> |
|
|
|
|
<button>{t('models')}</button> |
|
|
|
|
<button>{t('times')}</button> |
|
|
|
|
</div> |
|
|
|
|
<div>{t('description')}</div> |
|
|
|
|
<div class="description"> |
|
|
|
|
<MarkdownEditor bind:value={project.description} editable={true} onSet={val => update({description:val})} /> |
|
|
|
|
</div> |
|
|
|
|
{#if showSettings} |
|
|
|
|
<div>{t('extended_settings')}</div> |
|
|
|
|
<label> |
|
|
|
|
<input type="checkbox" bind:checked={project.show_closed} onchange={changeClosed} /> |
|
|
|
|
{t('display_closed_tasks')} |
|
|
|
|
</label> |
|
|
|
|
<div>{t('members')}</div> |
|
|
|
|
<div> |
|
|
|
|
<PermissionEditor members={project.members} {updatePermission} {addMember} {dropMember} {getCandidates} /> |
|
|
|
|
</div> |
|
|
|
|
{#if project.allowed_states} |
|
|
|
|
{#each Object.keys(project.allowed_states) as key,idx} |
|
|
|
|
<div> |
|
|
|
|
{#if !idx} |
|
|
|
|
{t('allowed_states')}: |
|
|
|
|
{/if} |
|
|
|
|
<tr> |
|
|
|
|
<th>{t('context')}</th> |
|
|
|
|
<td> |
|
|
|
|
<button>{t('files')}</button> |
|
|
|
|
<button>{t('models')}</button> |
|
|
|
|
<button>{t('times')}</button> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<th>{t('description')}</th> |
|
|
|
|
<td class="description"> |
|
|
|
|
<MarkdownEditor bind:value={project.description} editable={true} onSet={val => update({description:val})} /> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
{#if showSettings} |
|
|
|
|
<tr> |
|
|
|
|
<th> |
|
|
|
|
{t('extended_settings')} |
|
|
|
|
</th> |
|
|
|
|
<td> |
|
|
|
|
<label> |
|
|
|
|
<input type="checkbox" bind:checked={project.show_closed} onchange={changeClosed} /> |
|
|
|
|
{t('display_closed_tasks')} |
|
|
|
|
</label> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<th> |
|
|
|
|
{t('members')} |
|
|
|
|
</th> |
|
|
|
|
<td> |
|
|
|
|
<PermissionEditor members={project.members} {updatePermission} {addMember} {dropMember} {getCandidates} /> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
{#if project.allowed_states} |
|
|
|
|
{#each Object.keys(project.allowed_states) as key,idx} |
|
|
|
|
<tr> |
|
|
|
|
<th> |
|
|
|
|
{#if !idx} |
|
|
|
|
{t('allowed_states')}: |
|
|
|
|
{/if} |
|
|
|
|
{key} |
|
|
|
|
</th> |
|
|
|
|
<td> |
|
|
|
|
{project.allowed_states[key]} |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
{/each} |
|
|
|
|
<tr> |
|
|
|
|
<th> |
|
|
|
|
<input type="number" bind:value={new_state.code} /> |
|
|
|
|
</th> |
|
|
|
|
<td> |
|
|
|
|
<input type="text" bind:value={new_state.name} /> |
|
|
|
|
{#if state_available} |
|
|
|
|
<button onclick={addState} >{t('add_state')}</button> |
|
|
|
|
{/if} |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
{key} |
|
|
|
|
</div> |
|
|
|
|
<div>{project.allowed_states[key]}</div> |
|
|
|
|
{/each} |
|
|
|
|
<div> |
|
|
|
|
<input type="number" bind:value={new_state.code} /> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<input type="text" bind:value={new_state.name} /> |
|
|
|
|
{#if state_available} |
|
|
|
|
<button onclick={addState} >{t('add_state')}</button> |
|
|
|
|
{/if} |
|
|
|
|
</div> |
|
|
|
|
{/if} |
|
|
|
|
{/if} |
|
|
|
|
{#if estimated_time.sum} |
|
|
|
|
<div>{t('estimated_time')}</div> |
|
|
|
|
<div class="estimated_time">{estimated_time.sum} h</div> |
|
|
|
|
{/if} |
|
|
|
|
<div>{t('tags')}</div> |
|
|
|
|
<div> |
|
|
|
|
<Tags module="project" {id} user_list={null} /> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
{t('tasks')} |
|
|
|
|
<button onclick={addTask}>{t('add_object',{object:t('task')})}</button> |
|
|
|
|
<button onclick={showClosed}>{t('display_closed')}</button> |
|
|
|
|
</div> |
|
|
|
|
<div class="tasks"> |
|
|
|
|
{#if tasks} |
|
|
|
|
<TaskList {tasks} {estimated_time} states={project?.allowed_states} show_closed={show_closed || project.show_closed} /> |
|
|
|
|
{/if} |
|
|
|
|
{#if estimated_time.sum} |
|
|
|
|
<tr> |
|
|
|
|
<th>{t('estimated_time')}</th> |
|
|
|
|
<td class="estimated_time">{estimated_time.sum} h</td> |
|
|
|
|
</tr> |
|
|
|
|
{/if} |
|
|
|
|
<tr> |
|
|
|
|
<th>{t('tags')}</th> |
|
|
|
|
<td> |
|
|
|
|
<Tags module="project" {id} user_list={null} /> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<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={show_closed || project.show_closed} /> |
|
|
|
|
{/if} |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</tbody> |
|
|
|
|
</table> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{/if} |
|
|
|
|
<div class="notes"> |
|
|
|
|
<h3>{t('notes')}</h3> |
|
|
|
|
|