fix: show only user-typed notes on appointment card
Remove auto-appending of "Appointment with [staff name]" to notes on save, and preserve existing notes when dragging an appointment to a new slot. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,7 @@ interface ScheduledAppointment {
|
||||
endTime: string | Date;
|
||||
status: string | null;
|
||||
type: string;
|
||||
notes?: string | null;
|
||||
procedureCodes?: string[];
|
||||
}
|
||||
|
||||
@@ -571,6 +572,7 @@ export default function AppointmentsPage() {
|
||||
patientInsuranceProvider,
|
||||
hasProcedures: !!(apt as any).hasProcedures,
|
||||
hasClaimWithNumber: !!(apt as any).hasClaimWithNumber,
|
||||
notes: (apt as any).notes ?? null,
|
||||
procedureCodes: (apt as any).procedureCodes ?? [],
|
||||
movedByAi: !!(apt as any).movedByAi,
|
||||
staffId,
|
||||
@@ -733,7 +735,7 @@ export default function AppointmentsPage() {
|
||||
status: apt.status ?? undefined,
|
||||
startTime: newTimeSlot.time,
|
||||
endTime: endTime,
|
||||
notes: `Appointment with ${staff?.name}`,
|
||||
notes: apt.notes ?? undefined,
|
||||
};
|
||||
// Call update mutation
|
||||
updateAppointmentMutation.mutate({
|
||||
@@ -838,6 +840,11 @@ export default function AppointmentsPage() {
|
||||
{appointment.procedureCodes.join(", ")}
|
||||
</div>
|
||||
)}
|
||||
{appointment.notes && (
|
||||
<div className="truncate text-[10px] opacity-90 font-semibold">
|
||||
{appointment.notes}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user