appointment creation fixed

This commit is contained in:
2025-07-28 00:11:29 +05:30
parent ee27d1d9ca
commit af1b0f8d70
7 changed files with 696 additions and 210 deletions

View File

@@ -287,10 +287,10 @@ export default function AppointmentsPage() {
}
}, [patients, user, location]);
// Create appointment mutation
// Create/upsert appointment mutation
const createAppointmentMutation = useMutation({
mutationFn: async (appointment: InsertAppointment) => {
const res = await apiRequest("POST", "/api/appointments/", appointment);
const res = await apiRequest("POST", "/api/appointments/upsert", appointment);
return await res.json();
},
onSuccess: () => {