+ {appointments.length === 0 && (
+
No appointments assigned to you on this day.
+ )}
+ {appointments.map((a) => {
+ const sel = a.id === selectedAppointmentId;
+ const start = new Date(a.startAt);
+ const end = new Date(a.endAt);
+ const timeLabel = `${start.toLocaleTimeString(undefined, {
+ hour: 'numeric',
+ minute: '2-digit',
+ })} – ${end.toLocaleTimeString(undefined, {
+ hour: 'numeric',
+ minute: '2-digit',
+ })}`;
+ const palette = purposeStyle(a.purpose);
+ return (
+
+ );
+ })}
+