error fixed
This commit is contained in:
@@ -218,8 +218,11 @@ export default function ClaimsPage() {
|
|||||||
// selenium pdf download handler
|
// selenium pdf download handler
|
||||||
const handleSeleniumPopup = async (actionType: string) => {
|
const handleSeleniumPopup = async (actionType: string) => {
|
||||||
try {
|
try {
|
||||||
if (!claimRes?.id || !selectedPatient) {
|
if (!claimRes?.id) {
|
||||||
throw new Error("Missing claim or patient selection");
|
throw new Error("Missing claimId");
|
||||||
|
}
|
||||||
|
if (!selectedPatient) {
|
||||||
|
throw new Error("Missing patientId");
|
||||||
}
|
}
|
||||||
const res = await apiRequest("POST", "/api/claims/selenium/fetchpdf", {
|
const res = await apiRequest("POST", "/api/claims/selenium/fetchpdf", {
|
||||||
action: actionType,
|
action: actionType,
|
||||||
@@ -234,6 +237,7 @@ export default function ClaimsPage() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
setIsMhPopupOpen(false);
|
setIsMhPopupOpen(false);
|
||||||
|
setSelectedPatient(null);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
toast({
|
toast({
|
||||||
title: "Error",
|
title: "Error",
|
||||||
@@ -371,7 +375,6 @@ export default function ClaimsPage() {
|
|||||||
|
|
||||||
const closeClaim = () => {
|
const closeClaim = () => {
|
||||||
setIsClaimFormOpen(false);
|
setIsClaimFormOpen(false);
|
||||||
setSelectedPatient(null);
|
|
||||||
setClaimFormData({
|
setClaimFormData({
|
||||||
patientId: null,
|
patientId: null,
|
||||||
serviceDate: "",
|
serviceDate: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user