diff --git a/src/completed-list/completed-list.component.tsx b/src/completed-list/completed-list.component.tsx index dc23e4bd..aacd4de1 100644 --- a/src/completed-list/completed-list.component.tsx +++ b/src/completed-list/completed-list.component.tsx @@ -6,6 +6,7 @@ import { formatDate, parseDate, usePagination, + isDesktop, } from "@openmrs/esm-framework"; import { DataTable, @@ -119,7 +120,7 @@ const CompletedList: React.FC = ({ fulfillerStatus }) => { return (
- + {({ rows, headers, @@ -170,7 +171,7 @@ const CompletedList: React.FC = ({ fulfillerStatus }) => { {headers.map((header) => ( - {header.header} + {header.header?.content ?? header.header} ))} diff --git a/src/queue-list/laboratory-patient-list.component.tsx b/src/queue-list/laboratory-patient-list.component.tsx index a691eac0..702caad5 100644 --- a/src/queue-list/laboratory-patient-list.component.tsx +++ b/src/queue-list/laboratory-patient-list.component.tsx @@ -140,44 +140,6 @@ const LaboratoryPatientList: React.FC = () => { }, })); }, [paginatedQueueEntries, t]); - - // const handleFilter = ({ - // rowIds, - // headers, - // cellsById, - // inputValue, - // getCellId, - // }: FilterProps): Array => { - // return rowIds.filter((rowId) => - // headers.some(({ key }) => { - // const cellId = getCellId(rowId, key); - // const filterableValue = cellsById[cellId].value; - // const filterTerm = inputValue.toLowerCase(); - - // if (typeof filterableValue === "boolean") { - // return false; - // } - // if (filterableValue.hasOwnProperty("content")) { - // if (Array.isArray(filterableValue.content.props.children)) { - // return ( - // "" + filterableValue.content.props.children[1].props.children - // ) - // .toLowerCase() - // .includes(filterTerm); - // } - // if (typeof filterableValue.content.props.children === "object") { - // return ("" + filterableValue.content.props.children.props.children) - // .toLowerCase() - // .includes(filterTerm); - // } - // return ("" + filterableValue.content.props.children) - // .toLowerCase() - // .includes(filterTerm); - // } - // return ("" + filterableValue).toLowerCase().includes(filterTerm); - // }) - // ); - // }; if (isLoading) { return ; } @@ -186,7 +148,7 @@ const LaboratoryPatientList: React.FC = () => { return (
- + {({ rows, headers, @@ -223,7 +185,7 @@ const LaboratoryPatientList: React.FC = () => { {headers.map((header) => ( - {header.header} + {header.header?.content ?? header.header} ))} diff --git a/src/review-list/review-list.component.tsx b/src/review-list/review-list.component.tsx index 065f9857..2eaedb8b 100644 --- a/src/review-list/review-list.component.tsx +++ b/src/review-list/review-list.component.tsx @@ -149,7 +149,7 @@ const ReviewList: React.FC = ({ fulfillerStatus }) => { return (
- + {({ rows, headers, @@ -199,7 +199,7 @@ const ReviewList: React.FC = ({ fulfillerStatus }) => { {headers.map((header) => ( - {header.header} + {header.header?.content ?? header.header} ))} diff --git a/src/work-list/work-list.component.tsx b/src/work-list/work-list.component.tsx index edbe38c5..e08a3d03 100644 --- a/src/work-list/work-list.component.tsx +++ b/src/work-list/work-list.component.tsx @@ -189,7 +189,7 @@ const WorkList: React.FC = ({ fulfillerStatus }) => { return (
- + {({ rows, headers, @@ -239,7 +239,7 @@ const WorkList: React.FC = ({ fulfillerStatus }) => { {headers.map((header) => ( - {header.header} + {header.header?.content ?? header.header} ))}