Repository navigation
Fix/99 admin panel clean - #199
Merged
Merged
Conversation
…ration, backend user management
- Fix sidebar: nav items now use [routerLink]/routerLinkActive, show real admin username,
disabled items (Preguntas/Rankings/etc.) are dimmed and non-clickable
- Backend: add AdminController (/api/admin/users, /api/admin/stats) + AdminService
with paginated user list, role update, status toggle (suspend/unsuspend)
- Backend: add AdminStatsResponse, AdminUserResponse, UpdateRoleRequest, UpdateStatusRequest DTOs
- Backend: extend UserRepository with findAdminUsers JPQL query (search + role filter)
and countByIsActiveTrue; add countByCreatedAtGreaterThanEqual to MatchRepository;
add countByStatus to QuestionReportRepository
- Frontend: add AdminService (HTTP) and admin.models.ts (typed interfaces)
- Dashboard: loads real stats + spiders from backend instead of mock data
- Spiders: loads real spider list, filter works, run button calls POST /api/admin/spiders/{name}/run
- Reports: loads real reports from /api/moderation/reports, status filter tabs reload,
DESCARTAR/ELIMINAR buttons call resolve endpoint
- Users: loads real users with live search + role filter, role dropdown and
SUSPENDER/ACTIVAR buttons call backend
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All 14 conflicted files resolved: - Backend: AdminController/Service use upstream (self-protection, @AuthenticationPrincipal, getLogs, AdminUserPageResponse) - Backend: MatchRepository + UserRepository merged (searchUsers JPQL + verification token methods) - Frontend: admin.models.ts + admin.service.ts merged (all methods from both sides) - Frontend: dashboard uses real spiders + logs signals; users page uses upstream's click-to-edit UX - Frontend: spiders + reports pages keep real data integration (upstream had TODO stubs) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ponente Los selectores .vs-admin__side/.vs-admin__nav-item/.vs-admin__nav-section vivían en admin-dashboard.scss (scoped con la encapsulación del dashboard), por lo que nunca se aplicaban al <aside> que el AdminSidebarComponent renderiza desde su propio scope. Resultado: sidebar sin estilos en todas las páginas admin. - Crear sidebar.scss y mover allí todos los selectores del sidebar + bloque de perfil (antes con inline-styles) - Añadir styleUrl en sidebar.ts; sustituir inline-styles del HTML por clases - Ocultar items del sidebar que no tienen ruta implementada (Preguntas, Rankings, Configuración, Logs) en vez de mostrarlos disabled - Limpiar admin-dashboard.scss de los selectores movidos
…visible El listado /admin/usuarios devolvía 0 resultados pese a haber usuarios en BD (el dashboard mostraba 4 activos). Causa: la @query JPQL con patrón "(:role IS NULL OR …)" sobre tres parámetros nullables (String/Enum/Boolean) fallaba bajo Hibernate 6 + PostgreSQL por inferencia de tipos. El frontend no tenía error handler, así que la respuesta caída se renderizaba como tabla vacía silenciosa. Backend: - AdminService.getUsers: construir Specification dinámicamente, añadiendo cada predicado SOLO si el filtro no es null - Eliminar UserRepository.searchUsers @query (la interfaz ya extiende JpaSpecificationExecutor) - Actualizar AdminServiceTest para mockear findAll(Specification, Pageable) Frontend: - admin-users.ts: signals loading + errorMsg; .subscribe({next, error}) con mensajes según status (401/403/0/genérico) - admin-users.html: banner .vs-admin-error antes de la tabla; distinguir "Cargando…" de "Sin resultados" cuando users().length===0
🧪 Resultados de CI
Total de pruebas ejecutadas: 205 · Build de imágenes: ✅ commit |
ualbrl973
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
areglo del panel de control y users