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);
+1 -1
View File
@@ -224,7 +224,7 @@ export const commonIcons: IconName[] = [
export type IconName = keyof typeof icons;
export const iconNames = Object.keys(icons).sort() as IconName[];
export const DEFAULT_ICON = iconNames[0] as IconName;
export const DEFAULT_ICON = commonIcons[0];
export const uncommonIcons = iconNames.filter(n => !commonIcons.includes(n));
+4 -4
View File
@@ -1,10 +1,9 @@
<script lang="ts">
import stuffLogClient from "../clients/stufflog";
import Checkbox from "../components/Checkbox.svelte";
import IconSelect from "../components/IconSelect.svelte";
import Modal from "../components/Modal.svelte";
import StatusTagSelect from "../components/StatusTagSelect.svelte";
import { iconNames } from "../external/icons";
import { DEFAULT_ICON } from "../external/icons";
import type { ProjectResult } from "../models/project";
import markStale from "../stores/markStale";
import modalStore from "../stores/modal";
@@ -19,8 +18,9 @@ import StatusTagSelect from "../components/StatusTagSelect.svelte";
id: "",
name: "",
description: "",
icon: iconNames[0],
active: true,
icon: DEFAULT_ICON,
active: false,
statusTag: "to do",
createdTime: "",
tasks: [],
}
+2 -2
View File
@@ -21,12 +21,12 @@
name: "",
description: "",
icon: iconNames[0],
active: true,
active: false,
createdTime: "",
item: null,
logs: [],
completedAmount: 0,
statusTag: null,
statusTag: "to do",
}
let verb = "Add";
if (md.name === "task.edit" || md.name === "task.delete") {