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