From 35db825e6a50bae8dddc81926db847ea292403c6 Mon Sep 17 00:00:00 2001 From: Moritz Utcke Date: Sun, 23 Feb 2025 22:29:22 +1100 Subject: [PATCH 1/5] Auto stash before merge of "main" and "origin/main" --- src/astro-typesafe-api-caller.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/astro-typesafe-api-caller.ts b/src/astro-typesafe-api-caller.ts index 01c6a1a1..ca019c6a 100644 --- a/src/astro-typesafe-api-caller.ts +++ b/src/astro-typesafe-api-caller.ts @@ -19,22 +19,24 @@ export const createCaller = createCallerFactory({ "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"), + "ausweise": await import("../src/pages/api/ausweise/index.ts"), + "aufnahme": await import("../src/pages/api/aufnahme/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"), "geg-nachweis-wohnen/[uid]": await import("../src/pages/api/geg-nachweis-wohnen/[uid].ts"), "geg-nachweis-wohnen": await import("../src/pages/api/geg-nachweis-wohnen/index.ts"), "objekt": await import("../src/pages/api/objekt/index.ts"), + "ticket": await import("../src/pages/api/ticket/index.ts"), "rechnung/anfordern": await import("../src/pages/api/rechnung/anfordern.ts"), "rechnung": await import("../src/pages/api/rechnung/index.ts"), - "ticket": await import("../src/pages/api/ticket/index.ts"), "user": await import("../src/pages/api/user/index.ts"), "user/self": await import("../src/pages/api/user/self.ts"), + "webhooks/mollie": await import("../src/pages/api/webhooks/mollie.ts"), "verbrauchsausweis-gewerbe/[uid]": await import("../src/pages/api/verbrauchsausweis-gewerbe/[uid].ts"), "verbrauchsausweis-gewerbe": await import("../src/pages/api/verbrauchsausweis-gewerbe/index.ts"), "verbrauchsausweis-wohnen/[uid]": await import("../src/pages/api/verbrauchsausweis-wohnen/[uid].ts"), "verbrauchsausweis-wohnen": await import("../src/pages/api/verbrauchsausweis-wohnen/index.ts"), - "webhooks/mollie": await import("../src/pages/api/webhooks/mollie.ts"), "aufnahme/[uid]/bilder": await import("../src/pages/api/aufnahme/[uid]/bilder.ts"), "aufnahme/[uid]": await import("../src/pages/api/aufnahme/[uid]/index.ts"), "aufnahme/[uid]/unterlagen": await import("../src/pages/api/aufnahme/[uid]/unterlagen.ts"), From 80b88df992b30a615171c018199219eb361e09b2 Mon Sep 17 00:00:00 2001 From: Moritz Utcke Date: Sun, 23 Feb 2025 22:58:17 +1100 Subject: [PATCH 2/5] Kleinere Fehler gefixt --- Makefile | 4 +- .../20250223113449_migration/migration.sql | 47 ++++++++++++ src/astro-typesafe-api-caller.ts | 10 +-- .../Ausweis/Rechnungsadresse.svelte | 2 +- .../widgets/WelcherAusweisWidget_IBC.svelte | 2 +- src/lib/pdf/elements/Image.ts | 4 + .../pdfDatenblattVerbrauchsausweisWohnen.ts | 73 +------------------ src/lib/pdf/pdfVerbrauchsausweisWohnen.ts | 22 +++--- src/modules/KundendatenModule.svelte | 26 +++++-- src/pages/pdf/datenblatt.ts | 2 +- 10 files changed, 93 insertions(+), 99 deletions(-) create mode 100644 prisma/migrations/20250223113449_migration/migration.sql 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/src/astro-typesafe-api-caller.ts b/src/astro-typesafe-api-caller.ts index ca019c6a..2ed48238 100644 --- a/src/astro-typesafe-api-caller.ts +++ b/src/astro-typesafe-api-caller.ts @@ -14,29 +14,27 @@ 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"), - "ausweise": await import("../src/pages/api/ausweise/index.ts"), - "aufnahme": await import("../src/pages/api/aufnahme/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"), "geg-nachweis-wohnen/[uid]": await import("../src/pages/api/geg-nachweis-wohnen/[uid].ts"), "geg-nachweis-wohnen": await import("../src/pages/api/geg-nachweis-wohnen/index.ts"), "objekt": await import("../src/pages/api/objekt/index.ts"), - "ticket": await import("../src/pages/api/ticket/index.ts"), "rechnung/anfordern": await import("../src/pages/api/rechnung/anfordern.ts"), "rechnung": await import("../src/pages/api/rechnung/index.ts"), + "ticket": await import("../src/pages/api/ticket/index.ts"), "user": await import("../src/pages/api/user/index.ts"), "user/self": await import("../src/pages/api/user/self.ts"), - "webhooks/mollie": await import("../src/pages/api/webhooks/mollie.ts"), "verbrauchsausweis-gewerbe/[uid]": await import("../src/pages/api/verbrauchsausweis-gewerbe/[uid].ts"), "verbrauchsausweis-gewerbe": await import("../src/pages/api/verbrauchsausweis-gewerbe/index.ts"), "verbrauchsausweis-wohnen/[uid]": await import("../src/pages/api/verbrauchsausweis-wohnen/[uid].ts"), "verbrauchsausweis-wohnen": await import("../src/pages/api/verbrauchsausweis-wohnen/index.ts"), + "webhooks/mollie": await import("../src/pages/api/webhooks/mollie.ts"), "aufnahme/[uid]/bilder": await import("../src/pages/api/aufnahme/[uid]/bilder.ts"), "aufnahme/[uid]": await import("../src/pages/api/aufnahme/[uid]/index.ts"), "aufnahme/[uid]/unterlagen": await import("../src/pages/api/aufnahme/[uid]/unterlagen.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/widgets/WelcherAusweisWidget_IBC.svelte b/src/components/widgets/WelcherAusweisWidget_IBC.svelte index a79cf9c0..5acda5be 100644 --- a/src/components/widgets/WelcherAusweisWidget_IBC.svelte +++ b/src/components/widgets/WelcherAusweisWidget_IBC.svelte @@ -2,7 +2,7 @@ import { fade } from "svelte/transition"; import WidgetCardTemplate from "#components/widgets/WidgetCardTemplate_IBC.svelte"; import { PRICES } from "#lib/constants.js"; - import { Enums } from "#lib/client/prisma"; + import { Enums } from "#lib/client/prisma.js"; let gebaeudetyp: string = "bitte auswählen"; let anlass: string = "bitte auswählen"; diff --git a/src/lib/pdf/elements/Image.ts b/src/lib/pdf/elements/Image.ts index c4a21cef..9e0ce5e3 100644 --- a/src/lib/pdf/elements/Image.ts +++ b/src/lib/pdf/elements/Image.ts @@ -43,6 +43,10 @@ export class Image extends PDFElement { async draw(page: PDFPage, x: number, y: number) { let embed: PDFImage; if (this.options.src) { + if (!fs.existsSync(this.options.src)) { + return; + } + const img = fs.readFileSync(this.options.src) if (this.options.src.split(".").pop() === "png") { embed = await page.doc.embedPng(img) diff --git a/src/lib/pdf/pdfDatenblattVerbrauchsausweisWohnen.ts b/src/lib/pdf/pdfDatenblattVerbrauchsausweisWohnen.ts index e64b478d..4e415c42 100644 --- a/src/lib/pdf/pdfDatenblattVerbrauchsausweisWohnen.ts +++ b/src/lib/pdf/pdfDatenblattVerbrauchsausweisWohnen.ts @@ -5,7 +5,7 @@ import { PDFDocument, rgb, StandardFonts, TextAlignment } from "pdf-lib"; import { checkbox, flex, text } from "./elements/index.js"; import { xml2pdf } from "./elements/xml2pdf.js"; import moment from "moment"; -import { BilderKategorie, Heizungsstatus } from "#lib/server/prisma"; +import { BilderKategorie, Heizungsstatus } from "#lib/server/prisma.js"; import { fileURLToPath } from "url"; import { copyPage } from "./utils/copyPage.js"; import { PERSISTENT_DIR } from "#lib/server/constants.js"; @@ -51,7 +51,7 @@ export async function pdfDatenblattVerbrauchsausweisWohnen(ausweis: Verbrauchsau } const innerWidth = pages[0].getWidth() - marginX * 2; - + const layout = xml2pdf(` ${benutzer.vorname} ${benutzer.name} ${benutzer.adresse} @@ -337,74 +337,5 @@ export async function pdfDatenblattVerbrauchsausweisWohnen(ausweis: Verbrauchsau layoutPage2.draw(pages[1], 0, pages[1].getHeight()) layoutPage3.draw(pages[2], 0, pages[2].getHeight()) - // const containerWidth = width - marginX; - - // const layout = flex([ - // flex([ - // checkbox(8, 8), text("Neubau", { - // color: rgb(0,0,0), - // font, - // fontSize: 12 - // }) - // ], { - // align: "center", - // justify: "center", - // gap: 5, - // height: 12, - // page: pages[0] - // }), - // flex([ - // checkbox(8, 8), text("Vermietung/Verkauf", { - // color: rgb(0,0,0), - // font, - // fontSize: 12 - // }) - // ], { - // align: "center", - // justify: "center", - // gap: 5, - // height: 12, - // page: pages[0] - // }), - // flex([ - // checkbox(8, 8), text("Modernisierung", { - // color: rgb(0,0,0), - // font, - // fontSize: 12 - // }) - // ], { - // align: "center", - // justify: "center", - // gap: 5, - // height: 12, - // page: pages[0] - // }), - // flex([ - // checkbox(8, 8), text("Sonstiges", { - // color: rgb(0,0,0), - // font, - // fontSize: 12 - // }) - // ], { - // align: "center", - // justify: "center", - // gap: 5, - // height: 12, - // page: pages[0] - // }) - // ], { - // align: "center", - // justify: "space-between", - // gap: 15, - // x: marginX, - // y: height - marginY - 165, - // height: 12, - // width: containerWidth - // }) - - // layout.draw(pages[0]) - - // pdf.getForm().flatten() - return pdf.save(); } \ No newline at end of file diff --git a/src/lib/pdf/pdfVerbrauchsausweisWohnen.ts b/src/lib/pdf/pdfVerbrauchsausweisWohnen.ts index d9ac0161..ef1faa84 100644 --- a/src/lib/pdf/pdfVerbrauchsausweisWohnen.ts +++ b/src/lib/pdf/pdfVerbrauchsausweisWohnen.ts @@ -86,15 +86,19 @@ export async function pdfVerbrauchsausweisWohnen(ausweis: VerbrauchsausweisWohne const bild = bilder && bilder.find(image => image.kategorie === Enums.BilderKategorie.Gebaeude); if (bild) { - const file = fs.readFileSync(fileURLToPath(new URL(`${PERSISTENT_DIR}/images/${bild.uid}.jpg`, import.meta.url))) - let image: PDFImage; - image = await pdf.embedJpg(file) - pages[0].drawImage(image, { - x: 460.5, - y: height - 289, - width: 111, - height: 138 - }) + const path = `${PERSISTENT_DIR}/images/${bild.uid}.jpg`; + + if (fs.existsSync(path)) { + const file = fs.readFileSync(fileURLToPath(new URL(path, import.meta.url))) + let image: PDFImage; + image = await pdf.embedJpg(file) + pages[0].drawImage(image, { + x: 460.5, + y: height - 289, + width: 111, + height: 138 + }) + } } // Nach 82 aus Wohnfläche ermittelt diff --git a/src/modules/KundendatenModule.svelte b/src/modules/KundendatenModule.svelte index 9aaa85f6..ebbb85c0 100644 --- a/src/modules/KundendatenModule.svelte +++ b/src/modules/KundendatenModule.svelte @@ -4,8 +4,8 @@ import Bereich from "#components/labels/Bereich.svelte"; import Ansprechpartner from "#components/Ausweis/Ansprechpartner.svelte"; import Rechnungsadresse from "#components/Ausweis/Rechnungsadresse.svelte"; - import type { Bezahlmethoden } from "#lib/client/prisma"; - import { Enums } from "#lib/client/prisma"; + import type { Bezahlmethoden } from "#lib/client/prisma.js"; + import { Enums } from "#lib/client/prisma.js"; import { dialogs } from "svelte-dialogs"; import LoginDialog from "#components/LoginDialog.svelte"; import { @@ -239,11 +239,19 @@ } if (result === null) { - addNotification({ - dismissable: true, - message: "Ups... Das hat nicht geklappt.", - subtext: "Der Ausweis konnte nicht gespeichert werden, bitte versuchen sie es erneut oder kontaktieren sie unseren Support." - }) + if (ausweisart === Enums.Ausweisart.GEGNachweisWohnen || ausweisart === Enums.Ausweisart.GEGNachweisGewerbe || ausweisart === Enums.Ausweisart.GEGNachweisBedarfsausweis) { + addNotification({ + dismissable: true, + message: "Ups... Das hat nicht geklappt.", + subtext: "Der Ausweis konnte nicht gespeichert werden, bitte versuchen sie es erneut oder kontaktieren sie unseren Support." + }) + } else { + addNotification({ + dismissable: true, + message: "Ups... Das hat nicht geklappt.", + subtext: "Ihre Anfrage für einen GEG Nachweis konnte nicht gespeichert werden, bitte versuchen sie es erneut oder kontaktieren sie unseren Support." + }) + } } try { @@ -350,9 +358,11 @@ {:else} - + {/if}
diff --git a/src/pages/pdf/datenblatt.ts b/src/pages/pdf/datenblatt.ts index 8c1a854b..e355325e 100644 --- a/src/pages/pdf/datenblatt.ts +++ b/src/pages/pdf/datenblatt.ts @@ -98,7 +98,7 @@ export const POST: APIRoute = async (Astro) => { const aufnahme = JSON.parse(params.get("aufnahme") || "{}"); const objekt = JSON.parse(params.get("objekt") || "{}"); const bilder = JSON.parse(params.get("bilder") || "{}"); - const ausweisart: Enums.Ausweisart = params.get("ausweisart") + const ausweisart: Enums.Ausweisart = JSON.parse(params.get("ausweisart") || "") let user: BenutzerClient = {}; From 1484f54fe2c9668dd80f0126b5344fde9d93f5ea Mon Sep 17 00:00:00 2001 From: Robert Jagtiani Date: Sun, 23 Feb 2025 14:09:23 +0100 Subject: [PATCH 3/5] verbrauch --- src/components/Ausweis/Verbrauch.svelte | 37 +++++++++++++++---------- src/components/labels/HelpLabel.svelte | 2 +- src/style/global.css | 5 +++- 3 files changed, 28 insertions(+), 16 deletions(-) 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/style/global.css b/src/style/global.css index 43abda49..4a011c73 100644 --- a/src/style/global.css +++ b/src/style/global.css @@ -63,7 +63,10 @@ input[type="password"], input[type="file"], textarea, select{ -@apply p-1 min-h-[38px] ring-1 ring-black/15 rounded-sm} +@apply p-1 min-h-[38px] ring-1 ring-black/15 rounded-sm;} + +select option{font-family: "Heron", sans-serif !important;} +select, select option:disabled{@apply bg-white} input[type="file"]{@apply pt-[4px]} From af50e6ffada5ecb4f866b8d01807efd99bd357b8 Mon Sep 17 00:00:00 2001 From: Robert Jagtiani Date: Sun, 23 Feb 2025 15:35:19 +0100 Subject: [PATCH 4/5] widget Korrekturen - firefox,bilder --- .../immowelt/gewerbegebaeude_immowelt.svg | 28 ++++----- .../images/immowelt/wohngebaeude_immowelt.svg | 26 ++++---- public/images/widget/gewerbegebaeude.svg | 28 ++++----- public/images/widget/wohngebaeude.svg | 59 ++++++------------- .../widgets/WelcherAusweisWidget_IBC.svelte | 2 +- .../widgets/WidgetCardTemplate_IBC.svelte | 6 +- .../WelcherAusweisWidget_immowelt.svelte | 11 ++-- .../WidgetCardTemplate_immowelt.svelte | 10 ++-- 8 files changed, 72 insertions(+), 98 deletions(-) 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/components/widgets/WelcherAusweisWidget_IBC.svelte b/src/components/widgets/WelcherAusweisWidget_IBC.svelte index a79cf9c0..68a4d940 100644 --- a/src/components/widgets/WelcherAusweisWidget_IBC.svelte +++ b/src/components/widgets/WelcherAusweisWidget_IBC.svelte @@ -62,7 +62,7 @@ ausnahme = ((leerStand === "mehr als 30") || (heizungsAlter === "< 3") || (bau : false; oneBOX = ((ausnahme === true) && (gebaeudetyp != "Gewerbegebäude")) && (gebaeudetyp != "Mischgebäude") || - ((!twoBoxReason.includes(anlass)) && (gebaeudetyp != "Mischgebäude")) || + ((!twoBoxReason.includes(anlass)) && (gebaeudetyp != "Mischgebäude") && (gebaeudetyp != "bitte auswählen")) || ((gebaeudetyp === "Gewerbegebäude") && (leerStand === "mehr als 30")) ? true : false; diff --git a/src/components/widgets/WidgetCardTemplate_IBC.svelte b/src/components/widgets/WidgetCardTemplate_IBC.svelte index 0758f3d4..d47b482c 100644 --- a/src/components/widgets/WidgetCardTemplate_IBC.svelte +++ b/src/components/widgets/WidgetCardTemplate_IBC.svelte @@ -66,8 +66,8 @@ .sumRows{@apply hidden sm:grid grid-rows-subgrid row-span-5 items-center} .forServices{@apply grid-rows-subgrid row-span-5 items-center col-span-2 justify-center px-6} -.image{@apply w-[75%] justify-self-center - md:w-[75%] md:pl-12} +.image{@apply w-[75%] mx-auto + md:w-[75%] md:pl-0} .buttoncols{@apply grid grid-cols-1 gap-x-4 w-full mb-4 md:grid-cols-2 md:w-[auto]} @@ -84,7 +84,7 @@ hover:bg-primary hover:text-white} .titel {@apply col-span-2 text-center [font-size:_clamp(20px,2.5vw,28px)]} .empfehlung{@apply -mt-4 absolute justify-self-end rounded-md bg-red-700 text-white w-fit h-fit px-2 py-1 rotate-1 text-[0.65rem] ring-4 ring-white mr-6} .variante { - @apply italic col-span-2 -mt-2 -mb-4 text-[1rem] text-[#222222] justify-self-start ring-2 ring-primary rounded-md pl-[4px] pr-[6px] py-[0px]; + @apply w-fit italic col-span-2 -mt-2 -mb-4 text-[1rem] text-[#222222] justify-self-start ring-2 ring-primary rounded-md pl-[4px] pr-[6px] py-[0px]; } .services { diff --git a/src/components/widgets/immowelt/WelcherAusweisWidget_immowelt.svelte b/src/components/widgets/immowelt/WelcherAusweisWidget_immowelt.svelte index a0b8aa2c..fea328a9 100644 --- a/src/components/widgets/immowelt/WelcherAusweisWidget_immowelt.svelte +++ b/src/components/widgets/immowelt/WelcherAusweisWidget_immowelt.svelte @@ -20,6 +20,7 @@ let oneBOX: boolean = false; let threeBOX: boolean = false; + function getBoxes(){ if(twoBoxReason.includes(anlass)){ @@ -55,14 +56,15 @@ else{ } - $: { + + ausnahme = ((leerStand === "mehr als 30") || (heizungsAlter === "< 3") || (baujahr === "vor 1978" && einheiten === "bis 4 Wohneinheiten" && sanierungsstatus === "unsaniert")) ? true : false; -oneBOX = ((ausnahme === true) && (gebaeudetyp != "Gewerbegebäude")) && (gebaeudetyp != "Mischgebäude") || - ((!twoBoxReason.includes(anlass)) && (gebaeudetyp != "Mischgebäude")) || +oneBOX = ((ausnahme === true) && (gebaeudetyp != "Gewerbegebäude") && (gebaeudetyp != "Mischgebäude")) || + ((!twoBoxReason.includes(anlass)) && (gebaeudetyp != "Mischgebäude") && (gebaeudetyp != "bitte auswählen")) || ((gebaeudetyp === "Gewerbegebäude") && (leerStand === "mehr als 30")) ? true : false; @@ -73,9 +75,6 @@ threeBOX = ((ausnahme === true) && (gebaeudetyp === "Mischgebäude") && (twoBo } - - - diff --git a/src/components/widgets/immowelt/WidgetCardTemplate_immowelt.svelte b/src/components/widgets/immowelt/WidgetCardTemplate_immowelt.svelte index 2ac3ad3b..5e57f010 100644 --- a/src/components/widgets/immowelt/WidgetCardTemplate_immowelt.svelte +++ b/src/components/widgets/immowelt/WidgetCardTemplate_immowelt.svelte @@ -25,7 +25,7 @@ {src} {alt} /> -
+

ab {price} €

@@ -66,8 +66,8 @@ .sumRows{@apply hidden sm:grid grid-rows-subgrid row-span-5 items-center} .forServices{@apply grid-rows-subgrid row-span-5 items-center col-span-2 justify-center px-6} -.image{@apply w-[75%] justify-self-center - md:w-[75%] md:pl-12} +.image{@apply w-[75%] mx-auto + md:w-[75%] md:pl-0} .buttoncols{@apply grid grid-cols-1 gap-x-4 w-full mb-4 md:grid-cols-2 md:w-[auto]} @@ -76,7 +76,7 @@ md:grid-cols-2 md:w-[auto]} hover:bg-[#222222] hover:text-white} - .price{@apply tracking-tighter text-[2rem] text-[#222222] pl-12 m-0 -mt-4 text-nowrap; + .price{@apply tracking-tighter text-[2rem] text-[#222222] pl-12 m-0 -mt-7 text-nowrap text-left; font-family: "Antique Olive Compact bold";} @@ -84,7 +84,7 @@ hover:bg-[#222222] hover:text-white} .titel {@apply col-span-2 text-center [font-size:_clamp(20px,2.5vw,28px)]} .empfehlung{@apply -mt-4 absolute justify-self-end rounded-md bg-red-700 text-white w-fit h-fit px-2 py-1 rotate-1 text-[0.65rem] ring-4 ring-white mr-6} .variante { - @apply italic col-span-2 -mt-2 -mb-4 text-[1rem] text-[#222222] justify-self-start ring-2 ring-[#ffcc00] rounded-md pl-[4px] pr-[6px] py-[0px]; + @apply w-fit italic col-span-2 -mt-2 -mb-4 text-[1rem] text-[#222222] justify-self-start ring-2 ring-[#ffcc00] rounded-md pl-[4px] pr-[6px] py-[0px]; } .services { From cc2b9bdbf12788edd87600cfd4ddf943c11fc7a8 Mon Sep 17 00:00:00 2001 From: Robert Jagtiani Date: Sun, 23 Feb 2025 17:03:46 +0100 Subject: [PATCH 5/5] widget --- src/components/labels/InputLabel.svelte | 2 +- .../widgets/WelcherAusweisWidget_IBC.svelte | 2 +- .../WelcherAusweisWidget_immowelt.svelte | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) 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}