diff --git a/templates/index.html b/templates/index.html
index e505b93..b772f91 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -111,8 +111,7 @@
}
.result-counts {
display: flex;
- flex-wrap: wrap;
- gap: 1rem;
+ justify-content: center;
margin-bottom: 1rem;
padding: 0.5rem;
background-color: #f8f9fa;
@@ -172,10 +171,6 @@
-
-
-
-
@@ -257,40 +252,10 @@
}
function updateResultCounts() {
- const name = document.getElementById('nameInput').value;
- const ort = document.getElementById('ortInput').value;
- const kundennummer = document.getElementById('kundennummerInput').value;
- const fachrichtung = document.getElementById('fachrichtungInput').value;
- const query = document.getElementById('searchInput').value;
-
- // Zähler für spezifische Felder
- const nameCount = lastResults.filter(customer =>
- (customer.Vorname + ' ' + customer.Nachname).toLowerCase().includes(name.toLowerCase())
- ).length;
- document.getElementById('nameCount').textContent = nameCount;
- document.getElementById('nameCount').classList.toggle('visible', nameCount > 0);
-
- const ortCount = lastResults.filter(customer =>
- customer.Ort?.toLowerCase().includes(ort.toLowerCase())
- ).length;
- document.getElementById('ortCount').textContent = ortCount;
- document.getElementById('ortCount').classList.toggle('visible', ortCount > 0);
-
- const kundennummerCount = lastResults.filter(customer =>
- customer.Nummer?.toString().includes(kundennummer)
- ).length;
- document.getElementById('kundennummerCount').textContent = kundennummerCount;
- document.getElementById('kundennummerCount').classList.toggle('visible', kundennummerCount > 0);
-
- const fachrichtungCount = lastResults.filter(customer =>
- customer.Fachrichtung?.toLowerCase().includes(fachrichtung.toLowerCase())
- ).length;
- document.getElementById('fachrichtungCount').textContent = fachrichtungCount;
- document.getElementById('fachrichtungCount').classList.toggle('visible', fachrichtungCount > 0);
-
- // Zähler für allgemeine Suche
+ // Nur Gesamtzahl anzeigen
const generalCount = lastResults.length;
- document.getElementById('generalCount').textContent = generalCount;
+ document.getElementById('generalCount').textContent =
+ generalCount > 0 ? `${generalCount} Treffer gefunden` : '';
document.getElementById('generalCount').classList.toggle('visible', generalCount > 0);
}