diff --git a/VERSION b/VERSION
index 59be0e4..a65c2ed 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1170
\ No newline at end of file
+1171
\ No newline at end of file
diff --git a/backend/static/index.html b/backend/static/index.html
index 320e9d3..1a62f6c 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 01da932..c739557 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 = '1170'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
+const APP_VER = '1171'; // ← 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 0bae02c..f7fa7cb 100644
--- a/backend/static/js/pages/ernaehrung.js
+++ b/backend/static/js/pages/ernaehrung.js
@@ -113,12 +113,22 @@ window.Page_ernaehrung = (() => {
// ------------------------------------------------------------------
// TAB 1: KALORIEN-RECHNER
// ------------------------------------------------------------------
+ // Alter in Jahren (1 Nachkommastelle) aus Geburtstag, '' wenn unbekannt/ungültig.
+ function _alterJahre(geburtstag) {
+ if (!geburtstag) return '';
+ const birth = new Date(geburtstag + 'T00:00:00');
+ if (isNaN(birth.getTime())) return '';
+ const years = (Date.now() - birth.getTime()) / (365.25 * 24 * 3600 * 1000);
+ return (years > 0 && years < 30) ? Math.round(years * 10) / 10 : '';
+ }
+
function _renderRechner(el) {
const dog = _appState.activeDog;
- // Auto-Werte aus Hundeprofil
- const gewichtDefault = dog?.gewicht || '';
- const alterDefault = dog?.alter || '';
+ // Auto-Werte aus Hundeprofil. Feldnamen: gewicht_kg (nicht gewicht); Alter gibt
+ // es nicht als Feld → aus geburtstag berechnen.
+ const gewichtDefault = dog?.gewicht_kg ?? '';
+ const alterDefault = _alterJahre(dog?.geburtstag);
el.innerHTML = `
diff --git a/backend/static/landing.html b/backend/static/landing.html
index 6af53ab..7a08a37 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 1c58f13..f7baa95 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 = '1170';
+const VER = '1171';
const CACHE_VERSION = `by-v${VER}`;
const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten