Auto stash before checking out "origin/main"

.
This commit is contained in:
Robert Jagtiani
2025-04-02 18:48:52 +02:00
parent cfdfef039e
commit 78523171e9
33 changed files with 798 additions and 79 deletions

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 Gewerbe 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/AusweisLayoutDaten_immowelt.astro";
import ProduktUebersichtGEGNachweisGewerbe from "#components/design/content/ProduktUebersichtGEGNachweisGewerbe.svelte";
---
<Layout title="GEG Nachweis Gewerbe Produktübersicht">
<ProduktUebersichtGEGNachweisGewerbe>
</ProduktUebersichtGEGNachweisGewerbe>
</Layout>

View File

@@ -0,0 +1,93 @@
---
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";
import { Enums } from "#lib/server/prisma";
const uid = Astro.url.searchParams.get("uid");
const ausweistyp = Astro.url.searchParams.get("ausweistyp") || Enums.AusweisTyp.Standard;
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} {ausweistyp} {unterlagen} />
</AusweisLayout>

View File

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

View File

@@ -0,0 +1,82 @@
---
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";
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["bedarfsausweis-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.aufnahme._uid.bilder.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: ausweis.uid_aufnahme
}
})
if (!ausweis) {
// Der Ausweis scheint nicht zu existieren.
// Wir leiten auf die generische Ausweisseite ohne UID weiter.
return Astro.redirect(
"/energieausweis-erstellen/bedarfsausweis-wohnen"
);
}
} catch(e) {
return Astro.redirect(
"/energieausweis-erstellen/bedarfsausweis-wohnen"
);
}
}
---
<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 Wohngebäude Produktübersicht">
<div class="mx-auto my-8" style="width:85%">
<ProduktUebersichtBedarfsausweisWohnen ref="/immowelt"></ProduktUebersichtBedarfsausweisWohnen>
</div>
</Layout>

View File

@@ -0,0 +1,86 @@
---
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";
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: VerbrauchsausweisGewerbeClient = {} as VerbrauchsausweisGewerbeClient;
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 {
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}`
},
params: {
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: uid_aufnahme
}
})
objekt = await caller.objekt._uid.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: 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: uid_aufnahme
}
})
if (!ausweis) {
// Der Ausweis scheint nicht zu existieren.
// Wir leiten auf die generische Ausweisseite ohne UID weiter.
return Astro.redirect(
"/energieausweis-erstellen/verbrauchsausweis-gewerbe"
);
}
} catch(e) {
return Astro.redirect(
"/energieausweis-erstellen/verbrauchsausweis-gewerbe"
);
}
}
---
<AusweisLayout title="Verbrauchsausweis Gewerbe erstellen | IBCornelsen" tabHover2="glow">
<VerbrauchsausweisGewerbeModule client:only {ausweis} {objekt} {aufnahme} {bilder} {ausweistyp}/>
</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 Gewerbe Produktübersicht">
<div class="mx-auto my-8" style="width:85%">
<ProduktUebersichtVerbrauchsausweisGewerbe ref="/immowelt">
</ProduktUebersichtVerbrauchsausweisGewerbe>
</div>
</Layout>

View File

@@ -0,0 +1,85 @@
---
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 "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;
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.aufnahme._uid.bilder.GET.fetch(null, {
headers: {
authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
},
params: {
uid: ausweis.uid_aufnahme
}
})
if (!ausweis) {
// Der Ausweis scheint nicht zu existieren.
// Wir leiten auf die generische Ausweisseite ohne UID weiter.
return Astro.redirect(
"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude"
);
}
} catch(e) {
return Astro.redirect(
"/energieausweis-erstellen/verbrauchsausweis-wohngebaeude"
);
}
}
---
<AusweisLayout title="Verbrauchsausweis erstellen" tabHover1="glow">
<VerbrauchsausweisWohnenModule client:only {ausweis} {objekt} {aufnahme} {bilder} {ausweistyp} />
</AusweisLayout>

View File

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