diff --git a/src/components/Ausweis/AusweisPreviewContainer.svelte b/src/components/Ausweis/AusweisPreviewContainer.svelte
index c9f13baf..f22070e3 100644
--- a/src/components/Ausweis/AusweisPreviewContainer.svelte
+++ b/src/components/Ausweis/AusweisPreviewContainer.svelte
@@ -13,10 +13,8 @@
VerbrauchsausweisWohnenClient,
} from "./types";
- export let ausweis:
- | VerbrauchsausweisWohnenClient;
+ export let ausweis: VerbrauchsausweisWohnenClient;
export let gebaeude: GebaeudeClient;
-
export let images: UploadedGebaeudeBild[] = [];
diff --git a/src/components/Ausweis/BilderZusatzsysteme.svelte b/src/components/Ausweis/BilderZusatzsysteme.svelte
index 8bae7530..739ac969 100644
--- a/src/components/Ausweis/BilderZusatzsysteme.svelte
+++ b/src/components/Ausweis/BilderZusatzsysteme.svelte
@@ -5,10 +5,6 @@
import DaemmungImage from "./DaemmungImage.svelte";
import FensterImage from "./FensterImage.svelte";
import Label from "../Label.svelte";
- import type {
- BedarfsausweisWohnen,
- VerbrauchsausweisGewerbe,
- } from "@ibcornelsen/database/client";
import {
GebaeudeAufnahmeClient,
GebaeudeClient,
@@ -18,10 +14,7 @@
export let gebaeude: GebaeudeClient;
export let gebaeude_aufnahme_allgemein: GebaeudeAufnahmeClient;
- export let ausweis:
- | VerbrauchsausweisWohnenClient
- | VerbrauchsausweisGewerbe
- | BedarfsausweisWohnen;
+ export let ausweis: VerbrauchsausweisWohnenClient
export let images: UploadedGebaeudeBild[];
@@ -388,4 +381,4 @@
als PDF anschauen
-
+
diff --git a/src/components/Ausweis/PerformanceScore.svelte b/src/components/Ausweis/PerformanceScore.svelte
index 3e17f350..c2fca932 100644
--- a/src/components/Ausweis/PerformanceScore.svelte
+++ b/src/components/Ausweis/PerformanceScore.svelte
@@ -1,17 +1,31 @@
-

-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/components/Ausweis/Verbrauch.svelte b/src/components/Ausweis/Verbrauch.svelte
index 272057a9..2d1925da 100644
--- a/src/components/Ausweis/Verbrauch.svelte
+++ b/src/components/Ausweis/Verbrauch.svelte
@@ -4,7 +4,6 @@
import Label from "../Label.svelte";
import fuelList from "./brennstoffListe";
import { auditVerbrauchAbweichung } from "../Verbrauchsausweis/audits/VerbrauchAbweichung";
- import type { VerbrauchsausweisGewerbe } from "@ibcornelsen/database/client";
import { GebaeudeAufnahmeClient, GebaeudeClient, VerbrauchsausweisWohnenClient } from "./types";
// Wir dürfen bis zu 4.5 Jahre alte Klimafaktoren benutzen, also nehmen wir alle Monate seitdem und generieren daraus die Auswahl.
@@ -43,7 +42,7 @@
export let gebaeude: GebaeudeClient;
export let gebaeude_aufnahme_allgemein: GebaeudeAufnahmeClient;
- export let ausweis: VerbrauchsausweisWohnenClient | VerbrauchsausweisGewerbe;
+ export let ausweis: VerbrauchsausweisWohnenClient;
const fuelMap: Record = {};
for (const fuel of fuelList) {
@@ -53,8 +52,8 @@
}
- let month = ausweis.startdatum?.getMonth() || moment().month();
- let year = ausweis.startdatum?.getFullYear() || moment().subtract(3, "years").year();
+ let month = ausweis.startdatum?.getMonth() || null;
+ let year = ausweis.startdatum?.getFullYear() || null;
$: {
if (typeof month === "number" && typeof year === "number") {
@@ -192,8 +191,11 @@
{/each}
{:else}
- {#each availableDates as date}
-
+ {#each Array.from(availableDates.reduce((a,c) => {
+ a.add(c.month);
+ return a;
+ }, new Set())) as month}
+
{/each}
{/if}
diff --git a/src/components/Ausweis/types.ts b/src/components/Ausweis/types.ts
index 41b0a661..7ea0fc50 100644
--- a/src/components/Ausweis/types.ts
+++ b/src/components/Ausweis/types.ts
@@ -4,7 +4,7 @@ import { inferProcedureInput, inferProcedureOutput } from "@trpc/server";
export type UploadedGebaeudeBild = inferProcedureOutput<
AppRouter["v1"]["verbrauchsausweisWohnen"]["get"]
->["gebaeude_aufnahme_allgemein"]["gebaeude_stammdaten"]["gebaeude_bilder"][0];
+>["gebaeude_aufnahme_allgemein"]["gebaeude_stammdaten"]["gebaeude_bilder"][0] & { base64?: string };
/**
diff --git a/src/components/ImageGrid.svelte b/src/components/ImageGrid.svelte
index 25cb5ba4..8589213f 100644
--- a/src/components/ImageGrid.svelte
+++ b/src/components/ImageGrid.svelte
@@ -21,7 +21,7 @@
{#if image.kategorie == kategorie}

diff --git a/src/modules/Ausweise/VerbrauchsausweisWohnenModule.svelte b/src/modules/Ausweise/VerbrauchsausweisWohnenModule.svelte
index d64d30f0..1aea20a8 100644
--- a/src/modules/Ausweise/VerbrauchsausweisWohnenModule.svelte
+++ b/src/modules/Ausweise/VerbrauchsausweisWohnenModule.svelte
@@ -102,7 +102,7 @@
-
+