diff --git a/app/templates/index.html b/app/templates/index.html
index a6c8fba..42785a0 100644
--- a/app/templates/index.html
+++ b/app/templates/index.html
@@ -891,6 +891,15 @@
}
}
+ // Partei-Normalisierung (global, für Stats + Labels)
+ function normalizePartei(f) {
+ const u = f.toUpperCase();
+ if (u === 'AFD') return 'AfD';
+ if (u === 'GRÜNE' || u === 'GRUENE' || u === 'BÜNDNIS 90/DIE GRÜNEN') return 'GRÜNE';
+ if (u === 'DIE LINKE') return 'LINKE';
+ return f;
+ }
+
// Map code → parlament_name, vom Backend mit dem Initial-Render geliefert.
// Wird im Detail-Header und im Listen-Item-Badge-Tooltip verwendet.
const PARLAMENT_NAMES = {{ parlament_names | tojson }};
@@ -1109,14 +1118,7 @@
blContainer.innerHTML = '';
}
- // Partei-Durchschnitte berechnen (mit Normalisierung für AfD/AFD etc.)
- const normalizePartei = (f) => {
- const u = f.toUpperCase();
- if (u === 'AFD') return 'AfD';
- if (u === 'GRÜNE' || u === 'GRUENE' || u === 'BÜNDNIS 90/DIE GRÜNEN') return 'GRÜNE';
- if (u === 'DIE LINKE') return 'LINKE';
- return f;
- };
+ // Partei-Durchschnitte berechnen (Normalisierung via globaler normalizePartei)
const parteiStats = {};
allAssessments.forEach(a => {
if (a.gwoeScore == null) return;