mirror of
https://github.com/melgarafael/DeskcommCRM.git
synced 2026-10-02 01:28:34 +08:00
GET /api/v1/admin/platform-admins: requirePlatformAdmin, service-role list of platform_admins with auth.users emails resolved (granted_by, revoked_by, target user). POST/PATCH/DELETE return 405 explicitly with message pointing to Spec 01 §3.4 T-04 (DBA-only mutation). UI: - /admin/platform-admins: prominent DBAOnlyNotice (blue alert with T-04 reference + runbook link) + PlatformAdminsTable (user, granted_at relative, granted_by, scope, mfa_required, status active/revoked, reason tooltip) - ZERO mutation buttons by design Closes EPIC-11 — Super-Admin Platform fully wired (14/14 waves). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
components/
Componentes React compartilhados.
ui/— primitives do shadcn/ui (instalar vianpx shadcn@latest add <component>)<Feature>/— componentes específicos de domínio (ex:inbox/ConversationList.tsx)
Convenções
- Server Components por default;
"use client"apenas quando precisa estado/event handler/browser API - Props tipadas;
Readonly<{...}>em props de componentes puros - Sem fetching direto em Server Component sem cache configurado (
cache: "no-store"ourevalidate) - Estilo via Tailwind + tokens de
app/globals.css. Sem CSS-in-JS