From 1884262268847e3a753c201c4758f262e710a043 Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Tue, 1 Apr 2025 21:26:14 +0100 Subject: [PATCH] chore: improve data display --- site/src/routes/SmartApplicationList.svelte | 35 ++++++++++++--------- site/src/routes/graphs/+page.svelte | 8 +++-- site/src/routes/graphs/Pie.svelte | 26 ++++++++------- 3 files changed, 40 insertions(+), 29 deletions(-) diff --git a/site/src/routes/SmartApplicationList.svelte b/site/src/routes/SmartApplicationList.svelte index 0d1c8bd..d5cd4f8 100644 --- a/site/src/routes/SmartApplicationList.svelte +++ b/site/src/routes/SmartApplicationList.svelte @@ -15,28 +15,33 @@ return i.status_id === status_id; }) ); + + let internal = $derived( + sorted.filter((i) => { + if (!filter) { + return true; + } + const f = new RegExp(filter, 'ig'); + + let x = i.title; + + if (i.company) { + x = `${x} @ ${i.company}`; + } + + return x.match(f); + }) + ); {#if sorted.length > 0}

- {title} + {title} ({internal.length}) +

- {#each sorted.filter((i) => { - if (!filter) { - return true; - } - const f = new RegExp(filter, 'ig'); - - let x = i.title; - - if (i.company) { - x = `${x} @ ${i.company}`; - } - - return x.match(f); - }) as item} + {#each internal as item}