Skip to content

feat(case-location): apply spec#395

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feat/apply-case-location
May 11, 2026
Merged

feat(case-location): apply spec#395
rubenvdlinde merged 1 commit into
developmentfrom
feat/apply-case-location

Conversation

@rubenvdlinde
Copy link
Copy Markdown
Contributor

Summary

Manifest-first apply of the case-location change. Adds a location schema with a back-reference to case, surfaces it on the case detail "Locaties" sidebar tab via the related-index widget, and adds admin Locations / LocationDetail pages for browsing.

CRUD goes through the OpenRegister auto-form rendered by the manifest — no bespoke LocationController. LocationService.php owns the server-side helpers (validate, reverseGeocode, attachToCase, listForCase) and delegates reverse geocoding to PdokLocatieserverService from #390.

Changes

  • lib/Settings/procest_register.json: new location schema (back-ref to case, nummeraanduidingId, parcelId, latitude, longitude, formattedAddress, accuracyRadius, source enum, label), registered in the Procest register schema list.
  • lib/Service/SettingsService.php: location_schema config key + slug mapping.
  • lib/Service/LocationService.php: NEW — validate / reverseGeocode (PDOK-aware with graceful fallback) / attachToCase / listForCase.
  • src/manifest.json: Locations (index) + LocationDetail (detail) admin pages, LocationsMenu settings menu item, new locaties sidebar tab on CaseDetail page.
  • builds/build.json: applied entry for case-location with task accounting.

Spec coverage

Applied: T01 (schema + location_schema config key), T02 (back-reference relation), T04 (LocationService).

Deferred (follow-up issues):

  • T03 — PDOK client supplied by pdok-integration (feat(pdok-integration): apply spec #390); LocationService.reverseGeocode() delegates to it.
  • T05 — no bespoke LocationController; manifest + OpenRegister object endpoint cover CRUD.
  • T06 — manifest-driven related-index widget replaces Vue-side CaseLocationsTab.vue for MVP.
  • T07/T08 — CSV importer + export endpoint (separate follow-up).
  • V01-V04 — verification tests deferred under strict watchdog (lint + jq only).

Constraints honoured

  • Manifest-first: location entity CRUD via OpenRegister auto-form, no LocationController.
  • Address validation = legitimate PHP service (LocationService::validate).
  • Strict watchdog: only php -l + jq validation; no i18n; no composer.
  • Graceful fallback when pdok-integration services are unavailable.

Test plan

  • Run composer check:strict locally once PR lands (deferred under watchdog).
  • Verify LocationService::validate() rejects payload missing both BAG ID and coordinates.
  • Verify case detail "Locaties" tab renders the related-index widget filtered by case UUID.
  • Verify admin /settings/locations index page renders without 500.
  • Verify LocationService::reverseGeocode() returns null when PDOK service is missing.

Manifest-first apply of the case-location change. Adds a `location` schema to
the Procest register with a back-reference to `case`, the case detail
"Locaties" sidebar tab (related-index widget filtered by case UUID), and
admin index/detail pages for browsing all case locations. The location
entity CRUD is handled entirely by the OpenRegister auto-form rendered by
the manifest — no bespoke LocationController.

LocationService.php exposes the server-side helpers the manifest cannot:
- validate() — cross-field rules from design.md §Validation Rules
- reverseGeocode() — delegates to PdokLocatieserverService (pdok-integration)
  with graceful null fallback when PDOK is unavailable
- attachToCase() — persists a validated location through the OpenRegister
  object store, scoped to a case
- listForCase() — server-side helper for workflow guards and map clustering

Settings: adds `location_schema` to the app-config allow-list and the
`location` → `location_schema` slug mapping so the schema UUID is resolvable
at runtime.

Spec tasks applied: T01 (schema + config key), T02 (back-reference relation
docs), T04 (LocationService validate/reverseGeocode/attachToCase). Deferred:
T03 (PDOK client supplied by pdok-integration #390), T05 (no bespoke
LocationController — manifest covers CRUD), T06 (manifest-driven tab
replaces Vue-side CaseLocationsTab.vue for MVP), T07/T08 (CSV
import/export — follow-up), V01-V04 (test scope — strict watchdog lint+jq
only).
@rubenvdlinde rubenvdlinde force-pushed the feat/apply-case-location branch from 54e0460 to f6dc42d Compare May 11, 2026 12:15
@rubenvdlinde rubenvdlinde merged commit c8880e0 into development May 11, 2026
12 of 15 checks passed
@rubenvdlinde rubenvdlinde deleted the feat/apply-case-location branch May 11, 2026 12:15
@github-actions
Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/procest @ c954525

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm ✅ 419/419
PHPUnit ⏭️
Newman ⏭️
Playwright

Spec coverage: 3% (21 tests / 673 specs)


Quality workflow — 2026-05-11 12:19 UTC

Download the full PDF report from the workflow artifacts.

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.

1 participant