Fix: Gewicht-Eintrag schlug fehl (bezeichnung Pflichtfeld + Komma-Dezimal)
- health.py: bezeichnung Optional statt required (Gewicht braucht keinen Titel) - _buildPayload: Komma → Punkt bei wert und kosten (deutsche Lokalisierung) - Gewicht-Einträge setzen automatisch bezeichnung = "9.9 kg" - SW-Cache → by-v10
This commit is contained in:
parent
75529cbdab
commit
1a5f1f7ee2
3 changed files with 7 additions and 4 deletions
|
|
@ -20,7 +20,7 @@ TYPEN = {"impfung", "entwurmung", "tierarzt", "medikament", "gewicht", "allergie
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
class HealthCreate(BaseModel):
|
class HealthCreate(BaseModel):
|
||||||
typ: str
|
typ: str
|
||||||
bezeichnung: str
|
bezeichnung: Optional[str] = None
|
||||||
datum: str
|
datum: str
|
||||||
naechstes: Optional[str] = None
|
naechstes: Optional[str] = None
|
||||||
notiz: Optional[str] = None
|
notiz: Optional[str] = None
|
||||||
|
|
|
||||||
|
|
@ -840,8 +840,11 @@ window.Page_health = (() => {
|
||||||
schweregrad: fd.schweregrad || null,
|
schweregrad: fd.schweregrad || null,
|
||||||
reaktion: fd.reaktion || null,
|
reaktion: fd.reaktion || null,
|
||||||
};
|
};
|
||||||
if (fd.wert) p.wert = parseFloat(fd.wert);
|
if (fd.wert) {
|
||||||
if (fd.kosten) p.kosten = parseFloat(fd.kosten);
|
p.wert = parseFloat(fd.wert.replace(',', '.'));
|
||||||
|
if (typ === 'gewicht') p.bezeichnung = `${p.wert} kg`;
|
||||||
|
}
|
||||||
|
if (fd.kosten) p.kosten = parseFloat(fd.kosten.toString().replace(',', '.'));
|
||||||
if (fd.tierarzt_id) p.tierarzt_id = parseInt(fd.tierarzt_id);
|
if (fd.tierarzt_id) p.tierarzt_id = parseInt(fd.tierarzt_id);
|
||||||
if (typ === 'medikament') {
|
if (typ === 'medikament') {
|
||||||
p.aktiv = 'aktiv' in fd ? 1 : 0;
|
p.aktiv = 'aktiv' in fd ? 1 : 0;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications
|
Offline-Cache + Push Notifications
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v9';
|
const CACHE_VERSION = 'by-v10';
|
||||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||||
|
|
||||||
// Diese Dateien werden beim Install gecacht (App Shell)
|
// Diese Dateien werden beim Install gecacht (App Shell)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue