402 lines
11 KiB
Svelte
402 lines
11 KiB
Svelte
<script lang="ts">
|
|
import { fade } from "svelte/transition";
|
|
import WidgetCardTemplate from "#components/design/content/WidgetCardTemplate.svelte";
|
|
import { PRICES } from "#lib/constants.js";
|
|
|
|
|
|
let gebaeudetyp: string = "bitte auswählen";
|
|
let anlass: string = "bitte auswählen";
|
|
let einheiten: string = "bitte auswählen";
|
|
let sanierungsstatus: string = "bitte auswählen";
|
|
let baujahr: string = "bitte auswählen";
|
|
let heizungsAlter: string = "bitte auswählen";
|
|
let leerStand: string = "bitte auswählen";
|
|
|
|
const twoBoxReason = ["Vermietung/Verkauf", "Aushangpflicht", "Sonstiges"];
|
|
const gewerbeHouse = ["Gewerbegebäude", "Mischgebäude"];
|
|
|
|
|
|
function getBoxes(){
|
|
if(twoBoxReason.includes(anlass)){
|
|
|
|
document.getElementById('firstrow')?.classList.remove('md:grid-cols-2');
|
|
document.getElementById('firstrow')?.classList.add('md:grid-cols-3');
|
|
}else{
|
|
|
|
document.getElementById('firstrow')?.classList.remove('md:grid-cols-3');
|
|
document.getElementById('firstrow')?.classList.add('md:grid-cols-2');
|
|
}
|
|
|
|
}
|
|
|
|
|
|
let ausnahme: boolean = false
|
|
|
|
$: {
|
|
|
|
ausnahme = ((leerStand === "mehr als 30") || (heizungsAlter === "< 3") || (baujahr === "vor 1978" && einheiten === "bis 4 Wohneinheiten" && sanierungsstatus === "unsaniert"))
|
|
? true
|
|
: false;
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div id="OEA_widget">
|
|
<input id="recode" type="hidden" value="widgetvorlage" />
|
|
|
|
<div id="OEA_input">
|
|
|
|
|
|
<div id="firstrow" class="firstrow">
|
|
|
|
<div class="auswahl">
|
|
<div class="titel">Anlass</div>
|
|
<select
|
|
id="anlass"
|
|
class="selectfeld"
|
|
bind:value={anlass} on:change={getBoxes}
|
|
>
|
|
<option selected disabled>bitte auswählen</option>
|
|
<option value="Vermietung/Verkauf"
|
|
>Vermietung/Verkauf</option
|
|
>
|
|
<option value="Modernisierung">Modernisierung</option>
|
|
<option value="Neubau">Neubau</option>
|
|
<option value="Erweiterung">Erweiterung</option>
|
|
<option value="Aushangpflicht">Aushangpflicht</option>
|
|
<option value="Sonstiges">Sonstiges z.B. Bank</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="auswahl">
|
|
<div class="titel">Gebäudetyp</div>
|
|
<select
|
|
class="selectfeld"
|
|
bind:value={gebaeudetyp} on:change={getBoxes}
|
|
>
|
|
<option selected disabled>bitte auswählen</option>
|
|
<option value="Einfamilienhaus">Einfamilienhaus</option>
|
|
<option value="Zweifamilienhaus">Zweifamilienhaus</option>
|
|
<option value="Mehrfamilienhaus">Mehrfamilienhaus</option>
|
|
<option value="Gewerbegebäude">Gewerbegebäude</option>
|
|
<option value="Mischgebäude">Mischgebäude</option>
|
|
</select>
|
|
</div>
|
|
|
|
{#if twoBoxReason.includes(anlass)}
|
|
<div class="auswahl">
|
|
<div class="titel">Sanierungsstand</div>
|
|
<select
|
|
class="selectfeld"
|
|
bind:value={sanierungsstatus} on:change={getBoxes}
|
|
|
|
>
|
|
<option selected disabled>bitte auswählen</option>
|
|
<option value="saniert">saniert</option>
|
|
<option value="unsaniert">unsaniert</option>
|
|
</select>
|
|
</div>
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
{#if twoBoxReason.includes(anlass)}
|
|
<div id="secondrow" class="secondrow">
|
|
<div class="auswahl">
|
|
<div class="titel">Baujahr</div>
|
|
<select
|
|
id="baujahr"
|
|
class="selectfeld"
|
|
bind:value={baujahr}
|
|
|
|
>
|
|
<option selected disabled>bitte auswählen</option>
|
|
<option value="vor 1978">vor 1978</option>
|
|
<option value="nach 1977">nach 1977</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="auswahl">
|
|
<div class="titel">Heizungsalter</div>
|
|
<select
|
|
class="selectfeld"
|
|
bind:value={heizungsAlter}
|
|
>
|
|
<option selected disabled>bitte auswählen</option>
|
|
<option value="< 3">jünger als 3 Jahre</option>
|
|
<option value=">= 3">3 Jahre oder älter</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="auswahl">
|
|
<div class="titel">Wohneinheiten</div>
|
|
<select
|
|
class="selectfeld"
|
|
bind:value={einheiten}
|
|
>
|
|
<option selected disabled>bitte auswählen</option>
|
|
<option value="bis 4 Wohneinheiten"
|
|
>bis 4 Wohneinheiten</option
|
|
>
|
|
<option value="mehr als 4 Wohneinheiten"
|
|
>mehr als 4 Wohneinheiten</option
|
|
>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="OEA_item4">
|
|
<div class="titel">Leerstand</div>
|
|
<select
|
|
class="selectfeld ausnahmen"
|
|
bind:value={leerStand}
|
|
>
|
|
<option selected disabled>bitte auswählen</option>
|
|
<option value="bis 30">bis 30%</option>
|
|
<option value="mehr als 30">mehr als 30%</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
|
|
<div id="thirdrow" class="thirdrow">
|
|
{#if twoBoxReason.includes(anlass) && (gebaeudetyp != "Gewerbegebäude") && (ausnahme === false)}
|
|
|
|
<div
|
|
class="produktbox"
|
|
transition:fade={{ duration: 200 }}
|
|
>
|
|
<WidgetCardTemplate
|
|
name="Verbrauchsausweis Wohngebäude"
|
|
price={PRICES.VerbrauchsausweisWohnen[0]}
|
|
src="/images/right-sidebar/wohngebaeude.svg"
|
|
alt="Wohnhaus Verbrauchsausweis"
|
|
variant="einfach"
|
|
empfehlung="nein"
|
|
services={[
|
|
["3 Jahresverbräuche der Heizung benötigt.", true],
|
|
["Zulässig bei Vermietung oder Verkauf.", true],
|
|
["Unzulässig bei unsanierten Gebäuden vor 1978.", false],
|
|
["Ungenau durch individuelles Heizverhalten.", false],
|
|
["Wird nicht immer bei den Banken akzeptiert.", false]
|
|
]}
|
|
href_buy="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/"
|
|
href_overview="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude/produkt-uebersicht/"
|
|
></WidgetCardTemplate>
|
|
</div>
|
|
{/if}
|
|
|
|
{#if twoBoxReason.includes(anlass) && (gebaeudetyp != "Gewerbegebäude")}
|
|
<div
|
|
class="produktbox"
|
|
transition:fade={{ duration: 200 }}
|
|
>
|
|
<WidgetCardTemplate
|
|
name="Bedarfsausweis Wohngebäude"
|
|
price={PRICES.BedarfsausweisWohnen[0]}
|
|
src="/images/right-sidebar/wohngebaeude.svg"
|
|
alt="Wohnhaus Bedarfsausweis"
|
|
variant="fundiert"
|
|
empfehlung="ja"
|
|
services={[
|
|
["Erfassung der Gebäudegeometrie.", true],
|
|
["Für Vermietung, Verkauf und Finanzierung.", true],
|
|
["Zulässig auch für unsanierte Objekte.", true],
|
|
["Kann als Grundlage für den ISFP dienen.", true],
|
|
["Objektivere Berechnungsmethode nach DIN 18599.", true],
|
|
]}
|
|
href_buy="/energieausweis-erstellen/bedarfsausweis-wohngebaeude/"
|
|
href_overview="/energieausweis-erstellen/bedarfsausweis-wohngebaeude/produkt-uebersicht/"
|
|
></WidgetCardTemplate>
|
|
</div>
|
|
{/if}
|
|
|
|
{#if twoBoxReason.includes(anlass) && gewerbeHouse.includes(gebaeudetyp) && (ausnahme === false)}
|
|
<div
|
|
class="produktbox"
|
|
transition:fade={{ duration: 200 }}
|
|
>
|
|
<WidgetCardTemplate
|
|
name="Verbrauchsausweis Gewerbegebäude"
|
|
price={PRICES.VerbrauchsausweisGewerbe[0]}
|
|
src="/images/right-sidebar/gewerbegebaeude.svg"
|
|
alt="Gewerbe Verbrauchsausweis"
|
|
variant="einfach"
|
|
empfehlung="nein"
|
|
services={[
|
|
|
|
["3 Jahresverbräuche von Heizung Gebäudestrom nötig.", true],
|
|
["Zulässig bei Vermietung oder Verkauf.", true],
|
|
["Für bauliche und energetische Maßnahmen ungeeignet.", false],
|
|
["Wird nicht immer bei den Banken akzeptiert.", false],
|
|
["xxx", false],
|
|
]}
|
|
href_buy="/energieausweis-erstellen/verbrauchsausweis-gewerbe/"
|
|
href_overview="/energieausweis-erstellen/verbrauchsausweis-gewerbe/produkt-uebersicht/"
|
|
></WidgetCardTemplate>
|
|
|
|
</div>
|
|
{/if}
|
|
|
|
{#if twoBoxReason.includes(anlass) && gewerbeHouse.includes(gebaeudetyp)}
|
|
<div
|
|
class="produktbox"
|
|
transition:fade={{ duration: 200 }}
|
|
>
|
|
<WidgetCardTemplate
|
|
name="Bedarfsausweis Gewerbegebäude"
|
|
price={PRICES.BedarfsausweisGewerbe[0]}
|
|
src="/images/right-sidebar/gewerbegebaeude.svg"
|
|
alt="Gewerbe Bedarfsausweis"
|
|
variant="fundiert"
|
|
empfehlung="ja"
|
|
services={[
|
|
|
|
["Mehrzonenmodell nach DIN 18599.", true],
|
|
["Zulässig bei Vermietung oder Verkauf.", true],
|
|
["Grundlage für Sanierung-Varianten.", true],
|
|
["Objektiveres, besser vergleichbares Ergebnis.", true],
|
|
["xxx", false],
|
|
]}
|
|
href_buy="/energieausweis-erstellen/bedarfsausweis-gewerbe/"
|
|
href_overview="/energieausweis-erstellen/bedarfsausweis-gewerbe/produkt-uebersicht/"
|
|
></WidgetCardTemplate>
|
|
</div>
|
|
{/if}
|
|
|
|
{#if (anlass != "bitte auswählen") && !twoBoxReason.includes(anlass) && (gebaeudetyp != "Gewerbegebäude")}
|
|
<div
|
|
class="produktbox"
|
|
transition:fade={{ duration: 200 }}
|
|
>
|
|
<WidgetCardTemplate
|
|
name="GEG-Nachweis Wohngebäude"
|
|
price={PRICES.BedarfsausweisGewerbe[0]}
|
|
src="/images/right-sidebar/gewerbegebaeude.svg"
|
|
alt="Gewerbe Bedarfsausweis"
|
|
variant="Bauvorlage"
|
|
empfehlung="nein"
|
|
services={[
|
|
|
|
["xxx", true],
|
|
["xxx", true],
|
|
["xxx", false],
|
|
["xxx", false],
|
|
["xxx", false],
|
|
]}
|
|
href="/energieausweis-erstellen/bedarfsausweis-gewerbe/"
|
|
|
|
></WidgetCardTemplate>
|
|
|
|
</div>
|
|
{/if}
|
|
|
|
{#if (anlass != "bitte auswählen") && !twoBoxReason.includes(anlass) && gewerbeHouse.includes(gebaeudetyp)}
|
|
<div
|
|
class="produktbox"
|
|
transition:fade={{ duration: 200 }}
|
|
>
|
|
<WidgetCardTemplate
|
|
name="GEG-Nachweis Gewerbegebäude"
|
|
price={PRICES.BedarfsausweisGewerbe[0]}
|
|
src="/images/right-sidebar/gewerbegebaeude.svg"
|
|
alt="Gewerbe Bedarfsausweis"
|
|
variant="Bauvorlage"
|
|
empfehlung="nein"
|
|
services={[
|
|
|
|
["xxx", true],
|
|
["xxx", true],
|
|
["xxx", false],
|
|
["xxx", false],
|
|
["xxx", false],
|
|
]}
|
|
href="/energieausweis-erstellen/bedarfsausweis-gewerbe/"
|
|
></WidgetCardTemplate>
|
|
|
|
</div>
|
|
{/if}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style lang="postcss">
|
|
|
|
@font-face {
|
|
font-family: 'Heron';
|
|
font-weight: 700;
|
|
font-style: normal;
|
|
font-display:swap;
|
|
src: url("/fonts/HeronSans-Regular.woff2") format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Antique Olive Compact bold';
|
|
font-weight: 700;
|
|
font-style: normal;
|
|
font-display:swap;
|
|
src: url("/fonts/Antique Olive Std Compact.woff2") format('woff2');
|
|
}
|
|
|
|
|
|
*{font-family: "Heron";}
|
|
|
|
#OEA_widget {
|
|
@apply min-w-[320px] max-w-[1920px] p-[4px]
|
|
sm:p-[10px];
|
|
|
|
.firstrow{@apply grid grid-cols-1 gap-x-4 gap-y-2
|
|
sm:grid-cols-2 sm:gap-x-4 sm:gap-y-2;
|
|
|
|
.titel{@apply text-white font-sans font-bold bg-[#444f94] px-2 py-1 rounded-[0.25rem];}
|
|
|
|
.selectfeld{@apply w-full px-2 py-1 min-h-[38px] ring-1 ring-black/15}
|
|
|
|
}
|
|
|
|
.secondrow{@apply grid grid-cols-2 gap-x-4 gap-y-2 mt-4
|
|
sm:grid-cols-4 sm:gap-x-4 sm:gap-y-2;
|
|
|
|
.titel{@apply text-black font-sans font-bold bg-[#cccccc] px-2 py-1 rounded-[0.25rem];}
|
|
|
|
.selectfeld{@apply w-full px-2 py-1 min-h-[38px] ring-1 ring-black/15}
|
|
|
|
}
|
|
|
|
.thirdrow{@apply grid grid-cols-2 gap-x-4 gap-y-2
|
|
md:grid-cols-4 md:gap-x-4 md:gap-y-2;
|
|
|
|
.produktbox{@apply grid grid-cols-subgrid col-span-2 grid-rows-subgrid row-span-3 md:row-span-12 bg-black/5 rounded-lg
|
|
px-2 py-2 mt-5;
|
|
box-shadow:2px 2px 8px rgba(0,0,0,0.25)
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|