update
This commit is contained in:
@@ -380,9 +380,10 @@ export default function BestellungDetail() {
|
||||
// ── PDF Export ──
|
||||
async function generateBestellungDetailPdf() {
|
||||
if (!bestellung) return;
|
||||
const { jsPDF } = await import('jspdf');
|
||||
const autoTable = (await import('jspdf-autotable')).default;
|
||||
const doc = new jsPDF({ orientation: 'portrait', unit: 'mm', format: 'a4' });
|
||||
try {
|
||||
const { jsPDF } = await import('jspdf');
|
||||
const autoTable = (await import('jspdf-autotable')).default;
|
||||
const doc = new jsPDF({ orientation: 'portrait', unit: 'mm', format: 'a4' });
|
||||
|
||||
let settings;
|
||||
try { settings = await configApi.getPdfSettings(); } catch { settings = { pdf_header: '', pdf_footer: '', pdf_logo: '', pdf_org_name: '' }; }
|
||||
@@ -596,7 +597,11 @@ export default function BestellungDetail() {
|
||||
: (bestellung.besteller_name || '');
|
||||
doc.text(sigName, 120, curY);
|
||||
|
||||
doc.save(`bestellung_${kennung.replace('/', '-')}.pdf`);
|
||||
doc.save(`bestellung_${kennung.replace('/', '-')}.pdf`);
|
||||
} catch (err) {
|
||||
console.error('PDF generation failed:', err);
|
||||
showError('PDF konnte nicht erstellt werden');
|
||||
}
|
||||
}
|
||||
|
||||
if (isLoading) {
|
||||
|
||||
Reference in New Issue
Block a user