779: adds editable title to OrganisationDetails#783
Conversation
nadavosa
left a comment
There was a problem hiding this comment.
Small, clean, well-scoped PR — mirrors the existing pattern for every other field in this form (Controller + EditableField, same display/edit split, same i18n key structure). Nothing structurally off.
Good catch, not a bug: the diff removes the old OrganizationDetailsPatch local type in useUpdateOrganizationDetails.ts, which existed specifically because addressStreet/addressPostcode weren't yet in the SDK's ApiAgentPatch. Checked the SDK (need4deed-org/sdk/src/types/api/agent.ts) — ApiAgentPatch now includes title, about, website, addressStreet, and addressPostcode, so switching to it directly is legitimate cleanup of now-obsolete tech debt, not a regression.
Worth confirming (not a confirmed bug): the SDK's ApiAgentTitleConflict type documents a unique-title constraint enforced on agent creation, returning a distinctly-shaped { conflict: "title", agentId } 409. The doc comment scopes it to CREATE specifically, so it likely doesn't apply to this edit flow — but worth a quick check with the be side that editing an existing org's title to match another org's name fails with a normal validation message rather than an unhandled/oddly-shaped error, since no special handling for that case was added here.
Minor: no tests added, but that's consistent with the rest of this codebase's convention for form fields like this — not a real ding.
|
thanks @nadavosa , I tried editing the agent title on the Nonetheless it still blocks the user from editing an agent's title to one that already exists |
Description
Adds
titleto agent'sOrganisationDetailswithEditableFieldRelated Issues
Closes #779
Changes
titletoorganisationDetailsSchematitletoOrganisationDetailsEdittitletoOrganisationDetailsDisplaytitletoupdateOrganizationmutation funcScreenshots / Demos
Checklist