feat: add absence notification and analytics features

- Implemented AbsenceNotifyView for notifying absence with session details.
- Created AnalyticsView for displaying group analytics and managing students at risk.
- Added ClassAttendanceView for marking attendance in classes.
- Defined new schemas for analytics and attendance in shared package.
This commit is contained in:
Jose Selesan
2026-09-23 16:24:45 -03:00
parent a363e9e8fc
commit 2e184845e1
59 changed files with 3854 additions and 23 deletions

View File

@@ -27,6 +27,14 @@ export function isPublicApiRequest(method: string, path: string): boolean {
const normalizedPath = normalizePath(path);
// Aviso de ausencia con token personal del alumno (sin sesión).
if (method === 'GET' && normalizedPath === '/api/v1/classes/absence') {
return true;
}
if (method === 'POST' && normalizedPath === '/api/v1/classes/notify-absence') {
return true;
}
return (
normalizedPath === '/api/v1/health'
|| matchesPublicPrefix(normalizedPath, '/api/v1/auth')
@@ -40,5 +48,8 @@ function matchesPublicPrefix(path: string, prefix: string): boolean {
}
function normalizePath(path: string): string {
return path.length > 1 && path.endsWith('/') ? path.slice(0, -1) : path;
const withoutQuery = path.split('?')[0]?.split('#')[0] ?? path;
return withoutQuery.length > 1 && withoutQuery.endsWith('/')
? withoutQuery.slice(0, -1)
: withoutQuery;
}