Skip to content

Commit

Permalink
1949 re enable partial features (#1951)
Browse files Browse the repository at this point in the history
* Re-enable temporarily disabled features

* Comment out Filter Drawer
  • Loading branch information
entrotech authored Nov 13, 2024
1 parent 71b65a7 commit 19656b2
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions client/src/components/Projects/ProjectsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -285,7 +285,7 @@ const ProjectsPage = ({ contentContainerRef }) => {
endDateModifiedAdmin: null
});

const [filterCollapsed, setFilterCollapsed] = useState(true);
// const [filterCollapsed, setFilterCollapsed] = useState(true);
const checkedProjectsStatusData = useCheckedProjectsStatusData(
checkedProjectIds,
projects
Expand Down Expand Up @@ -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"];

Expand Down Expand Up @@ -781,6 +778,8 @@ const ProjectsPage = ({ contentContainerRef }) => {
startDateModifiedAdmin: null,
endDateModifiedAdmin: null
});
setOrderBy("dateModified");
setOrder("desc");
setCheckedProjectIds([]);
setSelectAllChecked(false);
};
Expand Down Expand Up @@ -874,7 +873,7 @@ const ProjectsPage = ({ contentContainerRef }) => {
return (
<ContentContainerNoSidebar contentContainerRef={contentContainerRef}>
<div className={classes.outerDiv}>
<div
{/* <div
className={filterCollapsed ? classes.filterCollapsed : classes.filter}
>
<FilterDrawer
Expand All @@ -886,7 +885,7 @@ const ProjectsPage = ({ contentContainerRef }) => {
setSelectAllChecked={setSelectAllChecked}
droOptions={droOptions}
/>
</div>
</div> */}

<div className={classes.contentDiv}>
<h1 className={classes.pageTitle}>Projects</h1>
Expand Down Expand Up @@ -948,7 +947,7 @@ const ProjectsPage = ({ contentContainerRef }) => {
>
RESET FILTERS/SORT
</button>
{filterCollapsed ? (
{/* {filterCollapsed ? (
<button
alt="Show Filter Criteria"
style={{ backgroundColor: "#0F2940", color: "white" }}
Expand All @@ -957,7 +956,7 @@ const ProjectsPage = ({ contentContainerRef }) => {
<MdFilterAlt style={{ marginRight: "0.5em" }} />
Filter By
</button>
) : null}
) : null} */}
</div>
</div>
</div>
Expand Down

0 comments on commit 19656b2

Please sign in to comment.