Version 1.2.6: Verbesserte Suchfunktion und Highlighting
This commit is contained in:
@@ -5,6 +5,12 @@ Alle wichtigen Änderungen an diesem Projekt werden in dieser Datei dokumentiert
|
||||
Das Format basiert auf [Keep a Changelog](https://keepachangelog.com/de/1.0.0/),
|
||||
und dieses Projekt adhäriert zu [Semantic Versioning](https://semver.org/lang/de/).
|
||||
|
||||
## [1.2.6] - 2024-03-19
|
||||
### Geändert
|
||||
- Verbesserte Suchfunktion: Keine Ergebnisse mehr bei leeren Suchfeldern
|
||||
- Optimiertes Highlighting der Suchergebnisse für alle Suchfelder
|
||||
- Fachrichtung wird jetzt in den Suchergebnissen hervorgehoben
|
||||
|
||||
## [1.2.5] - 2024-03-19
|
||||
### Hinzugefügt
|
||||
- Neues Suchfeld für Fachrichtung
|
||||
|
@@ -51,7 +51,7 @@ Die Anwendung unterstützt CIDR-Notation für IP-Bereiche. Beispiele:
|
||||
|
||||
## Version
|
||||
|
||||
Aktuelle Version: 1.2.4
|
||||
Aktuelle Version: v1.2.6
|
||||
|
||||
## Lizenz
|
||||
|
||||
|
@@ -59,9 +59,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="fachrichtungInput">Fachrichtung</label>
|
||||
<input type="text" class="form-control" id="fachrichtungInput" placeholder="Fachrichtung eingeben">
|
||||
<div class="search-field">
|
||||
<div class="input-group">
|
||||
<input type="text" id="fachrichtungInput" class="form-control" placeholder="Fachrichtung" oninput="searchCustomers()">
|
||||
<i class="fas fa-times reset-icon" onclick="clearInput('fachrichtungInput')"></i>
|
||||
<i class="fas fa-search search-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -86,8 +89,8 @@
|
||||
|
||||
<footer class="footer">
|
||||
<div class="footer-content">
|
||||
Made with ❤️ and 🍺 by <a href="https://www.medisoftware.de" target="_blank" class="footer-link">medisoftware</a>
|
||||
<div style="font-size: 0.8em;">Version: v1.2.5</div>
|
||||
Proudly made with ❤️ and 🍺 by <a href="https://www.medisoftware.de" target="_blank" class="footer-link">medisoftware</a>
|
||||
<div style="font-size: 0.8em;">Version: v1.2.6</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -230,20 +233,33 @@
|
||||
return;
|
||||
}
|
||||
|
||||
const searchTerm = document.getElementById('q').value;
|
||||
// Hole alle Suchbegriffe
|
||||
const searchTerms = {
|
||||
general: document.getElementById('q').value,
|
||||
name: document.getElementById('nameInput').value,
|
||||
ort: document.getElementById('ortInput').value,
|
||||
nummer: document.getElementById('nummerInput').value,
|
||||
plz: document.getElementById('plzInput').value,
|
||||
fachrichtung: document.getElementById('fachrichtungInput').value
|
||||
};
|
||||
|
||||
results.forEach(customer => {
|
||||
const card = document.createElement('div');
|
||||
card.className = 'customer-card';
|
||||
card.innerHTML = `
|
||||
<div class="customer-info">
|
||||
<h5 class="mb-1">${highlightText(customer.name, searchTerm)}</h5>
|
||||
<h5 class="mb-1">${highlightText(customer.name, searchTerms.general || searchTerms.name)}</h5>
|
||||
<p class="mb-1 customer-number">${createCustomerLink(customer.nummer)}</p>
|
||||
<p class="mb-1">${createAddressLink(customer.strasse, customer.plz, customer.ort)}</p>
|
||||
<p class="mb-1">${createAddressLink(
|
||||
customer.strasse,
|
||||
highlightText(customer.plz, searchTerms.general || searchTerms.plz),
|
||||
highlightText(customer.ort, searchTerms.general || searchTerms.ort)
|
||||
)}</p>
|
||||
<p class="mb-1">Tel: ${createPhoneLink(customer.telefon)}</p>
|
||||
${customer.mobil ? `<p class="mb-1">Mobil: ${createPhoneLink(customer.mobil)}</p>` : ''}
|
||||
${customer.email ? `<p class="mb-1">E-Mail: ${createEmailLink(customer.email)}</p>` : ''}
|
||||
${customer.bemerkung ? `<p class="mb-1">Bemerkung: ${customer.bemerkung}</p>` : ''}
|
||||
${customer.fachrichtung ? `<p class="mb-1">Fachrichtung: ${highlightText(customer.fachrichtung, searchTerms.general || searchTerms.fachrichtung)}</p>` : ''}
|
||||
</div>
|
||||
<div class="card-actions">
|
||||
<button class="share-button" onclick="copyCustomerLink('${customer.nummer}')">
|
||||
@@ -288,36 +304,7 @@
|
||||
|
||||
lastResults = data;
|
||||
updateResultCounts();
|
||||
|
||||
const resultsDiv = document.getElementById('results');
|
||||
resultsDiv.innerHTML = '';
|
||||
|
||||
if (data.length === 0) {
|
||||
resultsDiv.innerHTML = '<p class="text-center text-muted">Keine Ergebnisse gefunden</p>';
|
||||
return;
|
||||
}
|
||||
|
||||
data.forEach(customer => {
|
||||
const card = document.createElement('div');
|
||||
card.className = 'customer-card';
|
||||
card.innerHTML = `
|
||||
<div class="customer-info">
|
||||
<h5 class="mb-1">${highlightText(customer.name, q || name)}</h5>
|
||||
<p class="mb-1 customer-number">${createCustomerLink(customer.nummer)}</p>
|
||||
<p class="mb-1">${createAddressLink(customer.strasse, customer.plz, customer.ort)}</p>
|
||||
<p class="mb-1">Tel: ${createPhoneLink(customer.telefon)}</p>
|
||||
${customer.mobil ? `<p class="mb-1">Mobil: ${createPhoneLink(customer.mobil)}</p>` : ''}
|
||||
${customer.email ? `<p class="mb-1">E-Mail: ${createEmailLink(customer.email)}</p>` : ''}
|
||||
${customer.bemerkung ? `<p class="mb-1">Bemerkung: ${customer.bemerkung}</p>` : ''}
|
||||
</div>
|
||||
<div class="card-actions">
|
||||
<button class="share-button" onclick="copyCustomerLink('${customer.nummer}')">
|
||||
<i class="fas fa-share-alt"></i> Teilen
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
resultsDiv.appendChild(card);
|
||||
});
|
||||
displayResults(data);
|
||||
})
|
||||
.catch(error => {
|
||||
document.getElementById('loading').style.display = 'none';
|
||||
|
Reference in New Issue
Block a user