diff --git a/src/Components/Facility/ConsultationCard.tsx b/src/Components/Facility/ConsultationCard.tsx index 67ee4dfb89c..96728c6a2e3 100644 --- a/src/Components/Facility/ConsultationCard.tsx +++ b/src/Components/Facility/ConsultationCard.tsx @@ -21,9 +21,9 @@ export const ConsultationCard = (props: ConsultationProps) => { const { itemData, isLastConsultation, refetch } = props; const { kasp_string } = useConfig(); const [open, setOpen] = useState(false); - const bedDialogTitle = itemData?.discharge_date + const bedDialogTitle = itemData.discharge_date ? "Bed History" - : !itemData?.current_bed + : !itemData.current_bed ? "Assign Bed" : "Switch Bed"; return ( @@ -34,12 +34,12 @@ export const ConsultationCard = (props: ConsultationProps) => { onClose={() => setOpen(false)} className="md:max-w-3xl" > - {itemData?.facility && itemData?.patient && itemData?.id ? ( + {itemData.facility && itemData.patient && itemData.id ? ( { { - if (itemData?.admitted && !itemData?.current_bed) { + if (itemData.admitted && !itemData.current_bed) { Notification.Error({ msg: "Please assign a bed to the patient", });