diff --git a/backend/main.py b/backend/main.py index 9d39d5e..0d36ed1 100644 --- a/backend/main.py +++ b/backend/main.py @@ -406,7 +406,7 @@ async def serve_media(path: str, request: _Request): raise _HE(404, "Nicht gefunden.") return _media_response(filepath) -APP_VER = "895" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "896" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/routes/breeder.py b/backend/routes/breeder.py index 355a575..22e6fde 100644 --- a/backend/routes/breeder.py +++ b/backend/routes/breeder.py @@ -315,8 +315,8 @@ async def breeder_public_profile(zwingername: str): FROM breeder_profiles bp JOIN users u ON u.id = bp.user_id WHERE LOWER(bp.zwingername) = LOWER(?) - AND u.rolle = 'breeder' - AND u.breeder_status = 'approved' + AND u.rolle IN ('breeder', 'admin') + AND (u.breeder_status = 'approved' OR u.rolle = 'admin') """, (zwingername,)).fetchone() if not row: raise HTTPException(404, "Züchter nicht gefunden.") diff --git a/backend/static/index.html b/backend/static/index.html index 1da1a58..27c1caf 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -591,10 +591,10 @@
- - - - + + + + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 4c2987e..e3e7d0f 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 = '895'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '896'; // ← 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/breeder.js b/backend/static/js/pages/breeder.js index 20e1e3a..a5a99ea 100644 --- a/backend/static/js/pages/breeder.js +++ b/backend/static/js/pages/breeder.js @@ -8,6 +8,8 @@ window.Page_breeder = (() => { let _container = null; let _appState = null; + const _esc = s => UI.esc ? UI.esc(s) : String(s ?? '').replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); + // ---------------------------------------------------------- // INIT // ---------------------------------------------------------- diff --git a/backend/static/js/pages/litters.js b/backend/static/js/pages/litters.js index eda8672..73b7e04 100644 --- a/backend/static/js/pages/litters.js +++ b/backend/static/js/pages/litters.js @@ -146,13 +146,13 @@ window.Page_litters = (() => { { icon: 'list-bullets', label: 'Alle Würfe', val: total, filter: null }, { icon: 'baby', label: 'Aktiv', val: aktiv, filter: ['verfuegbar','geboren'], color: 'var(--c-success)' }, { icon: 'calendar-dots',label: 'Geplant', val: geplant, filter: ['geplant'] }, - { icon: 'dog', label: 'Welpen ges.', val: welpen, filter: null }, + { icon: 'dog', label: 'Welpen ges.', val: welpen, filter: null, noClick: true }, { icon: 'tag', label: 'Verfügbar', val: verfuegb,filter: ['verfuegbar'], color: verfuegb > 0 ? 'var(--c-primary)' : undefined }, ]; bar.style.display = 'flex'; bar.innerHTML = statItems.map((s, i) => { const isActive = JSON.stringify(_filterStatus) === JSON.stringify(s.filter); - const clickable = s.filter !== undefined && !(s.label === 'Welpen ges.'); + const clickable = !s.noClick; return `