@@ -12,13 +12,13 @@ const customStyles = {
1212 right : 'auto' ,
1313 bottom : 'auto' ,
1414 marginRight : '-50%' ,
15- transform : 'translate(-50%, -50 %)'
15+ transform : 'translate(-50%, -5 %)'
1616 }
1717} ;
1818
1919const EditStudent = ( props ) => {
2020 const studentContext = useContext ( AuthContext ) ;
21- const { fName, mName, lName, Std, Addr, brd, phy, eng, maths, sex, fees} = studentContext . state . selectedForEdit ;
21+ const { fName, mName, lName, Std, Addr, School , brd, phy, eng, maths, sex, fees} = studentContext . state . selectedForEdit ;
2222 const [ modalJoinIsOpen , setModalJoinIsOpen ] = useState ( false )
2323 const [ modalDOBIsOpen , setModalDOBIsOpen ] = useState ( false )
2424 const [ loading , setLoading ] = useState ( false )
@@ -53,7 +53,9 @@ const EditStudent = (props)=> {
5353
5454 const firstNameEl = React . createRef ( ) ; const middleNameEl = React . createRef ( ) ; const lastNameEl = React . createRef ( ) ;
5555 const addressEl = React . createRef ( ) ; const standardEl = React . createRef ( ) ;
56- const boardEl = React . createRef ( ) ; const physicsEl = React . createRef ( ) ;
56+ const boardEl = React . createRef ( ) ;
57+ const schoolEl = React . createRef ( ) ;
58+ const physicsEl = React . createRef ( ) ;
5759 const englishEl = React . createRef ( ) ; const mathsEl = React . createRef ( ) ;
5860 const sexEl = React . createRef ( ) ; const feesEl = React . createRef ( ) ;
5961
@@ -64,6 +66,7 @@ const EditStudent = (props)=> {
6466 const fName = firstNameEl . current . value ; const mName = middleNameEl . current . value ; const lName = lastNameEl . current . value ;
6567 const std = standardEl . current . value ; const addr = addressEl . current . value ;
6668 const brd = boardEl . current . value ;
69+ const schl = schoolEl . current . value ;
6770 const dateOfJoining = date ;
6871 const phy = physicsEl . current . value ;
6972 const eng = englishEl . current . value ; const maths = mathsEl . current . value ;
@@ -73,7 +76,7 @@ const EditStudent = (props)=> {
7376 "firstName" :fName , "middleName" : mName , "lastName" :lName ,
7477 "dateOfBirth" : dateOfBirth ,
7578 "Address" :addr , "standard" :std ,
76- "Board" :brd ,
79+ "Board" :brd , "school" : schl ,
7780 "joinedOn" : dateOfJoining ,
7881 "lastYearmarks" :{
7982 "physics" :phy , "english" :eng , "maths" :maths
@@ -176,6 +179,8 @@ const EditStudent = (props)=> {
176179 </ span >
177180 </ div >
178181 </ div >
182+ < label htmlFor = "InputSchool" > School</ label >
183+ < input type = "text" ref = { schoolEl } defaultValue = { School } className = "form-control form-control-sm" id = "InputSchool" placeholder = "School" required />
179184 < hr />
180185 < div >
181186 < h5 > Last Year Marks / Grades</ h5 >
0 commit comments