GEG Nachweis und Gebäudeliste

This commit is contained in:
Moritz Utcke
2025-03-09 07:35:59 -03:00
parent a1e5945d73
commit e69362536e
7 changed files with 169 additions and 28 deletions

View File

@@ -4,7 +4,8 @@ import "../style/global.css";
import "../../svelte-dialogs.config.js";
import DashboardSidebar from "../components/Dashboard/DashboardSidebar.svelte";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
import { BenutzerClient } from "#components/Ausweis/types";
import { BenutzerClient, ObjektClient } from "#components/Ausweis/types";
import { prisma } from "#lib/server/prisma";
const valid = validateAccessTokenServer(Astro)
@@ -19,6 +20,29 @@ export interface Props {
const { title, user } = Astro.props;
const objekte = await prisma.objekt.findMany({
where: {
benutzer: {
uid: user.uid
}
},
take: 10,
orderBy: {
erstellungsdatum: "desc"
},
include: {
aufnahmen: {
include: {
bilder: true,
unterlagen: true,
bedarfsausweise_wohnen: true,
verbrauchsausweise_gewerbe: true,
verbrauchsausweise_wohnen: true
}
}
}
})
const schema = JSON.stringify({
"@context": "http://schema.org",
"@type": "Corporation",
@@ -107,7 +131,7 @@ let lightTheme = Astro.cookies.get("theme")?.value === "light";
2xl:grid-cols-[minmax(150px,300px)1fr] 2xl:gap-5 2xl:p-6"
>
<DashboardSidebar lightTheme={lightTheme} benutzer={user} client:load>
<DashboardSidebar lightTheme={lightTheme} benutzer={user} {objekte} client:load>
</DashboardSidebar>
<article class="box rounded-tl-none