import { Button } from "@/components/base/buttons/button"; import { formatShortDate } from "@/lib/format"; import type { FollowUp } from "@/types/entities"; import { cx } from "@/utils/cx"; interface FollowupWidgetProps { overdue: FollowUp[]; upcoming: FollowUp[]; } export const FollowupWidget = ({ overdue, upcoming }: FollowupWidgetProps) => { const items = [...overdue, ...upcoming].slice(0, 4); if (items.length === 0) { return null; } return (
{item.scheduledAt ? formatShortDate(item.scheduledAt) : "No date"} {isOverdue && " — Overdue"}
{item.description ?? item.followUpType ?? "Follow-up"}
{(item.patientName || item.patientPhone) && ({item.patientName} {item.patientPhone && ` · ${item.patientPhone}`}
)}