diff --git a/backend/main.py b/backend/main.py index 4485c8d..6d96fc8 100644 --- a/backend/main.py +++ b/backend/main.py @@ -404,7 +404,7 @@ async def serve_media(path: str, request: _Request): raise _HE(404, "Nicht gefunden.") return _media_response(filepath) -APP_VER = "891" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "892" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/static/index.html b/backend/static/index.html index 49a2065..5bbd100 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -583,10 +583,10 @@
- - - - + + + + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index b84cbc0..def8158 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '891'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '892'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.5.1'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; // Cache-Bust-Parameter nach Update-Reload sofort entfernen diff --git a/backend/static/js/pages/litters.js b/backend/static/js/pages/litters.js index 9675f67..d1f42d7 100644 --- a/backend/static/js/pages/litters.js +++ b/backend/static/js/pages/litters.js @@ -613,17 +613,46 @@ window.Page_litters = (() => { try { const entries = await API.litters.waitlist(litterId); _renderWaitlist(inner, litterId, entries); + // Badge am Button aktualisieren + const btn = document.querySelector(`.litters-waitlist-btn[data-id="${litterId}"]`); + if (btn) { + const active = entries.filter(e => e.status !== 'abgesagt').length; + btn.innerHTML = `${UI.icon('list-bullets')} Warteliste${active ? ` ${active}` : ''}`; + } } catch (err) { inner.innerHTML = `${_esc(err.message || 'Fehler.')}
`; } } function _renderWaitlist(container, litterId, entries) { + const active = entries.filter(e => e.status !== 'abgesagt'); + const statusCounts = {}; + entries.forEach(e => { statusCounts[e.status] = (statusCounts[e.status] || 0) + 1; }); + + const summaryPills = Object.entries(statusCounts).map(([s, n]) => { + const cfg = _WL_STATUS[s] || _WL_STATUS.anfrage; + return `${cfg.label}: ${n}`; + }).join(''); + + const header = ` +Noch keine Interessenten eingetragen.
`; + container.innerHTML = ` +Noch keine Interessenten
+Trage Anfragen ein — mit Wunsch-Geschlecht, Kontaktdaten und Status.
+