diff --git a/backend/main.py b/backend/main.py index 0fb21de..b9905ab 100644 --- a/backend/main.py +++ b/backend/main.py @@ -341,7 +341,7 @@ MEDIA_DIR = os.getenv("MEDIA_DIR", "/data/media") os.makedirs(MEDIA_DIR, exist_ok=True) app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media") -APP_VER = "802" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "803" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/static/js/app.js b/backend/static/js/app.js index a30eb9c..d10de0d 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 = '802'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '803'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.5.0'; // ← 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/health.js b/backend/static/js/pages/health.js index 17c7155..87d6dd2 100644 --- a/backend/static/js/pages/health.js +++ b/backend/static/js/pages/health.js @@ -2312,11 +2312,14 @@ window.Page_health = (() => { // ---------------------------------------------------------- // KI-GESUNDHEITSBERICHTE (gespeicherte automatische Berichte) // ---------------------------------------------------------- - async function _loadKiBerichte(dogId) { + async function _loadKiBerichte(dogId, force = false) { const el = _container.querySelector('#health-ki-berichte'); if (!el) return; try { - const berichte = await API.health.kiBerichte(dogId); + // force=true: Cache-Buster damit SW den neuen Bericht nicht übersieht + const berichte = force + ? await API.get(`/dogs/${dogId}/health/ki-berichte?_t=${Date.now()}`) + : await API.health.kiBerichte(dogId); if (!berichte || berichte.length === 0) return; const neuester = berichte[0]; const datum = neuester.erstellt_at @@ -2795,8 +2798,8 @@ window.Page_health = (() => { title: `${UI.icon('star')} KI-Gesundheitsbericht`, body: `