Merge pull request #246 from IBCornelsen/dev-moritz

Ausweis Speichern, Startmonat, TagInput
This commit is contained in:
Moritz Utcke
2024-12-20 14:46:54 +07:00
committed by GitHub
4 changed files with 46 additions and 59 deletions

View File

@@ -152,8 +152,9 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
<TagInput
name="baujahr_gebaeude"
type="number"
minlength={4}
maxlength={4}
onlyUnique={true}
minChars={4}
onFocusIn={() => {
addNotification({
message: "Info",
@@ -193,7 +194,8 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
name="baujahr_heizung"
type="number"
onlyUnique={true}
minChars={4}
minlength={4}
maxlength={4}
onFocusIn={() => {
addNotification({
message: "Info",

View File

@@ -65,8 +65,8 @@
fuelMap[fuel[0]].push(fuel[1]);
}
let month = ausweis.startdatum?.getMonth() || null;
let year = ausweis.startdatum?.getFullYear() || null;
let month = ausweis.startdatum?.getMonth();
let year = ausweis.startdatum?.getFullYear();
$: {
if (typeof month === "number" && typeof year === "number") {
@@ -158,11 +158,11 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
{#each Array.from(availableDates.reduce((a, c) => {
a.add(c.month);
return a;
}, new Set())) as month}
}, new Set())) as availableMonth}
<option
value={month}
selected={ausweis.startdatum?.getMonth() === month}
>{monthNames[month]}</option
value={availableMonth}
selected={month === availableMonth}
>{monthNames[availableMonth]}</option
>
{/each}
{/if}