|
@ -7,6 +7,8 @@ import type { IconName } from "../external/icons"; |
|
|
export let task: TaskResult; |
|
|
export let task: TaskResult; |
|
|
export let iconName: IconName; |
|
|
export let iconName: IconName; |
|
|
|
|
|
|
|
|
|
|
|
let showNumbersAnyway; |
|
|
|
|
|
|
|
|
$: { |
|
|
$: { |
|
|
switch (task.statusTag) { |
|
|
switch (task.statusTag) { |
|
|
case "to do": iconName = "lightbulb"; break; |
|
|
case "to do": iconName = "lightbulb"; break; |
|
@ -16,10 +18,12 @@ import type { IconName } from "../external/icons"; |
|
|
default: iconName = "check"; break; |
|
|
default: iconName = "check"; break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$: showNumbersAnyway = ["to do", "on hold"].includes(task.statusTag) && task.itemAmount > 1; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<div class="icon sccsi" class:inactive={!task.active}> |
|
|
|
|
|
{#if !task.active} |
|
|
|
|
|
|
|
|
<div class="icon sccsi" class:inactive={!task.active && !showNumbersAnyway}> |
|
|
|
|
|
{#if !task.active && !showNumbersAnyway} |
|
|
<span class="on"><Icon block name={iconName} /></span> |
|
|
<span class="on"><Icon block name={iconName} /></span> |
|
|
<span class="off"> |
|
|
<span class="off"> |
|
|
{task.completedAmount} / {task.itemAmount} |
|
|
{task.completedAmount} / {task.itemAmount} |
|
|