feat(report): implement official daily attendance report generation and export (US-09) #16

Open
gabogg wants to merge 1 commit from feat/us-09-official-report-generation-and-export into main
Owner

Summary

sequenceDiagram
    participant User
    participant App
    participant ReportGenerator
    participant Window
    participant PDF/Share

    User->>App: Click "Official Report"
    App->>ReportGenerator: openOfficialReport(selectedDate, diurnoData, nocturnoData)
    ReportGenerator->>Window: window.open() & write generated HTML
    User->>Window: Click "Descargar PDF" or "Enviar por WhatsApp"
    Window->>PDF/Share: html2canvas + jsPDF pagination / Web Share API

Addresses US-09:

  • Generates dedicated pop-up window with formal institutional branding for Consultores H&G and Orinokia Mall.
  • Builds consolidated 24-post comparative table across Gamas, Rojos, and Parking.
  • Adds @media print styling rules hiding .action-toolbar during browser printing.
  • Implements multi-page A4 PDF export using html2canvas and jsPDF.
  • Implements WhatsApp sharing via navigator.share / navigator.canShare with fallback PNG download.
  • Adds complete unit test suite in src/components/__tests__/ReportGenerator.test.jsx.

Evidence

  • Before: No test suite or dedicated HTML generator export for official attendance document generation (0 tests for ReportGenerator).
  • After: 10/10 unit tests passing in ReportGenerator.test.jsx; full suite: 79/79 passing; production Vite build passing with 0 errors.

Merge Danger

Door: two-way

Blast Radius: isolated
Only touches document export window utilities and its dedicated test suite.

## Summary ```mermaid sequenceDiagram participant User participant App participant ReportGenerator participant Window participant PDF/Share User->>App: Click "Official Report" App->>ReportGenerator: openOfficialReport(selectedDate, diurnoData, nocturnoData) ReportGenerator->>Window: window.open() & write generated HTML User->>Window: Click "Descargar PDF" or "Enviar por WhatsApp" Window->>PDF/Share: html2canvas + jsPDF pagination / Web Share API ``` Addresses **US-09**: - Generates dedicated pop-up window with formal institutional branding for Consultores H&G and Orinokia Mall. - Builds consolidated 24-post comparative table across Gamas, Rojos, and Parking. - Adds `@media print` styling rules hiding `.action-toolbar` during browser printing. - Implements multi-page A4 PDF export using `html2canvas` and `jsPDF`. - Implements WhatsApp sharing via `navigator.share` / `navigator.canShare` with fallback PNG download. - Adds complete unit test suite in `src/components/__tests__/ReportGenerator.test.jsx`. ## Evidence - **Before:** No test suite or dedicated HTML generator export for official attendance document generation (`0` tests for ReportGenerator). - **After:** 10/10 unit tests passing in `ReportGenerator.test.jsx`; full suite: 79/79 passing; production Vite build passing with 0 errors. ## Merge Danger **Door:** two-way **Blast Radius:** isolated Only touches document export window utilities and its dedicated test suite.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/us-09-official-report-generation-and-export:feat/us-09-official-report-generation-and-export
git switch feat/us-09-official-report-generation-and-export

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/us-09-official-report-generation-and-export
git switch feat/us-09-official-report-generation-and-export
git rebase main
git switch main
git merge --ff-only feat/us-09-official-report-generation-and-export
git switch feat/us-09-official-report-generation-and-export
git rebase main
git switch main
git merge --no-ff feat/us-09-official-report-generation-and-export
git switch main
git merge --squash feat/us-09-official-report-generation-and-export
git switch main
git merge --ff-only feat/us-09-official-report-generation-and-export
git switch main
git merge feat/us-09-official-report-generation-and-export
git push origin main
Sign in to join this conversation.
No description provided.