Bedarfsausweis Wohnen

This commit is contained in:
Moritz Utcke
2025-03-20 09:12:37 -03:00
parent 9706a839d6
commit 8b3e6b80c4
9 changed files with 196 additions and 105 deletions

View File

@@ -1,7 +1,8 @@
import { UUidWithPrefix } from "#components/Ausweis/types.js";
import { authorizationHeaders, authorizationMiddleware } from "#lib/middleware/authorization.js";
import { BedarfsausweisWohnenSchema, prisma } from "#lib/server/prisma";
import { prisma } from "#lib/server/prisma.js";
import { APIError, defineApiRoute } from "astro-typesafe-api/server";
import { BedarfsausweisWohnenSchema } from "src/generated/zod/bedarfsausweiswohnen.js";
import { z } from "zod";
export const PUT = defineApiRoute({

View File

@@ -7,7 +7,7 @@ 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");
const uid = Astro.url.searchParams.get("uid") || "";
let ausweis: VerbrauchsausweisWohnenClient = {} as VerbrauchsausweisWohnenClient;
let aufnahme: AufnahmeClient = {} as AufnahmeClient;
let objekt: ObjektClient = {} as ObjektClient;
@@ -78,5 +78,5 @@ if (uid) {
---
<AusweisLayout title="Bedarfsausweis erstellen | IBCornelsen">
<BedarfsausweisWohnenModule client:load {ausweis} {objekt} {aufnahme} {bilder}></BedarfsausweisWohnenModule>
<BedarfsausweisWohnenModule client:only {ausweis} {objekt} {aufnahme} {bilder} {uid}></BedarfsausweisWohnenModule>
</AusweisLayout>