working on custom states for projects

This commit is contained in:
2025-07-31 17:21:09 +02:00
parent b8b93fe925
commit 956085c7d3
10 changed files with 34 additions and 19 deletions

View File

@@ -95,7 +95,7 @@
</td>
<td class="state" onclick={() => show(project.id)} >
{t("state_"+project.status.name.toLowerCase())}
{t("state_"+project.allowed_states[project.status].toLowerCase())}
</td>
<td class="members" onclick={() => show(project.id)} >
{#each Object.entries(project.members) as [uid,member]}
@@ -104,7 +104,7 @@
</td>
<td class="actions">
<button class="edit symbol" title={t('edit')}></button>
{#if project.status.code < 60}
{#if project.status < 60}
<button class="complete symbol" title={t('complete')} onclick={() => setState(project.id,'COMPLETE')} ></button>
<button class="abort symbol" title={t('abort')} onclick={() => setState(project.id,'CANCELLED')} ></button>
{:else}

View File

@@ -142,7 +142,7 @@
<tr>
<th>{t('state')}</th>
<td>
<StateSelector selected={project.status.code} onchange={val => update({status:val})} project_id={id} />
<StateSelector selected={project.status} onchange={val => update({status:val})} project_id={id} />
</td>
</tr>
{#if project.company}
@@ -205,7 +205,7 @@
</th>
<td class="tasks">
{#if tasks}
<TaskList {tasks} {estimated_time} show_closed={project.show_closed} />
<TaskList {tasks} {estimated_time} states={project.allowed_states} show_closed={project.show_closed} />
{/if}
</td>
</tr>