diff --git a/src/astro-typesafe-api-caller.ts b/src/astro-typesafe-api-caller.ts
index edb1fa17..34400f59 100644
--- a/src/astro-typesafe-api-caller.ts
+++ b/src/astro-typesafe-api-caller.ts
@@ -5,12 +5,12 @@ export const createCaller = createCallerFactory({
"postleitzahlen": await import("../src/pages/api/postleitzahlen.ts"),
"aufnahme/[uid]": await import("../src/pages/api/aufnahme/[uid].ts"),
"aufnahme": await import("../src/pages/api/aufnahme/index.ts"),
+ "bilder/[uid]": await import("../src/pages/api/bilder/[uid].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"),
"bedarfsausweis-wohnen/[uid]": await import("../src/pages/api/bedarfsausweis-wohnen/[uid].ts"),
"bedarfsausweis-wohnen": await import("../src/pages/api/bedarfsausweis-wohnen/index.ts"),
- "bilder/[uid]": await import("../src/pages/api/bilder/[uid].ts"),
"objekt": await import("../src/pages/api/objekt/index.ts"),
"rechnung": await import("../src/pages/api/rechnung/index.ts"),
"ticket": await import("../src/pages/api/ticket/index.ts"),
diff --git a/src/components/Ausweis/Ausweisart.svelte b/src/components/Ausweis/Ausweisart.svelte
index 0e3049ec..3426cde3 100644
--- a/src/components/Ausweis/Ausweisart.svelte
+++ b/src/components/Ausweis/Ausweisart.svelte
@@ -5,7 +5,7 @@
//import Label from "#components/Label.svelte";
import { auditHeizungGebaeudeBaujahr } from "../Verbrauchsausweis/audits/HeizungGebaeudeBaujahr.js";
- import { addNotification, deleteNotification } from "@ibcornelsen/ui";
+ import { addNotification, deleteNotification } from "#components/Notifications/shared.js";
import TagInput from "../TagInput.svelte";
import { Enums } from "@ibcornelsen/database/client";
import {
diff --git a/src/components/Ausweis/StromVerbrauch.svelte b/src/components/Ausweis/StromVerbrauch.svelte
index 9bed4411..a59deeae 100644
--- a/src/components/Ausweis/StromVerbrauch.svelte
+++ b/src/components/Ausweis/StromVerbrauch.svelte
@@ -86,22 +86,6 @@
}
}
- $: {
- console.log(month, year);
-
- if ((availableDates.filter(date => date.month === month && date.year === year).length === 0) && typeof month === "number" && typeof year === "number") {
- addNotification({
- message: "Monat nicht verfügbar.",
- subtext: "Der ausgewählte Monat ist in diesem Jahr nicht verfügbar, bitte wählen sie einen neuen Start Monat.",
- dismissable: true,
- type: "warning",
- timeout: 0,
- uid: "monat_nicht_verfuegbar",
- selector: "select[name='energieverbrauch_zeitraum_monat']"
- })
- }
- }
-
$: abweichung = auditVerbrauchAbweichung(ausweis, aufnahme);
diff --git a/src/components/Ausweis/Verbrauch.svelte b/src/components/Ausweis/Verbrauch.svelte
index 2cfb527f..3c8f7da9 100644
--- a/src/components/Ausweis/Verbrauch.svelte
+++ b/src/components/Ausweis/Verbrauch.svelte
@@ -78,29 +78,6 @@
}
}
- $: {
- console.log(month, year);
-
- if (
- availableDates.filter(
- (date) => date.month === month && date.year === year
- ).length === 0 &&
- typeof month === "number" &&
- typeof year === "number"
- ) {
- addNotification({
- message: "Monat nicht verfügbar.",
- subtext:
- "Der ausgewählte Monat ist in diesem Jahr nicht verfügbar, bitte wählen sie einen neuen Start Monat.",
- dismissable: true,
- type: "warning",
- timeout: 0,
- uid: "monat_nicht_verfuegbar",
- selector: "select[name='energieverbrauch_zeitraum_monat']",
- });
- }
- }
-
$: abweichung = auditVerbrauchAbweichung(ausweis, aufnahme);
diff --git a/src/components/Notifications/RawNotificationWrapper.svelte b/src/components/Notifications/RawNotificationWrapper.svelte
index 3ced0a61..364200d2 100644
--- a/src/components/Notifications/RawNotificationWrapper.svelte
+++ b/src/components/Notifications/RawNotificationWrapper.svelte
@@ -1,5 +1,7 @@
-
+
+
+
\ No newline at end of file
diff --git a/src/components/TagInput.svelte b/src/components/TagInput.svelte
index 0a2b3146..ed7b818b 100644
--- a/src/components/TagInput.svelte
+++ b/src/components/TagInput.svelte
@@ -75,7 +75,7 @@
on:focusin={onFocusIn}
on:focusout={onFocusOut}
on:blur={() => {
- if (tag.toString().length >= minlength && tag.toString().length < maxlength) {
+ if (tag.toString().length >= minlength && tag.toString().length <= maxlength) {
addTag(tag)
tag = ""
}
diff --git a/src/components/Verbrauchsausweis/audits/KlimaFaktoren.ts b/src/components/Verbrauchsausweis/audits/KlimaFaktoren.ts
index acbdecc2..f5c2e108 100644
--- a/src/components/Verbrauchsausweis/audits/KlimaFaktoren.ts
+++ b/src/components/Verbrauchsausweis/audits/KlimaFaktoren.ts
@@ -1,20 +1,29 @@
-import { ObjektClient, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js";
+import {
+ ObjektClient,
+ VerbrauchsausweisWohnenClient,
+} from "#components/Ausweis/types.js";
import { AuditType, hidden } from "./hidden.js";
import { getKlimafaktoren } from "#lib/Klimafaktoren.js";
-export async function auditKlimaFaktoren(ausweis: VerbrauchsausweisWohnenClient, gebaeude: ObjektClient): Promise {
+export async function auditKlimaFaktoren(
+ ausweis: VerbrauchsausweisWohnenClient,
+ gebaeude: ObjektClient
+): Promise {
if (hidden.has(AuditType.KLIMA_FAKTOREN)) {
return false;
}
- if (ausweis.startdatum && gebaeude.plz && ausweis.verbrauch_1) {
- try {
- const response = await getKlimafaktoren(ausweis.startdatum, gebaeude.plz);
- return true; // Alle Klimfaktoren konnten abgefragt werden.
- } catch (e) {
- return true;
+ if (ausweis.startdatum && gebaeude.plz && ausweis.verbrauch_1) {
+ try {
+ const response = await getKlimafaktoren(
+ ausweis.startdatum,
+ gebaeude.plz
+ );
+ return true; // Alle Klimfaktoren konnten abgefragt werden.
+ } catch (e) {
+ return true;
+ }
}
- }
- return false;
+ return false;
}
diff --git a/src/components/Verbrauchsausweis/audits/LeerStand.ts b/src/components/Verbrauchsausweis/audits/LeerStand.ts
index 667493ca..ac7a9f8c 100644
--- a/src/components/Verbrauchsausweis/audits/LeerStand.ts
+++ b/src/components/Verbrauchsausweis/audits/LeerStand.ts
@@ -2,7 +2,7 @@ import { AufnahmeClient } from "#components/Ausweis/types.js";
import { AuditType, hidden } from "./hidden.js";
export function auditLeerStand(gebaeude: AufnahmeClient): boolean {
- if (gebaeude.leerstand && !hidden.has(AuditType.LEER_STAND)) {
+ if (gebaeude.leerstand) {
return (
(gebaeude.leerstand > 30)
);
diff --git a/src/components/Verbrauchsausweis/audits/VerbrauchAbweichung.ts b/src/components/Verbrauchsausweis/audits/VerbrauchAbweichung.ts
index 4a0b631f..7ee538f3 100644
--- a/src/components/Verbrauchsausweis/audits/VerbrauchAbweichung.ts
+++ b/src/components/Verbrauchsausweis/audits/VerbrauchAbweichung.ts
@@ -1,7 +1,7 @@
-import { AufnahmeClient, ObjektClient, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js";
+import { AufnahmeClient, ObjektClient, VerbrauchsausweisGewerbeClient, VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js";
import { AuditType, hidden } from "./hidden.js";
-export function auditVerbrauchAbweichung(ausweis: VerbrauchsausweisWohnenClient, aufnahme: AufnahmeClient): number[] {
+export function auditVerbrauchAbweichung(ausweis: VerbrauchsausweisWohnenClient | VerbrauchsausweisGewerbeClient, aufnahme: AufnahmeClient): number[] {
if (aufnahme.leerstand && (aufnahme.leerstand > 0)) {
return [];
}
diff --git a/src/layouts/AusweisLayoutDaten.astro b/src/layouts/AusweisLayoutDaten.astro
index bf25997f..0d7eec96 100644
--- a/src/layouts/AusweisLayoutDaten.astro
+++ b/src/layouts/AusweisLayoutDaten.astro
@@ -16,21 +16,25 @@ const { title } = Astro.props;
Willkommen zurück, {user.vorname}!
diff --git a/src/modules/RegisterModule.svelte b/src/modules/RegisterModule.svelte
index 73564763..223ff52c 100644
--- a/src/modules/RegisterModule.svelte
+++ b/src/modules/RegisterModule.svelte
@@ -1,8 +1,10 @@