This commit is contained in:
Moritz Utcke
2025-02-20 10:35:23 +11:00
parent 39476ac5d5
commit 8049af9f17
7 changed files with 24 additions and 24 deletions

View File

@@ -56,6 +56,7 @@
`${location.pathname}?uid=${ausweis.uid}` `${location.pathname}?uid=${ausweis.uid}`
); );
localStorage.clear()
window.location.href = `/speichern-erfolgreich?uid=${ausweis.uid}` window.location.href = `/speichern-erfolgreich?uid=${ausweis.uid}`
} }
} }

View File

@@ -117,14 +117,14 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
Verbräuche öffnet sich dann.</HelpLabel> Verbräuche öffnet sich dann.</HelpLabel>
</div> </div>
</div> </div>
{#if !ausweis.zusaetzliche_heizquelle}
<div class="input-standard"> <div class="input-standard">
<div class="input-checkboxen"> <div class="input-checkboxen">
<div <div
class="grid grid-cols-[25px_max-content] items-center justify-items-start" class="grid grid-cols-[25px_max-content] items-center justify-items-start"
> >
{#if !ausweis.zusaetzliche_heizquelle}
<input <input
id="zusaetzliche_heizquelle_1" id="zusaetzliche_heizquelle_1"
type="checkbox" type="checkbox"
@@ -137,7 +137,6 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
for="zusaetzliche_heizquelle_1" for="zusaetzliche_heizquelle_1"
class="cursor-pointer">zusätzliche Heizquelle</label class="cursor-pointer">zusätzliche Heizquelle</label
> >
{/if}
</div> </div>
</div> </div>
<div class="help-label"> <div class="help-label">
@@ -145,6 +144,8 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
gemacht werden, da alle 3 Verbrauchsjahre zusammenhängend sein sollen.</HelpLabel> gemacht werden, da alle 3 Verbrauchsjahre zusammenhängend sein sollen.</HelpLabel>
</div> </div>
</div> </div>
{/if}
</div> </div>

View File

@@ -157,19 +157,15 @@ export type UnterlageClient = Omit<Unterlage, "id" | "objekt_id">
export type BildClient = Omit<Bild, "id" | "objekt_id"> export type BildClient = Omit<Bild, "id" | "objekt_id">
export type ObjektKomplettClient = ObjektClient & { export type ObjektKomplettClient = ObjektClient & {
bilder: BildClient[], aufnahmen: AufnahmeKomplettClient[]
unterlagen: UnterlageClient[],
aufnahmen: (AufnahmeClient & {
bedarfsausweis_wohnen?: BedarfsausweisWohnenClient,
verbrauchsausweis_wohnen?: VerbrauchsausweisWohnenClient,
verbrauchsausweis_gewerbe?: VerbrauchsausweisGewerbeClient
})[]
} }
export type AufnahmeKomplettClient = AufnahmeClient & { export type AufnahmeKomplettClient = AufnahmeClient & {
bedarfsausweis_wohnen: BedarfsausweisWohnenClient[], bilder: BildClient[],
verbrauchsausweis_wohnen: VerbrauchsausweisWohnenClient[], unterlagen: UnterlageClient[],
verbrauchsausweis_gewerbe: VerbrauchsausweisGewerbeClient[] bedarfsausweis_wohnen?: BedarfsausweisWohnenClient,
verbrauchsausweis_wohnen?: VerbrauchsausweisWohnenClient,
verbrauchsausweis_gewerbe?: VerbrauchsausweisGewerbeClient
} }
export type GEGNachweisWohnenClient = Omit<GEGNachweisWohnen, "id" | "aufnahme_id" | "benutzer_id"> export type GEGNachweisWohnenClient = Omit<GEGNachweisWohnen, "id" | "aufnahme_id" | "benutzer_id">

View File

@@ -6,8 +6,7 @@
export let objekt: ObjektKomplettClient; export let objekt: ObjektKomplettClient;
// TODO const objektBild = objekt.aufnahmen[0].bilder.find(bild => bild.kategorie === Enums.BilderKategorie.Gebaeude);
const objektBild = objekt.bilder.find(bild => bild.kategorie === Enums.BilderKategorie.Gebaeude);
</script> </script>
<div class="border rounded-lg border-base-300 bg-white"> <div class="border rounded-lg border-base-300 bg-white">

View File

@@ -15,10 +15,13 @@ const { title } = Astro.props;
--- ---
<script> <script>
const skala = document.getElementById("skala");
if (!skala?.classList.contains("no-scroll")) {
window.addEventListener("scroll", (event) => { window.addEventListener("scroll", (event) => {
const skala = document.getElementById("skala");
if (skala?.classList.contains("no-scroll")) {
return;
}
let scroll = window.scrollY; let scroll = window.scrollY;
if (scroll >= 400) { if (scroll >= 400) {
if (skala) { if (skala) {
@@ -63,7 +66,6 @@ const { title } = Astro.props;
?.classList.remove("2xl:mt-[370px]"); ?.classList.remove("2xl:mt-[370px]");
} }
}); });
}
</script> </script>
<html lang="de"> <html lang="de">

View File

@@ -109,6 +109,7 @@
// uid: ausweis.uid, // uid: ausweis.uid,
// }); // });
localStorage.clear()
window.location.href = `/kaufabschluss?uid=${ausweis.uid}`; window.location.href = `/kaufabschluss?uid=${ausweis.uid}`;
} }
@@ -141,6 +142,9 @@
} }
}) })
// Alle alten Ausweisdateien im localStorage löschen.
localStorage.clear();
if (bezahlmethode === Enums.Bezahlmethoden.rechnung) { if (bezahlmethode === Enums.Bezahlmethoden.rechnung) {
window.location.href = `/payment/success?uid=${uid}` window.location.href = `/payment/success?uid=${uid}`
} else { } else {

View File

@@ -211,10 +211,7 @@ const ausweisart: Enums.Ausweisart = "VerbrauchsausweisWohnen"
<div id="skala" class="bg-white grid grid-cols-1 p-4 <div id="skala" class="bg-white grid grid-cols-1 p-4 lg:grid-cols-2 lg:gap-x-6">
lg:grid-cols-2 lg:gap-x-6
">
<div id="performance-box" class="w-full box relative px-4 order-1 self-stretch grid grid-cols-1"> <div id="performance-box" class="w-full box relative px-4 order-1 self-stretch grid grid-cols-1">
<PerformanceScore <PerformanceScore