Skip to content

Commit

Permalink
Merge branch 'develop' into feature/1339
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 authored Dec 23, 2024
2 parents 344f7ed + 96dbceb commit 5d7c7a7
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function TestNotificationConfigMenu() {

const componentMounted = useRef(false);
const [page, setPage] = useState(1);
const [pageSize, setPageSize] = useState(20);
const [pageSize, setPageSize] = useState(25);
const [loading, setLoading] = useState(true);
const [saveButton, setSaveButton] = useState(true);
const [testNamesList, setTestNamesList] = useState([]);
Expand Down Expand Up @@ -170,7 +170,7 @@ function TestNotificationConfigMenu() {

setTestNotificationConfigMenuDataPost((prevData) => {
const updatedMenuList = prevData.menuList.map((item) => {
if (item.id === rowId) {
if (item.testId === rowId) {
switch (header) {
case "patientEmail":
return {
Expand Down Expand Up @@ -225,9 +225,13 @@ function TestNotificationConfigMenu() {
return (
<TableCell key={cell.id}>
<Checkbox
id={cell.id}
id={`checkbox-${row.id}-${cell.info.header}`}
labelText=""
checked={cell.value === "true"}
checked={
testNotificationConfigMenuDataPost?.menuList.find(
(item) => item.testId === row.id,
)?.[cell.info.header]?.active || false
}
onChange={(e) => {
setSaveButton(false);
handleCheckboxChange(e, row.id, cell.info.header);
Expand Down Expand Up @@ -304,7 +308,7 @@ function TestNotificationConfigMenu() {
testNotificationConfigMenuDataPost?.menuList
?.slice((page - 1) * pageSize, page * pageSize)
?.map((item) => ({
id: item.id,
id: item.testId,
testId: item.testId,
patientEmail: item.patientEmail.active ? "true" : "false",
patientSMS: item.patientSMS.active ? "true" : "false",
Expand Down

0 comments on commit 5d7c7a7

Please sign in to comment.