Skip to content

Commit

Permalink
Hide N/A and null values in event log ohcnetwork#8376
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithin9585 committed Aug 21, 2024
1 parent 9a5e833 commit 9d68af8
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions src/Components/Facility/Consultations/NeurologicalTables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,30 @@ const DataTable = (props: any) => {
</div>
<div className="flex flex-row overflow-x-auto">
{data.map((x: any, i: any) => {
return (
<div
key={`${title}_${i}`}
className="flex flex-col divide-x divide-secondary-200"
>
<div className="w-20 bg-secondary-50 px-2 py-3 text-center text-xs font-medium leading-4 text-secondary-900">
{x.date}
</div>
<div className="whitespace-nowrap bg-white px-2 py-4 text-center text-sm leading-5 text-secondary-900">
{x.left}
</div>
<div className="whitespace-nowrap bg-white px-2 py-4 text-center text-sm leading-5 text-secondary-900">
{x.right}
if (
x.left !== "N/A" &&
x.left !== null &&
x.right !== "N/A" &&
x.right !== null
) {
return (
<div
key={`${title}_${i}`}
className="flex flex-col divide-x divide-secondary-200"
>
<div className="w-20 bg-secondary-50 px-2 py-3 text-center text-xs font-medium leading-4 text-secondary-900">
{x.date}
</div>
<div className="whitespace-nowrap bg-white px-2 py-4 text-center text-sm leading-5 text-secondary-900">
{x.left}
</div>
<div className="whitespace-nowrap bg-white px-2 py-4 text-center text-sm leading-5 text-secondary-900">
{x.right}
</div>
</div>
</div>
);
);
}
return null;
})}
</div>
</div>
Expand Down

0 comments on commit 9d68af8

Please sign in to comment.