Energiesausweis erstellen
{ausweisart} {PRICES.VerbrauchsausweisWohnen[0]} €
diff --git a/src/pages/immowelt/verbrauchsausweis-wohngebaeude/index.astro b/src/pages/immowelt/verbrauchsausweis-wohngebaeude/index.astro
new file mode 100644
index 00000000..3ed02b65
--- /dev/null
+++ b/src/pages/immowelt/verbrauchsausweis-wohngebaeude/index.astro
@@ -0,0 +1,80 @@
+---
+import AusweisLayout from "#layouts/AusweisLayoutDaten_immowelt.astro";
+import VerbrauchsausweisWohnenModule from "#modules/VerbrauchsausweisWohnen/VerbrauchsausweisWohnenModule.svelte";
+import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types";
+import { createCaller } from "../../../astro-typesafe-api-caller.js";
+import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants";
+import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
+
+const uid = Astro.url.searchParams.get("uid");
+let ausweis: VerbrauchsausweisWohnenClient = {} as VerbrauchsausweisWohnenClient;
+let aufnahme: AufnahmeClient = {} as AufnahmeClient;
+let objekt: ObjektClient = {} as ObjektClient;
+let bilder: UploadedGebaeudeBild[] = []
+
+const valid = validateAccessTokenServer(Astro);
+
+const caller = createCaller(Astro);
+
+if (uid) {
+ if (!valid) {
+ return Astro.redirect(
+ `/auth/login?redirect=${Astro.url.toString()}`
+ );
+ }
+
+ try {
+ ausweis = await caller["verbrauchsausweis-wohnen"]._uid.GET.fetch(null, {
+ headers: {
+ authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
+ },
+ params: {
+ uid
+ }
+ });
+
+ aufnahme = await caller.aufnahme._uid.GET.fetch(null, {
+ headers: {
+ authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
+ },
+ params: {
+ uid: ausweis.uid_aufnahme
+ }
+ })
+
+ objekt = await caller.objekt._uid.GET.fetch(null, {
+ headers: {
+ authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
+ },
+ params: {
+ uid: ausweis.uid_objekt
+ }
+ })
+
+ bilder = await caller.objekt._uid.bilder.GET.fetch(null, {
+ headers: {
+ authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
+ },
+ params: {
+ uid: ausweis.uid_objekt
+ }
+ })
+
+ if (!ausweis) {
+ // Der Ausweis scheint nicht zu existieren.
+ // Wir leiten auf die generische Ausweisseite ohne UID weiter.
+ return Astro.redirect(
+ "/energieausweis-erstellen/verbrauchsausweis-wohnen"
+ );
+ }
+ } catch(e) {
+ return Astro.redirect(
+ "/energieausweis-erstellen/verbrauchsausweis-wohnen"
+ );
+ }
+}
+---
+
+
+
+
diff --git a/src/pages/immowelt/verbrauchsausweis-wohngebaeude/produkt-uebersicht.astro b/src/pages/immowelt/verbrauchsausweis-wohngebaeude/produkt-uebersicht.astro
new file mode 100644
index 00000000..a2fe581c
--- /dev/null
+++ b/src/pages/immowelt/verbrauchsausweis-wohngebaeude/produkt-uebersicht.astro
@@ -0,0 +1,13 @@
+---
+import Layout from "#layouts/Layout.astro";
+import ProduktUebersichtVerbrauchsausweisWohnen from "#components/design/content/ProduktUebersichtVerbrauchsausweisWohnen.svelte";
+---
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/style/global.css b/src/style/global.css
index a729af46..c101f536 100644
--- a/src/style/global.css
+++ b/src/style/global.css
@@ -40,9 +40,12 @@
body{
- @apply bg-[url('/images/pattern.png')] bg-repeat bg-fixed max-w-[1920px] mx-auto border-gray-200 border-[1px] min-w-[320px]
+ @apply bg-[#efefef] min-w-[320px]
}
+main{
+ @apply bg-[url('/images/pattern.png')] bg-repeat bg-fixed max-w-[1920px] mx-auto border-gray-200 border-[1px] min-w-[320px]
+}
.button {
@apply w-min h-[38px] px-4 py-2 bg-secondary ring-2 ring-secondary/25 rounded-none xs:rounded-md text-white text-nowrap