Add CRUD API for enseignements (prof-module-promo associations):
- POST /enseignements: Create with validation (201/409)
- GET /enseignements/{idProf}/{idModule}/{idPromo}: Read by composite
key (200/404)
- DELETE /enseignements/{idProf}/{idModule}/{idPromo}: Delete by
composite key (204/404)
Access control: Employee-only (403 Forbidden)
Tests: 7 unit tests added
Note: RBAC implementation pending (current access control is temporary)
- GET /promotions/{idPromo} returns promotion or 404
- PUT /promotions/{idPromo} updates year or 404
- DELETE /promotions/{idPromo} deletes promotion or 404
- Only employees allowed, otherwise 403
Add tables for role-based access control and academic entities.
Includes modules, UEs, notes, and adjustments.
Update students and mobility tables to reference new primary keys.
This enables richer data modeling for the application.
test: add tests for fixtures, mock fetch, mock db, and happy-dom
- Add comprehensive fixture shape tests.
- Expand mockFetch to support methods, status codes, and body tracking.
- Introduce getFetchCalls to inspect intercepted requests.
- Add mockDb helper for in-memory DB operations.
- Reorganize tests for clarity and coverage.
- Ensure happy-dom setup/cleanup works correctly.
Add support for HTTP methods, status codes, body and headers in the fetch
mock. Track calls and expose getFetchCalls for assertions. Update fixture
interfaces to use string IDs, add ImportResult and ApiError types, and
provide standard error constants. Adjust fixture data to match new types.
Add postgres service with environment variable for password.
Change app image to registry and adjust ports.
Update volume mount to production path.
Add deploy constraints for manager nodes.
- replace Database with db instance
- use schema imports for tables
- use db.select, db.insert, onConflictDoUpdate
- remove manual connection handling and console logs
- improve type safety and maintainability
refactor(students): migrate to Drizzle ORM and async queries
Replace raw sqlite queries with Drizzle ORM. Remove the connect helper and use the
shared db instance and schema definitions. Convert getItself, getAll and
addStudents to async functions, use eq and lt helpers, and simplify promotion
handling. This improves type safety, maintainability, and allows non‑blocking
database access.
Add type="button" to the EditMobility and UploadStudents buttons
to prevent default form submission behavior.
Include a key prop on Student components in Promotion for stable list rendering.