Skip to content

Commit

Permalink
Fixed bug introduced in PR #1904 that caused Admin Notes, Date Admin …
Browse files Browse the repository at this point in the history
…Modified cols to be hidden
  • Loading branch information
entrotech committed Oct 31, 2024
1 parent eae21e2 commit 47d2412
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions client/src/components/Projects/ProjectsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ const ProjectsPage = ({ contentContainerRef }) => {
const [droOptions, setDroOptions] = useState([]);
const [droNameMap, setDroNameMap] = useState({});
const projectsPerPage = perPage;
const isAdmin = userContext.account?.isAdmin || false;

useEffect(() => {
// Check if the user is an admin
Expand Down Expand Up @@ -948,18 +949,12 @@ const ProjectsPage = ({ contentContainerRef }) => {
handleHide={handleHide}
handleCheckboxChange={handleCheckboxChange}
checkedProjectIds={checkedProjectIds}
isAdmin={
UserContext.account
? UserContext.account.isAdmin
: false
}
isAdmin={isAdmin}
droOptions={droOptions}
onDroChange={handleDroChange} // Pass the DRO change handler
onAdminNoteUpdate={handleAdminNoteUpdate} // Pass the admin note update handler
droName={
userContext.account?.isAdmin
? null
: droNameMap[project.droId] || "N/A"
isAdmin ? null : droNameMap[project.droId] || "N/A"
} // Pass the droName
/>
))
Expand Down

0 comments on commit 47d2412

Please sign in to comment.