2.1 KiB
2.1 KiB
Session Log: Admin Console Fixes
Date: 2025-12-11
Overview
This session focused on debugging and resolving critical display and functionality issues in the Admin Console. Major fixes included Data integration for Document Numbering, RBAC Matrix functionality, and resolving data unwrapping issues for Active Sessions and Logs.
Resolved Issues
1. Tag Management
- Issue: 404 Error when accessing system tags.
- Cause: Incorrect API endpoint (
/tagsvs/master/tags). - Resolution: Updated frontend service to use the correct
/masterprefix.
2. Document Numbering
- Issue: Project Selection dropdown used hardcoded mock data.
- Cause:
PROJECTSconstant in component. - Resolution: Implemented
useProjectshook to fetch dynamic project list from backend.
3. RBAC Matrix
- Issue: Permission checkboxes were all empty.
- Cause:
UserService.findAllRolesdid not load thepermissionsrelation. - Resolution:
- Updated
UserServiceto eager load relations. - Implemented
updateRolePermissionsin backend. - Added
PATCHendpoint for saving changes.
- Updated
4. Active Sessions
- Issue: List "No results" and missing user names.
- Cause:
- Property mismatch (
first_namevsfirstName). - Frontend failed to unwrap
response.data.data(Interceptor behavior).
- Property mismatch (
- Resolution:
- Aligned backend/frontend naming convention.
- Updated
sessionServiceto handle wrapped response data. - Improved backend date comparison robustness.
5. Numbering Logs
- Issue: Logs table empty.
- Cause: Same data unwrapping issue as Active Sessions.
- Resolution: Updated
logServiceinsystem-logs/numbering/page.tsx.
6. Missing Permissions (Advisory)
- Issue: 403 Forbidden on Logs page.
- Cause:
system.view_logspermission missing from user role. - Resolution: Advised user to use the newly fixed RBAC Matrix to assign the permission.
Verification
All issues were verified by manual testing and confirming correct data display in the Admin Console. Backend logs were used to debug the Active Sessions data flow.