Fix statuses (#3666)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2023-09-07 00:49:53 +06:00
committed by GitHub
parent 47e39eae75
commit f3c3541964
32 changed files with 390 additions and 125 deletions
@@ -49,7 +49,7 @@
statuses = getStates(_space, $statusStore).filter((p) => p.category === tracker.issueStatusCategory.Started)
}
async function updateCategory (status: WithLookup<IssueStatus>, statuses: IssueStatus[]) {
async function updateCategory (_space: Project | undefined, status: WithLookup<IssueStatus>, statuses: IssueStatus[]) {
if (status.$lookup?.category) {
category = status.$lookup.category
}
@@ -68,7 +68,7 @@
}
}
$: updateCategory(value, statuses)
$: updateCategory(_space, value, statuses)
$: icon = category?.icon
$: color = value.color !== undefined ? value.color : category !== undefined ? category.color : -1
</script>
@@ -117,7 +117,7 @@
return {
id: s._id,
component: StatusPresenter,
props: { value: s, size: 'small' },
props: { value: s, size: 'small', space: value.space },
isSelected: selectedStatus?._id === s._id ?? false
}
})
@@ -46,7 +46,7 @@
</script>
<div class="flex-presenter flex-gap-1-5">
{#each statuses as value, i}
{#each statuses as value, i (value._id)}
{#if value && i < 5}
<div>
<IssueStatusIcon {space} {value} size={'small'} />