Skip to content

Report Builder: five band canvases (header, group header, details, group footer, footer) #523

Description

@nielsdrost7

Status 2026-07-13: implemented on feature/130-report-builder (#608) — as-built notes in the #130 status section.


Parent: #130 (Report Builder — bands + bricks). Phase 2 (needs Phase 1: #521, #528). Part of epic #506, Track A.

Scope

The builder page shows five stacked Mason canvases, one per band, in fixed order:

  1. Header
  2. Group Header
  3. Details
  4. Group Footer
  5. Footer

(ReportBand enum — harvested from feature/145-report-builder — already defines exactly these five.)

Each canvas is its own Awcodes\Mason\Mason field whose ->bricks() list is ReportBricksCollection::forBand($band) — a brick that isn't allowed in a band never appears in that band's picker. Saving the page merges the five canvas states into one bands.json via ReportTemplateStorage (#528). This replaces the previous single-canvas-with-zone-overlays attempt, which is what stalled the old branch.

Also in scope: the template list page (disk scan: system + current company templates) with Clone / Rename / Delete actions (company templates only; system templates read-only) and a Preview action rendering dummy data. Panel theme imports mason's plugin CSS.

Acceptance criteria

  • Builder page renders five canvases in band order for a company template.
  • Each band's brick picker only offers bricks whose allowedBands() include that band.
  • Save writes all five bands into bands.json; an empty band saves as an empty array.
  • System templates open read-only (no save/delete); clones are fully editable.
  • Template list shows system + own-company templates only.

Test scenarios (PHPUnit + Livewire, #[Test], no Pest)

  • Builder page loads for an admin (AbstractAdminPanelTestCase), asserts five band fields present.
  • Saving a modified state persists to the expected storage path and round-trips.
  • A details-only brick is absent from the header canvas's available bricks.
  • Save action on a system template is rejected/hidden.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refinedRefined with SMART plan / test suggestions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions