immowelt
This commit is contained in:
@@ -14,11 +14,11 @@ export const createCaller = createCallerFactory({
|
||||
"admin/stornieren": await import("../src/pages/api/admin/stornieren.ts"),
|
||||
"aufnahme": await import("../src/pages/api/aufnahme/index.ts"),
|
||||
"ausweise": await import("../src/pages/api/ausweise/index.ts"),
|
||||
"bedarfsausweis-wohnen/[uid]": await import("../src/pages/api/bedarfsausweis-wohnen/[uid].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/[uid]": await import("../src/pages/api/bedarfsausweis-wohnen/[uid].ts"),
|
||||
"bedarfsausweis-wohnen": await import("../src/pages/api/bedarfsausweis-wohnen/index.ts"),
|
||||
"bilder/[uid]": await import("../src/pages/api/bilder/[uid].ts"),
|
||||
"geg-nachweis-gewerbe/[uid]": await import("../src/pages/api/geg-nachweis-gewerbe/[uid].ts"),
|
||||
"geg-nachweis-gewerbe": await import("../src/pages/api/geg-nachweis-gewerbe/index.ts"),
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
---
|
||||
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">
|
||||
@@ -16,9 +22,12 @@ import HeaderLogin from "#components/design/header/HeaderLogin.svelte";
|
||||
<div>
|
||||
|
||||
<ul class="navlist">
|
||||
<li><button>Verbrauchsausweis</button></li>
|
||||
<li><button>Bedarfssausweis</button></li>
|
||||
<li><button>Verbrauchsausweis Gewerbe</button></li>
|
||||
<li><a href="/immowelt/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/"><button class={tabHover1}>Verbrauchsausweis</button></a></li>
|
||||
<li><a href="/immowelt/energieausweis-erstellen/verbrauchsausweis-gewerbe/"><button class={tabHover2}>Verbrauchsausweis Gewerbe</button></a></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>
|
||||
|
||||
</div>
|
||||
@@ -57,4 +66,6 @@ background-repeat:no-repeat; background-position:right;">
|
||||
font-family: "immo Sans";
|
||||
font-weight:400;}
|
||||
|
||||
.glow{@apply rounded-[1rem] bg-[rgba(50,50,50,0.1)];}
|
||||
|
||||
</style>
|
||||
@@ -9,9 +9,21 @@ import { NotificationWrapper } from "@ibcornelsen/ui";
|
||||
|
||||
export interface Props {
|
||||
title: string;
|
||||
tabHover1: string;
|
||||
tabHover2: string;
|
||||
tabHover3: string;
|
||||
tabHover4: string;
|
||||
tabHover5: string;
|
||||
tabHover6: string;
|
||||
}
|
||||
|
||||
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>
|
||||
window.addEventListener("scroll", (event) => {
|
||||
@@ -79,7 +91,7 @@ window.addEventListener("scroll", (event) => {
|
||||
|
||||
<body>
|
||||
|
||||
<Header />
|
||||
<Header {tabHover1} {tabHover2} {tabHover3}/>
|
||||
|
||||
<main class="w-full p-0 grid grid-cols-1">
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -1,8 +1,9 @@
|
||||
---
|
||||
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 AusweisLayout from "#layouts/AusweisLayoutDaten_immowelt.astro";
|
||||
import BedarfsausweisWohnenModule from "#modules/BedarfsausweisWohnen/BedarfsausweisWohnenModule.svelte";
|
||||
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 { validateAccessTokenServer } from "#server/lib/validateAccessToken";
|
||||
|
||||
@@ -24,7 +25,7 @@ if (uid) {
|
||||
}
|
||||
|
||||
try {
|
||||
ausweis = await caller["verbrauchsausweis-wohnen"]._uid.GET.fetch(null, {
|
||||
ausweis = await caller["bedarfsausweis-wohnen"]._uid.GET.fetch(null, {
|
||||
headers: {
|
||||
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
|
||||
},
|
||||
@@ -64,17 +65,18 @@ if (uid) {
|
||||
// Der Ausweis scheint nicht zu existieren.
|
||||
// Wir leiten auf die generische Ausweisseite ohne UID weiter.
|
||||
return Astro.redirect(
|
||||
"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude"
|
||||
"/energieausweis-erstellen/bedarfsausweis-wohnen"
|
||||
);
|
||||
}
|
||||
} catch(e) {
|
||||
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>
|
||||
@@ -1,13 +1,14 @@
|
||||
---
|
||||
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 AusweisLayout from "#layouts/AusweisLayoutDaten_immowelt.astro";
|
||||
import { AufnahmeClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisGewerbeClient } from "#components/Ausweis/types";
|
||||
import { createCaller } from "src/astro-typesafe-api-caller";
|
||||
import { inferOutput } from "astro-typesafe-api/client";
|
||||
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants";
|
||||
import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
|
||||
import VerbrauchsausweisGewerbeModule from "#modules/VerbrauchsausweisGewerbe/VerbrauchsausweisGewerbeModule.svelte";
|
||||
|
||||
const uid = Astro.url.searchParams.get("uid");
|
||||
let ausweis: VerbrauchsausweisWohnenClient = {} as VerbrauchsausweisWohnenClient;
|
||||
let ausweis: VerbrauchsausweisGewerbeClient = {} as VerbrauchsausweisGewerbeClient;
|
||||
let aufnahme: AufnahmeClient = {} as AufnahmeClient;
|
||||
let objekt: ObjektClient = {} as ObjektClient;
|
||||
let bilder: UploadedGebaeudeBild[] = []
|
||||
@@ -24,7 +25,7 @@ if (uid) {
|
||||
}
|
||||
|
||||
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: {
|
||||
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, {
|
||||
headers: {
|
||||
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
|
||||
},
|
||||
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}`
|
||||
},
|
||||
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}`
|
||||
},
|
||||
params: {
|
||||
uid: ausweis.uid_aufnahme
|
||||
uid: uid_aufnahme
|
||||
}
|
||||
})
|
||||
|
||||
@@ -64,17 +67,17 @@ if (uid) {
|
||||
// Der Ausweis scheint nicht zu existieren.
|
||||
// Wir leiten auf die generische Ausweisseite ohne UID weiter.
|
||||
return Astro.redirect(
|
||||
"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude"
|
||||
"/energieausweis-erstellen/verbrauchsausweis-gewerbe"
|
||||
);
|
||||
}
|
||||
} catch(e) {
|
||||
return Astro.redirect(
|
||||
"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude"
|
||||
"/energieausweis-erstellen/verbrauchsausweis-gewerbe"
|
||||
);
|
||||
}
|
||||
}
|
||||
---
|
||||
|
||||
<AusweisLayoutImmowelt title="Verbrauchsausweis erstellen">
|
||||
<VerbrauchsausweisWohnenModule client:load {ausweis} {objekt} {aufnahme} {bilder} />
|
||||
</AusweisLayoutImmowelt>
|
||||
<AusweisLayout title="Verbrauchsausweis Gewerbe erstellen | IBCornelsen" tabHover2="glow">
|
||||
<VerbrauchsausweisGewerbeModule client:only {ausweis} {objekt} {aufnahme} {bilder} />
|
||||
</AusweisLayout>
|
||||
@@ -2,11 +2,15 @@
|
||||
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 { createCaller } from "src/astro-typesafe-api-caller";
|
||||
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants";
|
||||
import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
|
||||
import { Enums } from "#lib/server/prisma";
|
||||
|
||||
const uid = Astro.url.searchParams.get("uid");
|
||||
const ausweistyp = Astro.url.searchParams.get("ausweistyp") || Enums.AusweisTyp.Standard;
|
||||
|
||||
|
||||
let ausweis: VerbrauchsausweisWohnenClient = {} as VerbrauchsausweisWohnenClient;
|
||||
let aufnahme: AufnahmeClient = {} as AufnahmeClient;
|
||||
let objekt: ObjektClient = {} as ObjektClient;
|
||||
@@ -73,8 +77,9 @@ if (uid) {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
<AusweisLayout title="Verbrauchsausweis erstellen">
|
||||
<VerbrauchsausweisWohnenModule client:load {ausweis} {objekt} {aufnahme} {bilder} />
|
||||
<AusweisLayout title="Verbrauchsausweis erstellen" tabHover1="glow">
|
||||
<VerbrauchsausweisWohnenModule client:only {ausweis} {objekt} {aufnahme} {bilder} {ausweistyp} />
|
||||
</AusweisLayout>
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
import Layout from "#layouts/Layout.astro";
|
||||
import ProduktUebersichtVerbrauchsausweisWohnen from "#components/design/content/ProduktUebersichtVerbrauchsausweisWohnen.svelte";
|
||||
---
|
||||
|
||||
<Layout title="Verbrauchsausweis Produktübersicht">
|
||||
|
||||
<ProduktUebersichtVerbrauchsausweisWohnen>
|
||||
|
||||
</ProduktUebersichtVerbrauchsausweisWohnen>
|
||||
|
||||
|
||||
</Layout>
|
||||
Reference in New Issue
Block a user