Fehler gefixt die beim Testen aufgefallen sind.
This commit is contained in:
@@ -5,12 +5,12 @@ export const createCaller = createCallerFactory({
|
|||||||
"postleitzahlen": await import("../src/pages/api/postleitzahlen.ts"),
|
"postleitzahlen": await import("../src/pages/api/postleitzahlen.ts"),
|
||||||
"aufnahme/[uid]": await import("../src/pages/api/aufnahme/[uid].ts"),
|
"aufnahme/[uid]": await import("../src/pages/api/aufnahme/[uid].ts"),
|
||||||
"aufnahme": await import("../src/pages/api/aufnahme/index.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/access-token": await import("../src/pages/api/auth/access-token.ts"),
|
||||||
"auth/forgot-password": await import("../src/pages/api/auth/forgot-password.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"),
|
"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/[uid]": await import("../src/pages/api/bedarfsausweis-wohnen/[uid].ts"),
|
||||||
"bedarfsausweis-wohnen": await import("../src/pages/api/bedarfsausweis-wohnen/index.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"),
|
"objekt": await import("../src/pages/api/objekt/index.ts"),
|
||||||
"rechnung": await import("../src/pages/api/rechnung/index.ts"),
|
"rechnung": await import("../src/pages/api/rechnung/index.ts"),
|
||||||
"ticket": await import("../src/pages/api/ticket/index.ts"),
|
"ticket": await import("../src/pages/api/ticket/index.ts"),
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
//import Label from "#components/Label.svelte";
|
//import Label from "#components/Label.svelte";
|
||||||
|
|
||||||
import { auditHeizungGebaeudeBaujahr } from "../Verbrauchsausweis/audits/HeizungGebaeudeBaujahr.js";
|
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 TagInput from "../TagInput.svelte";
|
||||||
import { Enums } from "@ibcornelsen/database/client";
|
import { Enums } from "@ibcornelsen/database/client";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -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);
|
$: abweichung = auditVerbrauchAbweichung(ausweis, aufnahme);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
$: abweichung = auditVerbrauchAbweichung(ausweis, aufnahme);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<script lang="ts"></script>
|
<script lang="ts">
|
||||||
|
|
||||||
<div class="fixed right-8 bottom-8 max-w-[400px] flex flex-col gap-4 z-50">
|
</script>
|
||||||
|
|
||||||
|
<div class="fixed right-8 bottom-8 max-w-[400px] flex flex-col gap-4 z-50" {...$$restProps}>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
on:focusin={onFocusIn}
|
on:focusin={onFocusIn}
|
||||||
on:focusout={onFocusOut}
|
on:focusout={onFocusOut}
|
||||||
on:blur={() => {
|
on:blur={() => {
|
||||||
if (tag.toString().length >= minlength && tag.toString().length < maxlength) {
|
if (tag.toString().length >= minlength && tag.toString().length <= maxlength) {
|
||||||
addTag(tag)
|
addTag(tag)
|
||||||
tag = ""
|
tag = ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 { AuditType, hidden } from "./hidden.js";
|
||||||
import { getKlimafaktoren } from "#lib/Klimafaktoren.js";
|
import { getKlimafaktoren } from "#lib/Klimafaktoren.js";
|
||||||
|
|
||||||
export async function auditKlimaFaktoren(ausweis: VerbrauchsausweisWohnenClient, gebaeude: ObjektClient): Promise<boolean> {
|
export async function auditKlimaFaktoren(
|
||||||
|
ausweis: VerbrauchsausweisWohnenClient,
|
||||||
|
gebaeude: ObjektClient
|
||||||
|
): Promise<boolean> {
|
||||||
if (hidden.has(AuditType.KLIMA_FAKTOREN)) {
|
if (hidden.has(AuditType.KLIMA_FAKTOREN)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ausweis.startdatum && gebaeude.plz && ausweis.verbrauch_1) {
|
if (ausweis.startdatum && gebaeude.plz && ausweis.verbrauch_1) {
|
||||||
try {
|
try {
|
||||||
const response = await getKlimafaktoren(ausweis.startdatum, gebaeude.plz);
|
const response = await getKlimafaktoren(
|
||||||
return true; // Alle Klimfaktoren konnten abgefragt werden.
|
ausweis.startdatum,
|
||||||
} catch (e) {
|
gebaeude.plz
|
||||||
return true;
|
);
|
||||||
|
return true; // Alle Klimfaktoren konnten abgefragt werden.
|
||||||
|
} catch (e) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { AufnahmeClient } from "#components/Ausweis/types.js";
|
|||||||
import { AuditType, hidden } from "./hidden.js";
|
import { AuditType, hidden } from "./hidden.js";
|
||||||
|
|
||||||
export function auditLeerStand(gebaeude: AufnahmeClient): boolean {
|
export function auditLeerStand(gebaeude: AufnahmeClient): boolean {
|
||||||
if (gebaeude.leerstand && !hidden.has(AuditType.LEER_STAND)) {
|
if (gebaeude.leerstand) {
|
||||||
return (
|
return (
|
||||||
(gebaeude.leerstand > 30)
|
(gebaeude.leerstand > 30)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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";
|
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)) {
|
if (aufnahme.leerstand && (aufnahme.leerstand > 0)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,21 +16,25 @@ const { title } = Astro.props;
|
|||||||
<script>
|
<script>
|
||||||
window.addEventListener("scroll", (event) => {
|
window.addEventListener("scroll", (event) => {
|
||||||
let scroll = window.scrollY;
|
let scroll = window.scrollY;
|
||||||
|
const skala = document.getElementById("skala")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log(scroll);
|
|
||||||
if(scroll>=400){
|
if(scroll>=400){
|
||||||
|
if (skala) {
|
||||||
document.getElementById('skala')?.classList.add('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20');
|
skala.classList.add('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20');
|
||||||
document.getElementById('skala')?.classList.remove('w-full');
|
skala.classList.remove('w-full');
|
||||||
|
skala.style.borderBottom = "3px solid #e6e6e6";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
document.getElementById('skala').style.borderBottom = "3px solid #e6e6e6";
|
const performanceBox = document.getElementById('performance-box')
|
||||||
|
if (performanceBox) {
|
||||||
|
performanceBox.style.maxWidth = "688.5px";
|
||||||
|
}
|
||||||
|
const progressBox = document.getElementById('progress-box');
|
||||||
|
|
||||||
|
if (progressBox) {
|
||||||
document.getElementById('performance-box').style.maxWidth = "688.5px";
|
progressBox.style.maxWidth = "688.5px"
|
||||||
document.getElementById('progress-box').style.maxWidth = "688.5px";
|
}
|
||||||
|
|
||||||
document.getElementById('formInput-1')?.classList.add('2xl:mt-[370px]');
|
document.getElementById('formInput-1')?.classList.add('2xl:mt-[370px]');
|
||||||
|
|
||||||
@@ -38,11 +42,12 @@ console.log(scroll);
|
|||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
if (skala) {
|
||||||
document.getElementById('skala')?.classList.remove('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20');
|
skala.classList.remove('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20')
|
||||||
document.getElementById('skala')?.classList.add('w-full');
|
skala.classList.add('w-full')
|
||||||
|
skala.style.borderBottom = "none";
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById('skala').style.borderBottom = "none";
|
|
||||||
|
|
||||||
document.getElementById('formInput-1')?.classList.remove('2xl:mt-[370px]');
|
document.getElementById('formInput-1')?.classList.remove('2xl:mt-[370px]');
|
||||||
|
|
||||||
|
|||||||
@@ -48,13 +48,15 @@
|
|||||||
<span class="font-semibold">Falls sie ein Konto bei uns haben wurde eine Email an sie verschickt.</span>
|
<span class="font-semibold">Falls sie ein Konto bei uns haben wurde eine Email an sie verschickt.</span>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<button type="submit" class="btn btn-primary"
|
<button type="submit" class="button"
|
||||||
>Email zum Zurücksetzen des Passworts senden.</button
|
>Email zum Zurücksetzen des Passworts senden.</button
|
||||||
>
|
>
|
||||||
|
{#if showEmailSuccess}
|
||||||
<div class="flex-row justify-between" style="margin-top: 10px">
|
<div class="flex-row justify-between" style="margin-top: 10px">
|
||||||
<a class="link link-hover"
|
<a class="link link-hover"
|
||||||
href="/auth/login{redirect ? `?redirect=${redirect}` : ""}">Einloggen</a
|
href="/auth/login{redirect ? `?redirect=${redirect}` : ""}">Einloggen</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,14 +70,9 @@
|
|||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary"
|
<button type="submit" class="button"
|
||||||
>Passwort zurückzusetzen</button
|
>Passwort zurückzusetzen</button
|
||||||
>
|
>
|
||||||
<div class="flex-row justify-between" style="margin-top: 10px">
|
|
||||||
<a class="link link-hover"
|
|
||||||
href="/auth/login">Einloggen</a
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,6 @@
|
|||||||
|
|
||||||
export let user: BenutzerClient;
|
export let user: BenutzerClient;
|
||||||
export let objekte: ObjektClient[];
|
export let objekte: ObjektClient[];
|
||||||
|
|
||||||
console.log(objekte);
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1 class="text-4xl font-medium my-8">Willkommen zurück, {user.vorname}!</h1>
|
<h1 class="text-4xl font-medium my-8">Willkommen zurück, {user.vorname}!</h1>
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { addNotification } from "@ibcornelsen/ui";
|
import { addNotification } from "#components/Notifications/shared.js";
|
||||||
import { CrossCircled } from "radix-svelte-icons";
|
import { CrossCircled } from "radix-svelte-icons";
|
||||||
import { fade } from "svelte/transition";
|
import { fade } from "svelte/transition";
|
||||||
import { api } from "astro-typesafe-api/client";
|
import { api } from "astro-typesafe-api/client";
|
||||||
|
import NotificationProvider from "#components/NotificationProvider/NotificationProvider.svelte";
|
||||||
|
import NotificationWrapper from "#components/Notifications/NotificationWrapper.svelte";
|
||||||
|
|
||||||
let passwort: string;
|
let passwort: string;
|
||||||
let email: string;
|
let email: string;
|
||||||
@@ -13,6 +15,16 @@
|
|||||||
|
|
||||||
async function login(e: SubmitEvent) {
|
async function login(e: SubmitEvent) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
if (passwort.length < 8) {
|
||||||
|
addNotification({
|
||||||
|
message: "Passwort muss mindestens 6 Zeichen enthalten.",
|
||||||
|
dismissable: true,
|
||||||
|
timeout: 3000,
|
||||||
|
type: "error"
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { uid } = await api.user.PUT.fetch({
|
const { uid } = await api.user.PUT.fetch({
|
||||||
email,
|
email,
|
||||||
@@ -92,7 +104,7 @@
|
|||||||
<span class="font-semibold">Da ist wohl etwas schiefgelaufen. Diese Email Adresse ist bereits in Benutzung, haben sie vielleicht bereits ein Konto bei uns?</span>
|
<span class="font-semibold">Da ist wohl etwas schiefgelaufen. Diese Email Adresse ist bereits in Benutzung, haben sie vielleicht bereits ein Konto bei uns?</span>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<button type="submit" class="btn btn-primary"
|
<button type="submit" class="button"
|
||||||
>Registrieren</button
|
>Registrieren</button
|
||||||
>
|
>
|
||||||
<div class="flex-row justify-between" style="margin-top: 10px">
|
<div class="flex-row justify-between" style="margin-top: 10px">
|
||||||
@@ -102,4 +114,5 @@
|
|||||||
<a class="link link-hover" href="/auth/passwort-vergessen{redirect ? `?redirect=${redirect}` : ""}">Passwort Vergessen?</a>
|
<a class="link link-hover" href="/auth/passwort-vergessen{redirect ? `?redirect=${redirect}` : ""}">Passwort Vergessen?</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<NotificationWrapper></NotificationWrapper>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,6 +51,7 @@
|
|||||||
AufnahmeClient,
|
AufnahmeClient,
|
||||||
} from "#components/Ausweis/types.js";
|
} from "#components/Ausweis/types.js";
|
||||||
import { Enums } from "@ibcornelsen/database/client";
|
import { Enums } from "@ibcornelsen/database/client";
|
||||||
|
import { onMount } from "svelte";
|
||||||
|
|
||||||
// TODO: Vom Server sollte ein volles Objekt kommen, dass alle Subobjekte enthält, weil es sonst zu Problemen führen kann
|
// TODO: Vom Server sollte ein volles Objekt kommen, dass alle Subobjekte enthält, weil es sonst zu Problemen führen kann
|
||||||
// wenn aufnahme oder objekt nicht existiert...
|
// wenn aufnahme oder objekt nicht existiert...
|
||||||
@@ -60,6 +61,27 @@
|
|||||||
export let user: BenutzerClient = {} as BenutzerClient;
|
export let user: BenutzerClient = {} as BenutzerClient;
|
||||||
export let bilder: UploadedGebaeudeBild[] = []
|
export let bilder: UploadedGebaeudeBild[] = []
|
||||||
|
|
||||||
|
if (Object.keys(ausweis).length === 0) {
|
||||||
|
const localStorageAusweis = localStorage.getItem("ausweis");
|
||||||
|
if (localStorageAusweis) {
|
||||||
|
ausweis = JSON.parse(localStorageAusweis)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Object.keys(aufnahme).length === 0) {
|
||||||
|
const localStorageAufnahme = localStorage.getItem("aufnahme");
|
||||||
|
if (localStorageAufnahme) {
|
||||||
|
aufnahme = JSON.parse(localStorageAufnahme)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Object.keys(objekt).length === 0) {
|
||||||
|
const localStorageObjekt = localStorage.getItem("objekt");
|
||||||
|
if (localStorageObjekt) {
|
||||||
|
objekt = JSON.parse(localStorageObjekt)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function spaeterWeitermachen() {
|
async function spaeterWeitermachen() {
|
||||||
// TODO FIX
|
// TODO FIX
|
||||||
// const result = await ausweisSpeichern(
|
// const result = await ausweisSpeichern(
|
||||||
@@ -144,6 +166,18 @@
|
|||||||
let waitOverlayHidden = true;
|
let waitOverlayHidden = true;
|
||||||
let speichernOverlayHidden = true;
|
let speichernOverlayHidden = true;
|
||||||
|
|
||||||
|
$: {
|
||||||
|
if (ausweis.uid && objekt.uid && aufnahme.uid) {
|
||||||
|
localStorage.setItem(ausweis.uid, JSON.stringify(ausweis))
|
||||||
|
localStorage.setItem(objekt.uid, JSON.stringify(objekt))
|
||||||
|
localStorage.setItem(aufnahme.uid, JSON.stringify(aufnahme))
|
||||||
|
} else {
|
||||||
|
localStorage.setItem("ausweis", JSON.stringify(ausweis))
|
||||||
|
localStorage.setItem("aufnahme", JSON.stringify(aufnahme))
|
||||||
|
localStorage.setItem("objekt", JSON.stringify(objekt))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
if (
|
if (
|
||||||
aufnahme.saniert &&
|
aufnahme.saniert &&
|
||||||
@@ -302,7 +336,7 @@ lg:grid-cols-2 lg:gap-x-6
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ButtonWeiterHilfe {spaeterWeitermachen}
|
<ButtonWeiterHilfe
|
||||||
bind:ausweis
|
bind:ausweis
|
||||||
bind:bilder
|
bind:bilder
|
||||||
bind:user
|
bind:user
|
||||||
@@ -317,7 +351,7 @@ lg:grid-cols-2 lg:gap-x-6
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<RawNotificationWrapper>
|
<RawNotificationWrapper class="fixed left-8 bottom-8 max-w-[400px] flex flex-col gap-4 z-50">
|
||||||
{#each Object.entries($notifications) as [uid, notification] (uid)}
|
{#each Object.entries($notifications) as [uid, notification] (uid)}
|
||||||
<RawNotification notification={{ ...notification, uid }}>
|
<RawNotification notification={{ ...notification, uid }}>
|
||||||
{@html notification.subtext}
|
{@html notification.subtext}
|
||||||
@@ -416,7 +450,8 @@ lg:grid-cols-2 lg:gap-x-6
|
|||||||
dismissable: true,
|
dismissable: true,
|
||||||
onUserDismiss: () => {
|
onUserDismiss: () => {
|
||||||
hidden.add(AuditType.HEIZUNG_JUENGER_DREI_JAHRE);
|
hidden.add(AuditType.HEIZUNG_JUENGER_DREI_JAHRE);
|
||||||
objekt = objekt;
|
aufnahme = aufnahme;
|
||||||
|
|
||||||
},
|
},
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}}
|
}}
|
||||||
@@ -440,6 +475,7 @@ lg:grid-cols-2 lg:gap-x-6
|
|||||||
onUserDismiss: () => {
|
onUserDismiss: () => {
|
||||||
hidden.add(AuditType.ZEITRAUM_AKTUELL);
|
hidden.add(AuditType.ZEITRAUM_AKTUELL);
|
||||||
objekt = objekt;
|
objekt = objekt;
|
||||||
|
ausweis = ausweis
|
||||||
},
|
},
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}}
|
}}
|
||||||
@@ -463,6 +499,7 @@ lg:grid-cols-2 lg:gap-x-6
|
|||||||
onUserDismiss: () => {
|
onUserDismiss: () => {
|
||||||
hidden.add(AuditType.KLIMA_FAKTOREN);
|
hidden.add(AuditType.KLIMA_FAKTOREN);
|
||||||
objekt = objekt;
|
objekt = objekt;
|
||||||
|
ausweis = ausweis;
|
||||||
},
|
},
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}}
|
}}
|
||||||
@@ -486,7 +523,7 @@ lg:grid-cols-2 lg:gap-x-6
|
|||||||
dismissable: true,
|
dismissable: true,
|
||||||
onUserDismiss: () => {
|
onUserDismiss: () => {
|
||||||
hidden.add(AuditType.WOHN_FLAECHE);
|
hidden.add(AuditType.WOHN_FLAECHE);
|
||||||
objekt = objekt;
|
aufnahme = aufnahme;
|
||||||
},
|
},
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}}
|
}}
|
||||||
@@ -506,7 +543,7 @@ lg:grid-cols-2 lg:gap-x-6
|
|||||||
dismissable: true,
|
dismissable: true,
|
||||||
onUserDismiss: () => {
|
onUserDismiss: () => {
|
||||||
hidden.add(AuditType.WARM_WASSER);
|
hidden.add(AuditType.WARM_WASSER);
|
||||||
objekt = objekt;
|
ausweis = ausweis;
|
||||||
},
|
},
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}}
|
}}
|
||||||
@@ -522,11 +559,7 @@ lg:grid-cols-2 lg:gap-x-6
|
|||||||
message: "Plausibilitätsprüfung",
|
message: "Plausibilitätsprüfung",
|
||||||
timeout: 0,
|
timeout: 0,
|
||||||
uid: "LEER_STAND",
|
uid: "LEER_STAND",
|
||||||
dismissable: true,
|
dismissable: false,
|
||||||
onUserDismiss: () => {
|
|
||||||
hidden.add(AuditType.LEER_STAND);
|
|
||||||
objekt = objekt;
|
|
||||||
},
|
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -536,7 +569,8 @@ lg:grid-cols-2 lg:gap-x-6
|
|||||||
</RawNotification>
|
</RawNotification>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if auditVerbrauchAbweichung(ausweis, aufnahme).length > 0}
|
{@const abweichung = auditVerbrauchAbweichung(ausweis, aufnahme)}
|
||||||
|
{#if abweichung.length > 0}
|
||||||
<RawNotification
|
<RawNotification
|
||||||
notification={{
|
notification={{
|
||||||
message: "Plausibilitätsprüfung",
|
message: "Plausibilitätsprüfung",
|
||||||
@@ -546,17 +580,12 @@ lg:grid-cols-2 lg:gap-x-6
|
|||||||
onUserDismiss: () => {
|
onUserDismiss: () => {
|
||||||
hidden.add(AuditType.VERBRAUCH_ABWEICHUNG);
|
hidden.add(AuditType.VERBRAUCH_ABWEICHUNG);
|
||||||
objekt = objekt;
|
objekt = objekt;
|
||||||
|
ausweis = ausweis;
|
||||||
},
|
},
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Die Abweichung der Verbräuche zwischen Zeitraum {auditVerbrauchAbweichung(
|
Die Abweichung der Verbräuche zwischen Zeitraum {abweichung[0]} und {abweichung[1]} beträgt mehr als 30% und sie haben keinen Leerstand angegeben.
|
||||||
ausweis,
|
|
||||||
aufnahme
|
|
||||||
)[0]} und {auditVerbrauchAbweichung(
|
|
||||||
ausweis,
|
|
||||||
aufnahme
|
|
||||||
)[1]} beträgt mehr als 30% und sie haben keinen Leerstand angegeben.
|
|
||||||
Sind sie sich sicher, dass das stimmt?
|
Sind sie sich sicher, dass das stimmt?
|
||||||
</RawNotification>
|
</RawNotification>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { z } from "zod";
|
|||||||
export const PUT = defineApiRoute({
|
export const PUT = defineApiRoute({
|
||||||
input: z.object({
|
input: z.object({
|
||||||
email: z.string().email(),
|
email: z.string().email(),
|
||||||
passwort: z.string().min(6),
|
passwort: z.string().min(8),
|
||||||
vorname: z.string(),
|
vorname: z.string(),
|
||||||
name: z.string()
|
name: z.string()
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -76,5 +76,5 @@ if (uid) {
|
|||||||
---
|
---
|
||||||
|
|
||||||
<AusweisLayout title="Verbrauchsausweis erstellen">
|
<AusweisLayout title="Verbrauchsausweis erstellen">
|
||||||
<VerbrauchsausweisWohnenModule client:load {ausweis} {objekt} {aufnahme} {bilder} />
|
<VerbrauchsausweisWohnenModule client:only {ausweis} {objekt} {aufnahme} {bilder} />
|
||||||
</AusweisLayout>
|
</AusweisLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user