Wohnfläche größer Nutzfläche Fehler
This commit is contained in:
@@ -4,23 +4,9 @@
|
||||
import { fly } from "svelte/transition";
|
||||
|
||||
export let notification: Partial<Notification> & { uid: string };
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="border rounded-lg bg-white shadow-md flex flex-row border-l-8" in:fly={{x: 200, duration: 200}} out:fly={{x: 200, duration: 200}}
|
||||
class:border-l-red-400={notification.type == "error"}
|
||||
class:border-l-blue-400={notification.type == "info"}
|
||||
class:border-l-green-400={notification.type == "success"}
|
||||
class:border-l-yellow-400={notification.type == "warning"}
|
||||
>
|
||||
<div class="flex flex-col px-4 py-2">
|
||||
<h2 class="text-xl font-semibold flex flex-row items-center gap-3">{@html notification.message} {#if notification.selector}
|
||||
<button on:click={() => {
|
||||
if (!notification.selector) {
|
||||
return
|
||||
}
|
||||
|
||||
const element = document.querySelector(notification.selector);
|
||||
function focusSelector() {
|
||||
const element = document.querySelector(notification.selector as string) as HTMLElement | null;
|
||||
|
||||
if (!element) {
|
||||
return
|
||||
@@ -40,7 +26,19 @@
|
||||
setTimeout(() => {
|
||||
element?.classList.remove("bg-red-300")
|
||||
}, 3000)
|
||||
}} class="p-1.5 border rounded-lg" title="Anzeigen"><OpenInNewWindow size={18}></OpenInNewWindow></button>
|
||||
}
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="border rounded-lg bg-white shadow-md flex flex-row border-l-8" in:fly={{x: 200, duration: 200}} out:fly={{x: 200, duration: 200}}
|
||||
class:border-l-red-400={notification.type == "error"}
|
||||
class:border-l-blue-400={notification.type == "info"}
|
||||
class:border-l-green-400={notification.type == "success"}
|
||||
class:border-l-yellow-400={notification.type == "warning"}
|
||||
>
|
||||
<div class="flex flex-col px-4 py-2">
|
||||
<h2 class="text-xl font-semibold flex flex-row items-center gap-3">{@html notification.message} {#if notification.selector}
|
||||
<button on:click={focusSelector} class="p-1.5 border rounded-lg" title="Anzeigen"><OpenInNewWindow size={18}></OpenInNewWindow></button>
|
||||
{/if}</h2>
|
||||
<p class="text-gray-600 text-lg"><slot></slot></p>
|
||||
</div>
|
||||
|
||||
@@ -339,6 +339,7 @@ xs:grid-cols-2"
|
||||
uid: "WOHNFLAECHE_GLEICH_GESAMTFLAECHE",
|
||||
dismissable: true,
|
||||
type: "warning",
|
||||
selector: "input[name='nutzflaeche']"
|
||||
}}
|
||||
>
|
||||
Die angegebene Gesamtfläche ist gleich der angegebenen Wohnfläche, in den meisten Fällen sollte die Gesamtfläche größer sein.
|
||||
@@ -579,18 +580,13 @@ xs:grid-cols-2"
|
||||
message: "Plausibilitätsprüfung",
|
||||
timeout: 0,
|
||||
uid: "WOHNFLAECHE_GROESSER_GESAMTFLAECHE",
|
||||
dismissable: true,
|
||||
onUserDismiss: () => {
|
||||
hidden.add(AuditType.WOHNFLAECHE_GROESSER_GESAMTFLAECHE);
|
||||
gebaeude = gebaeude;
|
||||
},
|
||||
type: "warning",
|
||||
dismissable: false,
|
||||
type: "error",
|
||||
selector: "input[name='nutzflaeche']"
|
||||
|
||||
}}
|
||||
>
|
||||
Die Wohnfläche darf nicht größer als die Nutzfläche sein.
|
||||
</RawNotification>
|
||||
{/if}
|
||||
</RawNotificationWrapper>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user