From 987043152ccbf11b9ddec4582ed3da8a4bcabc60 Mon Sep 17 00:00:00 2001 From: Potenz Date: Mon, 23 Jun 2025 08:41:50 +0530 Subject: [PATCH] error fixed --- apps/Frontend/src/pages/claims-page.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/Frontend/src/pages/claims-page.tsx b/apps/Frontend/src/pages/claims-page.tsx index 6e8a509..bb3c99d 100644 --- a/apps/Frontend/src/pages/claims-page.tsx +++ b/apps/Frontend/src/pages/claims-page.tsx @@ -218,8 +218,11 @@ export default function ClaimsPage() { // selenium pdf download handler const handleSeleniumPopup = async (actionType: string) => { try { - if (!claimRes?.id || !selectedPatient) { - throw new Error("Missing claim or patient selection"); + if (!claimRes?.id) { + throw new Error("Missing claimId"); + } + if (!selectedPatient) { + throw new Error("Missing patientId"); } const res = await apiRequest("POST", "/api/claims/selenium/fetchpdf", { action: actionType, @@ -234,6 +237,7 @@ export default function ClaimsPage() { }); setIsMhPopupOpen(false); + setSelectedPatient(null); } catch (error: any) { toast({ title: "Error", @@ -371,7 +375,6 @@ export default function ClaimsPage() { const closeClaim = () => { setIsClaimFormOpen(false); - setSelectedPatient(null); setClaimFormData({ patientId: null, serviceDate: "",