update
This commit is contained in:
@@ -380,6 +380,7 @@ export default function BestellungDetail() {
|
|||||||
// ── PDF Export ──
|
// ── PDF Export ──
|
||||||
async function generateBestellungDetailPdf() {
|
async function generateBestellungDetailPdf() {
|
||||||
if (!bestellung) return;
|
if (!bestellung) return;
|
||||||
|
try {
|
||||||
const { jsPDF } = await import('jspdf');
|
const { jsPDF } = await import('jspdf');
|
||||||
const autoTable = (await import('jspdf-autotable')).default;
|
const autoTable = (await import('jspdf-autotable')).default;
|
||||||
const doc = new jsPDF({ orientation: 'portrait', unit: 'mm', format: 'a4' });
|
const doc = new jsPDF({ orientation: 'portrait', unit: 'mm', format: 'a4' });
|
||||||
@@ -597,6 +598,10 @@ export default function BestellungDetail() {
|
|||||||
doc.text(sigName, 120, curY);
|
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) {
|
if (isLoading) {
|
||||||
|
|||||||
Reference in New Issue
Block a user