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:
@@ -319,9 +319,12 @@ export const updateGroupAttendee = (
|
||||
export const getGroupWaitlist = (groupId: string, page = 1, pageSize = 100) =>
|
||||
apiFetch<GroupWaitlistList>(`/api/v1/groups/${groupId}/waitlist?page=${page}&pageSize=${pageSize}`)
|
||||
|
||||
export const promoteGroupWaitlistEntry = (groupId: string, entryId: string) =>
|
||||
// Sin `targetGroupId` la persona pasa al grupo en el que se anotó. El body va
|
||||
// siempre: `apiFetch` manda Content-Type JSON y un body vacío no se parsea.
|
||||
export const promoteGroupWaitlistEntry = (groupId: string, entryId: string, targetGroupId?: string) =>
|
||||
apiFetch<PromoteGroupWaitlistEntryResult>(`/api/v1/groups/${groupId}/waitlist/${entryId}/promote`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ targetGroupId }),
|
||||
})
|
||||
|
||||
export const removeGroupWaitlistEntry = (groupId: string, entryId: string) =>
|
||||
|
||||
Reference in New Issue
Block a user