Skip to content

Commit d7cfe58

Browse files
committed
Added option to show task authors in separate column
1 parent fd78f61 commit d7cfe58

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

components/src/lib/tasks/FilteredTasksTable.svelte

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
77
/** @type {Array<import('../types/api').TaskGroupV2>} */
88
export let taskGroups;
9+
export let showAuthorsInSeparateColumn = true;
910
1011
/** @type {import('../types/api').WorkflowTasksTableRowGroup[]} */
1112
let allRows = [];
@@ -244,7 +245,7 @@
244245
const values = [];
245246
// authors, tags
246247
values.push(...taskProperties.tags);
247-
if (taskProperties.authors) {
248+
if (taskProperties.authors && !showAuthorsInSeparateColumn) {
248249
values.push(taskProperties.authors);
249250
}
250251
return values.join(', ');
@@ -351,6 +352,9 @@
351352
<col />
352353
<col />
353354
<col />
355+
{#if showAuthorsInSeparateColumn}
356+
<col />
357+
{/if}
354358
<col width="120" />
355359
<slot name="extra-columns-colgroup" />
356360
</colgroup>
@@ -360,6 +364,9 @@
360364
<th>Category</th>
361365
<th>Modality</th>
362366
<th>Metadata</th>
367+
{#if showAuthorsInSeparateColumn}
368+
<th>Author</th>
369+
{/if}
363370
<th>Version</th>
364371
<slot name="extra-columns-header" />
365372
</tr>
@@ -410,6 +417,11 @@
410417
<td class="metadata-col">
411418
{getMetadataCell(task.taskVersions[task.selectedVersion])}
412419
</td>
420+
{#if showAuthorsInSeparateColumn}
421+
<td class="author-col">
422+
{task.taskVersions[task.selectedVersion].authors || '-'}
423+
</td>
424+
{/if}
413425
<td class="version-col">
414426
{#if Object.keys(task.taskVersions).length > 1}
415427
<select
@@ -454,7 +466,8 @@
454466
padding-bottom: 12px;
455467
background: transparent;
456468
}
457-
.metadata-col {
469+
.metadata-col,
470+
.author-col {
458471
font-size: 85%;
459472
max-width: 150px;
460473
}

src/lib/components/v2/workflow/AddWorkflowTaskModal.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" />
114114
{/if}
115115
<div class:invisible={loading} class:collapse={loading}>
116-
<FilteredTasksTable {taskGroups}>
116+
<FilteredTasksTable {taskGroups} showAuthorsInSeparateColumn={false}>
117117
<svelte:fragment slot="extra-columns-colgroup">
118118
<col width="40" />
119119
<col width="120" />

0 commit comments

Comments
 (0)