Skip to content

Feature/dawa adressevaelger shift#77

Open
martinyde wants to merge 6 commits into
developfrom
feature/dawa-adressevaelger-shift
Open

Feature/dawa adressevaelger shift#77
martinyde wants to merge 6 commits into
developfrom
feature/dawa-adressevaelger-shift

Conversation

@martinyde
Copy link
Copy Markdown
Collaborator

@martinyde martinyde commented May 22, 2026

Link to ticket

https://leantime.itkdev.dk/#/tickets/showTicket/7543

Description

Replace deprecated DAWA address service with Adressevaelger

The DAWA API (dawa.aws.dk) is deprecated. This replaces both the frontend autocomplete (dawa-autocomplete2 npm package) and backend geocoding (nicoeg/dawa PHP package) with the new https://github.com/Klimadatastyrelsen/adressevaelger widget.

The new API returns coordinates in EPSG:25832 (UTM Zone 32N) instead of WGS84, so proj4 is used client-side to convert them. Coordinates are passed to the backend via hidden form fields and merged into the existing serialized data blob in massageFormValues() — no schema changes required. Server-side geocoding is fully removed. An optional admin config field is added for a custom adressevaelger API token, with the default public token (adressevaelger123) used as fallback.

Terser plugin was presumably only used for handling dawa-autocomplete2 so that has been removed.

New data flow

User selects address → adressevaelger widget calls /adresser/{id}
→ JS extracts EPSG:25832 coords from response.adresse.husnummer.adgangspunkt.koordinater
→ proj4 converts to WGS84 [lat, lng]
→ populates hidden form fields (geo_lat, geo_lng)
→ form submit → massageFormValues() merges into data['coordinates'], unsets hidden fields
→ EventHelper (unchanged) reads data['coordinates'] → sends geo_lat/geo_lng to Pretix API

@martinyde martinyde marked this pull request as ready for review May 22, 2026 13:17
@martinyde martinyde requested a review from rimi-itk May 22, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants