Skip to content

Commit 08820cd

Browse files
committed
Mini changes fixed
1 parent 511a388 commit 08820cd

3 files changed

Lines changed: 29 additions & 33 deletions

File tree

src/frontend/src/components/NERAutocomplete.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const NERAutocomplete: React.FC<NERAutocompleteProps> = ({
4343
const theme = useTheme();
4444

4545
const autocompleteStyle = {
46-
height: '50%',
4746
backgroundColor: theme.palette.background.default,
4847
width: '100%',
4948
border: 0,

src/frontend/src/pages/WorkPackageDetailPage/WorkPackageEditContainer/WorkPackageEditContainer.tsx

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { useQuery } from '../../../hooks/utils.hooks';
1414
import { Controller, useFieldArray, useForm } from 'react-hook-form';
1515
import { yupResolver } from '@hookform/resolvers/yup';
1616
import * as yup from 'yup';
17-
import { TextField, Autocomplete, FormControl } from '@mui/material';
17+
import { TextField, Autocomplete, FormControl, Typography } from '@mui/material';
1818
import ReactHookEditableList from '../../../components/ReactHookEditableList';
1919
import { useEditWorkPackage } from '../../../hooks/work-packages.hooks';
2020
import WorkPackageFormDetails from './WorkPackageFormDetails';
@@ -171,7 +171,6 @@ const WorkPackageEditContainer: React.FC<WorkPackageEditContainerProps> = ({ wor
171171
{ name: 'Projects', route: routes.PROJECTS },
172172
{ name: `${projectWbsString} - ${workPackage.projectName}`, route: `${routes.PROJECTS}/${projectWbsString}` }
173173
]}
174-
headerRight={<></>}
175174
>
176175
<form
177176
id="work-package-edit-form"
@@ -216,24 +215,24 @@ const WorkPackageEditContainer: React.FC<WorkPackageEditContainerProps> = ({ wor
216215
/>
217216
</FormControl>
218217
</PageBlock>
219-
<PageBlock title="Expected Activities">
220-
<ReactHookEditableList
221-
name="expectedActivities"
222-
register={register}
223-
ls={expectedActivities}
224-
append={appendExpectedActivity}
225-
remove={removeExpectedActivity}
226-
/>
227-
</PageBlock>
228-
<PageBlock title="Deliverables">
229-
<ReactHookEditableList
230-
name="deliverables"
231-
register={register}
232-
ls={deliverables}
233-
append={appendDeliverable}
234-
remove={removeDeliverable}
235-
/>
236-
</PageBlock>
218+
<Typography variant="h5">Expected Activities</Typography>
219+
<ReactHookEditableList
220+
name="expectedActivities"
221+
register={register}
222+
ls={expectedActivities}
223+
append={appendExpectedActivity}
224+
remove={removeExpectedActivity}
225+
bulletName="Expected Activity"
226+
/>
227+
<Typography variant="h5">Deliverables</Typography>
228+
<ReactHookEditableList
229+
name="deliverables"
230+
register={register}
231+
ls={deliverables}
232+
append={appendDeliverable}
233+
remove={removeDeliverable}
234+
bulletName="Deliverable"
235+
/>
237236
<Box textAlign="right" sx={{ my: 2 }}>
238237
<NERFailButton variant="contained" onClick={exitEditMode} sx={{ mx: 1 }}>
239238
Cancel

src/frontend/src/pages/WorkPackageDetailPage/WorkPackageEditContainer/WorkPackageFormDetails.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ const WorkPackageFormDetails: React.FC<Props> = ({
6969
<Typography variant="h5" sx={{ marginBottom: '10px', color: 'white' }}>
7070
Project Details
7171
</Typography>
72-
<Grid container xs={12}>
73-
<Grid item xs={12} md={4} sx={{ mt: 2, mr: 2 }}>
72+
<Grid container spacing={1} xs={12}>
73+
<Grid item xs={12} md={4}>
7474
<FormControl fullWidth>
7575
<FormLabel>Work Package Name</FormLabel>
7676
<ReactHookTextField
@@ -81,13 +81,13 @@ const WorkPackageFormDetails: React.FC<Props> = ({
8181
/>
8282
</FormControl>
8383
</Grid>
84-
<Grid item xs={12} md={2} lg={2} sx={{ mt: 2, mr: 2 }}>
84+
<Grid item xs={12} md={3}>
8585
<ChangeRequestDropdown control={control} name="crId" errors={errors} changeHeight={56} />
8686
</Grid>
87-
<Grid item xs={12} md={2} sx={{ mt: 2, mr: 2 }}>
87+
<Grid item xs={12} md={3}>
8888
<StageSelect />
8989
</Grid>
90-
<Grid item xs={12} md={2} sx={{ mt: 2, mr: 2 }}>
90+
<Grid item xs={12} md={2}>
9191
<FormControl fullWidth sx={{ overflow: 'hidden' }}>
9292
<FormLabel sx={{ whiteSpace: 'noWrap' }}>Start Date (YYYY-MM-DD)</FormLabel>
9393
<Controller
@@ -109,7 +109,7 @@ const WorkPackageFormDetails: React.FC<Props> = ({
109109
/>
110110
</FormControl>
111111
</Grid>
112-
<Grid item xs={12} md={2} sx={{ mt: 2, mr: 2 }}>
112+
<Grid item xs={12} md={2}>
113113
<FormControl fullWidth>
114114
<FormLabel>Duration</FormLabel>
115115
<ReactHookTextField
@@ -121,10 +121,10 @@ const WorkPackageFormDetails: React.FC<Props> = ({
121121
/>
122122
</FormControl>
123123
</Grid>
124-
<Grid item xs={12} md={4} sx={{ mt: 1 }}>
124+
<Grid item xs={12} md={5}>
125125
<FormLabel> Project Lead</FormLabel>
126126
<NERAutocomplete
127-
sx={{ mt: 1, width: '90%' }}
127+
sx={{ width: '100%' }}
128128
id="project-lead-autocomplete"
129129
onChange={(_event, value) => setLead(value?.id)}
130130
options={usersForProjectLead.map(userToOption)}
@@ -133,12 +133,10 @@ const WorkPackageFormDetails: React.FC<Props> = ({
133133
value={userToOption(usersForProjectLead.find((user) => user.userId.toString() === lead))}
134134
/>
135135
</Grid>
136-
137-
<Grid item xs={12} md={4} sx={{ mt: 1 }}>
136+
<Grid item xs={12} md={5}>
138137
<FormLabel>Project Manager</FormLabel>
139-
140138
<NERAutocomplete
141-
sx={{ mt: 1, width: '90%' }}
139+
sx={{ width: '100%' }}
142140
id="project-manager-autocomplete"
143141
onChange={(_event, value) => setManager(value?.id)}
144142
options={usersForProjectManager.map(userToOption)}

0 commit comments

Comments
 (0)