Skip to content

Export observations as PDF and CSV #6

Description

@bgorzelic

Description

Allow users to export their observations in two formats:

  • PDF — Formatted like the NWCG fire behavior observation worksheet, suitable for printing and attaching to incident reports
  • CSV — Tabular export of all observations for analysis in Excel, Google Sheets, or GIS tools

Proposed Implementation

PDF Export

  • Use @react-pdf/renderer or jspdf for client-side PDF generation
  • Template mirrors the physical NWCG form layout
  • Include all fields: incident info, environment, wind/slope (with calculated EWS), ROS, LCES checklist, log entries
  • Fire-themed header with Firevector branding
  • Add "Export PDF" button on individual observation view

CSV Export

  • Server action that queries all user observations
  • Standard CSV with headers matching the observation columns
  • Include both raw and calculated values
  • Add "Export All (CSV)" button on dashboard

Acceptance Criteria

  • PDF export generates a professional NWCG-style form
  • CSV export includes all observations with calculated fields
  • Exports work on mobile and desktop
  • PDF includes log entries in a table
  • CSV handles special characters and commas in text fields
  • Loading state during generation
  • File downloads with meaningful filename (e.g., creek-fire-observation-2024-09-05.pdf)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: mediumMedium priority — important but not blockingarea: webNext.js web app (apps/web)size: LLarge — 3-5 daystype: featureNew feature or capability

    Projects

    Status
    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions