eligibility page fields done

This commit is contained in:
2025-07-13 00:15:41 +05:30
parent 324623f02b
commit e542e6c701
2 changed files with 77 additions and 38 deletions

View File

@@ -68,7 +68,7 @@ interface PatientTableProps {
allowView?: boolean;
allowDelete?: boolean;
allowCheckbox?: boolean;
onSelectPatient?: (patient: Patient) => void;
onSelectPatient?: (patient: Patient | null) => void;
}
export function PatientTable({
@@ -107,8 +107,8 @@ export function PatientTable({
const newSelectedId = isSelected ? null : patient.id;
setSelectedPatientId(newSelectedId);
if (!isSelected && onSelectPatient) {
onSelectPatient(patient);
if (onSelectPatient) {
onSelectPatient(isSelected ? null : patient);
}
};