diff --git a/client/src/components/Projects/ProjectsPage.jsx b/client/src/components/Projects/ProjectsPage.jsx index c6a7a3ee..b1d80497 100644 --- a/client/src/components/Projects/ProjectsPage.jsx +++ b/client/src/components/Projects/ProjectsPage.jsx @@ -4,7 +4,7 @@ import { useNavigate } from "react-router-dom"; import { createUseStyles } from "react-jss"; import UserContext from "../../contexts/UserContext"; -import { MdFilterAlt } from "react-icons/md"; +// import { MdFilterAlt } from "react-icons/md"; import { MdOutlineSearch } from "react-icons/md"; import Pagination from "../UI/Pagination"; import ContentContainerNoSidebar from "../Layout/ContentContainerNoSidebar"; @@ -22,7 +22,7 @@ import DeleteProjectModal from "./DeleteProjectModal"; import CopyProjectModal from "./CopyProjectModal"; import CsvModal from "./CsvModal"; import ProjectTableRow from "./ProjectTableRow"; -import FilterDrawer from "./FilterDrawer"; +// import FilterDrawer from "./FilterDrawer"; import MultiProjectToolbarMenu from "./MultiProjectToolbarMenu"; import fetchEngineRules from "./fetchEngineRules"; import UniversalSelect from "../UI/UniversalSelect"; @@ -151,12 +151,12 @@ const ProjectsPage = ({ contentContainerRef }) => { const userContext = useContext(UserContext); const [filterText, setFilterText] = useState(""); - const [order, setOrder] = useState("asc"); + const [order, setOrder] = useState("desc"); + const [orderBy, setOrderBy] = useState("dateModified"); const email = userContext.account ? userContext.account.email : ""; const navigate = useNavigate(); const handleError = useErrorHandler(email, navigate); const [projects, setProjects] = useProjects(handleError); - const [orderBy, setOrderBy] = useState("dateCreated"); const [copyModalOpen, setCopyModalOpen] = useState(false); const [snapshotModalOpen, setSnapshotModalOpen] = useState(false); const [renameSnapshotModalOpen, setRenameSnapshotModalOpen] = useState(false); @@ -285,7 +285,7 @@ const ProjectsPage = ({ contentContainerRef }) => { endDateModifiedAdmin: null }); - const [filterCollapsed, setFilterCollapsed] = useState(true); + // const [filterCollapsed, setFilterCollapsed] = useState(true); const checkedProjectsStatusData = useCheckedProjectsStatusData( checkedProjectIds, projects @@ -743,9 +743,6 @@ const ProjectsPage = ({ contentContainerRef }) => { ) return false; - // Search criteria for filterText - redundant with individual search - // criteria in FilterDrawer, and we could get rid of the search box - // above the grid. if (filterText !== "") { let ids = ["name", "address", "fullName", "alternative", "description"]; @@ -781,6 +778,8 @@ const ProjectsPage = ({ contentContainerRef }) => { startDateModifiedAdmin: null, endDateModifiedAdmin: null }); + setOrderBy("dateModified"); + setOrder("desc"); setCheckedProjectIds([]); setSelectAllChecked(false); }; @@ -874,7 +873,7 @@ const ProjectsPage = ({ contentContainerRef }) => { return (
-
{ setSelectAllChecked={setSelectAllChecked} droOptions={droOptions} /> -
+
*/}

Projects

@@ -948,7 +947,7 @@ const ProjectsPage = ({ contentContainerRef }) => { > RESET FILTERS/SORT - {filterCollapsed ? ( + {/* {filterCollapsed ? ( - ) : null} + ) : null} */}