From 753072c0745a0ccc5c87ee09fc3535f75bdf3e22 Mon Sep 17 00:00:00 2001
From: Jens Cornelsen <79703163+IB-Cornelsen@users.noreply.github.com>
Date: Fri, 7 Feb 2025 17:15:47 +0100
Subject: [PATCH 1/2] Formularseiten Immowelt
---
public/images/header/logo_immowelt.svg | 7 +
src/astro-typesafe-api-caller.ts | 2 +-
.../design/header/AusweisHeaderImmowelt.astro | 86 ++++++++++
.../header/AusweisHeaderImmowelt2.astro | 86 ++++++++++
src/layouts/AusweisLayoutDatenImmowelt.astro | 156 ++++++++++++++++++
src/layouts/AusweisLayoutDatenImmowelt2.astro | 156 ++++++++++++++++++
src/pages/immowelt/index.astro | 80 +++++++++
.../verbrauchsausweis-erstellen/index.astro | 80 +++++++++
tailwind.config.cjs | 2 +
9 files changed, 654 insertions(+), 1 deletion(-)
create mode 100644 public/images/header/logo_immowelt.svg
create mode 100644 src/components/design/header/AusweisHeaderImmowelt.astro
create mode 100644 src/components/design/header/AusweisHeaderImmowelt2.astro
create mode 100644 src/layouts/AusweisLayoutDatenImmowelt.astro
create mode 100644 src/layouts/AusweisLayoutDatenImmowelt2.astro
create mode 100644 src/pages/immowelt/index.astro
create mode 100644 src/pages/immowelt/verbrauchsausweis-erstellen/index.astro
diff --git a/public/images/header/logo_immowelt.svg b/public/images/header/logo_immowelt.svg
new file mode 100644
index 00000000..7937a005
--- /dev/null
+++ b/public/images/header/logo_immowelt.svg
@@ -0,0 +1,7 @@
+
diff --git a/src/astro-typesafe-api-caller.ts b/src/astro-typesafe-api-caller.ts
index c12f37e9..d0eba2c3 100644
--- a/src/astro-typesafe-api-caller.ts
+++ b/src/astro-typesafe-api-caller.ts
@@ -5,10 +5,10 @@ export const createCaller = createCallerFactory({
"postleitzahlen": await import("../src/pages/api/postleitzahlen.ts"),
"aufnahme/[uid]": await import("../src/pages/api/aufnahme/[uid].ts"),
"aufnahme": await import("../src/pages/api/aufnahme/index.ts"),
- "bedarfsausweis-wohnen": await import("../src/pages/api/bedarfsausweis-wohnen/index.ts"),
"auth/access-token": await import("../src/pages/api/auth/access-token.ts"),
"auth/forgot-password": await import("../src/pages/api/auth/forgot-password.ts"),
"auth/refresh-token": await import("../src/pages/api/auth/refresh-token.ts"),
+ "bedarfsausweis-wohnen": await import("../src/pages/api/bedarfsausweis-wohnen/index.ts"),
"bilder/[uid]": await import("../src/pages/api/bilder/[uid].ts"),
"objekt": await import("../src/pages/api/objekt/index.ts"),
"rechnung": await import("../src/pages/api/rechnung/index.ts"),
diff --git a/src/components/design/header/AusweisHeaderImmowelt.astro b/src/components/design/header/AusweisHeaderImmowelt.astro
new file mode 100644
index 00000000..190b0b74
--- /dev/null
+++ b/src/components/design/header/AusweisHeaderImmowelt.astro
@@ -0,0 +1,86 @@
+---
+import HeaderLogin from "#components/design/header/HeaderLogin.svelte";
+---
+
+
+
+
\ No newline at end of file
diff --git a/src/components/design/header/AusweisHeaderImmowelt2.astro b/src/components/design/header/AusweisHeaderImmowelt2.astro
new file mode 100644
index 00000000..5fe4051b
--- /dev/null
+++ b/src/components/design/header/AusweisHeaderImmowelt2.astro
@@ -0,0 +1,86 @@
+---
+import HeaderLogin from "#components/design/header/HeaderLogin.svelte";
+---
+
+
+
+
\ No newline at end of file
diff --git a/src/layouts/AusweisLayoutDatenImmowelt.astro b/src/layouts/AusweisLayoutDatenImmowelt.astro
new file mode 100644
index 00000000..95fd7914
--- /dev/null
+++ b/src/layouts/AusweisLayoutDatenImmowelt.astro
@@ -0,0 +1,156 @@
+---
+import "../style/global.css";
+import "../style/formular.css";
+import "../../svelte-dialogs.config"
+import Header from "#components/design/header/AusweisHeaderImmowelt.astro";
+import Footer from "#components/design/footer/Footer.astro";
+import { NotificationWrapper } from "@ibcornelsen/ui";
+
+export interface Props {
+ title: string;
+}
+
+const { title } = Astro.props;
+---
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {title || 'Energieausweis online erstellen - Online Energieausweis'}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layouts/AusweisLayoutDatenImmowelt2.astro b/src/layouts/AusweisLayoutDatenImmowelt2.astro
new file mode 100644
index 00000000..f0ff2f32
--- /dev/null
+++ b/src/layouts/AusweisLayoutDatenImmowelt2.astro
@@ -0,0 +1,156 @@
+---
+import "../style/global.css";
+import "../style/formular.css";
+import "../../svelte-dialogs.config"
+import Header from "#components/design/header/AusweisHeaderImmowelt2.astro";
+import Footer from "#components/design/footer/Footer.astro";
+import { NotificationWrapper } from "@ibcornelsen/ui";
+
+export interface Props {
+ title: string;
+}
+
+const { title } = Astro.props;
+---
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {title || 'Energieausweis online erstellen - Online Energieausweis'}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/immowelt/index.astro b/src/pages/immowelt/index.astro
new file mode 100644
index 00000000..ab4a77c8
--- /dev/null
+++ b/src/pages/immowelt/index.astro
@@ -0,0 +1,80 @@
+---
+import AusweisLayoutImmowelt from "#layouts/AusweisLayoutDatenImmowelt.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-erstellen/index.astro b/src/pages/immowelt/verbrauchsausweis-erstellen/index.astro
new file mode 100644
index 00000000..1a511715
--- /dev/null
+++ b/src/pages/immowelt/verbrauchsausweis-erstellen/index.astro
@@ -0,0 +1,80 @@
+---
+import AusweisLayoutImmowelt from "#layouts/AusweisLayoutDatenImmowelt2.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/tailwind.config.cjs b/tailwind.config.cjs
index 74045ef5..e5c941f0 100644
--- a/tailwind.config.cjs
+++ b/tailwind.config.cjs
@@ -51,6 +51,8 @@ module.exports = {
"pdf-yellow-bright": "#f3cb00",
"pdf-yellow-light": "#fff6ca",
+ "immowelt-gelb": "#ffcc00ff",
+
},
boxShadow: {
'box': '3px 3px 6px rgba(0, 0, 0, 0.1)',
From 4daaedaacafc6e67e19540d8cd553ed9698211b5 Mon Sep 17 00:00:00 2001
From: Jens Cornelsen <79703163+IB-Cornelsen@users.noreply.github.com>
Date: Sun, 9 Feb 2025 15:14:56 +0100
Subject: [PATCH 2/2] =?UTF-8?q?Berechnung=20A14=20Teil=201=20fertig,=20Int?=
=?UTF-8?q?erpolationen=20erstellt,=20aufger=C3=A4umt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/astro-typesafe-api-caller.ts | 2 +-
.../A14AufwandszahlenMittlereBelastung.svelte | 23 +-
.../A12BerechnungNutzenergiebedarfHeizung.ts | 30 +-
...rechnungAufwandszahlenMittlereBelastung.ts | 153 +-
...rechnungWaermequellenSolareEinstrahlung.ts | 4 +-
...ngWaermequellenAusAnlagentechnikHeizung.ts | 8 +-
...echnungNutzenergiebedarfTrinkwarmwasser.ts | 8 +-
.../datasetKorrekturfaktorVerteilungT32.ts | 1682 +++++++++++++++++
...andszahlErzeugungHeizungHilfsenergieT83.ts | 35 +
...funktionAufwandszahlErzeugungHeizungT77.ts | 34 +
...hlErzeugungHeizungUmlaufWasserheizerT82.ts | 18 +
.../funktionAusnutzungsgrad.ts | 156 --
.../funktionAusnutzungsgradT18.ts | 29 +
... => funktionBilanzInnentemperaturT8T10.ts} | 2 +-
.../funktionDoppelteInterpolation.ts | 35 +
...n.ts => funktionInterneWaermequellenA8.ts} | 2 +-
...tionKorrekturfaktorMittlereBelastungT32.ts | 35 +
...funktionMonatlicherBelastungsgradT9T11.ts} | 6 +-
...NennleistungWaermeerzeugerWarmwasserA14.ts | 74 +
...> funktionSolareBestrahlungsEnergieT17.ts} | 4 +-
...senken.ts => funktionWaermesenkenA8A12.ts} | 54 +-
21 files changed, 2122 insertions(+), 272 deletions(-)
create mode 100644 src/lib/Berechnungen/BedarfsausweisWohnen/datasetKorrekturfaktorVerteilungT32.ts
create mode 100644 src/lib/Berechnungen/BedarfsausweisWohnen/funktionAufwandszahlErzeugungHeizungHilfsenergieT83.ts
create mode 100644 src/lib/Berechnungen/BedarfsausweisWohnen/funktionAufwandszahlErzeugungHeizungT77.ts
create mode 100644 src/lib/Berechnungen/BedarfsausweisWohnen/funktionAufwandszahlErzeugungHeizungUmlaufWasserheizerT82.ts
delete mode 100644 src/lib/Berechnungen/BedarfsausweisWohnen/funktionAusnutzungsgrad.ts
create mode 100644 src/lib/Berechnungen/BedarfsausweisWohnen/funktionAusnutzungsgradT18.ts
rename src/lib/Berechnungen/BedarfsausweisWohnen/{funktionBilanzInnentemperatur.ts => funktionBilanzInnentemperaturT8T10.ts} (98%)
create mode 100644 src/lib/Berechnungen/BedarfsausweisWohnen/funktionDoppelteInterpolation.ts
rename src/lib/Berechnungen/BedarfsausweisWohnen/{funktionInterneWaermequellen.ts => funktionInterneWaermequellenA8.ts} (96%)
create mode 100644 src/lib/Berechnungen/BedarfsausweisWohnen/funktionKorrekturfaktorMittlereBelastungT32.ts
rename src/lib/Berechnungen/BedarfsausweisWohnen/{funktionMonatlicherBelastungsgrad.ts => funktionMonatlicherBelastungsgradT9T11.ts} (97%)
create mode 100644 src/lib/Berechnungen/BedarfsausweisWohnen/funktionNennleistungWaermeerzeugerWarmwasserA14.ts
rename src/lib/Berechnungen/BedarfsausweisWohnen/{funktionSolareBestrahlungsEnergie.ts => funktionSolareBestrahlungsEnergieT17.ts} (98%)
rename src/lib/Berechnungen/BedarfsausweisWohnen/{funktionWaermesenken.ts => funktionWaermesenkenA8A12.ts} (74%)
diff --git a/src/astro-typesafe-api-caller.ts b/src/astro-typesafe-api-caller.ts
index d0eba2c3..18a0982c 100644
--- a/src/astro-typesafe-api-caller.ts
+++ b/src/astro-typesafe-api-caller.ts
@@ -8,8 +8,8 @@ export const createCaller = createCallerFactory({
"auth/access-token": await import("../src/pages/api/auth/access-token.ts"),
"auth/forgot-password": await import("../src/pages/api/auth/forgot-password.ts"),
"auth/refresh-token": await import("../src/pages/api/auth/refresh-token.ts"),
- "bedarfsausweis-wohnen": await import("../src/pages/api/bedarfsausweis-wohnen/index.ts"),
"bilder/[uid]": await import("../src/pages/api/bilder/[uid].ts"),
+ "bedarfsausweis-wohnen": await import("../src/pages/api/bedarfsausweis-wohnen/index.ts"),
"objekt": await import("../src/pages/api/objekt/index.ts"),
"rechnung": await import("../src/pages/api/rechnung/index.ts"),
"ticket": await import("../src/pages/api/ticket/index.ts"),
diff --git a/src/components/Tabellen/A14AufwandszahlenMittlereBelastung.svelte b/src/components/Tabellen/A14AufwandszahlenMittlereBelastung.svelte
index ad8ac837..aa980041 100644
--- a/src/components/Tabellen/A14AufwandszahlenMittlereBelastung.svelte
+++ b/src/components/Tabellen/A14AufwandszahlenMittlereBelastung.svelte
@@ -1,5 +1,7 @@