imporvements

This commit is contained in:
Joyce
2026-02-02 13:49:11 -05:00
parent 10675b6846
commit 192b885149
6 changed files with 134 additions and 18 deletions

View File

@@ -71,11 +71,11 @@ export async function deleteParticipant(id: string): Promise<void> {
}
}
export async function fetchAvailability(participantIds: string[]): Promise<TimeSlotAPI[]> {
export async function fetchAvailability(participantIds: string[], weekOffset: number = 0): Promise<TimeSlotAPI[]> {
const response = await fetch(`${API_URL}/api/availability`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ participant_ids: participantIds }),
body: JSON.stringify({ participant_ids: participantIds, week_offset: weekOffset }),
});
const data = await handleResponse<{ slots: TimeSlotAPI[] }>(response);
return data.slots;