From fe3329fc376b3da5f12a76cdb7c0cee99b64f90d Mon Sep 17 00:00:00 2001 From: Stan Runge Date: Mon, 24 Mar 2025 18:49:20 +0100 Subject: [PATCH] add basic search bar --- packages/web/src/routes/progress/+page.svelte | 200 ++++++++++-------- 1 file changed, 109 insertions(+), 91 deletions(-) diff --git a/packages/web/src/routes/progress/+page.svelte b/packages/web/src/routes/progress/+page.svelte index c127f7b..d7360df 100755 --- a/packages/web/src/routes/progress/+page.svelte +++ b/packages/web/src/routes/progress/+page.svelte @@ -1,5 +1,16 @@
@@ -16,6 +27,15 @@ {/if}
+ +
+ +
Total progress: {data.tasks.reduce((acc, task) => acc + task.currentPoints, 0)} / {data.tasks.reduce( (acc, task) => acc + task.totalPoints, 0 @@ -26,103 +46,101 @@ ).toFixed(3)}%) - {#if data.tasks.length > 0} + {#if filteredTasks.length > 0}
- {#if data.tasks.length > 0} - - + + +
+ {#each filteredTasks as task} +
+ + {task.name} + +
+
+ Topics: +
+ {#each task.tasksToTopics as topic} +
+ {topic.topic.name} +
+ {/each}
- {/each} -
- {:else} -

No tasks available. Click "Create" to add a new task.

- {/if} +
+
+ + {task.currentPoints} / {task.totalPoints} ({( + (task.currentPoints / task.totalPoints) * + 100 + ).toFixed(1)}%) + +
+
+ {/each} +
{:else} -

No tasks available. Click "Create" to add a new task.

+

+ No tasks found matching your search. Try a different keyword or clear the search. +

{/if}