Debug: KI-Bericht save_count + save_error im Response, Toast-Feedback (SW by-v808)

This commit is contained in:
rene 2026-05-09 21:38:35 +02:00
parent 891e11df65
commit 3acb7aa874
6 changed files with 21 additions and 12 deletions

View file

@ -96,9 +96,9 @@
</script>
<!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung -->
<link rel="stylesheet" href="/css/design-system.css?v=807">
<link rel="stylesheet" href="/css/layout.css?v=807">
<link rel="stylesheet" href="/css/components.css?v=807">
<link rel="stylesheet" href="/css/design-system.css?v=808">
<link rel="stylesheet" href="/css/layout.css?v=808">
<link rel="stylesheet" href="/css/components.css?v=808">
</head>
<body>
@ -578,10 +578,10 @@
<div id="modal-container"></div>
<!-- JS: Reihenfolge ist wichtig — erst Basis, dann Features -->
<script src="/js/api.js?v=807"></script>
<script src="/js/ui.js?v=807"></script>
<script src="/js/app.js?v=807"></script>
<script src="/js/worlds.js?v=807"></script>
<script src="/js/api.js?v=808"></script>
<script src="/js/ui.js?v=808"></script>
<script src="/js/app.js?v=808"></script>
<script src="/js/worlds.js?v=808"></script>
<!-- Feature-Seiten werden lazy geladen -->

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '807'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '808'; // ← 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

View file

@ -2793,7 +2793,10 @@ window.Page_health = (() => {
UI.setLoading(btn, true);
try {
const { zusammenfassung } = await API.health.kiZusammenfassung(_appState.activeDog.id);
const res = await API.health.kiZusammenfassung(_appState.activeDog.id);
const zusammenfassung = res.zusammenfassung ?? res;
if (res.save_error) UI.toast.warning(`Speichern fehlgeschlagen: ${res.save_error}`);
else if (res.saved_count !== undefined) UI.toast.info(`${res.saved_count} Bericht(e) gespeichert`);
UI.modal.open({
title: `${UI.icon('star')} KI-Gesundheitsbericht`,
body: `<div style="white-space:pre-wrap;line-height:1.7;font-size:var(--text-sm)">${_esc(zusammenfassung)}</div>`,

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache
============================================================ */
const CACHE_VERSION = 'by-v807';
const CACHE_VERSION = 'by-v808';
const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache