diff --git a/persistent/images/img-53cc77f5-940f-4fcb-b21c-fb46e1d6aaaf.webp b/persistent/images/img-53cc77f5-940f-4fcb-b21c-fb46e1d6aaaf.webp new file mode 100644 index 00000000..641c1e02 Binary files /dev/null and b/persistent/images/img-53cc77f5-940f-4fcb-b21c-fb46e1d6aaaf.webp differ diff --git a/src/components/Ausweis/StromVerbrauch.svelte b/src/components/Ausweis/StromVerbrauch.svelte index a59deeae..4a17e979 100644 --- a/src/components/Ausweis/StromVerbrauch.svelte +++ b/src/components/Ausweis/StromVerbrauch.svelte @@ -6,21 +6,14 @@ import VerbrauchsHelpLabel from "#components/labels/VerbrauchsHelpLabel.svelte"; import StromVerbrauchsHelpLabel from "#components/labels/StromVerbrauchsHelpLabel.svelte"; import SanierungsOption from "#components/Ausweis/SanierungsOption.svelte" - - - import Label from "../Label.svelte"; - import moment from "moment"; import fuelList from "./brennstoffListe.js"; import { auditVerbrauchAbweichung } from "../Verbrauchsausweis/audits/VerbrauchAbweichung.js"; import { AufnahmeClient, - ObjektClient, VerbrauchsausweisGewerbeClient, } from "./types.js"; - import { addNotification } from "#components/Notifications/shared.js"; - export let objekt: ObjektClient; export let aufnahme: AufnahmeClient; export let ausweis: VerbrauchsausweisGewerbeClient; @@ -46,7 +39,7 @@ "November", "Dezember", ]; - + const startDate = moment( aufnahme.erstellungsdatum || Date.now() ) @@ -70,8 +63,8 @@ fuelMap[fuel[0]].push(fuel[1]); } - let month = ausweis.startdatum?.getMonth(); - let year = ausweis.startdatum?.getFullYear(); + let month = moment(ausweis.startdatum).month(); + let year = moment(ausweis.startdatum).year(); $: { if (typeof month === "number" && typeof year === "number") { @@ -86,6 +79,11 @@ } } + $: { + console.log(aufnahme.brennstoff_1); + + } + $: abweichung = auditVerbrauchAbweichung(ausweis, aufnahme); @@ -216,7 +214,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
- +