11import { User } from 'shared' ;
2- import { FormControl , FormLabel , Grid } from '@mui/material' ;
3- import PageBlock from '../../../layouts/PageBlock' ;
2+ import { Box , FormControl , FormLabel , Grid , Typography } from '@mui/material' ;
43import ReactHookTextField from '../../../components/ReactHookTextField' ;
54import { fullNamePipe } from '../../../utils/pipes' ;
65import NERAutocomplete from '../../../components/NERAutocomplete' ;
76import { ProjectEditFormInput } from './ProjectEditContainer' ;
87import { Control , FieldErrorsImpl } from 'react-hook-form' ;
98import { AttachMoney } from '@mui/icons-material' ;
9+ import ChangeRequestDropdown from '../../../components/ChangeRequestDropdown' ;
10+ import TeamDropdown from '../../../components/TeamsDropdown' ;
1011
1112interface ProjectEditDetailsProps {
1213 users : User [ ] ;
@@ -33,9 +34,12 @@ const ProjectEditDetails: React.FC<ProjectEditDetailsProps> = ({
3334 setProjectManager
3435} ) => {
3536 return (
36- < PageBlock title = "Project Details" >
37- < Grid container spacing = { 2 } >
38- < Grid item xs = { 8 } >
37+ < Box >
38+ < Typography variant = "h5" sx = { { marginBottom : '10px' } } >
39+ Project Details
40+ </ Typography >
41+ < Grid container spacing = { 3 } >
42+ < Grid item lg = { 2.4 } md = { 6 } xs = { 12 } >
3943 < FormControl fullWidth >
4044 < FormLabel > Project Name</ FormLabel >
4145 < ReactHookTextField
@@ -46,7 +50,28 @@ const ProjectEditDetails: React.FC<ProjectEditDetailsProps> = ({
4650 />
4751 </ FormControl >
4852 </ Grid >
49- < Grid item xs = { 4 } >
53+ < Grid item lg = { 2.4 } md = { 6 } xs = { 12 } >
54+ < FormControl fullWidth >
55+ < ChangeRequestDropdown control = { control } name = "crId" />
56+ </ FormControl >
57+ </ Grid >
58+ < Grid item lg = { 2.4 } md = { 6 } xs = { 12 } >
59+ < FormControl fullWidth >
60+ < FormLabel > Car Number</ FormLabel >
61+ < ReactHookTextField
62+ name = "car-number"
63+ control = { control }
64+ placeholder = "Enter a car number..."
65+ errorMessage = { errors . name }
66+ />
67+ </ FormControl >
68+ </ Grid >
69+ < Grid item lg = { 2.4 } md = { 6 } xs = { 12 } >
70+ < FormControl fullWidth >
71+ < TeamDropdown control = { control } name = "teamId" />
72+ </ FormControl >
73+ </ Grid >
74+ < Grid item lg = { 2.4 } md = { 6 } xs = { 12 } >
5075 < FormControl fullWidth >
5176 < FormLabel > Budget</ FormLabel >
5277 < ReactHookTextField
@@ -59,7 +84,9 @@ const ProjectEditDetails: React.FC<ProjectEditDetailsProps> = ({
5984 />
6085 </ FormControl >
6186 </ Grid >
62- < Grid item xs = { 12 } md = { 6 } sx = { { mt : 1 } } >
87+ </ Grid >
88+ < Grid container spacing = { 2 } >
89+ < Grid item lg = { 6 } md = { 12 } xs = { 12 } mt = { { xs : 3 , md : 3 , lg : 2 } } >
6390 < FormLabel > Project Lead</ FormLabel >
6491 < NERAutocomplete
6592 id = "users-autocomplete"
@@ -70,7 +97,7 @@ const ProjectEditDetails: React.FC<ProjectEditDetailsProps> = ({
7097 value = { userToAutocompleteOption ( users . find ( ( user ) => user . userId . toString ( ) === projectLead ) ) }
7198 />
7299 </ Grid >
73- < Grid item xs = { 12 } md = { 6 } sx = { { mt : 1 } } >
100+ < Grid item lg = { 6 } md = { 12 } xs = { 12 } mt = { { xs : 0 , md : 0 , lg : 2 } } >
74101 < FormLabel > Project Manager</ FormLabel >
75102 < NERAutocomplete
76103 id = "users-autocomplete"
@@ -81,8 +108,21 @@ const ProjectEditDetails: React.FC<ProjectEditDetailsProps> = ({
81108 value = { userToAutocompleteOption ( users . find ( ( user ) => user . userId . toString ( ) === projectManager ) ) }
82109 />
83110 </ Grid >
111+ < Grid item lg = { 12 } md = { 12 } xs = { 12 } >
112+ < FormControl fullWidth >
113+ < FormLabel > Project Summary</ FormLabel >
114+ < ReactHookTextField
115+ name = "summary"
116+ control = { control }
117+ type = "number"
118+ placeholder = "Enter a summmary..."
119+ multiline = { true }
120+ rows = { 5 }
121+ />
122+ </ FormControl >
123+ </ Grid >
84124 </ Grid >
85- </ PageBlock >
125+ </ Box >
86126 ) ;
87127} ;
88128
0 commit comments