feat: tabular reports — five company-panel report pages (IP-145)#604
feat: tabular reports — five company-panel report pages (IP-145)#604nielsdrost7 wants to merge 1 commit into
Conversation
Track B of epic #506, per naui95's spec: Payment History, Invoicing History, Invoiced Amount by Client, Sales by Date (paid invoices), and Invoices per Client. Each is a read-only Filament page under a Reports navigation group with a date-range filter (defaults to the current month), an optional client filter, a totals summary line, and a CSV export streaming the filtered rows. Tenant scoping comes from the BelongsToCompany global scope and is covered by a cross-company test. Includes the AbstractCompanyPanelTestCase::testLivewire fix (wrong Livewire import + withSession chained on the wrong object) — the same fix ships in the report-builder branch; whichever merges second resolves cleanly to identical content. Test scenarios follow the issue body: in-range vs out-of-range payments, per-client invoiced sum, company scoping, plus client filtering, paid-only sales, and the CSV download. Refs #145 #506 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Recreated as #609 with the head branch on the fork (underdogg-forks) per the repo workflow — development on the fork, PRs land here. Same commits. |
Based on #602 (test-infra PR) — this PR's base branch is
chore/test-infra-and-gitignoreso the diff shows only its own commits; it retargets todevelopautomatically when #602 merges.Implements Track B of epic #506 — the tabular reports module per naui95's spec in #145. Independent of the Report Builder (no shared code path).
What's in here
Five read-only Filament pages in the company panel under a Reports navigation group, each with a date-range filter (defaults to the current month), an optional client filter, a totals summary line under the table, and a CSV export of the filtered rows:
withCount/withSumAll queries are tenant-scoped by the
BelongsToCompanyglobal scope. Shared behavior lives inBaseTabularReportPage(filters, CSV streaming, access control: client_admin + elevated roles).Also ships the
AbstractCompanyPanelTestCase::testLivewire()fix (broken Livewire import +withSessionchained on the wrong object) — identical fix is on the report-builder branch (underdogg-forks#2); whichever merges second resolves cleanly.Testing
Full suite green: 314 tests, 1,033 assertions, 0 failures (develop baseline: 307). The three scenarios drafted in the issue body (in-range vs out-of-range payments, per-client sum shows 1500, cross-company invisibility) plus client filtering, paid-only sales-by-date, page smoke for all five, and the CSV download assertion.
Follow-up
The issue's "later enhancement" (print/PDF export of these reports through builder templates) stays out of scope, as specified in #145.
🤖 Generated with Claude Code