feature: PDF export UI -- project versions + template editor #14

Merged
Gilles merged 1 commit from feature/pdf-export into main 2026-10-30 20:28:11 +00:00
Owner

Adds the frontend half of async PDF export (see backend#19 / backend!20):

  • Versions tab (new /:org/:project/versions route, linked from the existing "Par raffinage"/"Par emplacement" tabs): validates a new ProjectVersion, triggers a PdfExportJob per version, polls it every 2s while pending/running, links to the download once done, and surfaces the backend's own human-readable validation errors.
  • Gestion > Export PDF tab: edit a PDF template scoped to an organization or a project (same org->project scoping as AdminProjectsTab/AdminThemesTab), pre-filled from the backend's built-in default template, a "repartir du modele par defaut" action, and a synchronous preview rendered against a fixed sample context.

No chip-based variable insertion (unlike poulpinou-vue's mail editor): the export context is a recursive place tree, not a flat set of key-value variables, so a documented reference plus the default template as a worked example fits better than fake chip insertion.

Test plan

  • pnpm run test:unit -- 66/66 passing (9 new, covering the versions page, the template editor's CRUD/scoping/permissions/preview, and the validate_version error path)
  • vue-tsc -b clean
  • pnpm run build clean
  • Manual check against a live backend running backend!20 (not done in this session -- flagging per "say so explicitly rather than claiming success" when a UI change can't be exercised in a real browser)

Closes #13


🤖 Generated with Claude Code

https://claude.ai/code/session_013EeueXTWCT4Y6EbeideZcm

Adds the frontend half of async PDF export (see backend#19 / backend!20): - **Versions tab** (new `/:org/:project/versions` route, linked from the existing "Par raffinage"/"Par emplacement" tabs): validates a new `ProjectVersion`, triggers a `PdfExportJob` per version, polls it every 2s while pending/running, links to the download once done, and surfaces the backend's own human-readable validation errors. - **Gestion > Export PDF tab**: edit a PDF template scoped to an organization or a project (same org->project scoping as `AdminProjectsTab`/`AdminThemesTab`), pre-filled from the backend's built-in default template, a "repartir du modele par defaut" action, and a synchronous preview rendered against a fixed sample context. No chip-based variable insertion (unlike poulpinou-vue's mail editor): the export context is a recursive place tree, not a flat set of key-value variables, so a documented reference plus the default template as a worked example fits better than fake chip insertion. ## Test plan - [x] `pnpm run test:unit` -- 66/66 passing (9 new, covering the versions page, the template editor's CRUD/scoping/permissions/preview, and the validate_version error path) - [x] `vue-tsc -b` clean - [x] `pnpm run build` clean - [ ] Manual check against a live backend running backend!20 (not done in this session -- flagging per "say so explicitly rather than claiming success" when a UI change can't be exercised in a real browser) Closes #13 --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013EeueXTWCT4Y6EbeideZcm
feature: PDF export UI -- project versions + template editor (backend#19)
All checks were successful
ci / unit (pull_request) Successful in 1m6s
ci / publish (pull_request) Has been skipped
26deb4ba33
Adds the frontend half of async PDF export (backend#19/backend!20):

- Versions tab (new /:org/:project/versions route, linked from the
  existing raffinage/places tabs): validates a new ProjectVersion,
  triggers a PdfExportJob per version, polls it every 2s while
  pending/running, and links to the download once done.
- Gestion > Export PDF tab: edit a PDF template scoped to an
  organization or a project (mirrors AdminProjectsTab/AdminThemesTab's
  own org->project scoping), pre-filled from the backend's built-in
  default, "repartir du modèle par défaut", and a synchronous preview
  rendered against a fixed sample context.

No chip-based variable insertion (unlike poulpinou-vue's editor): the
export context is a recursive place tree, not poulpinou's flat
key-value variables, so a plain documented reference plus the default
template as a worked example fits better than fake chip insertion.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013EeueXTWCT4Y6EbeideZcm
Author
Owner
<!-- argus-link-bot:thierryade/frontend --> 📊 [Rapports Argus pour cette PR](https://reports.stationmyr.net/thierryade/frontend/pr/14)
Gilles merged commit 7917d3afca into main 2026-10-30 20:28:11 +00:00
Gilles deleted branch feature/pdf-export 2026-10-30 20:28:11 +00:00
Sign in to join this conversation.
No description provided.