Files
Stirling-PDF/frontend/editor
Connor Yoh 53ce3f093b Procurement: download the signed agreement after signing
Adds a "Download signed agreement" button so the buyer can retrieve the
final signed PDF (the sign step already renders + stores it; there was a
backend endpoint but no UI to reach it).

- Snapshot exposes agreementSignedVersion (the label of the latest signature
  that has a stored PDF) via a projection query that avoids loading the PDF
  bytes on the frequently-polled snapshot.
- The button appears on the payment and live stages only when a downloadable
  PDF exists, and fetches it as an auth-gated blob (apiClient.saas.blob) →
  browser download, mirroring the quote-PDF pattern.
- MSW mock: sign sets the version and serves a minimal PDF blob.

Note: the stored PDF only exists when the render runtime (WeasyPrint) was
available at signing; without it the signature still records but there's no
PDF, so the button correctly won't show.

Verified: saas compiles; portal typecheck, eslint, prettier, toml-sort,
translation audits, 174 portal tests.
2026-07-14 14:24:07 +01:00
..
2026-07-11 12:48:53 +01:00