Skip to content

Commit 4d467e9

Browse files
v3.8.0 hotfixes
1 parent 5e70073 commit 4d467e9

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

src/frontend/src/components/ProjectDetailCard.tsx

+12-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { daysOrWeeksLeftOrLate, emDashPipe, fullNamePipe } from '../utils/pipes'
1414
import WorkPackageStageChip from './WorkPackageStageChip';
1515
import FavoriteProjectButton from './FavoriteProjectButton';
1616
import TaskIcon from '@mui/icons-material/Task';
17+
import DoneIcon from '@mui/icons-material/Done';
1718

1819
interface ProjectDetailCardProps {
1920
project: Project;
@@ -47,8 +48,17 @@ const ProjectDetailCard: React.FC<ProjectDetailCardProps> = ({ project, projectI
4748
<Construction sx={{ mr: 1 }} /> <Typography>{fullNamePipe(project.projectLead)}</Typography>
4849
</Grid>
4950
<Grid item display="flex" sx={{ marginTop: 0.5 }} xs={4}>
50-
<ScheduleIcon sx={{ mr: 1 }} />
51-
<Typography>{daysLeft ? daysOrWeeksLeftOrLate(daysLeft) : emDashPipe('')}</Typography>
51+
{project.status === WbsElementStatus.Complete ? (
52+
<>
53+
<DoneIcon sx={{ mr: 1 }} />
54+
<Typography>Done!</Typography>
55+
</>
56+
) : (
57+
<>
58+
<ScheduleIcon sx={{ mr: 1 }} />
59+
<Typography>{daysLeft ? daysOrWeeksLeftOrLate(daysLeft) : emDashPipe('')}</Typography>
60+
</>
61+
)}
5262
</Grid>
5363
<Grid item display="flex" justifyContent="left" sx={{ marginTop: 0.5 }} xs={4}>
5464
<TaskIcon sx={{ mr: 1 }} /> <Typography>{`${tasksLeft} task${tasksLeft === 1 ? '' : 's'} left`}</Typography>

src/frontend/src/layouts/Sidebar/Sidebar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const Sidebar: React.FC = () => {
5353
return (
5454
<div className={styles.sidebar}>
5555
<NavPageLinks linkItems={linkItems} />
56-
<Typography className={styles.versionNumber}>3.7.2</Typography>
56+
<Typography className={styles.versionNumber}>3.8.0</Typography>
5757
</div>
5858
);
5959
};

src/frontend/src/pages/ProjectsPage/ProjectsOverview.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import ErrorPage from '../ErrorPage';
99
import { useCurrentUser, useUsersFavoriteProjects } from '../../hooks/users.hooks';
1010
import { useAllProjects } from '../../hooks/projects.hooks';
1111
import ProjectsOverviewCards from './ProjectsOverviewCards';
12+
import { WbsElementStatus } from 'shared';
1213

1314
/**
1415
* Cards of all projects this user has favorited
@@ -31,11 +32,13 @@ const ProjectsOverview: React.FC = () => {
3132
const favoriteProjectsSet: Set<number> = new Set(favoriteProjects.map((project) => project.id));
3233

3334
const projectsImLeading = projects.filter(
34-
(project) => project.projectLead?.userId === user.userId || project.projectManager?.userId === user.userId
35+
(project) =>
36+
(project.status !== WbsElementStatus.Complete && project.projectLead?.userId === user.userId) ||
37+
project.projectManager?.userId === user.userId
3538
);
3639
const myTeamsProjects = projects.filter(
3740
(project) =>
38-
(user.teamAsLeadId && user.teamAsLeadId === project.team?.teamId) ||
41+
(project.status !== WbsElementStatus.Complete && user.teamAsLeadId && user.teamAsLeadId === project.team?.teamId) ||
3942
project.team?.members.map((member) => member.userId).includes(user.userId)
4043
);
4144

0 commit comments

Comments
 (0)