MEGAINFRA-WEBAPP/src/components
DEls 8317238184 fix(purchasing): proxy PB files so PDFs render in the slip iframe
PocketBase sets `Content-Security-Policy: ...sandbox` on /api/files,
which makes Chromium treat the response as opaque-origin and silently
fail to render PDFs inside an <iframe> (downloads still work). Add a
same-origin proxy at /api/pb-files that forwards the bytes and strips
the CSP / X-Frame-Options headers so the iframe can render.

Files:
- new: src/app/api/pb-files/[collection]/[recordId]/[...filename]/route.ts
- SlipPreview now uses /api/pb-files/... for PDFs and PB directly
  for images (<img> isn't subject to the CSP sandbox, so the direct
  URL works there unchanged).

Path validation, ALLOWED_COLLECTIONS gate, path-traversal guard, and a
stable Content-Disposition so downloads keep the original filename.
2026-09-07 14:53:22 +02:00
..
layout feat(chat): sidebar link, editable-while-waiting, sticky footer, limit warning 2026-08-30 23:51:45 +02:00
ui feat(dashboard): add job start date to site records and enhance site management 2026-08-25 19:01:56 +02:00
add-plant-button.tsx feat(vehicles): implement DELETE endpoint for vehicle removal 2026-09-02 11:52:39 +02:00
auth-gate.tsx Initial commit: MEGA INFRASTRUCTURE dashboard + Coolify Dockerfile 2026-08-09 01:37:40 +02:00
edit-mode-bar.tsx feat(fuel-view): enhance inline editing and UI components 2026-08-26 08:54:57 +02:00
fixed-cost-dialog.tsx refactor(fixed-cost-dialog): drop defaultType prop, use field-message lookup, local-date default 2026-08-28 13:22:07 +02:00
import-fuel-logs-button.tsx feat(delivery-notes): enhance delivery note upload and processing 2026-08-26 15:33:30 +02:00
import-plant-hours-button.tsx feat(plant-hours): ImportPlantHoursButton component 2026-08-28 13:31:30 +02:00
import-timesheets-button.tsx feat(delivery-notes): enhance delivery note upload and processing 2026-08-26 15:33:30 +02:00
logo.tsx Initial commit: MEGA INFRASTRUCTURE dashboard + Coolify Dockerfile 2026-08-09 01:37:40 +02:00
needs-review-dns.tsx feat(purchasing): add searchable picker for PO assignment 2026-09-07 14:20:16 +02:00
pwa-register.tsx Initial commit: MEGA INFRASTRUCTURE dashboard + Coolify Dockerfile 2026-08-09 01:37:40 +02:00
rain-outlook-card.tsx feat(dashboard): enhance operations dashboard with rain outlook and coordinate support 2026-09-06 19:59:52 +02:00
site-form-dialog.tsx feat(dashboard): enhance operations dashboard with rain outlook and coordinate support 2026-09-06 19:59:52 +02:00
slip-preview.tsx fix(purchasing): proxy PB files so PDFs render in the slip iframe 2026-09-07 14:53:22 +02:00
theme-toggle.tsx Initial commit: MEGA INFRASTRUCTURE dashboard + Coolify Dockerfile 2026-08-09 01:37:40 +02:00
upload-delivery-note-button.tsx feat(delivery-notes): dedup by SHA-256 at upload time 2026-09-07 14:49:33 +02:00
upload-purchase-order-button.tsx feat(purchasing): shorten upload button labels (Upload PO / Upload DN) 2026-08-26 23:59:21 +02:00
vehicle-unit-type-cell.tsx fix(components): keep UnitTypePill text on a single line 2026-08-31 14:18:19 +02:00