feat(i18n): complete super-admin i18n — all 11 pages fully translated
CognxSafeTrack
b92ea37
All 11 super-admin pages now use useTranslation for every visible string.
Adds rel_today/rel_yesterday/rel_days_ago keys for WhatsAppProfiles relativeDate,
tpl_cat_*_desc keys for template category descriptions, and fixes the
SuperAdminLayout NAV_ITEMS destructuring (labelKey vs label).
feat: complete super-admin interface + enforce Day 11 photo requirement
CognxSafeTrack
8f2286f
Super-admin (3 missing pages + 3 new backend routes):
- AuditLogs page: date-range / action filter, paginated table with
inline JSON detail expansion
- WhatsAppTemplates page: org directory with lazy per-org template
fetch; category/status badges; expandable template panel per row
- WhatsAppProfiles page: card grid showing org branding (logo, color,
WABA ID, token age); inline edit form with live logo preview and
color picker; PATCH /v1/super-admin/whatsapp/profiles/:id
- Backend: GET /audit-logs, GET/PATCH /whatsapp/profiles,
GET /whatsapp/templates added to super-admin.ts
- SuperAdminLayout: 10 nav items (added Templates WA, Profils WA,
Audit Logs); SuperAdminRouter wired to all new routes
Day 11 photo enforcement (tasks/todo.md item resolved):
- FeedbackHandler: if currentDay === 11 and no imageUrl, send
multilingual photo prompt and return early — exercise cannot be
validated without a team member photo
When selectedOrgId === 'xamle-admin-org', the admin switches to a full
platform management dashboard instead of the normal org layout.
Backend (apps/api):
- New /v1/super-admin/* routes (SUPER_ADMIN/ADMIN role required):
platform stats, organizations CRUD + suspend + impersonate,
cross-org users + role change, WhatsApp numbers, billing
transactions + manual credits, monitoring health, AI agentic command
- Fixed SQL injection in analytics text-to-SQL (UNION/DROP/comment blocking)
- Removed JWT secret fallback — crashes on startup if JWT_SECRET is missing
- Added ORG_ADMIN role guard to all /v1/admin/* routes
Frontend (apps/admin):
- SuperAdminRouter: nested routes under /platform/*
- SuperAdminLayout: dark sidebar (slate-950/violet), 7 nav items
- PlatformDashboard: 6 KPI cards, system health, active alerts
- OrganizationsManager: searchable table, suspend/edit drawer, create modal
- UsersManager: cross-org table with inline role-change
- WhatsAppNumbers: all registered numbers …