Adds Z-Report feature with PDF generation and UI components

Introduces Z-Report page and related functionality for cash register reconciliation
- Adds new Z-Report page template with comprehensive financial reporting
- Updates reconciliation table with Z-Report download buttons
- Implements print-optimized CSS for report styling
- Adds TypeScript handler for Z-Report button interactions
This commit is contained in:
Janus C. H. Knudsen 2026-01-23 16:25:43 +01:00
parent eaae745c42
commit f3c54dde35
6 changed files with 603 additions and 21 deletions

View file

@ -18,6 +18,7 @@ export class CashController {
this.setupDateFilters();
this.setupRowToggle();
this.setupDraftRowClick();
this.setupZReportButtons();
}
/**
@ -384,4 +385,23 @@ export class CashController {
this.switchToTab('afstemning');
});
}
/**
* Setup Z-report PDF download buttons
*/
private setupZReportButtons(): void {
const buttons = document.querySelectorAll<HTMLElement>('[data-zreport]');
buttons.forEach(btn => {
btn.addEventListener('click', (e) => {
e.preventDefault();
e.stopPropagation();
const reportId = btn.dataset.zreport;
if (reportId) {
window.open(`/kasse/z-rapport/${reportId}`, '_blank');
}
});
});
}
}