Skip to content

fix: show full address and wire up street/PLZ editing in OrganisationDetails#687

Merged
need4deed merged 1 commit into
developfrom
fix/agent-full-address
Jun 16, 2026
Merged

fix: show full address and wire up street/PLZ editing in OrganisationDetails#687
need4deed merged 1 commit into
developfrom
fix/agent-full-address

Conversation

@nadavosa

Copy link
Copy Markdown
Collaborator

Summary

Closes #627

  • The address field in the edit form existed in the schema but was never saveduseUpdateOrganization only patched about and website
  • Split edit into addressStreet + addressPostcode fields, both wired to PATCH /agent/:id (the BE already accepts these)
  • On load, parses the formatted address string (e.g. "Heerstr. 110, 14055 Berlin") to pre-populate both fields
  • Display reads agentDetails.address directly (the pre-formatted string from the BE) rather than form state
  • Added addressStreet / addressPostcode i18n keys in DE and EN

Test plan

  • Open an agent profile that has a full address — display shows "Heerstr. 110, 14055 Berlin" (not just "Berlin")
  • Click Edit → Street and PLZ fields are pre-populated from the existing address
  • Edit street or PLZ, save → display updates with new full address
  • Agent with no address set → both edit fields empty, display shows "Berlin" fallback
  • Cancel edit → form resets to original values

🤖 Generated with Claude Code

…Details

Resolves #627

The address field in the edit form was never saved — useUpdateOrganization
only patched about and website. The display was correct when street+PLZ
existed in the DB, but there was no way to add them via the UI.

- Split edit form address field into addressStreet + addressPostcode,
  both wired up to PATCH /agent/:id (BE already supports these fields)
- Parse the formatted address string on load to pre-populate the edit
  fields (regex extracts street and 5-digit German postcode)
- Display reads agentDetails.address directly (the pre-formatted string
  from the BE) instead of the form state
- Add addressStreet / addressPostcode i18n keys (DE + EN)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@need4deed need4deed merged commit 9b12194 into develop Jun 16, 2026
1 check passed
@need4deed need4deed deleted the fix/agent-full-address branch June 16, 2026 18:43
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.

feat: show full address (street + PLZ) in agent organisation details section

2 participants