Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion client/src/components/Faq/FaqView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ const FaqView = () => {
return currentMatch && nextMatch;
};

return admin && formHasSaved && !isSamePage(currentLocation, nextLocation);
return (
admin && formHasSaved && !isSamePage(currentLocation, nextLocation)
);
},
[admin, formHasSaved]
);
Expand Down
10 changes: 7 additions & 3 deletions client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ const TextPopup = ({
}) => {
const userContext = useContext(UserContext);
const property = header.accessor || header.id;
const loggedInUserName = `${userContext?.account?.lastName}, ${userContext?.account?.firstName}`;

const getDisplayValue = value => {
if (property === "droName" && value === "") {
return "No DRO Assigned";
Expand Down Expand Up @@ -121,14 +123,15 @@ const TextPopup = ({
selectOptions = droOptions.map(dro => dro.name);
selectOptions.push("No DRO Assigned");
} else if (property === "author" && droOptions) {
const loggedInUserName = `${userContext?.account?.lastName}, ${userContext?.account?.firstName} (Me)`;
let hasLoggedInUserInList = false;

selectOptions = [
...new Set(
filteredProjects.map(p => {
const name = `${p.lastName}, ${p.firstName}`;
if (name === loggedInUserName) hasLoggedInUserInList = true;
if (p.loginId === userContext?.account?.id) {
hasLoggedInUserInList = true;
}
return name;
})
)
Expand Down Expand Up @@ -281,6 +284,7 @@ const TextPopup = ({

{filteredOptions.map(o => {
const checked = isChecked(o);

return (
<div key={o} className={classes.listItem}>
<ToggleCheckbox
Expand All @@ -295,7 +299,7 @@ const TextPopup = ({
}
label={o}
/>
<span>{o}</span>
<span>{o === loggedInUserName ? `${o} (Me)` : o}</span>
</div>
);
})}
Expand Down
Loading