{currentDate.format("MMMM [de] YYYY")}
+
-
- {weekDays.map(day => (
-
{day}
- ))}
- {dateGrid.map((day, index) => {
- const dayKey = day.format('YYYY-MM-DD');
- const appointmentsOnDay = DictAgendamentosOrganizados[dayKey] || [];
- const termDoc = searchTermDoctor.toLowerCase();
-const filteredAppointments = appointmentsOnDay.filter(app =>
- !termDoc
- ? true
- : (app.medico_nome || '').toLowerCase().startsWith(termDoc)
-);
- const cellClasses = `day-cell ${
- day.isSame(currentDate, 'month') ? 'current-month' : 'other-month'
- } ${day.isSame(dayjs(), 'day') ? 'today' : ''} ${
- day.isSame(selectedDay, 'day') ? 'selected' : ''
- }`;
- return (
-
handleDateClick(day)}
- >
-
{day.format('D')}
- {filteredAppointments.length > 0 && (
-
- {filteredAppointments.length}
+
+
+
+ {weekDays.map((day) => (
+
+ {day}
+
+ ))}
+ {dateGrid.map((day, index) => {
+ const dayKey = day.format("YYYY-MM-DD");
+ const appointmentsOnDay =
+ DictAgendamentosOrganizados[dayKey] || [];
+ const termDoc = searchTermDoctor.toLowerCase();
+ const filteredAppointments =
+ appointmentsOnDay.filter((app) =>
+ !termDoc
+ ? true
+ : (app.medico_nome || "")
+ .toLowerCase()
+ .startsWith(termDoc)
+ );
+ const cellClasses = `day-cell ${
+ day.isSame(currentDate, "month")
+ ? "current-month"
+ : "other-month"
+ } ${day.isSame(dayjs(), "day") ? "today" : ""} ${
+ day.isSame(selectedDay, "day") ? "selected" : ""
+ }`;
+ return (
+
handleDateClick(day)}
+ >
+
{day.format("D")}
+ {filteredAppointments.length > 0 && (
+
+ {filteredAppointments.length}
+
+ )}
- )}
-
- );
- })}
+ );
+ })}
+
+
+
+
+
+
+ Arraste para ver mais dias
@@ -661,7 +797,184 @@ const filteredAppointments = appointmentsOnDay.filter(app =>