Skip to content

Commit 60954c7

Browse files
committed
#3604 new tab
1 parent a646f11 commit 60954c7

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/frontend/src/pages/ProjectDetailPage/ProjectViewContainer/ProjectDetails.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ const ProjectDetails: React.FC<ProjectDetailsProps> = ({ project }) => {
137137
reimbursed={rrData.reimbursed}
138138
available={rrData.available}
139139
/>
140-
<ProjectSpendingHistory wbsNum={project.wbsNum} />
141140
</Grid>
142141
)}
143142
<Grid item {...summaryGridSize} sx={{ mb: emptyRRData ? 2 : 7 }}>

src/frontend/src/pages/ProjectDetailPage/ProjectViewContainer/ProjectViewContainer.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { useGetMaterialsForWbsElement } from '../../../hooks/bom.hooks';
3434
import ChangeRequestTab from '../../../components/ChangeRequestTab';
3535
import PartsReviewPage from './PartReview/PartsReviewPage';
3636
import ActionsMenu from '../../../components/ActionsMenu';
37+
import ProjectSpendingHistory from '../../ProjectPage/ProjectSpendingHistory';
3738

3839
interface ProjectViewContainerProps {
3940
project: Project;
@@ -179,7 +180,8 @@ const ProjectViewContainer: React.FC<ProjectViewContainerProps> = ({ project, en
179180
{ tabUrlValue: 'changes', tabName: 'Changes' },
180181
{ tabUrlValue: 'gantt', tabName: 'Gantt' },
181182
{ tabUrlValue: 'change-requests', tabName: 'Change Requests' },
182-
{ tabUrlValue: 'parts-review', tabName: 'Parts Review' }
183+
{ tabUrlValue: 'parts-review', tabName: 'Parts Review' },
184+
{ tabUrlValue: 'spending', tabName: 'Spending History' }
183185
]}
184186
baseUrl={`${routes.PROJECTS}/${wbsNum}`}
185187
defaultTab="overview"
@@ -202,8 +204,10 @@ const ProjectViewContainer: React.FC<ProjectViewContainerProps> = ({ project, en
202204
<ProjectGantt workPackages={project.workPackages} />
203205
) : tab === 6 ? (
204206
<ChangeRequestTab wbsElement={project} />
205-
) : (
207+
) : tab === 7 ? (
206208
<PartsReviewPage project={project} />
209+
) : (
210+
<ProjectSpendingHistory wbsNum={project.wbsNum} />
207211
)}
208212
{deleteModalShow && (
209213
<DeleteProject modalShow={deleteModalShow} handleClose={handleDeleteClose} wbsNum={project.wbsNum} />

src/frontend/src/pages/ProjectPage/ProjectSpendingHistory.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const ProjectSpendingHistory: React.FC<ProjectSpendingHistoryProps> = ({ wbsNum
2626
const { data: materials, isLoading, isError } = useGetMaterialsForWbsElement(wbsNum);
2727
const [openRows, setOpenRows] = React.useState<Record<string, boolean>>({});
2828

29-
// Group materials by reimbursementRequestId
3029
const grouped = React.useMemo(() => {
3130
if (!materials) return [];
3231
const map: Record<string, { request: any; materials: Material[] }> = {};

0 commit comments

Comments
 (0)