Support ticket #396994 (Jannick): pull prices from
haandvaerkpriser.dk for tasks we don't already price, as a starting
reference. robots.txt allows crawling /alle-priser/ and no terms of
use restrict reuse (checked before building this).
Each imported task becomes a verified 'component' Smart Package with
a single task carrying the price, filtered to only the 8 trades
Jannick asked for (Maler, Gulv, VVS & Blikkenslager, Tømrer &
Snedker, Murer, Tagrenovering, Isolering & Energi, Nedrivning &
Affald - the site has 16 categories total). This lands in the same
place as today's earlier smart-package fix, so these are immediately
selectable via the "Enkelte opgaver" picker and visible in the admin
Smart Packages list, unlike the existing price_database table which
is dead code (0 rows, its only consumer queries a column that no
longer exists, and its route isn't mounted).
Re-running the import is idempotent: a task already imported from
this source gets its price averaged with the new pull instead of
duplicating, per Jannick's request ("har vi en pris i forvejen kan
den lave et gennemsnit"). Cross-source matching against Jannick's own
manually-curated components is intentionally out of scope - automating
that risks merging unrelated tasks.
New endpoints (admin-only): GET /api/smart-packages/haandvaerkpriser-preview
(dry run, no writes) and POST /api/smart-packages/haandvaerkpriser-import.
Co-Authored-By: Claude Sonnet 5 <[email protected]>