feat: pasar de la lista de espera a otro grupo del profesor

- `POST /groups/:gid/waitlist/:entryId/promote` acepta `targetGroupId`
  opcional (por defecto, el grupo en el que se anotó). El destino tiene que
  ser del mismo profesor; cupo y teléfono duplicado se validan ahí.
- Detalle de la lista de espera: selector "Asignar a" con los grupos llenos
  deshabilitados.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jose Selesan
2026-11-02 15:39:55 -03:00
parent d397e9663c
commit fc12ec3ae0
7 changed files with 181 additions and 26 deletions

View File

@@ -161,6 +161,13 @@ export const BulkCreateAttendeesResultSchema = z.object({
});
export type BulkCreateAttendeesResult = z.output<typeof BulkCreateAttendeesResultSchema>;
/* Accepting someone from the waitlist defaults to the group they signed up
for; `targetGroupId` lets the teacher place them in another of their groups. */
export const PromoteGroupWaitlistEntrySchema = z.object({
targetGroupId: z.string().min(1).optional(),
});
export type PromoteGroupWaitlistEntry = z.output<typeof PromoteGroupWaitlistEntrySchema>;
export const PromoteGroupWaitlistEntryResultSchema = z.object({
attendee: AttendeeDtoSchema,
});