diff --git a/apps/web/scripts/ai-estimate.ts b/apps/web/scripts/ai-estimate.ts index 29d5a55..b41403c 100644 --- a/apps/web/scripts/ai-estimate.ts +++ b/apps/web/scripts/ai-estimate.ts @@ -100,6 +100,15 @@ async function main() { const engine = new PdfEngine(); + const headerIcon = path.join( + monorepoRoot, + "apps/web/src/assets/logo/Icon-Black-Transparent.png", + ); + const footerLogo = path.join( + monorepoRoot, + "apps/web/src/assets/logo/Logo-Black-Transparent.png", + ); + try { const conceptResult = await conceptPipeline.run({ briefing, @@ -116,7 +125,10 @@ async function main() { konzeptDir, `${companyName}_Konzept_${timestamp}.pdf`, ); - await engine.generateConceptPdf(conceptResult, conceptPdfPath); + await engine.generateConceptPdf(conceptResult, conceptPdfPath, { + headerIcon, + footerLogo, + }); console.log(`āœ… Created Concept PDF at: ${conceptPdfPath}`); console.log("\n=================================================="); @@ -143,6 +155,7 @@ async function main() { await engine.generateEstimatePdf( estimationResult.formState, estimationPdfPath, + { headerIcon, footerLogo }, ); console.log(`āœ… Created Angebot PDF at: ${estimationPdfPath}`); @@ -151,7 +164,7 @@ async function main() { agbDir, `${companyName}_AGBs_${timestamp}.pdf`, ); - await engine.generateAgbsPdf(agbPdfPath, {}); + await engine.generateAgbsPdf(agbPdfPath, { headerIcon, footerLogo }); console.log(`āœ… Created AGBs PDF at: ${agbPdfPath}`); console.log("\nšŸ“„ Generating Deckblatt PDF..."); @@ -162,6 +175,7 @@ async function main() { await engine.generateFrontPagePdf( estimationResult.formState, deckblattPdfPath, + { headerIcon }, ); console.log(`āœ… Created Deckblatt PDF at: ${deckblattPdfPath}`); @@ -170,7 +184,10 @@ async function main() { abschlussDir, `${companyName}_Abschluss_${timestamp}.pdf`, ); - await engine.generateClosingPdf(abschlussPdfPath, {}); + await engine.generateClosingPdf(abschlussPdfPath, { + headerIcon, + footerLogo, + }); console.log(`āœ… Created Abschluss PDF at: ${abschlussPdfPath}`); } else { console.log("\nāš ļø No formState generated, skipping Estimation PDF."); @@ -182,7 +199,7 @@ async function main() { infoDir, `${companyName}_Arbeitsweise_${timestamp}.pdf`, ); - await engine.generateInfoPdf(infoPdfPath, {}); + await engine.generateInfoPdf(infoPdfPath, { headerIcon, footerLogo }); console.log(`āœ… Created Arbeitsweise PDF at: ${infoPdfPath}`); } catch (e) { console.error(`\nāŒ Pipeline failed: ${(e as Error).message}`);