diff --git a/frontend/src/__test__/components/TableRowComponent.test.tsx b/frontend/src/__test__/components/TableRowComponent.test.tsx index 8e0a4ba2..49fc2286 100644 --- a/frontend/src/__test__/components/TableRowComponent.test.tsx +++ b/frontend/src/__test__/components/TableRowComponent.test.tsx @@ -65,7 +65,7 @@ describe("TableRowComponent", () => { fireEvent.click(tableRow); // Verify that setOpeningDetails was called with true - expect(setOpeningDetails).toHaveBeenCalledWith(true); + expect(setOpeningDetails).toHaveBeenCalledWith("1"); }); it("renders TableCell components only for selected headers", () => { diff --git a/frontend/src/components/ActionButtons/index.tsx b/frontend/src/components/ActionButtons/index.tsx index 877cfcc5..6de44329 100644 --- a/frontend/src/components/ActionButtons/index.tsx +++ b/frontend/src/components/ActionButtons/index.tsx @@ -25,6 +25,7 @@ const ActionButtons: React.FC = ({ rowId }) => ( renderIcon={Icons.DocumentDownload} onClick={() => null} size="md" + disabled /> ); diff --git a/frontend/src/components/Dashboard/Opening/RecentOpeningsDataTable/index.tsx b/frontend/src/components/Dashboard/Opening/RecentOpeningsDataTable/index.tsx index 1b3cc5f0..91084a3d 100644 --- a/frontend/src/components/Dashboard/Opening/RecentOpeningsDataTable/index.tsx +++ b/frontend/src/components/Dashboard/Opening/RecentOpeningsDataTable/index.tsx @@ -6,8 +6,7 @@ import { TableContainer, TableHead, TableHeader, - TableRow, - Modal, + TableRow } from "@carbon/react"; import EmptySection from "../../../EmptySection"; import PaginationContext from "../../../../contexts/PaginationContext"; @@ -15,6 +14,7 @@ import { OpeningsSearch } from "../../../../types/OpeningsSearch"; import { ITableHeader } from "../../../../types/TableHeader"; import { useNavigate } from "react-router-dom"; import TableRowComponent from "../../../TableRowComponent"; +import ComingSoonModal from "../../../ComingSoonModal"; interface IRecentOpeningsDataTable { rows: OpeningsSearch[]; @@ -38,7 +38,7 @@ const RecentOpeningsDataTable: React.FC = ({ setInitialItemsPerPage, } = useContext(PaginationContext); const [selectedRows, setSelectedRows] = useState([]); - const [openingDetails, setOpeningDetails] = useState(false); + const [openingDetails, setOpeningDetails] = useState(""); const navigate = useNavigate(); useEffect(() => { @@ -95,13 +95,9 @@ const RecentOpeningsDataTable: React.FC = ({ fill="#0073E6" /> )} - - setOpeningDetails(false)} - passiveModal - modalHeading="Feature coming soon" - modalLabel="Opening Details" + diff --git a/frontend/src/components/SilvicultureSearch/Openings/SearchScreenDataTable/index.tsx b/frontend/src/components/SilvicultureSearch/Openings/SearchScreenDataTable/index.tsx index 72d7029a..c4afc001 100644 --- a/frontend/src/components/SilvicultureSearch/Openings/SearchScreenDataTable/index.tsx +++ b/frontend/src/components/SilvicultureSearch/Openings/SearchScreenDataTable/index.tsx @@ -49,8 +49,6 @@ import { useNotification } from "../../../../contexts/NotificationProvider"; import TruncatedText from "../../../TruncatedText"; import FriendlyDate from "../../../FriendlyDate"; import ComingSoonModal from "../../../ComingSoonModal"; -import { Icon } from "@carbon/icons-react"; -import { set } from "date-fns"; interface ISearchScreenDataTable { rows: OpeningsSearch[]; diff --git a/frontend/src/components/TableRowComponent/index.tsx b/frontend/src/components/TableRowComponent/index.tsx index 41e4950f..de31b020 100644 --- a/frontend/src/components/TableRowComponent/index.tsx +++ b/frontend/src/components/TableRowComponent/index.tsx @@ -12,7 +12,7 @@ interface TableRowComponentProps { showSpatial: boolean; selectedRows: string[]; handleRowSelectionChanged: (rowId: string) => void; - setOpeningDetails: (show: boolean) => void; + setOpeningDetails: (openingId: string) => void; } const TableRowComponent: React.FC = ({ @@ -21,9 +21,9 @@ const TableRowComponent: React.FC = ({ showSpatial, selectedRows, handleRowSelectionChanged, - setOpeningDetails, + setOpeningDetails }) => ( - setOpeningDetails(true)}> + setOpeningDetails(row.openingId.toString())}> {headers.map((header) => header.selected ? (