feat(admin): surface member address fields on detail page

Aperta
#1,973 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
full-stack

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.tsx Identity 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)
    • showOnMap toggle
  • 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/:id body schema extended (packages/api/src/routes/admin/users/byId.ts) to accept city, region, countryId, publicLocation, showOnMap
  • GET /admin/users/:id response includes the existing address fields and geocoded_at so 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."

Lingua principale
HTML
Stelle
33
Fork
107
Merge medio
14h 6m
PR unite (30g)
19

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di USRSE/usrse.github.io

Tutte le issue di USRSE/usrse.github.io

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.