Button Ausweis erstellen

This commit is contained in:
Jens Cornelsen
2025-04-25 19:26:21 +02:00
parent 88c35f81f7
commit f9daeceeca
3 changed files with 33 additions and 9 deletions

View File

@@ -22,6 +22,12 @@
export let besteller: Benutzer | null;
let id: string;
let dropdownOpen = false;
function toggleDropdown() {
dropdownOpen = !dropdownOpen;
}
</script>
<aside class="rounded-lg bg-white box px-6 py-5">
@@ -54,12 +60,27 @@
Ausweise
</a> -->
<div class="flex flex-row gap-2 mb-4">
<div class="flex flex-row gap-2 mb-2">
<input type="text" bind:value={id} placeholder="ID">
<button class="button" on:click={() => {
window.location.href = `/dashboard/objekte/${id}`
}}><MagnifyingGlass size={24}></MagnifyingGlass></button>
</div>
<div class="relative mb-4">
<button class="button flex flex-row rounded-lg gap-2 bg-secondary text-white text-center" on:click={toggleDropdown}>
Energieausweis erstellen +
</button>
{#if dropdownOpen}
<div class="absolute top-15 left-0 mt-2 w-50 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 z-[9999]" on:click|stopPropagation on:keydown|stopPropagation on:keyup|stopPropagation>
<div class="py-1 w-full" role="menu" aria-orientation="vertical" aria-labelledby="options-menu">
<a href="/energieausweis-erstellen/verbrauchsausweis-wohngebaeude" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Verbrauchsausweis<br>Wohnen Erstellen</a>
<a href="/energieausweis-erstellen/verbrauchsausweis-gewerbe" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Verbrauchsausweis<br>Gewerbe Erstellen</a>
<a href="/energieausweis-erstellen/bedarfsausweis-wohngebaeude" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" role="menuitem">Bedarfsausweis<br>Wohnen Erstellen</a>
</div>
</div>
{/if}
</div>
<hr class="border-gray-600" />