Skip to content

Offline PWA: site selector + inline site-creation sub-wizard (GPS) #5

Description

@rec3141

Part of #1. Implements Tier 1 GPS.

GPS lives on the site (the sites table already has lat_lon, latitude, longitude, geo_loc_name, locality, env_broad_scale, env_local_scale); a sample inherits its site's coordinates.

Scope

  • Wizard's first step is a site selector.
  • If the site doesn't exist, create it inline using the same one-question-per-page flow, then return with it selected.
  • Site sub-wizard questions: project → site_name (only NOT NULL field) → GPS (navigator.geolocationlatitude/longitude/accuracy/altitude, Leaflet pin to confirm/adjust, manual fallback) → geo_loc_namelocalityenv_broad_scaleenv_local_scaledescription/access_notes.

Offline-site caveat (decision needed)

sites has sync_version but not client_id/local_created_at. To link an offline-created site to its samples before the server assigns an id, either:

  • (a) add client_id + local_created_at to sites via an idempotent migrate-*.mjs (mind the deploy-migration rule), or
  • (b) stash a client id in the existing custom_fields JSON, resolved server-side on sync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions