add a few fixes and tweaks related to the previous commit.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-01-24 13:52:37 +01:00
parent e1c5bf01b2
commit ef94b1556a
7 changed files with 15 additions and 18 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import type { GoalCompositionMode, GoalLogResult } from "../models/goal";
import type { GoalCompositionMode } from "../models/goal";
import type { LogResult } from "../models/log";
interface CompositionItem {
+1 -4
View File
@@ -15,7 +15,7 @@
<div class:disabled class="icon-select">
{#each commonIcons as iconName (iconName)}
<div class="icon-item common" class:selected={value===iconName} on:click={() => {if (!disabled) { value = iconName }}}>
<div class="icon-item" class:selected={value===iconName} on:click={() => {if (!disabled) { value = iconName }}}>
<Icon name={iconName} />
</div>
{/each}
@@ -53,9 +53,6 @@ div.icon-item {
cursor: pointer;
}
div.icon-item.uncommon {
color: #888;
}
div.icon-item:hover {
background-color: #292929;
}
+4 -4
View File
@@ -22,8 +22,8 @@
let activeTasks: TaskResult[] = [];
let inactiveTasks: TaskResult[] = [];
let completedTasks: TaskResult[] = [];
let todoTasks: TaskResult[] = [];
let completedTasks: TaskResult[] = [];
let onholdTasks: TaskResult[] = [];
let failedTasks: TaskResult[] = [];
@@ -37,14 +37,14 @@
if (!hideInactive) {
inactiveTasks = project.tasks.filter(t => !t.active);
completedTasks = inactiveTasks.filter(t => t.statusTag === "completed" || t.statusTag == null);
todoTasks = inactiveTasks.filter(t => t.statusTag === "to do" || t.statusTag === "idea");
completedTasks = inactiveTasks.filter(t => t.statusTag === "completed" || t.statusTag == null);
onholdTasks = inactiveTasks.filter(t => t.statusTag === "on hold" || t.statusTag === "postponed");
failedTasks = inactiveTasks.filter(t => t.statusTag === "failed" || t.statusTag === "declined" || t.statusTag === "wont do");
} else {
inactiveTasks = [];
completedTasks = [];
todoTasks = [];
completedTasks = [];
onholdTasks = [];
failedTasks = [];
}
@@ -72,8 +72,8 @@
<TaskList header="" tasks={activeTasks} project={project} showAllOptions={showAllOptions} />
{:else}
<TaskList header="Active" tasks={activeTasks} project={project} showAllOptions={showAllOptions} />
<TaskList header="Completed" tasks={completedTasks} project={project} showAllOptions={showAllOptions} />
<TaskList header="To Do" tasks={todoTasks} project={project} showAllOptions={showAllOptions} />
<TaskList header="Completed" tasks={completedTasks} project={project} showAllOptions={showAllOptions} />
<TaskList header="On Hold" tasks={onholdTasks} project={project} showAllOptions={showAllOptions} />
<TaskList header="Failed" tasks={failedTasks} project={project} showAllOptions={showAllOptions} />
{/if}
@@ -12,7 +12,7 @@
let progressAmount: number;
let progressTarget: number;
$: progressAmount = (project.tasks||[]).map(t => t.active
$: progressAmount = (project.tasks||[]).map(t => (t.active || t.statusTag === "to do" || t.statusTag === "on hold")
? Math.min(t.completedAmount, t.itemAmount) * t.item.groupWeight
: t.itemAmount * t.item.groupWeight
).reduce((n,m) => n+m, 0);