diff --git a/VERSION b/VERSION
index 825e329..59be0e4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1169
\ No newline at end of file
+1170
\ No newline at end of file
diff --git a/backend/static/index.html b/backend/static/index.html
index df9c4ba..320e9d3 100644
--- a/backend/static/index.html
+++ b/backend/static/index.html
@@ -86,14 +86,14 @@
Ban Yaro
-
+
-
-
-
-
-
+
+
+
+
+
@@ -617,11 +617,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -631,7 +631,7 @@
-
+
diff --git a/backend/static/js/app.js b/backend/static/js/app.js
index 1c46941..01da932 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 = '1169'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
+const APP_VER = '1170'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt
window.APP_VER = APP_VER; // global verfügbar für andere Module (z.B. offline-indicator)
window.APP_VERSION = APP_VERSION;
diff --git a/backend/static/js/pages/ernaehrung.js b/backend/static/js/pages/ernaehrung.js
index 6fd04a7..0bae02c 100644
--- a/backend/static/js/pages/ernaehrung.js
+++ b/backend/static/js/pages/ernaehrung.js
@@ -238,6 +238,23 @@ window.Page_ernaehrung = (() => {
});
el.querySelector('#ern-rechner-btn').addEventListener('click', () => _berechne(el));
+
+ // Bereits gespeichertes Futter-Profil beim Öffnen direkt anzeigen — sonst war
+ // es „nicht auffindbar" (Formular lag versteckt hinter der Berechnung).
+ const hasProfil = !!(_profil && (_profil.futter_typ || _profil.marke || _profil.notizen || _profil.kcal_tag));
+ if (hasProfil) {
+ if (_profil.kcal_tag) {
+ // Gespeicherten Tagesbedarf 1:1 wieder anzeigen (kein Neu-Rechnen → keine
+ // abweichende Zahl, da Aktivität/Kastration nicht persistiert werden).
+ _showResult(el, _profil.kcal_tag);
+ } else {
+ const ps = el.querySelector('#ern-profil-speichern');
+ if (ps) {
+ ps.style.display = '';
+ el.querySelector('#ern-prof-save-btn').onclick = () => _speichereProfil(el, null);
+ }
+ }
+ }
}
function _berechne(el) {
@@ -258,7 +275,12 @@ window.Page_ernaehrung = (() => {
sport: { intakt: 2.1, kastriert: 1.9 },
};
const kcal = Math.round(rer * faktoren[aktivitaet][kastriert ? 'kastriert' : 'intakt']);
+ _showResult(el, kcal);
+ }
+ // Tagesbedarf-Ergebnis + Profil-Formular rendern (genutzt von Berechnung UND
+ // beim Öffnen mit gespeichertem kcal_tag).
+ function _showResult(el, kcal) {
// Umrechnung in Futtermengen
const trocken = Math.round(kcal / 3.5); // ~350 kcal/100g
const nass = Math.round(kcal / 0.85); // ~85 kcal/100g
diff --git a/backend/static/landing.html b/backend/static/landing.html
index 22f5926..6af53ab 100644
--- a/backend/static/landing.html
+++ b/backend/static/landing.html
@@ -4,7 +4,7 @@
-
+
Ban Yaro — Die Hunde-App für Deutschland, Österreich & Schweiz
diff --git a/backend/static/sw.js b/backend/static/sw.js
index ee5d283..1c58f13 100644
--- a/backend/static/sw.js
+++ b/backend/static/sw.js
@@ -4,7 +4,7 @@
============================================================ */
// ← EINZIGE Stelle für die Version — STATIC_ASSETS und CACHE_VERSION leiten sich ab
-const VER = '1169';
+const VER = '1170';
const CACHE_VERSION = `by-v${VER}`;
const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten