diff --git a/frontend/src/views/ProjectListView.vue b/frontend/src/views/ProjectListView.vue index f0e7079..e45e68a 100644 --- a/frontend/src/views/ProjectListView.vue +++ b/frontend/src/views/ProjectListView.vue @@ -113,6 +113,14 @@ function truncate(text: string | null, max = 120): string { if (!text) return ""; return text.length > max ? text.slice(0, max) + "..." : text; } + +function overallPct(project: Project): { total: number; pct: number } { + const counts = project.summary?.task_counts; + if (!counts) return { total: 0, pct: 0 }; + const total = (counts.todo ?? 0) + (counts.in_progress ?? 0) + (counts.done ?? 0); + const pct = total > 0 ? Math.round((counts.done ?? 0) / total * 100) : 0; + return { total, pct }; +} @@ -164,6 +172,18 @@ function truncate(text: string | null, max = 120): string {
{{ truncate(project.description) }}
+ + +