diff --git a/dbml/schema.dbml b/dbml/schema.dbml index 6b5ccf2b..bbc8bfac 100644 --- a/dbml/schema.dbml +++ b/dbml/schema.dbml @@ -453,6 +453,7 @@ Table VerbrauchsausweisGewerbe { alternative_lueftung Boolean alternative_kuehlung Boolean warmwasser_enthalten Boolean + warmwasser_anteil_bekannt Boolean [note: '@zod.describe("Falls der Warmwasser Anteil am Verbrauch bekannt ist, sollte dieser Wert auf true stehen")'] anteil_warmwasser_1 Float anteil_warmwasser_2 Float ausgestellt Boolean [default: false] diff --git a/prisma/migrations/20250308100529_warmwasser_anteil_bekannt/migration.sql b/prisma/migrations/20250308100529_warmwasser_anteil_bekannt/migration.sql new file mode 100644 index 00000000..e94020be --- /dev/null +++ b/prisma/migrations/20250308100529_warmwasser_anteil_bekannt/migration.sql @@ -0,0 +1,48 @@ +-- 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" ADD COLUMN "warmwasser_anteil_bekannt" BOOLEAN, +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/prisma/schema/VerbrauchsausweisGewerbe.prisma b/prisma/schema/VerbrauchsausweisGewerbe.prisma index 552c8916..d8b292e7 100644 --- a/prisma/schema/VerbrauchsausweisGewerbe.prisma +++ b/prisma/schema/VerbrauchsausweisGewerbe.prisma @@ -42,6 +42,8 @@ model VerbrauchsausweisGewerbe { alternative_kuehlung Boolean? warmwasser_enthalten Boolean? + /// @zod.describe("Falls der Warmwasser Anteil am Verbrauch bekannt ist, sollte dieser Wert auf true stehen") + warmwasser_anteil_bekannt Boolean? anteil_warmwasser_1 Float? anteil_warmwasser_2 Float? diff --git a/src/astro-typesafe-api-caller.ts b/src/astro-typesafe-api-caller.ts index 89aa5f09..01c6a1a1 100644 --- a/src/astro-typesafe-api-caller.ts +++ b/src/astro-typesafe-api-caller.ts @@ -12,13 +12,13 @@ export const createCaller = createCallerFactory({ "admin/post-ausstellen": await import("../src/pages/api/admin/post-ausstellen.ts"), "admin/registriernummer": await import("../src/pages/api/admin/registriernummer.ts"), "admin/stornieren": await import("../src/pages/api/admin/stornieren.ts"), - "ausweise": await import("../src/pages/api/ausweise/index.ts"), "aufnahme": await import("../src/pages/api/aufnahme/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"), + "ausweise": await import("../src/pages/api/ausweise/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/StromVerbrauch.svelte b/src/components/Ausweis/StromVerbrauch.svelte index 6607459d..6e449ad2 100644 --- a/src/components/Ausweis/StromVerbrauch.svelte +++ b/src/components/Ausweis/StromVerbrauch.svelte @@ -653,9 +653,8 @@ xl:grid-cols-3 xl:gap-x-8 xl:gap-y-8