diff --git a/src/components/Ausweis/types.ts b/src/components/Ausweis/types.ts index d693338e..009a8099 100644 --- a/src/components/Ausweis/types.ts +++ b/src/components/Ausweis/types.ts @@ -137,7 +137,7 @@ export function getAusweisartFromUUID(id: string): Enums.Ausweisart | null { } export type UnterlageClient = Omit -export type BildClient = Omit +export type BildClient = Omit export type ObjektKomplettClient = ObjektClient & { aufnahmen: AufnahmeKomplettClient[] diff --git a/src/components/Dashboard/DashboardAusweis.svelte b/src/components/Dashboard/DashboardAusweis.svelte index 9aabd5aa..4419b3a0 100644 --- a/src/components/Dashboard/DashboardAusweis.svelte +++ b/src/components/Dashboard/DashboardAusweis.svelte @@ -15,7 +15,6 @@ import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants.js"; import { Enums, Objekt } from "#lib/client/prisma.js"; import { endEnergieVerbrauchVerbrauchsausweisGewerbe_2016 } from "#lib/Berechnungen/VerbrauchsausweisGewerbe/VerbrauchsausweisGewerbe_2016.js"; - import { shortenUID } from "#server/lib/hash.js"; import { addNotification } from "#components/Notifications/shared.js"; export let ausweis: VerbrauchsausweisWohnenClient | VerbrauchsausweisGewerbeClient | BedarfsausweisWohnenClient; @@ -25,9 +24,9 @@ export let benutzer: BenutzerClient; const progress = ausweis.ausgestellt ? 100 : ausweis.bestellt ? 66 : 33; - const ausweisart = getAusweisartFromUUID(ausweis.uid); + const ausweisart = getAusweisartFromUUID(ausweis.id); - const id = ausweis.alte_ausweis_id || shortenUID(ausweis.uid); + const id = ausweis.alte_ausweis_id || ausweis.id; async function ausweisStornieren() { const result = await dialogs.confirm({ @@ -46,18 +45,18 @@ if (result === true) { if (ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen) { - await api["verbrauchsausweis-wohnen"]._uid.DELETE.fetch(undefined, { + await api["verbrauchsausweis-wohnen"]._id.DELETE.fetch(undefined, { params: { - uid: ausweis.uid, + id: ausweis.id, }, headers: { Authorization: `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`, }, }); } else if (ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe) { - await api["verbrauchsausweis-gewerbe"]._uid.DELETE.fetch(undefined, { + await api["verbrauchsausweis-gewerbe"]._id.DELETE.fetch(undefined, { params: { - uid: ausweis.uid, + id: ausweis.id, }, headers: { Authorization: `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`, @@ -95,7 +94,7 @@ async function registriernummerAnfordern() { try { const result = await api.admin.registriernummer.GET.fetch({ - uid: ausweis.uid + uid: ausweis.id }, { headers: { "Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}` @@ -115,7 +114,7 @@ async function stornieren() { try { const response = await api.admin.stornieren.PUT.fetch({ - uid_ausweis: ausweis.uid + uid_ausweis: ausweis.id }, { headers: { "Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}` @@ -145,7 +144,7 @@ async function ausweisAusstellen() { try { await api.admin.ausstellen.GET.fetch({ - uid_ausweis: ausweis.uid + uid_ausweis: ausweis.id }, { headers: { "Authorization": `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}` @@ -297,13 +296,13 @@ {/if} {#if ausweis.bestellt && (!rechnung || rechnung.bezahlmethode === Enums.Bezahlmethoden.rechnung)} - + {/if} @@ -312,12 +311,12 @@ {#if ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen} Bearbeiten {:else if ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe} Bearbeiten {/if} {/if} @@ -327,12 +326,12 @@ {#if ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen} Formular {:else if ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe} Formular {/if} {/if} @@ -347,7 +346,7 @@ class="p-2 rounded-lg hover:bg-gray-200" title="PDF Herunterladen" target="_blank" - href="/pdf/ansichtsausweis?uid={ausweis.uid}" + href="/pdf/ansichtsausweis?uid={ausweis.id}" > Energieausweis @@ -355,7 +354,7 @@ class="p-2 rounded-lg hover:bg-gray-200" title="PDF Herunterladen" target="_blank" - href="/pdf/datenblatt?uid={ausweis.uid}" + href="/pdf/datenblatt?uid={ausweis.id}" > Datenblatt diff --git a/src/layouts/AusweisLayoutDaten.astro b/src/layouts/AusweisLayoutDaten.astro index 2bde6c13..e4657fee 100644 --- a/src/layouts/AusweisLayoutDaten.astro +++ b/src/layouts/AusweisLayoutDaten.astro @@ -20,15 +20,17 @@ const { title } = Astro.props; diff --git a/src/layouts/BlankLayout.astro b/src/layouts/BlankLayout.astro index 24e146b4..a2dc74c0 100644 --- a/src/layouts/BlankLayout.astro +++ b/src/layouts/BlankLayout.astro @@ -37,15 +37,17 @@ const schema = JSON.stringify({ diff --git a/src/layouts/DashboardLayout.astro b/src/layouts/DashboardLayout.astro index 3fa13611..f1fd1059 100644 --- a/src/layouts/DashboardLayout.astro +++ b/src/layouts/DashboardLayout.astro @@ -74,15 +74,17 @@ let lightTheme = Astro.cookies.get("theme")?.value === "light"; diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index ecc6ba59..b909f06f 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -21,15 +21,17 @@ const { title } = Astro.props;