SMART Plan — [Core] Online PDF invoice template editor
Related: #98 (split-panel live preview / template editor), #96 (inline PDF preview on the invoice edit page).
Specific
Provide an in-browser HTML editor (e.g. CodeMirror or Monaco) inside the Filament admin panel where an admin can edit the Blade/HTML source of invoice PDF templates. The editor displays available template variables (placeholders) in a sidebar reference panel. A Preview button renders the template with dummy data so the admin can see the result without leaving the editor.
Measurable
- A template editor page exists under the admin panel Settings section.
- The editor loads the current template source.
- Saving the editor content persists the template file (or a DB-backed template record).
- The Preview button renders the template with sample invoice data and displays the HTML inline (no download required).
- PHPUnit confirms the save endpoint persists the template content.
Achievable
- Create a Filament
EditTemplate page or custom page under Modules/Core/Filament/Admin/Pages/.
- Embed a CodeMirror or Monaco editor via a Livewire component.
- The "Save" action writes the template content to a configurable path or a
templates database table.
- The "Preview" action calls the PDF renderer with sample data and returns HTML via a Livewire modal.
Relevant
Template customisation currently requires direct file system access (SSH / FTP) which is inaccessible to non-technical users. An in-browser editor removes this barrier.
Time-bound
Sprint 6 — depends on the base PDF renderer being stable (#96, #190, #200).
Acceptance Criteria
SMART Plan — [Core] Online PDF invoice template editor
Specific
Provide an in-browser HTML editor (e.g. CodeMirror or Monaco) inside the Filament admin panel where an admin can edit the Blade/HTML source of invoice PDF templates. The editor displays available template variables (placeholders) in a sidebar reference panel. A Preview button renders the template with dummy data so the admin can see the result without leaving the editor.
Measurable
Achievable
EditTemplatepage or custom page underModules/Core/Filament/Admin/Pages/.templatesdatabase table.Relevant
Template customisation currently requires direct file system access (SSH / FTP) which is inaccessible to non-technical users. An in-browser editor removes this barrier.
Time-bound
Sprint 6 — depends on the base PDF renderer being stable (#96, #190, #200).
Acceptance Criteria
{{ $invoice->invoice_number }}, etc.).