Adds an inline preview for stored document files alongside download.
- API Server: GET /api/documents/{id}/file honours ?inline=1, serving an
inline Content-Disposition so the browser renders the file instead of
forcing a download (default stays attachment).
- Web App: BFF forwards the inline flag; documentPreviewUrl() helper; an eye
icon; and a preview modal (Teleported to body) that picks a viewer from the
file extension — images -> <img>, PDFs/text -> <iframe>, else a
download-instead fallback. Closes on backdrop click or Escape.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduces a `documents` collection and full-stack UI for tracking pilot
certificates, aircraft registrations, insurance, airspace authorisations,
contracts, and other paperwork.
- Migration 1720300800_add_documents.js (also provisioned live on remote PB):
doc_type/owner/expiry/status/access_tier + file blob, a self-referential
`replaces` version chain, audit fields, and a partial index on expiry_date.
- API Server (documents.go): role-scoped CRUD, server-computed expiry
assessment, ?expiring=N query, versioning (replaces -> version+1, old row
auto-archived), and streamed blob download. admin.go gains multipart upload,
file tokens, and protected-file streaming.
- Web App: BFF passthrough (multipart create + streamed download), api.js
client fns, and Documents.vue wired into the Documents nav slot.
Blobs live in PocketBase file storage for now; only that backend swaps when
S3-compatible object storage lands.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>