Skip to content

Commit 3cc13bb

Browse files
committed
#1640: Fixed file location, children prop
1 parent 1bec7a9 commit 3cc13bb

5 files changed

Lines changed: 54 additions & 56 deletions

File tree

src/frontend/src/pages/ChangeRequestDetailPage/ChangeRequestDetailsView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import LoadingIndicator from '../../components/LoadingIndicator';
3030
import ErrorPage from '../ErrorPage';
3131
import PageLayout from '../../components/PageLayout';
3232
import ChangeRequestActionMenu from './ChangeRequestActionMenu';
33+
import OtherChangeRequestsPopupTabs from './OtherChangeRequestsPopupTabs';
3334

3435
const buildDetails = (cr: ChangeRequest): ReactElement => {
3536
switch (cr.type) {
@@ -154,6 +155,7 @@ const ChangeRequestDetailsView: React.FC<ChangeRequestDetailsProps> = ({
154155
{deleteModalShow && (
155156
<DeleteChangeRequest modalShow={deleteModalShow} handleClose={handleDeleteClose} cr={changeRequest} />
156157
)}
158+
<OtherChangeRequestsPopupTabs changeRequest={changeRequest} />
157159
</PageLayout>
158160
);
159161
};

src/frontend/src/pages/ChangeRequestDetailPage/ImplementedChangesList.tsx

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { routes } from '../../utils/routes';
99
import { Link, ListItem, List, Typography } from '@mui/material';
1010
import { Link as RouterLink } from 'react-router-dom';
1111
import DynamicTooltip from '../../components/DynamicTooltip';
12-
import InfoBlock from '../../layouts/InfoBlock';
12+
import InfoBlock from '../../components/InfoBlock';
1313

1414
interface ImplementedChangesListProps {
1515
changes: ImplementedChange[];
@@ -18,34 +18,31 @@ interface ImplementedChangesListProps {
1818

1919
const ImplementedChangesList: React.FC<ImplementedChangesListProps> = ({ changes }) => {
2020
return (
21-
<InfoBlock
22-
title={'Implemented Changes'}
23-
children={
24-
<List>
25-
{changes.length === 0 ? (
26-
<Typography>—— There are no implemented changes for this change request.</Typography>
27-
) : (
28-
changes.map((ic, idx) => (
29-
<ListItem key={idx}>
30-
<DynamicTooltip title={`${fullNamePipe(ic.implementer)} - ${datePipe(ic.dateImplemented)}`}>
31-
{
32-
<Typography>
33-
[
34-
{
35-
<Link component={RouterLink} to={`${routes.PROJECTS}/${wbsPipe(ic.wbsNum)}`}>
36-
{wbsPipe(ic.wbsNum)}
37-
</Link>
38-
}
39-
] {ic.detail}
40-
</Typography>
41-
}
42-
</DynamicTooltip>
43-
</ListItem>
44-
))
45-
)}
46-
</List>
47-
}
48-
></InfoBlock>
21+
<InfoBlock title={'Implemented Changes'}>
22+
<List>
23+
{changes.length === 0 ? (
24+
<Typography>—— There are no implemented changes for this change request.</Typography>
25+
) : (
26+
changes.map((ic, idx) => (
27+
<ListItem key={idx}>
28+
<DynamicTooltip title={`${fullNamePipe(ic.implementer)} - ${datePipe(ic.dateImplemented)}`}>
29+
{
30+
<Typography>
31+
[
32+
{
33+
<Link component={RouterLink} to={`${routes.PROJECTS}/${wbsPipe(ic.wbsNum)}`}>
34+
{wbsPipe(ic.wbsNum)}
35+
</Link>
36+
}
37+
] {ic.detail}
38+
</Typography>
39+
}
40+
</DynamicTooltip>
41+
</ListItem>
42+
))
43+
)}
44+
</List>
45+
</InfoBlock>
4946
);
5047
};
5148

src/frontend/src/pages/ChangeRequestDetailPage/ReviewNotes.tsx

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { User } from 'shared';
77
import { datePipe, emDashPipe, fullNamePipe } from '../../utils/pipes';
88
import { Tooltip, Typography } from '@mui/material';
9-
import InfoBlock from '../../layouts/InfoBlock';
9+
import InfoBlock from '../../components/InfoBlock';
1010

1111
interface ReviewNotesProps {
1212
reviewer?: User;
@@ -16,30 +16,27 @@ interface ReviewNotesProps {
1616

1717
const ReviewNotes: React.FC<ReviewNotesProps> = ({ reviewer, reviewNotes, dateReviewed }: ReviewNotesProps) => {
1818
return (
19-
<InfoBlock
20-
title={'Review Notes'}
21-
children={
22-
<Typography>
23-
<Tooltip
24-
id="tooltip"
25-
arrow
26-
placement="bottom"
27-
title={
28-
<Typography
29-
sx={{
30-
fontSize: 14
31-
}}
32-
>
33-
{'Reviewed on: ' + (dateReviewed ? datePipe(dateReviewed) : emDashPipe(''))}
34-
</Typography>
35-
}
36-
>
37-
<span>{fullNamePipe(reviewer)}</span>
38-
</Tooltip>
39-
{reviewNotes ?? 'There are no review notes for this change request.'}
40-
</Typography>
41-
}
42-
></InfoBlock>
19+
<InfoBlock title={'Review Notes'}>
20+
<Typography>
21+
<Tooltip
22+
id="tooltip"
23+
arrow
24+
placement="bottom"
25+
title={
26+
<Typography
27+
sx={{
28+
fontSize: 14
29+
}}
30+
>
31+
{'Reviewed on: ' + (dateReviewed ? datePipe(dateReviewed) : emDashPipe(''))}
32+
</Typography>
33+
}
34+
>
35+
<span>{fullNamePipe(reviewer)}</span>
36+
</Tooltip>
37+
{reviewNotes ?? 'There are no review notes for this change request.'}
38+
</Typography>
39+
</InfoBlock>
4340
);
4441
};
4542

src/frontend/src/pages/ChangeRequestDetailPage/StageGateDetails.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { StageGateChangeRequest } from 'shared';
77
import { booleanPipe } from '../../utils/pipes';
8-
import InfoBlock from '../../layouts/InfoBlock';
8+
import InfoBlock from '../../components/InfoBlock';
99
import { Typography } from '@mui/material';
1010

1111
interface StageGateDetailsProps {
@@ -14,7 +14,9 @@ interface StageGateDetailsProps {
1414

1515
const StageGateDetails: React.FC<StageGateDetailsProps> = ({ cr }) => {
1616
return (
17-
<InfoBlock title={'Confirm WP Completed'} children={<Typography>{booleanPipe(cr.confirmDone)}</Typography>}></InfoBlock>
17+
<InfoBlock title={'Confirm WP Completed'}>
18+
<Typography>{booleanPipe(cr.confirmDone)}</Typography>
19+
</InfoBlock>
1820
);
1921
};
2022

0 commit comments

Comments
 (0)