260322:1648 Correct Coresspondence / Doing RFA / Correct CI
CI Pipeline / build (push) Failing after 12m41s
Build and Deploy / deploy (push) Failing after 2m44s

This commit is contained in:
admin
2026-03-22 16:48:12 +07:00
parent e5deedb42e
commit 11984bfa29
683 changed files with 105251 additions and 29068 deletions
@@ -1,48 +1,57 @@
# 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 (`/tags` vs `/master/tags`).
- **Resolution:** Updated frontend service to use the correct `/master` prefix.
### 2. Document Numbering
- **Issue:** Project Selection dropdown used hardcoded mock data.
- **Cause:** `PROJECTS` constant in component.
- **Resolution:** Implemented `useProjects` hook to fetch dynamic project list from backend.
### 3. RBAC Matrix
- **Issue:** Permission checkboxes were all empty.
- **Cause:** `UserService.findAllRoles` did not load the `permissions` relation.
- **Resolution:**
- Updated `UserService` to eager load relations.
- Implemented `updateRolePermissions` in backend.
- Added `PATCH` endpoint for saving changes.
- Updated `UserService` to eager load relations.
- Implemented `updateRolePermissions` in backend.
- Added `PATCH` endpoint for saving changes.
### 4. Active Sessions
- **Issue:** List "No results" and missing user names.
- **Cause:**
- Property mismatch (`first_name` vs `firstName`).
- Frontend failed to unwrap `response.data.data` (Interceptor behavior).
- Property mismatch (`first_name` vs `firstName`).
- Frontend failed to unwrap `response.data.data` (Interceptor behavior).
- **Resolution:**
- Aligned backend/frontend naming convention.
- Updated `sessionService` to handle wrapped response data.
- Improved backend date comparison robustness.
- Aligned backend/frontend naming convention.
- Updated `sessionService` to 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 `logService` in `system-logs/numbering/page.tsx`.
### 6. Missing Permissions (Advisory)
- **Issue:** 403 Forbidden on Logs page.
- **Cause:** `system.view_logs` permission 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.