The Schedule panel gives the team a clear, chronological view of who is facilitating each Friday’s meeting. Upcoming slots appear at the top, past meetings are archived below, and any slot left without an owner — because a member was removed after the roulette was spun — is shown as an unassigned placeholder. Members can be swapped between future slots using drag-and-drop without touching the roulette again.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fmoraga01/SpinAI/llms.txt
Use this file to discover all available pages before exploring further.
What the schedule shows
Assignments are fetched from Supabase and split into two groups at render time:- Upcoming (
Próximos viernes) — assignments whose date is today or later, sorted in ascending chronological order. The first card in this list is highlighted in blue as the Próximo (next) slot. A counter badge shows the total number of upcoming slots. - Past (
Anteriores) — assignments whose date is before today, sorted in descending order (most recent first) and rendered at reduced opacity. - Unassigned slots — slots where
memberIdisnull, shown with a dashed border, a?avatar, and aSin asignarlabel. These appear within the upcoming list at their correct date position and prompt the user to spin the roulette to fill them.
Assignment data shape
null memberId indicates an unassigned slot — the date slot exists in the assignments table but no member is currently linked to it.
Drag-and-drop swaps
Any two upcoming assigned slots can be swapped by dragging one row onto another. The drag handle (⠿) appears on the left side of each assigned row.
Start dragging
Click and hold the drag handle on an upcoming assigned slot. The card fades to 40% opacity to indicate it is being moved.
Hover over the target
Drag over any other upcoming assigned slot. The target card gains a blue border (
var(--color-primary)) and a light blue background to indicate it is a valid drop zone.UPDATE queries and one INSERT into assignment_logs:
Swap restrictions
- Unassigned slots cannot be swapped. If either slot in a drag-and-drop pair has
memberId: null, the drop is silently rejected. Unassigned slots are not draggable and do not render a drag handle. - Past slots cannot be swapped. Only rows in the upcoming list are draggable; past assignments are rendered in a read-only section.
- While a swap request is in flight, all drag interactions are locked (
cursor: wait) to prevent concurrent swaps.
The assignment change log
Every confirmed swap is appended to theassignment_logs table in Supabase. The log is viewable via the ChangeLog component accessible from the Schedule panel. Each entry records:
| Field | Description |
|---|---|
memberAName | Name of the first member involved in the swap |
memberBName | Name of the second member involved in the swap |
dateA | The original date assigned to member A |
dateB | The original date assigned to member B |
createdAt | Timestamp when the swap was recorded |
loadLogs(), which fetches up to 50 most-recent entries ordered by created_at descending. If the assignment_logs table does not exist, a tableError: true flag is returned and the ChangeLog component renders a graceful fallback. The log is also automatically cleared if the assignments table becomes empty (e.g. after all members are removed).