diff --git a/Makefile b/Makefile index 13e78cab..d07b36d4 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ BACKUP_FILENAME := $(HOME)/backups/$(shell date +"%Y-%m-%d_%H-%M-%S").sql.gz online-energieausweis: bun run dev --host -dev: install-dependencies database online-energieausweis +dev: database online-energieausweis database: docker compose up @@ -69,4 +69,4 @@ prod: install-dependencies run-database # - echo "CERTIFICATE=$(cat /etc/letsencrypt/live/ibcornelsen.de/fullchain.pem | base64 | tr -d '\n')" >> ~/online-energieausweis/.env; - pm2 delete online-energieausweis - pm2 start --name "online-energieausweis" --log ~/logs/`date '+%d-%m-%Y_%H:%M:%S'`.log --time bun -- run ./server.ts \ No newline at end of file + NODE_ENV="production" pm2 start --name "online-energieausweis" --update-env --log ~/logs/`date '+%d-%m-%Y_%H:%M:%S'`.log --time bun -- run ./server.ts \ No newline at end of file diff --git a/prisma/migrations/20250223113449_migration/migration.sql b/prisma/migrations/20250223113449_migration/migration.sql new file mode 100644 index 00000000..4e4efaa6 --- /dev/null +++ b/prisma/migrations/20250223113449_migration/migration.sql @@ -0,0 +1,47 @@ +-- AlterTable +ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); + +-- AlterTable +ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/public/images/immowelt/gewerbegebaeude_immowelt.svg b/public/images/immowelt/gewerbegebaeude_immowelt.svg index 4f94fd37..6ac92ac8 100644 --- a/public/images/immowelt/gewerbegebaeude_immowelt.svg +++ b/public/images/immowelt/gewerbegebaeude_immowelt.svg @@ -1,5 +1,5 @@ - + - - + + - - + + - - - - - - + + + + + + - - - + + + \ No newline at end of file diff --git a/public/images/immowelt/wohngebaeude_immowelt.svg b/public/images/immowelt/wohngebaeude_immowelt.svg index 3d694ef7..8fb28cde 100644 --- a/public/images/immowelt/wohngebaeude_immowelt.svg +++ b/public/images/immowelt/wohngebaeude_immowelt.svg @@ -1,5 +1,5 @@ - + - - + + - - + + - - - - + + + + - - - - + + + + diff --git a/public/images/widget/gewerbegebaeude.svg b/public/images/widget/gewerbegebaeude.svg index b1187c37..80d893a6 100644 --- a/public/images/widget/gewerbegebaeude.svg +++ b/public/images/widget/gewerbegebaeude.svg @@ -1,5 +1,5 @@ - + - - + + - - + + - - - - - - + + + + + + - - - + + + \ No newline at end of file diff --git a/public/images/widget/wohngebaeude.svg b/public/images/widget/wohngebaeude.svg index 6fb83e9c..eda0a69f 100644 --- a/public/images/widget/wohngebaeude.svg +++ b/public/images/widget/wohngebaeude.svg @@ -1,65 +1,40 @@ - + - - + + - + - - + + - - - - + + + + - - - - + + + + - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/astro-typesafe-api-caller.ts b/src/astro-typesafe-api-caller.ts index 01c6a1a1..2ed48238 100644 --- a/src/astro-typesafe-api-caller.ts +++ b/src/astro-typesafe-api-caller.ts @@ -14,11 +14,11 @@ export const createCaller = createCallerFactory({ "admin/stornieren": await import("../src/pages/api/admin/stornieren.ts"), "aufnahme": await import("../src/pages/api/aufnahme/index.ts"), "ausweise": await import("../src/pages/api/ausweise/index.ts"), + "bedarfsausweis-wohnen/[uid]": await import("../src/pages/api/bedarfsausweis-wohnen/[uid].ts"), + "bedarfsausweis-wohnen": await import("../src/pages/api/bedarfsausweis-wohnen/index.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/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": await import("../src/pages/api/bedarfsausweis-wohnen/index.ts"), "bilder/[uid]": await import("../src/pages/api/bilder/[uid].ts"), "geg-nachweis-gewerbe/[uid]": await import("../src/pages/api/geg-nachweis-gewerbe/[uid].ts"), "geg-nachweis-gewerbe": await import("../src/pages/api/geg-nachweis-gewerbe/index.ts"), diff --git a/src/components/Ausweis/Rechnungsadresse.svelte b/src/components/Ausweis/Rechnungsadresse.svelte index 1f0b4868..1d689dd0 100644 --- a/src/components/Ausweis/Rechnungsadresse.svelte +++ b/src/components/Ausweis/Rechnungsadresse.svelte @@ -87,7 +87,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8 name="rechnung_ort" type="text" required - value={rechnung.ort} + bind:value={rechnung.ort} />
diff --git a/src/components/Ausweis/Verbrauch.svelte b/src/components/Ausweis/Verbrauch.svelte index ad3325d2..2fe22a90 100644 --- a/src/components/Ausweis/Verbrauch.svelte +++ b/src/components/Ausweis/Verbrauch.svelte @@ -105,7 +105,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8 name="primaere_heizquelle" checked={true} /> - +
@@ -135,7 +135,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8 /> zusätzl. Heizquelle @@ -276,7 +276,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8 disabled={!aufnahme.brennstoff_1} required > - + {#each fuelMap.hasOwnProperty(aufnahme.brennstoff_1) ? fuelMap[aufnahme.brennstoff_1] : [] as unit} {/each} @@ -307,7 +307,10 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8 />
- {#if ausweis.einheit_1}{ausweis.einheit_1}{/if} + {#if ausweis.einheit_1 === "Bitte auswählen"} + {:else if ausweis.einheit_1 != "Bitte auswählen"} + {ausweis.einheit_1} + {/if}
@@ -335,7 +338,10 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8 required />
- {#if ausweis.einheit_1}{ausweis.einheit_1}{/if} + {#if ausweis.einheit_1 === "Bitte auswählen"} + {:else if ausweis.einheit_1 != "Bitte auswählen"} + {ausweis.einheit_1} + {/if}
@@ -363,7 +369,10 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8 required />
- {#if ausweis.einheit_1}{ausweis.einheit_1}{/if} + {#if ausweis.einheit_1 === "Bitte auswählen"} + {:else if ausweis.einheit_1 != "Bitte auswählen"} + {ausweis.einheit_1} + {/if}
@@ -380,12 +389,12 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8 {#if ausweis.zusaetzliche_heizquelle}
-
+
@@ -400,7 +409,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8 bind:checked={ausweis.zusaetzliche_heizquelle} /> zusätzl. Heizquelle
@@ -416,11 +425,11 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8
-
+ -
+
@@ -496,7 +505,7 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8 -
+
-
+
-
+
.tooltip { - @apply absolute -right-4 w-[240px] break-words ring-2 ring-secondary/5 invisible bg-white rounded-lg p-2 shadow-lg top-0 translate-y-[calc(-100%-8px)] transition-all duration-300 opacity-0; + @apply absolute z-[10] -right-4 w-[240px] break-words ring-2 ring-secondary/5 invisible bg-white rounded-lg p-2 shadow-lg top-0 translate-y-[calc(-100%-8px)] transition-all duration-300 opacity-0; } .tooltip-opener:hover .tooltip { diff --git a/src/components/labels/InputLabel.svelte b/src/components/labels/InputLabel.svelte index 82444fe2..49e851b9 100644 --- a/src/components/labels/InputLabel.svelte +++ b/src/components/labels/InputLabel.svelte @@ -4,7 +4,7 @@ -
{title}
+
{title}