feat: normalizar la hora de finalización de citas que cruzan la medianoche y ajustar la lógica de ordenamiento en CalendarRowView

This commit is contained in:
2026-09-25 10:04:16 -03:00
parent ec083ddf42
commit 1a9de06393
2 changed files with 16 additions and 3 deletions
@@ -12,6 +12,7 @@ export interface CalendarRowViewProps {
type CalendarRowViewData = {
name: string;
startTime: number;
events: TXCalendarEvent[];
};
@@ -167,11 +168,13 @@ export default function CalendarRowView(props: CalendarRowViewProps) {
} else {
auxData.push({
name: time,
startTime: item.startTime,
events: [item],
});
}
}
setData(auxData.sort((a, b) => a.name.localeCompare(b.name)));
// Sort by numeric hour, never by the formatted label: as strings "11:00 PM" < "5:00 PM".
setData(auxData.sort((a, b) => a.startTime - b.startTime));
}, [daySchedules]);
return (