Compare commits
5 Commits
Jens
...
reset-main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecdce5b279 | ||
|
|
c0d4ede483 | ||
|
|
3fa207ea9c | ||
|
|
2a302a4b59 | ||
|
|
42e0907bb9 |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 10 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 KiB |
@@ -1,45 +0,0 @@
|
||||
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"),
|
||||
"unterlage": await import("../src/pages/api/unterlage.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"),
|
||||
"admin/stornieren": await import("../src/pages/api/admin/stornieren.ts"),
|
||||
"aufnahme": await import("../src/pages/api/aufnahme/index.ts"),
|
||||
"ausweise": await import("../src/pages/api/ausweise/index.ts"),
|
||||
"auth/access-token": await import("../src/pages/api/auth/access-token.ts"),
|
||||
"auth/passwort-vergessen": await import("../src/pages/api/auth/passwort-vergessen.ts"),
|
||||
"auth/refresh-token": await import("../src/pages/api/auth/refresh-token.ts"),
|
||||
"bedarfsausweis-gewerbe/[id]": await import("../src/pages/api/bedarfsausweis-gewerbe/[id].ts"),
|
||||
"bedarfsausweis-gewerbe": await import("../src/pages/api/bedarfsausweis-gewerbe/index.ts"),
|
||||
"bedarfsausweis-wohnen/[id]": await import("../src/pages/api/bedarfsausweis-wohnen/[id].ts"),
|
||||
"bedarfsausweis-wohnen": await import("../src/pages/api/bedarfsausweis-wohnen/index.ts"),
|
||||
"bilder/[id]": await import("../src/pages/api/bilder/[id].ts"),
|
||||
"geg-nachweis-gewerbe/[id]": await import("../src/pages/api/geg-nachweis-gewerbe/[id].ts"),
|
||||
"geg-nachweis-gewerbe": await import("../src/pages/api/geg-nachweis-gewerbe/index.ts"),
|
||||
"geg-nachweis-wohnen/[id]": await import("../src/pages/api/geg-nachweis-wohnen/[id].ts"),
|
||||
"geg-nachweis-wohnen": await import("../src/pages/api/geg-nachweis-wohnen/index.ts"),
|
||||
"objekt": await import("../src/pages/api/objekt/index.ts"),
|
||||
"rechnung/[id]": await import("../src/pages/api/rechnung/[id].ts"),
|
||||
"rechnung/anfordern": await import("../src/pages/api/rechnung/anfordern.ts"),
|
||||
"rechnung": await import("../src/pages/api/rechnung/index.ts"),
|
||||
"ticket": await import("../src/pages/api/ticket/index.ts"),
|
||||
"user": await import("../src/pages/api/user/index.ts"),
|
||||
"user/self": await import("../src/pages/api/user/self.ts"),
|
||||
"verbrauchsausweis-gewerbe/[id]": await import("../src/pages/api/verbrauchsausweis-gewerbe/[id].ts"),
|
||||
"verbrauchsausweis-gewerbe": await import("../src/pages/api/verbrauchsausweis-gewerbe/index.ts"),
|
||||
"webhooks/mollie": await import("../src/pages/api/webhooks/mollie.ts"),
|
||||
"verbrauchsausweis-wohnen/[id]": await import("../src/pages/api/verbrauchsausweis-wohnen/[id].ts"),
|
||||
"verbrauchsausweis-wohnen": await import("../src/pages/api/verbrauchsausweis-wohnen/index.ts"),
|
||||
"aufnahme/[id]/bilder": await import("../src/pages/api/aufnahme/[id]/bilder.ts"),
|
||||
"aufnahme/[id]": await import("../src/pages/api/aufnahme/[id]/index.ts"),
|
||||
"aufnahme/[id]/unterlagen": await import("../src/pages/api/aufnahme/[id]/unterlagen.ts"),
|
||||
"objekt/[id]": await import("../src/pages/api/objekt/[id]/index.ts"),
|
||||
})
|
||||
@@ -161,64 +161,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="relative bg-base-200 border border-base-300 rounded-lg p-4">
|
||||
<div class="max-w-screen-xl mx-auto py-6 px-4 bg-white shadow">
|
||||
|
||||
<!-- Obere Zeile: Titel -->
|
||||
<div class="border-b flex flex-row pb-2">
|
||||
<div class="text-xl font-bold">
|
||||
Verbrauchsausweis Wohnen mit Beratung (Post, Same Day)
|
||||
</div>
|
||||
<div class="bg-red-600 ml-auto px-2 py-0.5 text-sm font-semibold rounded-lg text-white">Gespeichert</div>
|
||||
</div>
|
||||
|
||||
<!-- Navigation (1/3) -->
|
||||
<div class="border-b pt-4 mb-4 flex justify-between items-center">
|
||||
<button class="bg-gray-300 text-gray-700 px-2 py-1 rounded hover:bg-gray-400">
|
||||
«
|
||||
</button>
|
||||
<p class="text-gray-700 font-medium">
|
||||
Ausweis 1/3
|
||||
</p>
|
||||
<button class="bg-gray-300 text-gray-700 px-2 py-1 rounded hover:bg-gray-400">
|
||||
»
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Erster Block: Drei Spalten -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
|
||||
<!-- Linke Spalte: Bild + ID -->
|
||||
<div class="flex-shrink-0 bg-gray-100 flex flex-col items-center border text-2xl rounded-b-lg pb-2 max-w-[220px]">
|
||||
<img
|
||||
src="../../images/placeholder.png"
|
||||
alt="Gebäudevorschau"
|
||||
class="rounded-t-lg mb-2"
|
||||
/>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-2 bg-white">
|
||||
<!-- PDF-Icon / Ausweis -->
|
||||
<div class="m-1">
|
||||
<img
|
||||
src="../../images/dashboard/AusweisKreuz.svg"
|
||||
alt="PDF Symbol für Verbrauchsausweis"
|
||||
class="h-auto w-auto p-2 border border-black rounded-lg"
|
||||
/>
|
||||
<span class="text-xs font-medium ml-2">Verbrauchsausweis</span>
|
||||
</div>
|
||||
<!-- PDF-Icon / Datenblatt -->
|
||||
<div class="m-1">
|
||||
<img
|
||||
src="../../images/dashboard/DatenblattKreuz.svg"
|
||||
alt="PDF Symbol für Datenblatt"
|
||||
class="h-auto w-auto p-2 border border-black rounded-lg"
|
||||
/>
|
||||
<span class="text-xs font-medium ml-2">Datenblatt</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-4">Ausweis ID: <b>BWWICR32</b></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="relative bg-base-200 border border-base-300 rounded-lg p-4">
|
||||
<div class="relative bg-base-200 border border-base-300 rounded-lg p-4 mr-4">
|
||||
{#if ausweis.storniert}
|
||||
<div
|
||||
class="absolute top-0 left-0 w-full h-full bg-[rgba(0,0,0,0.7)] z-[5] rounded-lg select-none"
|
||||
@@ -474,57 +417,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-shrink-0 bg-gray-100 flex flex-col border text-xl rounded-lg p-4">
|
||||
|
||||
<p><b>Ausweisdaten</b><br>Anlass: Vermietung/Verkauf<br>
|
||||
Gebäudetyp: Mehrfamilienhaus<br>
|
||||
Anzahl Wohneinheiten: 3<br>
|
||||
Keller beheizt / DG beheizt<br>
|
||||
Gebäudeteil: gesamt<br>
|
||||
<br>
|
||||
<b>Heizverbräuche (kWh, kg)</b><br>vom 03.2022 - 03.2025<br>
|
||||
Erdgas 13600, 14600, 15000<br>Brennholz 400, 500, 600<br>
|
||||
Warmwasser enthalten, 20%<br>
|
||||
Alternative Energieversorgung: Warmwasser, Heizung, Lüftung, Kühlung<br>
|
||||
Leerstand 20%, Fensterlüftung, Kühlung<br><br>
|
||||
<b>Sanierungszustand:</b><br>Zentralheizung, Warmwasserrohre gedämmt, Brennwertkessel, Photovoltaik, Dreifachverglasung, alle Fenster dicht, Dachgeschoß gedämmt, Außenwand gedämmt</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Zweiter Block: Ansprechpartner und Ausweisdaten in zwei Spalten -->
|
||||
<div class="flex flex-row md:flex-row gap-4 mb-4">
|
||||
|
||||
<p class="text-lg text-gray-700 mb-1">
|
||||
<strong>Besteller:</strong> Norma Müller
|
||||
</p>
|
||||
<p class="text-lg text-gray-700">
|
||||
<strong>Telefon:</strong> 0700 / 123456
|
||||
</p>
|
||||
<p class="text-lg text-gray-700">
|
||||
<strong>E-Mail:</strong> norma.mueller@web.de
|
||||
</p>
|
||||
<p class="text-lg text-gray-700">
|
||||
<strong>Erstelldatum:</strong> 22.03.2025
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Fußzeile: Navigation (1/3) -->
|
||||
<div class="border-t pt-4 flex justify-between items-center">
|
||||
<button class="bg-gray-300 text-gray-700 px-2 py-1 rounded hover:bg-gray-400">
|
||||
«
|
||||
</button>
|
||||
<p class="text-gray-700 font-medium">
|
||||
Ausweis 1/3
|
||||
</p>
|
||||
<button class="bg-gray-300 text-gray-700 px-2 py-1 rounded hover:bg-gray-400">
|
||||
»
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<dialog bind:this={hilfeModal} class="modal">
|
||||
<div class="modal-box">
|
||||
<h3 class="font-bold text-xl mb-4">Hilfe Anfordern</h3>
|
||||
|
||||
@@ -148,7 +148,7 @@ export async function endEnergieVerbrauchVerbrauchsausweis_2016(
|
||||
energieVerbrauchHeizung_2 * durchschnittsKlimafaktor;
|
||||
|
||||
let kuehlungsZuschlag = 0;
|
||||
if (aufnahme.kuehlung === "1") {
|
||||
if (aufnahme.kuehlung) {
|
||||
kuehlungsZuschlag = 6 * 3 * energetischeNutzflaeche;
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ export async function pdfVerbrauchsausweisWohnen(ausweis: VerbrauchsausweisWohne
|
||||
}
|
||||
}
|
||||
|
||||
if (aufnahme.kuehlung === "1") {
|
||||
if (aufnahme.kuehlung) {
|
||||
/**
|
||||
* Kühlungszuschlag - Pauschale Erhöhung um 6kWh/m²
|
||||
* Primärenergiefaktor Strom
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="relative mb-6 hidden">
|
||||
<div class="relative mb-6">
|
||||
<button class="button flex flex-row rounded-lg gap-2 bg-secondary text-white text-center" on:click={toggleDropdown}>
|
||||
Ausweis erstellen +
|
||||
</button>
|
||||
@@ -47,7 +47,7 @@
|
||||
{#if aufnahme.bilder.length > 0}
|
||||
<Carousel perPage={3}>
|
||||
{#each aufnahme.bilder as bild, i (i)}
|
||||
<img src="/bilder/{bild.id}.jpg" alt={bild.kategorie} class="max-h-[15vh] h-full w-full object-contain">
|
||||
<img src="/bilder/{bild.id}.jpg" alt={bild.kategorie} class="max-h-[25vh] h-full w-full object-contain">
|
||||
{/each}
|
||||
<span slot="left-control" class="p-2.5 bg-opacity-50 bg-white block rounded-full"><ChevronLeft size={24}></ChevronLeft></span>
|
||||
<span slot="right-control" class="p-2.5 bg-opacity-50 bg-white block rounded-full"><ChevronRight size={24}></ChevronRight></span>
|
||||
@@ -74,7 +74,7 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="my-4 grid grid-cols-1 md:grid-cols-1 lg:grid-cols-1">
|
||||
<div class="my-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
|
||||
{#each aufnahme.verbrauchsausweise_wohnen as ausweis}
|
||||
<DashboardAusweis {benutzer} {ausweis} {aufnahme} {objekt} rechnung={ausweis.rechnung}></DashboardAusweis>
|
||||
{/each}
|
||||
|
||||
@@ -230,7 +230,3 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ export const PUT = defineApiRoute({
|
||||
}
|
||||
|
||||
const id = generatePrefixedId(
|
||||
6,
|
||||
9,
|
||||
VALID_UUID_PREFIXES.BedarfsausweisWohnen
|
||||
);
|
||||
|
||||
|
||||
@@ -43,7 +43,9 @@ const objekte = await prisma.objekt.findMany({
|
||||
every: {
|
||||
verbrauchsausweise_gewerbe: {
|
||||
some: {
|
||||
id
|
||||
id: {
|
||||
contains: id
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -54,7 +56,9 @@ const objekte = await prisma.objekt.findMany({
|
||||
every: {
|
||||
verbrauchsausweise_wohnen: {
|
||||
some: {
|
||||
id
|
||||
id: {
|
||||
contains: id
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -65,7 +69,9 @@ const objekte = await prisma.objekt.findMany({
|
||||
every: {
|
||||
bedarfsausweise_wohnen: {
|
||||
some: {
|
||||
id
|
||||
id: {
|
||||
contains: id
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -138,11 +138,11 @@ Papa.parse(file, {
|
||||
}
|
||||
|
||||
const aufnahme_id = generatePrefixedId(
|
||||
6,
|
||||
9,
|
||||
VALID_UUID_PREFIXES.Aufnahme
|
||||
);
|
||||
|
||||
const aufnahme = await prisma.aufnahme.create({
|
||||
const [aufnahme, aufnahme_error] = await tryCatch(prisma.aufnahme.create({
|
||||
data: {
|
||||
id: aufnahme_id,
|
||||
alternative_heizung: dataset.alheizung == "1",
|
||||
@@ -243,7 +243,12 @@ Papa.parse(file, {
|
||||
zentralheizung: dataset.zentralheizung == "1",
|
||||
zirkulation: dataset.zirkulation == "1",
|
||||
},
|
||||
});
|
||||
}));
|
||||
|
||||
if (aufnahme_error) {
|
||||
console.log(aufnahme_error);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* -------------------------------- Bilder ------------------------------- */
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user