The Agenda module is the scheduling hub of FemeSalud. It provides four complementary views of the appointment calendar, a full appointment creation and editing form, instant status transitions, and WhatsApp reminder dispatch — all backed by Supabase Realtime so every device in the clinic sees changes the moment they happen.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KevxxAlva/femesalud-zen-flow/llms.txt
Use this file to discover all available pages before exploring further.
Views
Use the Calendario / Lista toggle in the top-right header to switch between the calendar and list modes. Within Calendar mode, a secondary toggle offers three sub-views.Day View
A two-panel layout: a date info card on the left (showing the selected day, weekday name, and a “Programar Cita” button) and a timeline on the right listing all appointments for that day sorted by time. Each appointment shows a coloured bullet on the timeline line. Click any day in the Month view to jump directly to its Day view.
Week View
A seven-column grid (Monday–Sunday) displaying all appointments per day as compact cards. The current day column is visually highlighted. You can drag and drop an appointment card onto a different day column to reschedule it — the system calls
useUpdateAppointment with the new ISO date while preserving the original time.Month View
A 6-week (42-cell) grid. Each cell shows up to a few appointment chips for that date. Clicking a cell opens the Day view for that date; clicking an empty area within a cell pre-fills the appointment form with that date. Drag-and-drop rescheduling is also supported.
List View
Appointments grouped by date (newest group first) and paginated at 15 groups per page. Three scope filters appear in list mode: Hoy (today only), Semana (next 7 days), and Todas. Useful for bulk review or export planning.
‹ / › navigation arrows or the month/year dropdowns to move the calendar window; the Hoy button resets to the current date.
Creating an Appointment
Click Nueva cita (top-right button) or click directly on any empty calendar cell to openAppointmentForm. The following fields are available:
| Field | Type | Notes |
|---|---|---|
patient_id | Select (search) | Required. Searches the patients table. |
doctor_id | Select | Required (admin only). Lists all profiles with the doctor role. |
scheduled_at | Date + time picker | ISO 8601 stored in UTC. |
duration_minutes | Number | Default 30. |
status | Select | programada | completada | cancelada |
reason | Text | Visit reason / chief complaint. |
price | Number | Consultation fee in USD. |
Appointment Statuses
Every appointment carries one of three statuses that drive colour coding throughout the calendar.programada
Scheduled — appointment is upcoming and confirmed. Displayed in purple (mauve) across all views.
completada
Completed — the patient attended and the visit is closed. Displayed in green (sage). A completed appointment can be opened to attach or review its consultation record.
cancelada
Cancelled — the appointment will not take place. Displayed in red (destructive). Cancelled appointments remain in the system for reporting purposes.
Real-Time Sync
The Agenda subscribes to Supabase Realtime on theappointments channel. Any insert, update, or delete performed by another user (or another browser tab) is reflected immediately in the current view via useQueryClient().invalidateQueries. There is no need to refresh the page.
WhatsApp Reminders
Any appointment with statusprogramada shows a green MessageCircle icon button. Clicking it:
- Fetches the patient’s
phoneandfull_namefrom thepatientstable. - Strips all non-digit characters from the phone number.
- Builds a pre-written Spanish message:
- Opens
https://wa.me/[cleanPhone]?text=[encodedMessage]in a new tab.