diff --git a/persistent/images/img-694ca166-c339-44df-9240-0bb642291459.webp b/persistent/images/img-694ca166-c339-44df-9240-0bb642291459.webp
new file mode 100644
index 00000000..641c1e02
Binary files /dev/null and b/persistent/images/img-694ca166-c339-44df-9240-0bb642291459.webp differ
diff --git a/persistent/images/img-85f8a7cd-7351-408f-8576-6d7b9d0ac82b.webp b/persistent/images/img-85f8a7cd-7351-408f-8576-6d7b9d0ac82b.webp
new file mode 100644
index 00000000..fffe32ba
Binary files /dev/null and b/persistent/images/img-85f8a7cd-7351-408f-8576-6d7b9d0ac82b.webp differ
diff --git a/persistent/images/img-a4e04cf7-9443-4462-9582-3c18b33ef711.webp b/persistent/images/img-a4e04cf7-9443-4462-9582-3c18b33ef711.webp
new file mode 100644
index 00000000..099f2286
Binary files /dev/null and b/persistent/images/img-a4e04cf7-9443-4462-9582-3c18b33ef711.webp differ
diff --git a/persistent/images/img-a50b7f82-0add-4e3a-bb42-3f9b2e49936a.webp b/persistent/images/img-a50b7f82-0add-4e3a-bb42-3f9b2e49936a.webp
new file mode 100644
index 00000000..641c1e02
Binary files /dev/null and b/persistent/images/img-a50b7f82-0add-4e3a-bb42-3f9b2e49936a.webp differ
diff --git a/persistent/images/img-af39ffd3-389b-43a4-9afb-5e82020dc5b0.webp b/persistent/images/img-af39ffd3-389b-43a4-9afb-5e82020dc5b0.webp
new file mode 100644
index 00000000..641c1e02
Binary files /dev/null and b/persistent/images/img-af39ffd3-389b-43a4-9afb-5e82020dc5b0.webp differ
diff --git a/persistent/images/img-e7269e2e-de35-491a-b24e-76bde9d88ac0.webp b/persistent/images/img-e7269e2e-de35-491a-b24e-76bde9d88ac0.webp
new file mode 100644
index 00000000..641c1e02
Binary files /dev/null and b/persistent/images/img-e7269e2e-de35-491a-b24e-76bde9d88ac0.webp differ
diff --git a/src/astro-typesafe-api-caller.ts b/src/astro-typesafe-api-caller.ts
index d6ea0c6c..7e7e52d5 100644
--- a/src/astro-typesafe-api-caller.ts
+++ b/src/astro-typesafe-api-caller.ts
@@ -1,17 +1,18 @@
import { createCallerFactory } from "astro-typesafe-api/server";
export const createCaller = createCallerFactory({
+ "bild": await import("../src/pages/api/bild.ts"),
"klimafaktoren": await import("../src/pages/api/klimafaktoren.ts"),
"postleitzahlen": await import("../src/pages/api/postleitzahlen.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"),
"admin/ausstellen": await import("../src/pages/api/admin/ausstellen.ts"),
"admin/bestellbestaetigung": await import("../src/pages/api/admin/bestellbestaetigung.ts"),
"admin/erinnern": await import("../src/pages/api/admin/erinnern.ts"),
"admin/nicht-ausstellen": await import("../src/pages/api/admin/nicht-ausstellen.ts"),
"admin/post-ausstellen": await import("../src/pages/api/admin/post-ausstellen.ts"),
"admin/registriernummer": await import("../src/pages/api/admin/registriernummer.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"),
"aufnahme": await import("../src/pages/api/aufnahme/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"),
@@ -26,9 +27,9 @@ export const createCaller = createCallerFactory({
"user/self": await import("../src/pages/api/user/self.ts"),
"verbrauchsausweis-gewerbe/[uid]": await import("../src/pages/api/verbrauchsausweis-gewerbe/[uid].ts"),
"verbrauchsausweis-gewerbe": await import("../src/pages/api/verbrauchsausweis-gewerbe/index.ts"),
+ "webhooks/mollie": await import("../src/pages/api/webhooks/mollie.ts"),
"verbrauchsausweis-wohnen/[uid]": await import("../src/pages/api/verbrauchsausweis-wohnen/[uid].ts"),
"verbrauchsausweis-wohnen": await import("../src/pages/api/verbrauchsausweis-wohnen/index.ts"),
- "webhooks/mollie": await import("../src/pages/api/webhooks/mollie.ts"),
"aufnahme/[uid]/bilder": await import("../src/pages/api/aufnahme/[uid]/bilder.ts"),
"aufnahme/[uid]": await import("../src/pages/api/aufnahme/[uid]/index.ts"),
"objekt/[uid]": await import("../src/pages/api/objekt/[uid]/index.ts"),
diff --git a/src/client/lib/ausweisSpeichern.ts b/src/client/lib/ausweisSpeichern.ts
index f7d409dc..5084df48 100644
--- a/src/client/lib/ausweisSpeichern.ts
+++ b/src/client/lib/ausweisSpeichern.ts
@@ -3,14 +3,14 @@ import { api } from "astro-typesafe-api/client"
import { exclude } from "#lib/exclude.js";
import Cookies from "js-cookie";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js";
-import { AufnahmeClient, BedarfsausweisWohnenClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisGewerbeClient, VerbrauchsausweisWohnenClient, } from "#components/Ausweis/types.js";
+import { AufnahmeClient, BedarfsausweisWohnenClient, BildClient, ObjektClient, UploadedGebaeudeBild, VerbrauchsausweisGewerbeClient, VerbrauchsausweisWohnenClient, } from "#components/Ausweis/types.js";
import { Enums } from "@ibcornelsen/database/client";
export async function ausweisSpeichern(
ausweis: VerbrauchsausweisWohnenClient | VerbrauchsausweisGewerbeClient | BedarfsausweisWohnenClient,
objekt: ObjektClient,
aufnahme: AufnahmeClient,
- bilder: (UploadedGebaeudeBild & { base64?: string })[],
+ bilder: BildClient[],
ausweisart: Enums.Ausweisart
) {
if (objekt.uid) {
@@ -99,26 +99,15 @@ export async function ausweisSpeichern(
ausweis.uid = uid;
}
- for (const bild of bilder) {
- if (bild.uid) {
- continue;
+ await api.aufnahme._uid.bilder.PUT.fetch(bilder.map(bild => bild.uid), {
+ params: {
+ uid: aufnahme.uid
+ },
+ headers: {
+ "Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
}
-
- const response = await api.aufnahme._uid.bilder.PUT.fetch({
- data: bild.data,
- kategorie: bild.kategorie
- }, {
- params: {
- uid: aufnahme.uid
- },
- headers: {
- "Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
- }
- })
-
- bild.uid = response.uid
- }
-
+ })
+
return {
uid_ausweis: ausweis.uid,
uid_aufnahme: aufnahme.uid,
diff --git a/src/client/lib/validateAccessToken.ts b/src/client/lib/validateAccessToken.ts
index 1fa7c42e..8c43bdf7 100644
--- a/src/client/lib/validateAccessToken.ts
+++ b/src/client/lib/validateAccessToken.ts
@@ -38,6 +38,7 @@ export async function validateAccessTokenClient() {
const { accessToken: newAccessToken, accessTokenExpiry, refreshToken: newRefreshToken, refreshTokenExpiry } = await api.auth["access-token"].GET.fetch({
refreshToken
})
+
Cookies.set(API_ACCESS_TOKEN_COOKIE_NAME, newAccessToken, {
domain: `.${window.location.hostname}`,
diff --git a/src/components/Ausweis/ButtonSpaeterHilfe.svelte b/src/components/Ausweis/ButtonSpaeterHilfe.svelte
index 08dfce62..e32be9ac 100644
--- a/src/components/Ausweis/ButtonSpaeterHilfe.svelte
+++ b/src/components/Ausweis/ButtonSpaeterHilfe.svelte
@@ -1,6 +1,4 @@
@@ -18,13 +16,6 @@ sm:grid-cols-[1fr_min-content_min-content_min-content] sm:justify-self-end sm:mt
>Automatisch Ausfüllen
-