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}`
);
localStorage.clear()
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>
</div>
</div>
{#if !ausweis.zusaetzliche_heizquelle}
<div class="input-standard">
<div class="input-checkboxen">
<div
class="grid grid-cols-[25px_max-content] items-center justify-items-start"
>
{#if !ausweis.zusaetzliche_heizquelle}
<input
id="zusaetzliche_heizquelle_1"
type="checkbox"
@@ -137,7 +137,6 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
for="zusaetzliche_heizquelle_1"
class="cursor-pointer">zusätzliche Heizquelle</label
>
{/if}
</div>
</div>
<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>
</div>
</div>
{/if}
</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 ObjektKomplettClient = ObjektClient & {
bilder: BildClient[],
unterlagen: UnterlageClient[],
aufnahmen: (AufnahmeClient & {
bedarfsausweis_wohnen?: BedarfsausweisWohnenClient,
verbrauchsausweis_wohnen?: VerbrauchsausweisWohnenClient,
verbrauchsausweis_gewerbe?: VerbrauchsausweisGewerbeClient
})[]
aufnahmen: AufnahmeKomplettClient[]
}
export type AufnahmeKomplettClient = AufnahmeClient & {
bedarfsausweis_wohnen: BedarfsausweisWohnenClient[],
verbrauchsausweis_wohnen: VerbrauchsausweisWohnenClient[],
verbrauchsausweis_gewerbe: VerbrauchsausweisGewerbeClient[]
bilder: BildClient[],
unterlagen: UnterlageClient[],
bedarfsausweis_wohnen?: BedarfsausweisWohnenClient,
verbrauchsausweis_wohnen?: VerbrauchsausweisWohnenClient,
verbrauchsausweis_gewerbe?: VerbrauchsausweisGewerbeClient
}
export type GEGNachweisWohnenClient = Omit<GEGNachweisWohnen, "id" | "aufnahme_id" | "benutzer_id">

View File

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

View File

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

View File

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

View File

@@ -211,10 +211,7 @@ const ausweisart: Enums.Ausweisart = "VerbrauchsausweisWohnen"
<div id="skala" class="bg-white grid grid-cols-1 p-4
lg:grid-cols-2 lg:gap-x-6
">
<div id="skala" class="bg-white grid grid-cols-1 p-4 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">
<PerformanceScore