import { type Component, For, createMemo } from "solid-js"; import { store, getCombinedScore, matchesFilter } from "@/store"; import { TaskCard } from "@/components/TaskCard"; export const ProgressView: Component = () => { const sortedTasks = createMemo(() => { return [...store.tasks] .filter(t => !t.deletedAt && matchesFilter(t)) .sort((a, b) => { // 1. Completed tasks at the bottom if (a.completed !== b.completed) return a.completed ? 1 : -1; // 2. Sort by Progress (Status) Descending (Highest progress first) // Assuming status 0-9 are active states, 10 is completed (handled above) if (a.status !== b.status) return b.status - a.status; // 3. Then by Focus Score (Combined Score) return getCombinedScore(b) - getCombinedScore(a); }); }); return (
Tasks sorted by progress status, then by focus score.
No tasks found in the current filter.