Merge pull request #405 from IBCornelsen/main

get main
This commit is contained in:
Jens Cornelsen
2025-02-25 12:37:02 +01:00
committed by GitHub
29 changed files with 455 additions and 54 deletions

View File

@@ -2,6 +2,7 @@
import { PRICES } from "#lib/constants"; import { PRICES } from "#lib/constants";
export let bullets; export let bullets;
export let title; export let title;
export let ref = "";
import { Enums } from "#lib/client/prisma"; import { Enums } from "#lib/client/prisma";
bullets = [ bullets = [
@@ -51,9 +52,9 @@
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center"> <div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center">
<div class="justify-self-start pl-2"></div> <div class="justify-self-start pl-2"></div>
<button class="bestellbutton" type="button">jetzt<br>anfragen</button> <a href="{ref}/angebot-anfragen/bedarfsausweis-gewerbe-anfragen"><button class="bestellbutton" type="button">jetzt<br>anfragen</button></a>
<button class="bestellbutton" type="button">jetzt<br>anfragen</button> <a href="{ref}/angebot-anfragen/bedarfsausweis-gewerbe-anfragen"><button class="bestellbutton" type="button">jetzt<br>anfragen</button></a>
<button class="bestellbutton" type="button">jetzt<br>anfragen</button> <a href="{ref}/angebot-anfragen/bedarfsausweis-gewerbe-anfragen"><button class="bestellbutton" type="button">jetzt<br>anfragen</button></a>
</div> </div>
</div> </div>

View File

@@ -2,7 +2,8 @@
import { PRICES } from "#lib/constants"; import { PRICES } from "#lib/constants";
export let bullets; export let bullets;
export let title; export let title;
import { Enums } from "#lib/client/prisma"; export let ref = "";
import { Enums } from "#lib/client/prisma";
bullets = [ bullets = [
["Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",true, true, true], ["Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",true, true, true],
@@ -51,9 +52,9 @@
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center"> <div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center">
<div class="justify-self-start pl-2"></div> <div class="justify-self-start pl-2"></div>
<button class="bestellbutton" type="button">sofort<br>bestellen</button> <a href="{ref}/energieausweis-erstellen/bedarfsausweis-wohngebaeude/"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<button class="bestellbutton" type="button">sofort<br>bestellen</button> <a href="{ref}/energieausweis-erstellen/bedarfsausweis-wohngebaeude/"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<button class="bestellbutton" type="button">sofort<br>bestellen</button> <a href="{ref}/energieausweis-erstellen/bedarfsausweis-wohngebaeude/"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
</div> </div>
</div> </div>

View File

@@ -3,6 +3,7 @@
import { Enums } from "#lib/client/prisma"; import { Enums } from "#lib/client/prisma";
export let bullets; export let bullets;
export let title; export let title;
export let ref = "";
bullets = [ bullets = [
["Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",true, true, true], ["Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",true, true, true],
@@ -51,9 +52,9 @@
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center"> <div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center">
<div class="justify-self-start pl-2"></div> <div class="justify-self-start pl-2"></div>
<button class="bestellbutton" type="button">sofort<br>bestellen</button> <a href="{ref}/energieausweis-erstellen/verbrauchsausweis-gewerbe/"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<button class="bestellbutton" type="button">sofort<br>bestellen</button> <a href="{ref}/energieausweis-erstellen/verbrauchsausweis-gewerbe/"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<button class="bestellbutton" type="button">sofort<br>bestellen</button> <a href="{ref}/energieausweis-erstellen/verbrauchsausweis-gewerbe/"><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
</div> </div>
</div> </div>

View File

@@ -3,6 +3,8 @@
import { Enums } from "#lib/client/prisma"; import { Enums } from "#lib/client/prisma";
export let bullets; export let bullets;
export let title; export let title;
export let ref = "";
bullets = [ bullets = [
["Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",true, true, true], ["Prüfung durch Dipl.&nbsp;Ing.<br>Registrierung beim DiBt<br>rechtssicher nach&nbsp;GEG",true, true, true],
@@ -51,9 +53,9 @@ bullets = [
<div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center"> <div class="zeile grid grid-cols-subgrid col-span-4 py-4 border-b-[0px] justify-items-center items-center">
<div class="justify-self-start pl-2"></div> <div class="justify-self-start pl-2"></div>
<button class="bestellbutton" type="button">sofort<br>bestellen</button> <a href="{ref}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/" ><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<button class="bestellbutton" type="button">sofort<br>bestellen</button> <a href="{ref}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/" ><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
<button class="bestellbutton" type="button">sofort<br>bestellen</button> <a href="{ref}/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/" ><button class="bestellbutton" type="button">sofort<br>bestellen</button></a>
</div> </div>
</div> </div>

View File

@@ -1,5 +1,11 @@
--- ---
import HeaderLogin from "#components/design/header/HeaderLogin.svelte"; import HeaderLogin from "#components/design/header/HeaderLogin.svelte";
const { tabHover1 } = Astro.props;
const { tabHover2 } = Astro.props;
const { tabHover3 } = Astro.props;
const { tabHover4 } = Astro.props;
const { tabHover5 } = Astro.props;
const { tabHover6 } = Astro.props;
--- ---
<header id="header" class="w-full bg-white h-[81px] sm:pl-8"> <header id="header" class="w-full bg-white h-[81px] sm:pl-8">
@@ -16,9 +22,12 @@ import HeaderLogin from "#components/design/header/HeaderLogin.svelte";
<div> <div>
<ul class="navlist"> <ul class="navlist">
<li><button>Verbrauchsausweis</button></li> <li><a href="/immowelt/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/"><button class={tabHover1}>Verbrauchsausweis</button></a></li>
<li><button>Bedarfssausweis</button></li> <li><a href="/immowelt/energieausweis-erstellen/verbrauchsausweis-gewerbe/"><button class={tabHover2}>Verbrauchsausweis Gewerbe</button></a></li>
<li><button>Verbrauchsausweis Gewerbe</button></li> <li><a href="/immowelt/energieausweis-erstellen/bedarfsausweis-wohngebaeude/"><button class={tabHover3}>Bedarfsausweis</button></a></li>
<li><a href="/immowelt/angebot-anfragen/bedarfsausweis-gewerbe-anfragen/"><button class={tabHover4}>Bedarfsausweis Gewerbe</button></a></li>
<li><a href="/immowelt/angebot-anfragen/geg-nachweis-wohnen-anfragen/"><button class={tabHover5}>GEG Nachweis Wohngebäude</button></a></li>
<li><a href="/immowelt/angebot-anfragen/geg-nachweis-gewerbe-anfragen/"><button class={tabHover6}>GEG Nachweis Gewerbe</button></a></li>
</ul> </ul>
</div> </div>
@@ -57,4 +66,6 @@ background-repeat:no-repeat; background-position:right;">
font-family: "immo Sans"; font-family: "immo Sans";
font-weight:400;} font-weight:400;}
.glow{@apply rounded-[1rem] bg-[rgba(50,50,50,0.1)];}
</style> </style>

View File

@@ -9,9 +9,21 @@ import { NotificationWrapper } from "@ibcornelsen/ui";
export interface Props { export interface Props {
title: string; title: string;
tabHover1: string;
tabHover2: string;
tabHover3: string;
tabHover4: string;
tabHover5: string;
tabHover6: string;
} }
const { title } = Astro.props; const { title } = Astro.props;
const { tabHover1 } = Astro.props;
const { tabHover2 } = Astro.props;
const { tabHover3 } = Astro.props;
const { tabHover4 } = Astro.props;
const { tabHover5 } = Astro.props;
const { tabHover6 } = Astro.props;
--- ---
<script> <script>
window.addEventListener("scroll", (event) => { window.addEventListener("scroll", (event) => {
@@ -79,7 +91,7 @@ window.addEventListener("scroll", (event) => {
<body> <body>
<Header /> <Header {tabHover1} {tabHover2} {tabHover3} {tabHover4} {tabHover5} {tabHover6}/>
<main class="w-full p-0 grid grid-cols-1"> <main class="w-full p-0 grid grid-cols-1">

View File

@@ -274,7 +274,7 @@ title="Angabe zu Keller, Dachgeschoss, Lüftung und Kühlung"
/></Bereich /></Bereich
> >
</div>
<ButtonWeiterHilfe {spaeterWeitermachen} <ButtonWeiterHilfe {spaeterWeitermachen}
bind:ausweis bind:ausweis

View File

@@ -0,0 +1 @@
bedarfsausweis Gewerbe anfragen

View File

@@ -1,7 +1,7 @@
--- ---
import AusweisLayout from "#layouts/AusweisLayoutDaten.astro"; import AusweisLayout from "#layouts/AusweisLayoutDaten.astro";
import { AufnahmeClient, GEGNachweisWohnenClient, ObjektClient, UnterlageClient, UploadedGebaeudeBild } from "#components/Ausweis/types"; import { AufnahmeClient, GEGNachweisWohnenClient, ObjektClient, UnterlageClient, UploadedGebaeudeBild } from "#components/Ausweis/types";
import { createCaller } from "../../astro-typesafe-api-caller.js"; import { createCaller } from "src/astro-typesafe-api-caller";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js"; import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken.js"; import { validateAccessTokenServer } from "#server/lib/validateAccessToken.js";
import GEGNachweisGewerbeModule from "#modules/angebot-anfragen/GEGNachweisGewerbeModule.svelte"; import GEGNachweisGewerbeModule from "#modules/angebot-anfragen/GEGNachweisGewerbeModule.svelte";

View File

@@ -0,0 +1,13 @@
---
import Layout from "#layouts/Layout.astro";
import ProduktUebersichtGEGNachweisGewerbe from "#components/design/content/ProduktUebersichtGEGNachweisGewerbe.svelte";
---
<Layout title="Bedarfsausweis Produktübersicht">
<ProduktUebersichtGEGNachweisGewerbe>
</ProduktUebersichtGEGNachweisGewerbe>
</Layout>

View File

@@ -1,7 +1,7 @@
--- ---
import AusweisLayout from "#layouts/AusweisLayoutDaten.astro"; import AusweisLayout from "#layouts/AusweisLayoutDaten.astro";
import { AufnahmeClient, GEGNachweisWohnenClient, ObjektClient, UnterlageClient, UploadedGebaeudeBild } from "#components/Ausweis/types"; import { AufnahmeClient, GEGNachweisWohnenClient, ObjektClient, UnterlageClient, UploadedGebaeudeBild } from "#components/Ausweis/types";
import { createCaller } from "../../astro-typesafe-api-caller.js"; import { createCaller } from "src/astro-typesafe-api-caller";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js"; import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken.js"; import { validateAccessTokenServer } from "#server/lib/validateAccessToken.js";
import GEGNachweisWohnenModule from "#modules/angebot-anfragen/GEGNachweisWohnenModule.svelte"; import GEGNachweisWohnenModule from "#modules/angebot-anfragen/GEGNachweisWohnenModule.svelte";

View File

@@ -0,0 +1,13 @@
---
import Layout from "#layouts/Layout.astro";
import ProduktUebersichtGEGNachweisWohnen from "#components/design/content/ProduktUebersichtGEGNachweisWohnen.svelte";
---
<Layout title="Bedarfsausweis Produktübersicht">
<ProduktUebersichtGEGNachweisWohnen>
</ProduktUebersichtGEGNachweisWohnen>
</Layout>

View File

@@ -1,7 +1,7 @@
--- ---
import AusweisLayout from "#layouts/AusweisLayoutDaten.astro"; import AusweisLayout from "#layouts/AusweisLayoutDaten.astro";
import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisGewerbeClient } from "#components/Ausweis/types"; import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisGewerbeClient } from "#components/Ausweis/types";
import { createCaller } from "../../../astro-typesafe-api-caller.js"; import { createCaller } from "src/astro-typesafe-api-caller";
import { inferOutput } from "astro-typesafe-api/client"; import { inferOutput } from "astro-typesafe-api/client";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants"; import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken"; import { validateAccessTokenServer } from "#server/lib/validateAccessToken";

View File

@@ -2,7 +2,7 @@
import AusweisLayout from "#layouts/AusweisLayoutDaten.astro"; import AusweisLayout from "#layouts/AusweisLayoutDaten.astro";
import VerbrauchsausweisWohnenModule from "#modules/VerbrauchsausweisWohnen/VerbrauchsausweisWohnenModule.svelte"; import VerbrauchsausweisWohnenModule from "#modules/VerbrauchsausweisWohnen/VerbrauchsausweisWohnenModule.svelte";
import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types"; import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types";
import { createCaller } from "../../../astro-typesafe-api-caller.js"; import { createCaller } from "src/astro-typesafe-api-caller";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants"; import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken"; import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
import { Enums } from "#lib/server/prisma"; import { Enums } from "#lib/server/prisma";

View File

@@ -0,0 +1,90 @@
---
import AusweisLayout from "#layouts/AusweisLayoutDaten_immowelt.astro";
import { AufnahmeClient, GEGNachweisWohnenClient, ObjektClient, UnterlageClient, UploadedGebaeudeBild } from "#components/Ausweis/types";
import { createCaller } from "src/astro-typesafe-api-caller";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken.js";
import GEGNachweisGewerbeModule from "#modules/angebot-anfragen/GEGNachweisGewerbeModule.svelte";
const uid = Astro.url.searchParams.get("uid");
let nachweis: GEGNachweisWohnenClient = {} as GEGNachweisWohnenClient;
let aufnahme: AufnahmeClient = {} as AufnahmeClient;
let objekt: ObjektClient = {} as ObjektClient;
let bilder: UploadedGebaeudeBild[] = []
let unterlagen: UnterlageClient[] = []
const valid = validateAccessTokenServer(Astro);
const caller = createCaller(Astro);
if (uid) {
if (!valid) {
return Astro.redirect(
`/auth/login?redirect=${Astro.url.toString()}`
);
}
try {
nachweis = await caller["geg-nachweis-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: nachweis.uid_aufnahme
}
})
objekt = await caller.objekt._uid.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: nachweis.uid_objekt
}
})
bilder = await caller.aufnahme._uid.bilder.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: nachweis.uid_aufnahme
}
})
unterlagen = await caller.aufnahme._uid.unterlagen.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: nachweis.uid_aufnahme
}
})
if (!nachweis) {
// Der Ausweis scheint nicht zu existieren.
// Wir leiten auf die generische Ausweisseite ohne UID weiter.
return Astro.redirect(
"/angebot-anfragen/geg-nachweis-wohnen-anfragen"
);
}
} catch(e) {
return Astro.redirect(
"/angebot-anfragen/geg-nachweis-wohnen-anfragen"
);
}
}
---
<AusweisLayout title="Bedarfsausweis Gewerbe anfragen" tabHover4="glow">
Bedarfsausweis Gewerbe anfragen
</AusweisLayout>

View File

@@ -0,0 +1,13 @@
---
import Layout from "#layouts/AusweisLayoutDaten_immowelt.astro";
import ProduktUebersichtBedarfsausweisGewerbe from "#components/design/content/ProduktUebersichtBedarfsausweisGewerbe.svelte";
---
<Layout title="Bedarfsausweis Produktübersicht">
<div class="mx-auto my-8" style="width:85%">
<ProduktUebersichtBedarfsausweisGewerbe ref="/immowelt"></ProduktUebersichtBedarfsausweisGewerbe>
</div>
</Layout>

View File

@@ -0,0 +1,90 @@
---
import AusweisLayout from "#layouts/AusweisLayoutDaten_immowelt.astro";
import { AufnahmeClient, GEGNachweisWohnenClient, ObjektClient, UnterlageClient, UploadedGebaeudeBild } from "#components/Ausweis/types";
import { createCaller } from "src/astro-typesafe-api-caller";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken.js";
import GEGNachweisGewerbeModule from "#modules/angebot-anfragen/GEGNachweisGewerbeModule.svelte";
const uid = Astro.url.searchParams.get("uid");
let nachweis: GEGNachweisWohnenClient = {} as GEGNachweisWohnenClient;
let aufnahme: AufnahmeClient = {} as AufnahmeClient;
let objekt: ObjektClient = {} as ObjektClient;
let bilder: UploadedGebaeudeBild[] = []
let unterlagen: UnterlageClient[] = []
const valid = validateAccessTokenServer(Astro);
const caller = createCaller(Astro);
if (uid) {
if (!valid) {
return Astro.redirect(
`/auth/login?redirect=${Astro.url.toString()}`
);
}
try {
nachweis = await caller["geg-nachweis-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: nachweis.uid_aufnahme
}
})
objekt = await caller.objekt._uid.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: nachweis.uid_objekt
}
})
bilder = await caller.aufnahme._uid.bilder.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: nachweis.uid_aufnahme
}
})
unterlagen = await caller.aufnahme._uid.unterlagen.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: nachweis.uid_aufnahme
}
})
if (!nachweis) {
// Der Ausweis scheint nicht zu existieren.
// Wir leiten auf die generische Ausweisseite ohne UID weiter.
return Astro.redirect(
"/angebot-anfragen/geg-nachweis-wohnen-anfragen"
);
}
} catch(e) {
return Astro.redirect(
"/angebot-anfragen/geg-nachweis-wohnen-anfragen"
);
}
}
---
<AusweisLayout title="GEG Nachweis Wohnen anfragen" tabHover6="glow">
<GEGNachweisGewerbeModule client:only {nachweis} {objekt} {aufnahme} {bilder} {unterlagen} />
</AusweisLayout>

View File

@@ -0,0 +1,13 @@
---
import Layout from "#layouts/Layout.astro";
import ProduktUebersichtGEGNachweisGewerbe from "#components/design/content/ProduktUebersichtGEGNachweisGewerbe.svelte";
---
<Layout title="Bedarfsausweis Produktübersicht">
<ProduktUebersichtGEGNachweisGewerbe>
</ProduktUebersichtGEGNachweisGewerbe>
</Layout>

View File

@@ -0,0 +1,90 @@
---
import AusweisLayout from "#layouts/AusweisLayoutDaten_immowelt.astro";
import { AufnahmeClient, GEGNachweisWohnenClient, ObjektClient, UnterlageClient, UploadedGebaeudeBild } from "#components/Ausweis/types";
import { createCaller } from "src/astro-typesafe-api-caller";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken.js";
import GEGNachweisWohnenModule from "#modules/angebot-anfragen/GEGNachweisWohnenModule.svelte";
const uid = Astro.url.searchParams.get("uid");
let nachweis: GEGNachweisWohnenClient = {} as GEGNachweisWohnenClient;
let aufnahme: AufnahmeClient = {} as AufnahmeClient;
let objekt: ObjektClient = {} as ObjektClient;
let bilder: UploadedGebaeudeBild[] = []
let unterlagen: UnterlageClient[] = []
const valid = validateAccessTokenServer(Astro);
const caller = createCaller(Astro);
if (uid) {
if (!valid) {
return Astro.redirect(
`/auth/login?redirect=${Astro.url.toString()}`
);
}
try {
nachweis = await caller["geg-nachweis-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: nachweis.uid_aufnahme
}
})
objekt = await caller.objekt._uid.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: nachweis.uid_objekt
}
})
bilder = await caller.aufnahme._uid.bilder.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: nachweis.uid_aufnahme
}
})
unterlagen = await caller.aufnahme._uid.unterlagen.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: nachweis.uid_aufnahme
}
})
if (!nachweis) {
// Der Ausweis scheint nicht zu existieren.
// Wir leiten auf die generische Ausweisseite ohne UID weiter.
return Astro.redirect(
"/angebot-anfragen/geg-nachweis-wohnen-anfragen"
);
}
} catch(e) {
return Astro.redirect(
"/angebot-anfragen/geg-nachweis-wohnen-anfragen"
);
}
}
---
<AusweisLayout title="GEG Nachweis Wohnen anfragen" tabHover5="glow">
<GEGNachweisWohnenModule client:only {nachweis} {objekt} {aufnahme} {bilder} {unterlagen} />
</AusweisLayout>

View File

@@ -0,0 +1,13 @@
---
import Layout from "#layouts/Layout.astro";
import ProduktUebersichtGEGNachweisWohnen from "#components/design/content/ProduktUebersichtGEGNachweisWohnen.svelte";
---
<Layout title="Bedarfsausweis Produktübersicht">
<ProduktUebersichtGEGNachweisWohnen>
</ProduktUebersichtGEGNachweisWohnen>
</Layout>

View File

@@ -1,8 +1,9 @@
--- ---
import AusweisLayoutImmowelt from "#layouts/AusweisLayoutDatenImmowelt.astro";
import VerbrauchsausweisWohnenModule from "#modules/VerbrauchsausweisWohnen/VerbrauchsausweisWohnenModule.svelte"; import AusweisLayout from "#layouts/AusweisLayoutDaten_immowelt.astro";
import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types"; import BedarfsausweisWohnenModule from "#modules/BedarfsausweisWohnen/BedarfsausweisWohnenModule.svelte";
import { createCaller } from "../../astro-typesafe-api-caller.js"; import { AufnahmeClient, BedarfsausweisWohnenClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types";
import { createCaller } from "src/astro-typesafe-api-caller";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants"; import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken"; import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
@@ -24,7 +25,7 @@ if (uid) {
} }
try { try {
ausweis = await caller["verbrauchsausweis-wohnen"]._uid.GET.fetch(null, { ausweis = await caller["bedarfsausweis-wohnen"]._uid.GET.fetch(null, {
headers: { headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}` authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
}, },
@@ -64,17 +65,18 @@ if (uid) {
// Der Ausweis scheint nicht zu existieren. // Der Ausweis scheint nicht zu existieren.
// Wir leiten auf die generische Ausweisseite ohne UID weiter. // Wir leiten auf die generische Ausweisseite ohne UID weiter.
return Astro.redirect( return Astro.redirect(
"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude" "/energieausweis-erstellen/bedarfsausweis-wohnen"
); );
} }
} catch(e) { } catch(e) {
return Astro.redirect( return Astro.redirect(
"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude" "/energieausweis-erstellen/bedarfsausweis-wohnen"
); );
} }
} }
---
<AusweisLayoutImmowelt title="Verbrauchsausweis erstellen">
<VerbrauchsausweisWohnenModule client:load {ausweis} {objekt} {aufnahme} {bilder} /> ---
</AusweisLayoutImmowelt> <AusweisLayout title="Bedarfsausweis erstellen | IBCornelsen" tabHover3="glow">
<BedarfsausweisWohnenModule client:load {ausweis} {objekt} {aufnahme} {bilder}></BedarfsausweisWohnenModule>
</AusweisLayout>

View File

@@ -0,0 +1,13 @@
---
import Layout from "#layouts/AusweisLayoutDaten_immowelt.astro";
import ProduktUebersichtBedarfsausweisWohnen from "#components/design/content/ProduktUebersichtBedarfsausweisWohnen.svelte";
---
<Layout title="Bedarfsausweis Produktübersicht">
<div class="mx-auto my-8" style="width:85%">
<ProduktUebersichtBedarfsausweisWohnen ref="/immowelt"></ProduktUebersichtBedarfsausweisWohnen>
</div>
</Layout>

View File

@@ -1,13 +1,14 @@
--- ---
import AusweisLayoutImmowelt from "#layouts/AusweisLayoutDatenImmowelt2.astro"; import AusweisLayout from "#layouts/AusweisLayoutDaten_immowelt.astro";
import VerbrauchsausweisWohnenModule from "#modules/VerbrauchsausweisWohnen/VerbrauchsausweisWohnenModule.svelte"; import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisGewerbeClient } from "#components/Ausweis/types";
import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types"; import { createCaller } from "src/astro-typesafe-api-caller";
import { createCaller } from "../../../astro-typesafe-api-caller.js"; import { inferOutput } from "astro-typesafe-api/client";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants"; import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken"; import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
import VerbrauchsausweisGewerbeModule from "#modules/VerbrauchsausweisGewerbe/VerbrauchsausweisGewerbeModule.svelte";
const uid = Astro.url.searchParams.get("uid"); const uid = Astro.url.searchParams.get("uid");
let ausweis: VerbrauchsausweisWohnenClient = {} as VerbrauchsausweisWohnenClient; let ausweis: VerbrauchsausweisGewerbeClient = {} as VerbrauchsausweisGewerbeClient;
let aufnahme: AufnahmeClient = {} as AufnahmeClient; let aufnahme: AufnahmeClient = {} as AufnahmeClient;
let objekt: ObjektClient = {} as ObjektClient; let objekt: ObjektClient = {} as ObjektClient;
let bilder: UploadedGebaeudeBild[] = [] let bilder: UploadedGebaeudeBild[] = []
@@ -24,7 +25,7 @@ if (uid) {
} }
try { try {
ausweis = await caller["verbrauchsausweis-wohnen"]._uid.GET.fetch(null, { let { uid_aufnahme, uid_objekt, uid_benutzer, ...result } = await caller["verbrauchsausweis-gewerbe"]._uid.GET.fetch(null, {
headers: { headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}` authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
}, },
@@ -33,12 +34,14 @@ if (uid) {
} }
}); });
ausweis = result
aufnahme = await caller.aufnahme._uid.GET.fetch(null, { aufnahme = await caller.aufnahme._uid.GET.fetch(null, {
headers: { headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}` authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
}, },
params: { params: {
uid: ausweis.uid_aufnahme uid: uid_aufnahme
} }
}) })
@@ -47,7 +50,7 @@ if (uid) {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}` authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
}, },
params: { params: {
uid: ausweis.uid_objekt uid: uid_objekt
} }
}) })
@@ -56,7 +59,7 @@ if (uid) {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}` authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
}, },
params: { params: {
uid: ausweis.uid_aufnahme uid: uid_aufnahme
} }
}) })
@@ -64,17 +67,17 @@ if (uid) {
// Der Ausweis scheint nicht zu existieren. // Der Ausweis scheint nicht zu existieren.
// Wir leiten auf die generische Ausweisseite ohne UID weiter. // Wir leiten auf die generische Ausweisseite ohne UID weiter.
return Astro.redirect( return Astro.redirect(
"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude" "/energieausweis-erstellen/verbrauchsausweis-gewerbe"
); );
} }
} catch(e) { } catch(e) {
return Astro.redirect( return Astro.redirect(
"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude" "/energieausweis-erstellen/verbrauchsausweis-gewerbe"
); );
} }
} }
--- ---
<AusweisLayoutImmowelt title="Verbrauchsausweis erstellen"> <AusweisLayout title="Verbrauchsausweis Gewerbe erstellen | IBCornelsen" tabHover2="glow">
<VerbrauchsausweisWohnenModule client:load {ausweis} {objekt} {aufnahme} {bilder} /> <VerbrauchsausweisGewerbeModule client:only {ausweis} {objekt} {aufnahme} {bilder} />
</AusweisLayoutImmowelt> </AusweisLayout>

View File

@@ -0,0 +1,14 @@
---
import Layout from "#layouts/AusweisLayoutDaten_immowelt.astro";
import ProduktUebersichtVerbrauchsausweisGewerbe from "#components/design/content/ProduktUebersichtVerbrauchsausweisGewerbe.svelte";
---
<Layout title="Verbrauchsausweis Produktübersicht">
<div class="mx-auto my-8" style="width:85%">
<ProduktUebersichtVerbrauchsausweisGewerbe ref="/immowelt">
</ProduktUebersichtVerbrauchsausweisGewerbe>
</div>
</Layout>

View File

@@ -2,11 +2,15 @@
import AusweisLayout from "#layouts/AusweisLayoutDaten_immowelt.astro"; import AusweisLayout from "#layouts/AusweisLayoutDaten_immowelt.astro";
import VerbrauchsausweisWohnenModule from "#modules/VerbrauchsausweisWohnen/VerbrauchsausweisWohnenModule.svelte"; import VerbrauchsausweisWohnenModule from "#modules/VerbrauchsausweisWohnen/VerbrauchsausweisWohnenModule.svelte";
import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types"; import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types";
import { createCaller } from "../../../astro-typesafe-api-caller.js"; import { createCaller } from "src/astro-typesafe-api-caller";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants"; import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken"; import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
import { Enums } from "#lib/server/prisma";
const uid = Astro.url.searchParams.get("uid"); const uid = Astro.url.searchParams.get("uid");
const ausweistyp = Astro.url.searchParams.get("ausweistyp") || Enums.AusweisTyp.Standard;
let ausweis: VerbrauchsausweisWohnenClient = {} as VerbrauchsausweisWohnenClient; let ausweis: VerbrauchsausweisWohnenClient = {} as VerbrauchsausweisWohnenClient;
let aufnahme: AufnahmeClient = {} as AufnahmeClient; let aufnahme: AufnahmeClient = {} as AufnahmeClient;
let objekt: ObjektClient = {} as ObjektClient; let objekt: ObjektClient = {} as ObjektClient;
@@ -73,8 +77,9 @@ if (uid) {
); );
} }
} }
--- ---
<AusweisLayout title="Verbrauchsausweis erstellen"> <AusweisLayout title="Verbrauchsausweis erstellen" tabHover1="glow">
<VerbrauchsausweisWohnenModule client:load {ausweis} {objekt} {aufnahme} {bilder} /> <VerbrauchsausweisWohnenModule client:only {ausweis} {objekt} {aufnahme} {bilder} {ausweistyp} />
</AusweisLayout> </AusweisLayout>

View File

@@ -1,13 +1,13 @@
--- ---
import Layout from "#layouts/Layout.astro"; import Layout from "#layouts/AusweisLayoutDaten_immowelt.astro";
import ProduktUebersichtVerbrauchsausweisWohnen from "#components/design/content/ProduktUebersichtVerbrauchsausweisWohnen.svelte"; import ProduktUebersichtVerbrauchsausweisWohnen from "#components/design/content/ProduktUebersichtVerbrauchsausweisWohnen.svelte";
--- ---
<Layout title="Verbrauchsausweis Produktübersicht"> <Layout title="Verbrauchsausweis Produktübersicht">
<ProduktUebersichtVerbrauchsausweisWohnen> <div class="mx-auto my-8" style="width:85%">
<ProduktUebersichtVerbrauchsausweisWohnen ref="/immowelt">
</ProduktUebersichtVerbrauchsausweisWohnen> </ProduktUebersichtVerbrauchsausweisWohnen>
</div>
</Layout> </Layout>