feat: una sola regla de riesgo y preinscripciones pendientes en Inicio
- Estadísticas ("Alumnos en riesgo") y el job de reenganche usan la misma
regla de dominio que la lista de grupos e Inicio
(summarizeMemberAttendance). El armado del historial por alumno vive en
analytics/lib/member-attendance.ts y se borra el clasificador viejo
(racha o asistencia mensual < 50%).
- El badge de alumnos en riesgo muestra el motivo real (faltas seguidas,
días sin venir o asistencia en baja).
- GET /home devuelve pendingPreRegistrations por grupo (en la misma
consulta de grupos) y "Para atender" las lista con link a la ficha en
la pestaña Pendientes (?section=pending).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -46,10 +46,20 @@ export const UpcomingPaymentSchema = z.object({
|
||||
});
|
||||
export type UpcomingPayment = z.output<typeof UpcomingPaymentSchema>;
|
||||
|
||||
/** Pre-registrations from the shared link waiting for the teacher's approval,
|
||||
* per group. Only groups with at least one. */
|
||||
export const PendingPreRegistrationsSchema = z.object({
|
||||
groupId: z.string(),
|
||||
groupName: z.string(),
|
||||
count: z.number().int().positive(),
|
||||
});
|
||||
export type PendingPreRegistrations = z.output<typeof PendingPreRegistrationsSchema>;
|
||||
|
||||
export const HomeSummarySchema = z.object({
|
||||
stats: HomeStatsSchema,
|
||||
nextClass: NextClassSchema.nullable(),
|
||||
upcomingPayments: z.array(UpcomingPaymentSchema),
|
||||
pendingPreRegistrations: z.array(PendingPreRegistrationsSchema),
|
||||
});
|
||||
export type HomeSummary = z.output<typeof HomeSummarySchema>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user