UBERF-7105: Use status colour when projectState is undefined (#5697)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2024-05-30 10:22:45 +05:00 committed by GitHub
parent c20c7cacd6
commit 6bec327f61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -135,18 +135,22 @@
{#if kind === 'table-attrs'} {#if kind === 'table-attrs'}
<button class="hulyTableAttr-content__row-icon-wrapper" on:click> <button class="hulyTableAttr-content__row-icon-wrapper" on:click>
{#if icon != null} {#if icon != null}
<Icon {icon} {size} iconProps={{ icon: projectState?.color ?? category?.color }} /> <Icon {icon} {size} iconProps={{ icon: projectState?.color ?? value?.color ?? category?.color }} />
{:else if category?._id === task.statusCategory.Active} {:else if category?._id === task.statusCategory.Active}
<Icon <Icon
icon={categoryIcons[category._id]} icon={categoryIcons[category._id]}
{size} {size}
iconProps={{ index, count: sameCategory.length + 1, fill: projectState?.color ?? category?.color }} iconProps={{
index,
count: sameCategory.length + 1,
fill: projectState?.color ?? value?.color ?? category?.color
}}
/> />
{:else} {:else}
<Icon <Icon
icon={categoryIcons[category?._id ?? task.statusCategory.UnStarted]} icon={categoryIcons[category?._id ?? task.statusCategory.UnStarted]}
{size} {size}
iconProps={{ fill: projectState?.color ?? category?.color }} iconProps={{ fill: projectState?.color ?? value?.color ?? category?.color }}
/> />
{/if} {/if}
</button> </button>
@ -175,18 +179,22 @@
title={shouldShowTooltip ? value.name : undefined} title={shouldShowTooltip ? value.name : undefined}
> >
{#if icon != null} {#if icon != null}
<Icon {icon} {size} iconProps={{ icon: projectState?.color ?? category?.color }} /> <Icon {icon} {size} iconProps={{ icon: projectState?.color ?? value?.color ?? category?.color }} />
{:else if category?._id === task.statusCategory.Active} {:else if category?._id === task.statusCategory.Active}
<Icon <Icon
icon={categoryIcons[category._id]} icon={categoryIcons[category._id]}
{size} {size}
iconProps={{ index, count: sameCategory.length + 1, fill: projectState?.color ?? category?.color }} iconProps={{
index,
count: sameCategory.length + 1,
fill: projectState?.color ?? value?.color ?? category?.color
}}
/> />
{:else} {:else}
<Icon <Icon
icon={categoryIcons[category?._id ?? task.statusCategory.UnStarted]} icon={categoryIcons[category?._id ?? task.statusCategory.UnStarted]}
{size} {size}
iconProps={{ fill: projectState?.color ?? category?.color }} iconProps={{ fill: projectState?.color ?? value?.color ?? category?.color }}
/> />
{/if} {/if}
</div> </div>