social-reporting-tool/v2
DJP 1ca7b9c759 Wire teams + admin pages: list/create teams, manage members, toggle super-admin
Replaces the three Phase A scaffold placeholders with working pages backed by
the existing server endpoints (no server changes).

- src/api/teams.ts (new): useTeams, useTeam, useCreateTeam, useAddMember,
  useUpdateMemberRole, useRemoveMember. All with cache invalidation.
- src/api/admin.ts (new): useAllUsers, useToggleSuperAdmin.
- routes/teams/list.tsx: list of teams (cards with role badge + slug + Personal
  marker), inline "Create a team" form (POSTs /api/teams), each card links to
  /teams/:id. Inline 409 / validation handling.
- routes/teams/detail.tsx: team header with my role; members table; owners can
  change member roles via dropdown, owners + admins can remove members
  (confirm dialog); below the table, an Invite form (email + role select)
  matching POST /api/teams/:id/members. Per-row + per-form error surfacing.
- routes/admin/users.tsx: full users table — email, name, super-admin badge,
  created/last-login timestamps, promote/revoke button. Disables the toggle
  for the current user when they're super-admin (matches the server's
  self-demotion guard); also shows "(you)" indicator next to your own row.

Bundle size: 258 kB → /social-reports/assets/index-C0ofQc9Y.js (+7 kB gzipped).
TS strict + vite build pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 19:10:40 -04:00
..
db Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
deploy Bake VITE_AZURE_* into the SPA at docker build time; sweep V1 leftovers in cutover 2026-04-29 19:00:15 -04:00
operator-app Wire teams + admin pages: list/create teams, manage members, toggle super-admin 2026-04-29 19:10:40 -04:00
pipeline Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
server Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
templates Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
.env.example Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
.gitignore Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
docker-compose.v2.dev.yml Drop db-v2 host port binding in prod; add port pre-flight to cutover script 2026-04-29 18:49:44 -04:00
docker-compose.v2.prod.yml Drop db-v2 host port binding in prod; add port pre-flight to cutover script 2026-04-29 18:49:44 -04:00
docker-compose.v2.yml Bake VITE_AZURE_* into the SPA at docker build time; sweep V1 leftovers in cutover 2026-04-29 19:00:15 -04:00
Dockerfile.v2 Bake VITE_AZURE_* into the SPA at docker build time; sweep V1 leftovers in cutover 2026-04-29 19:00:15 -04:00
package-lock.json Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
package.json Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
tsconfig.base.json Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
tsconfig.json Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
vitest.config.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00