ID auf Datenblatt
This commit is contained in:
@@ -9,6 +9,7 @@ import { BilderKategorie, Enums, Heizungsstatus } from "#lib/server/prisma.js";
|
||||
import { fileURLToPath } from "url";
|
||||
import { copyPage } from "./utils/copyPage.js";
|
||||
import { PERSISTENT_DIR } from "#lib/server/constants.js";
|
||||
import { shortenUID } from "#server/lib/hash.js";
|
||||
|
||||
/* -------------------------------- Pdf Tools ------------------------------- */
|
||||
|
||||
@@ -52,13 +53,15 @@ export async function pdfDatenblattVerbrauchsausweisWohnen(ausweis: Verbrauchsau
|
||||
|
||||
const innerWidth = pages[0].getWidth() - marginX * 2;
|
||||
|
||||
const id = shortenUID(ausweis.uid);
|
||||
|
||||
const layout = xml2pdf(`<layout height="${pages[0].getHeight()}" width="${pages[0].getWidth()}" marginTop="150" marginLeft="${marginX}" marginRight="${marginX}">
|
||||
<text size="12" lineHeight="14">${benutzer.vorname} ${benutzer.name}</text>
|
||||
<text size="12" lineHeight="14">${benutzer.adresse}</text>
|
||||
<text size="12" lineHeight="14">${benutzer.plz} ${benutzer.ort}</text>
|
||||
<flex direction="row" justify="space-between" marginTop="55" width="${innerWidth}">
|
||||
<text size="12" font="bold">Datenblatt Energieausweis</text>
|
||||
<text size="12">Ausweis ID: ${ausweis.uid}</text>
|
||||
<text size="12">Ausweis ID: ${id}</text>
|
||||
</flex>
|
||||
<text size="12" lineHeight="14" font="bold" marginTop="10">Gebäudedaten</text>
|
||||
<text size="12" lineHeight="14">Adresse: ${objekt.adresse}, ${objekt.plz} ${objekt.ort}</text>
|
||||
|
||||
Reference in New Issue
Block a user