Commit Graph

18 Commits

Author SHA1 Message Date
Julien Froidefond
a5e5a75561 refactor: use services in routes plz 2025-08-25 08:38:56 +02:00
Julien Froidefond
dc06f00342 refactor: remove legacy evaluation route and update user management interfaces
- Deleted the obsolete evaluations route to streamline the API.
- Added User and UserFormData interfaces to admin-client for better user management.
- Updated useUsersManagement hook to utilize adminClient for fetching and creating users, improving data handling.
- Cleaned up unused imports and code for better maintainability.
2025-08-25 08:30:34 +02:00
Julien Froidefond
1a0877f51d refactor: update data fetching in management pages and improve type imports
- Simplified data extraction from AdminService in SkillsPage, TeamsPage, and UsersPage.
- Updated import paths for Team type in user-related components for consistency.
- Added id and name properties to SkillCategory interface for better data structure.
- Enhanced logging in useSkillsManagement for debugging skill creation process.
2025-08-24 22:25:12 +02:00
Julien Froidefond
6fba622003 refactor: revew all design of services, clients, deadcode, ... 2025-08-24 22:03:15 +02:00
Julien Froidefond
f4dcc89c11 refactor: Userservice 2025-08-24 16:44:31 +02:00
Julien Froidefond
2e195ca5cf reafctor: pages for management and split components 2025-08-23 08:16:09 +02:00
Julien Froidefond
a08caf2981 feat: userr management 2025-08-22 16:34:13 +02:00
Julien Froidefond
90c2f25ec7 fix: update team shouldnot create new user 2025-08-22 12:15:36 +02:00
Julien Froidefond
c0e2b9533b feat: add team members functionality and modal
- Introduced `onViewMembers` prop in `TreeItemRow` to handle viewing team members.
- Added `TeamMembersModal` to display members of a selected team.
- Implemented state management for team members in `TeamsManagement`, including fetching and updating stats.
- Enhanced `AdminManagementService` with methods to fetch and remove team members.
2025-08-22 09:28:52 +02:00
Julien Froidefond
e314a96fae feat: CRUD admin for skills and teams 2025-08-22 08:56:02 +02:00
Julien Froidefond
a4b680b092 refactor: update database setup and remove skills migration API
- Changed migration commands in DATABASE_SETUP.md to use `pnpm run sync-skills` and `pnpm run sync-teams`.
- Removed the skills migration API endpoint in route.ts, streamlining the migration process.
- Updated MIGRATION_UUID.md to reflect changes in migration steps and removed the old skills migration script.
- Added new sync scripts for skills and teams in package.json.
- Cleaned up init.sql by removing old teams data insertion and adjusted comments for clarity.
2025-08-21 15:21:36 +02:00
Julien Froidefond
578f0858e8 feat: secu migrate to user uuid 2025-08-21 13:54:13 +02:00
Julien Froidefond
ef16c73625 feat: handling SSR on evaluation 2025-08-21 13:19:46 +02:00
Julien Froidefond
45fb1148ae feat: enhance evaluation loading with cookie authentication
- Updated the GET method in the evaluations route to support user authentication via cookies, improving security and user experience.
- Added compatibility for legacy parameter-based authentication to ensure backward compatibility.
- Refactored the useEvaluation hook to load user profiles from cookies instead of localStorage, streamlining the authentication process.
- Introduced a new method in EvaluationService to retrieve user profiles by ID, enhancing data retrieval efficiency.
- Updated ApiClient to handle cookie-based requests for loading evaluations, ensuring proper session management.
2025-08-21 11:55:50 +02:00
Julien Froidefond
72b653de19 feat: refactor skills API and database schema
- Replaced file-based skill category loading with API calls in the GET and POST methods of the skills route.
- Added new `SkillsService` for handling skill category operations.
- Updated SQL initialization script to create `skill_categories`, `skills`, and `skill_links` tables with appropriate relationships.
- Enhanced `ApiClient` with methods for loading skill categories and creating new skills, improving API interaction.
- Introduced error handling for skill category creation and loading processes.
2025-08-21 09:55:35 +02:00
Julien Froidefond
345ff5baa0 feat: adding teams in PG 2025-08-21 09:44:29 +02:00
Julien Froidefond
4e82a6d860 feat: add PostgreSQL support and enhance evaluation loading
- Added `pg` and `@types/pg` dependencies for PostgreSQL integration.
- Updated `useEvaluation` hook to load user evaluations from the API, improving data management.
- Refactored `saveUserEvaluation` and `loadUserEvaluation` functions to interact with the API instead of localStorage.
- Introduced error handling for profile loading and evaluation saving to enhance robustness.
- Added new methods for managing user profiles and evaluations, including `clearUserProfile` and `loadEvaluationForProfile`.
2025-08-21 08:46:52 +02:00
Julien Froidefond
ab9c35c276 Add score color logic and evaluation migration
- Introduced `getScoreColors` function to dynamically set badge colors based on skill scores for better visual feedback.
- Updated HomePage to display skill evaluation percentages with corresponding colors.
- Implemented `migrateEvaluation` function to ensure existing evaluations are updated with new skill categories, enhancing data integrity.
- Refactored data loading in `loadSkillCategories` and `loadTeams` to fetch from API endpoints, improving flexibility and maintainability.
2025-08-20 16:50:30 +02:00