UBER-1182: Fix task type categories (#4222)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-12-20 13:29:31 +07:00
committed by GitHub
parent 5029c18f02
commit 5062febad9
26 changed files with 382 additions and 478 deletions
@@ -82,13 +82,10 @@
dispatch('accent-color', color)
}
$: color =
projectState?.color !== undefined
? getPlatformColorDef(
projectState.color ?? category?.color ?? getColorNumberByText(value?.name ?? ''),
$themeStore.dark
)
: undefined
$: color = getPlatformColorDef(
projectState?.color ?? category?.color ?? getColorNumberByText(value?.name ?? ''),
$themeStore.dark
)
$: dispatchAccentColor(color)
onMount(() => {
@@ -127,6 +124,7 @@
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
id="{value.category}:{value.name}"
class="flex-presenter"
class:inline-presenter={inline}
class:flex-no-shrink={!shouldShowName || shrink === 0}
@@ -16,7 +16,7 @@
import core, { Attribute, IdMap, Ref, Status, StatusCategory, toIdMap } from '@hcengineering/core'
import { Asset } from '@hcengineering/platform'
import { createQuery, getClient } from '@hcengineering/presentation'
import { ProjectStatus, ProjectType, TaskType, findStatusAttr, isTaskCategory } from '@hcengineering/task'
import { ProjectStatus, ProjectType, TaskType, findStatusAttr } from '@hcengineering/task'
import {
CircleButton,
ColorDefinition,
@@ -231,7 +231,7 @@
<div
class="color"
on:click={(ev) => {
if (state.category !== undefined && isTaskCategory(state.category)) {
if (state.category !== undefined) {
selectIcon(elements[i + prevIndex], state)
} else {
onColor(state, color, elements[i + prevIndex])