@@ -12,13 +12,13 @@ const customStyles = {
12
12
right : 'auto' ,
13
13
bottom : 'auto' ,
14
14
marginRight : '-50%' ,
15
- transform : 'translate(-50%, -50 %)'
15
+ transform : 'translate(-50%, -5 %)'
16
16
}
17
17
} ;
18
18
19
19
const EditStudent = ( props ) => {
20
20
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 ;
22
22
const [ modalJoinIsOpen , setModalJoinIsOpen ] = useState ( false )
23
23
const [ modalDOBIsOpen , setModalDOBIsOpen ] = useState ( false )
24
24
const [ loading , setLoading ] = useState ( false )
@@ -53,7 +53,9 @@ const EditStudent = (props)=> {
53
53
54
54
const firstNameEl = React . createRef ( ) ; const middleNameEl = React . createRef ( ) ; const lastNameEl = React . createRef ( ) ;
55
55
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 ( ) ;
57
59
const englishEl = React . createRef ( ) ; const mathsEl = React . createRef ( ) ;
58
60
const sexEl = React . createRef ( ) ; const feesEl = React . createRef ( ) ;
59
61
@@ -64,6 +66,7 @@ const EditStudent = (props)=> {
64
66
const fName = firstNameEl . current . value ; const mName = middleNameEl . current . value ; const lName = lastNameEl . current . value ;
65
67
const std = standardEl . current . value ; const addr = addressEl . current . value ;
66
68
const brd = boardEl . current . value ;
69
+ const schl = schoolEl . current . value ;
67
70
const dateOfJoining = date ;
68
71
const phy = physicsEl . current . value ;
69
72
const eng = englishEl . current . value ; const maths = mathsEl . current . value ;
@@ -73,7 +76,7 @@ const EditStudent = (props)=> {
73
76
"firstName" :fName , "middleName" : mName , "lastName" :lName ,
74
77
"dateOfBirth" : dateOfBirth ,
75
78
"Address" :addr , "standard" :std ,
76
- "Board" :brd ,
79
+ "Board" :brd , "school" : schl ,
77
80
"joinedOn" : dateOfJoining ,
78
81
"lastYearmarks" :{
79
82
"physics" :phy , "english" :eng , "maths" :maths
@@ -176,6 +179,8 @@ const EditStudent = (props)=> {
176
179
</ span >
177
180
</ div >
178
181
</ 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 />
179
184
< hr />
180
185
< div >
181
186
< h5 > Last Year Marks / Grades</ h5 >
0 commit comments