Auto stash before rebase of "main" onto "origin/main"

This commit is contained in:
Jens Cornelsen
2025-04-29 13:01:51 +02:00
parent 5a6bfcc900
commit cee45ffef5
3 changed files with 32 additions and 13 deletions

View File

@@ -683,7 +683,7 @@
{aufnahme.aussenwand_min_12cm_gedaemmt ? "Außenwand min. 12cm gedämmt" : ""}
</div>
<div class="text-xs space-y-1 p-2">
<span class="font-semibold">Hiermit bestätige ich {benutzer.vorname} {benutzer.name} als Besteller folgende Angaben:</span><br>
<span class="font-semibold">Hiermit bestätige ich {benutzer.vorname} {benutzer.name} als Besteller:</span><br>
{#if ausweis.pruefpunkt_heizungsalter}
<div>Das Heizungsalter ist jünger als 3 Jahre. Es betrifft einen Heizungstausch ohne energetische Verbesserung.</div>
{/if}

View File

@@ -199,16 +199,25 @@ export async function pdfVerbrauchsausweisGewerbe(ausweis: VerbrauchsausweisGewe
if (bild) {
const file = await getS3File("ibc-images", `${bild.id}.jpg`);
if (file) {
let image: PDFImage;
image = await pdf.embedJpg(file)
image = await pdf.embedJpg(file);
const originalWidth = image.width;
const originalHeight = image.height;
// Calculate the scaling factor to fit within the maximum dimensions while maintaining proportions
const scaleFactor = Math.min(111 / originalWidth, 138 / originalHeight);
const scaledWidth = originalWidth * scaleFactor;
const scaledHeight = originalHeight * scaleFactor;
pages[0].drawImage(image, {
x: 460.5,
y: height - 289,
width: 111,
height: 138
})
y: (height - 289 - scaledHeight) + 138, // Adjust y to align the image properly
width: scaledWidth,
height: scaledHeight
});
}
}

View File

@@ -59,13 +59,23 @@ export async function pdfVerbrauchsausweisWohnen(ausweis: VerbrauchsausweisWohne
if (file) {
let image: PDFImage;
image = await pdf.embedJpg(file)
image = await pdf.embedJpg(file);
const originalWidth = image.width;
const originalHeight = image.height;
// Calculate the scaling factor to fit within the maximum dimensions while maintaining proportions
const scaleFactor = Math.min(111 / originalWidth, 138 / originalHeight);
const scaledWidth = originalWidth * scaleFactor;
const scaledHeight = originalHeight * scaleFactor;
pages[0].drawImage(image, {
x: 460.5,
y: height - 289,
width: 111,
height: 138
})
y: (height - 289 - scaledHeight) + 138, // Adjust y to align the image properly
width: scaledWidth,
height: scaledHeight
});
}
}