fix: invalidate appointments query after claim submitted via claims/preauth page

When a claim was submitted through the claims/preauth page, the schedule
page appointment color did not update because the appointments query cache
was never invalidated after the selenium job completed. Added invalidation
of QK_APPOINTMENTS_BASE in handleMHSeleniumPdfDownload so the schedule
page refetches and reflects the new claim color.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gitead
2026-04-30 22:15:23 -04:00
parent 763a322e79
commit 24bbaed6ab

View File

@@ -22,6 +22,7 @@ import { useJobStatus } from "@/hooks/use-job-status";
import ClaimsRecentTable, {
QK_CLAIMS_BASE,
} from "@/components/claims/claims-recent-table";
import { QK_APPOINTMENTS_BASE } from "@/pages/appointments-page";
import ClaimsOfPatientModal from "@/components/claims/claims-of-patient-table";
import {
Claim,
@@ -439,6 +440,8 @@ export default function ClaimsPage() {
queryClient.invalidateQueries({ queryKey: ["groupPdfs"] });
queryClient.invalidateQueries({ queryKey: ["pdf-groups"] });
queryClient.invalidateQueries({ queryKey: ["claims-recent"] });
// Invalidate appointments so the schedule page picks up the new claim color
queryClient.invalidateQueries({ queryKey: QK_APPOINTMENTS_BASE });
dispatch(
setTaskStatus({