From d6ab191011c2f57c8b52d9c038c6143e67756c0f Mon Sep 17 00:00:00 2001 From: Claude Project Manager Date: Mon, 29 Sep 2025 22:19:34 +0200 Subject: [PATCH] =?UTF-8?q?Dashboard=20ge=C3=A4ndert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/Dashboard.tsx | 79 +------------------------------- 1 file changed, 2 insertions(+), 77 deletions(-) diff --git a/frontend/src/views/Dashboard.tsx b/frontend/src/views/Dashboard.tsx index ff11114..ab5d3fc 100644 --- a/frontend/src/views/Dashboard.tsx +++ b/frontend/src/views/Dashboard.tsx @@ -20,7 +20,7 @@ export default function Dashboard() { availableEmployees: 0, }) const [employees, setEmployees] = useState([]) - const [trendWindow, setTrendWindow] = useState<'today' | 7 | 30>('today') + // removed trends useEffect(() => { fetchStats() @@ -74,31 +74,7 @@ export default function Dashboard() { }, ] - // Trends: Top-Kompetenzen im Zeitraum (basierend auf aktualisierten Profilen) - const topSkills = useMemo(() => { - if (!employees.length) return [] as { name: string; count: number }[] - const since = new Date() - if (trendWindow === 'today') { - since.setHours(0, 0, 0, 0) - } else { - since.setDate(since.getDate() - trendWindow) - } - const recent = employees.filter((e: any) => { - const updated = new Date(e.updatedAt) - return !isNaN(updated.getTime()) && updated > since - }) - const counts = new Map() - for (const emp of recent) { - const skills = (emp.skills || []) as { name?: string; id: string }[] - for (const s of skills) { - const key = (s && (s as any).name) || (s && (s as any).id) || 'Unbenannt' - counts.set(key, (counts.get(key) || 0) + 1) - } - } - const arr = Array.from(counts.entries()).map(([name, count]) => ({ name, count })) - arr.sort((a, b) => b.count - a.count) - return arr.slice(0, 5) - }, [employees, trendWindow]) + // trends removed // Profilqualität (mein Profil): Kontakt & Dienststelle + ob Skills vorhanden const me = useMemo(() => { @@ -156,46 +132,6 @@ export default function Dashboard() {
- {/* Trends */} -
-
-

Trends

-
- - - -
-
-
- {topSkills.length === 0 ? ( -

Keine Daten im ausgewählten Zeitraum.

- ) : ( - topSkills.map((s, idx) => ( -
- {s.name} - {s.count} Profile -
- )) - )} -

Basis: Profile mit Aktualisierung im Zeitraum.

-
-
- {/* Profilqualität */}

Profilqualität

@@ -253,17 +189,6 @@ export default function Dashboard() {
- -
-

- Letzte Aktivitäten -

-
-

- Keine aktuellen Aktivitäten -

-
-
)