feat(admin): surface member address fields on detail page
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 33
- Forks
- 104
- Avg merge
- 12h 3m
- Merged PRs (30d)
- 10
Description
Summary
The admin member detail page's Identity tab does not currently expose city, region, countryId, publicLocation, showOnMap, or the geocoded latitude/longitude. Staff editing a member can't fix a typo'd city or toggle map visibility without going to the public dossier.
Requirements
-
MemberDetailPage.tsxIdentity tab gains an Address section with editable fields:- City (text)
- Region / state (text)
- Country (vocab picker reusing the existing countries vocab endpoint)
- Public location string (free-form override shown on the public dossier byline)
showOnMaptoggle
- Read-only preview of the geocoded result ("Pin: 42.36°N, 71.06°W") with a "Re-geocode now" button that bypasses the normal change-detection trigger
-
PATCH /admin/users/:idbody schema extended (packages/api/src/routes/admin/users/byId.ts) to acceptcity,region,countryId,publicLocation,showOnMap -
GET /admin/users/:idresponse includes the existing address fields andgeocoded_atso the UI can render the timestamp - Soft-delete / restore controls left untouched
Context
profiles has city, region, countryId, publicLocation, latitude, longitude, showOnMap already (packages/api/src/db/schema/users.ts:103-117). The admin PATCH route just doesn't accept them yet; the detail page just doesn't display them yet.
Depends on #1972 for the geocoded-value population and geocoded_at column.
Implementation Notes
Country picker: the vocab endpoint at packages/api/src/routes/vocab.ts already exposes countries; the web account page uses the same dataset for its country picker (see apps/web/src/hooks/useVocab.ts). Reuse it to avoid a parallel vocab fetch.
showOnMap defaults to false per the schema — admins flipping it on is an explicit consent decision and should be paired with a small note like "Surfaces this member on the public community map at /map."
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with MemberDetailPage.tsx, packages/api/src/routes/admin/users/byId.ts, and packages/api/src/db/schema/users.ts:103-117; compare the country picker with apps/web/src/hooks/useVocab.ts and the countries endpoint in packages/api/src/routes/vocab.ts. Done means the Identity tab edits and previews all requested address fields, supports re-geocoding, and the admin GET/PATCH responses handle them without changing soft-delete or restore controls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100