Skip to content

Commit 5fc77a0

Browse files
committed
#1644: proposed solutions redesign
1 parent d2de421 commit 5fc77a0

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

src/frontend/src/pages/ChangeRequestDetailPage/ProposedSolutionView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const ProposedSolutionView: React.FC<ProposedSolutionViewProps> = ({
6060
<Typography>{weeksPipe(proposedSolution.timelineImpact)}</Typography>
6161
</Grid>
6262
<Grid item>{proposedSolution.approved && <Chip label="Approved" color="success" />}</Grid>
63-
{showDeleteButton && onDelete !== undefined ? (
63+
{showDeleteButton && onDelete !== undefined && (
6464
<Grid item>
6565
<Button
6666
color="error"
@@ -72,7 +72,7 @@ const ProposedSolutionView: React.FC<ProposedSolutionViewProps> = ({
7272
<DeleteIcon />
7373
</Button>
7474
</Grid>
75-
) : null}
75+
)}
7676
</Grid>
7777
</Grid>
7878
</Grid>

src/frontend/src/pages/CreateChangeRequestPage/CreateChangeRequestView.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,17 @@ const CreateChangeRequestsView: React.FC<CreateChangeRequestViewProps> = ({
199199
previousPages={[{ name: 'Change Requests', route: routes.CHANGE_REQUESTS }]}
200200
headerRight={
201201
<Box textAlign="right" sx={{ mb: 2 }}>
202-
<NERFailButton variant="contained" onClick={handleCancel} sx={{ mx: 1 }}>
202+
<NERFailButton variant="contained" onClick={handleCancel} sx={{ mx: 1, width: 90 }}>
203203
Cancel
204204
</NERFailButton>
205-
<NERSuccessButton variant="contained" type="submit" sx={{ mx: 1 }}>
205+
<NERSuccessButton variant="contained" type="submit" sx={{ mx: 1, width: 90, mt: { xs: 1, md: 0 } }}>
206206
Submit
207207
</NERSuccessButton>
208208
</Box>
209209
}
210210
>
211211
<Grid container spacing={2} display="flex" justifyContent="space-between">
212-
<Grid container item spacing={2} xs={5} maxHeight={0} sx={{ mt: -5 }}>
212+
<Grid container item spacing={2} xs={12} md={6}>
213213
<Grid item xs={12}>
214214
<FormLabel>WBS</FormLabel>
215215
<NERAutocomplete
@@ -308,8 +308,7 @@ const CreateChangeRequestsView: React.FC<CreateChangeRequestViewProps> = ({
308308
</Button>
309309
</Grid>
310310
</Grid>
311-
<Grid item xs={1} />
312-
<Grid item xs={5} sx={{ mt: -2 }}>
311+
<Grid item xs={12} md={5} sx={{ mt: -2 }}>
313312
<CreateProposedSolutionsList proposedSolutions={proposedSolutions} setProposedSolutions={setProposedSolutions} />
314313
</Grid>
315314
</Grid>

src/frontend/src/pages/CreateChangeRequestPage/CreateProposedSolutionsList.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ const CreateProposedSolutionsList: React.FC<CreateProposedSolutionsListProps> =
2323
const user = useCurrentUser();
2424
const [showEditableForm, setShowEditableForm] = useState<boolean>(false);
2525

26-
if (!user) return <LoadingIndicator />;
27-
2826
const addProposedSolution = async (data: ProposedSolution) => {
2927
setProposedSolutions([...proposedSolutions, data]);
3028
setShowEditableForm(false);

0 commit comments

Comments
 (0)