Skip to content

Commit 730fc6c

Browse files
committed
#1650 - address comments/ tests?
1 parent d97274c commit 730fc6c

3 files changed

Lines changed: 34 additions & 18 deletions

File tree

src/frontend/src/layouts/PageTitle/PageTitle.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ const PageTitle: React.FC<PageTitleProps> = ({ title, chips, previousPages, head
4141
bgcolor={theme.palette.background.default}
4242
>
4343
<Grid container>
44-
<Grid item xs={6} md={tabs ? 4 : 8} display="flex" alignItems={'center'}>
45-
<Typography variant="h4" fontSize={30}>
46-
{title}
47-
</Typography>
48-
{chips}
44+
<Grid container item xs={6} md={tabs ? 4 : 8} display="flex" alignItems={'center'} rowGap={2}>
45+
<Grid item xs={12} md={chips ? 4.2 : 12}>
46+
<Typography variant="h4" fontSize={30}>
47+
{title}
48+
</Typography>
49+
</Grid>
50+
<Grid item xs={chips ? 12 : 0} md={chips ? 6 : 0}>
51+
{chips}
52+
</Grid>
4953
</Grid>
5054
<Grid item xs={0} md={tabs ? 4 : 0} sx={{ display: { xs: 'none', md: 'block' } }}>
5155
{tabs}

src/frontend/src/pages/ChangeRequestDetailPage/ActivationDetails.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ interface ActivationDetailsProps {
1818

1919
const ActivationDetails: React.FC<ActivationDetailsProps> = ({ cr }) => {
2020
return (
21-
<Grid container rowSpacing={'10px'} mb="10px">
22-
<Grid item xs={6} md={3}>
21+
<Grid container rowSpacing={'10px'} mb="40px">
22+
<Grid item xs={6} md={6}>
2323
<InfoBlock title={'Project Lead'} icon={<HandymanIcon />}>
2424
<Typography>{fullNamePipe(cr.projectLead)}</Typography>
2525
</InfoBlock>
2626
</Grid>
27-
<Grid item xs={6} md={3}>
27+
<Grid item xs={6} md={6}>
2828
<InfoBlock title={'Project Manager'} icon={<WorkIcon />}>
2929
<Typography>{fullNamePipe(cr.projectManager)}</Typography>
3030
</InfoBlock>
3131
</Grid>
32-
<Grid item xs={6} md={3}>
32+
<Grid item xs={6} md={6}>
3333
<InfoBlock title={'Start Date'} icon={<CalendarTodayIcon />}>
3434
<Typography>{datePipe(cr.startDate)}</Typography>
3535
</InfoBlock>

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

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ const ChangeRequestDetailsView: React.FC<ChangeRequestDetailsProps> = ({
7272
const isStandard =
7373
changeRequest.type !== ChangeRequestType.Activation && changeRequest.type !== ChangeRequestType.StageGate;
7474

75+
const isActivation = changeRequest.type === ChangeRequestType.Activation;
76+
7577
return (
7678
<PageLayout
7779
title={`Change Request #${changeRequest.crId}`}
7880
chips={
79-
<Box display="flex" mx="20px" gap="20px">
81+
<Box display="flex" gap="20px">
8082
<ChangeRequestTypePill type={changeRequest.type} />
8183
<ChangeRequestStatusPill status={changeRequest.status} />
8284
</Box>
@@ -111,21 +113,23 @@ const ChangeRequestDetailsView: React.FC<ChangeRequestDetailsProps> = ({
111113
</Typography>
112114
</Grid>
113115
</Grid>
114-
<Grid container rowSpacing={2} columnSpacing={2}>
115-
<Grid container item xs={isStandard ? 7 : 12}>
116+
<Grid container rowSpacing={2}>
117+
<Grid container rowSpacing={1} item xs={isStandard ? 7 : isActivation ? 6 : 12}>
116118
{buildDetails(changeRequest)}
117-
<Grid item md={isStandard ? 12 : 5}>
119+
<Grid item md={isStandard ? 12 : isActivation ? 12 : 5}>
118120
<ReviewNotes
119121
reviewer={changeRequest.reviewer}
120122
reviewNotes={changeRequest.reviewNotes}
121123
dateReviewed={changeRequest.dateReviewed}
122124
/>
123125
</Grid>
124-
<Grid item md={isStandard ? 12 : 6}>
125-
<ImplementedChangesList
126-
changes={changeRequest.implementedChanges || []}
127-
overallDateImplemented={changeRequest.dateImplemented}
128-
/>
126+
<Grid item md={isStandard ? 12 : isActivation ? 0 : 6}>
127+
{!isActivation && (
128+
<ImplementedChangesList
129+
changes={changeRequest.implementedChanges || []}
130+
overallDateImplemented={changeRequest.dateImplemented}
131+
/>
132+
)}
129133
</Grid>
130134
</Grid>
131135
<Grid item xs={isStandard ? 5 : 0}>
@@ -137,6 +141,14 @@ const ChangeRequestDetailsView: React.FC<ChangeRequestDetailsProps> = ({
137141
/>
138142
)}
139143
</Grid>
144+
<Grid item xs={isActivation ? 6 : 0}>
145+
{isActivation && (
146+
<ImplementedChangesList
147+
changes={changeRequest.implementedChanges || []}
148+
overallDateImplemented={changeRequest.dateImplemented}
149+
/>
150+
)}
151+
</Grid>
140152
</Grid>
141153
</Grid>
142154

0 commit comments

Comments
 (0)