육현진

add usermode page

1 -[{"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\index.js":"1","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\App.js":"2","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\reportWebVitals.js":"3","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\Student.js":"4","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\StudentAdd.js":"5","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\StudentDelete.js":"6"},{"size":500,"mtime":499162500000,"results":"7","hashOfConfig":"8"},{"size":6906,"mtime":1607495154012,"results":"9","hashOfConfig":"8"},{"size":362,"mtime":499162500000,"results":"10","hashOfConfig":"8"},{"size":2602,"mtime":1607450773121,"results":"11","hashOfConfig":"8"},{"size":6867,"mtime":1607455316983,"results":"12","hashOfConfig":"8"},{"size":2169,"mtime":1607455462628,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},"15hdric",{"filePath":"17","messages":"18","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"23","usedDeprecatedRules":"16"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"26","usedDeprecatedRules":"16"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"29","usedDeprecatedRules":"16"},"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\index.js",[],["30","31"],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\App.js",["32","33","34"],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\reportWebVitals.js",[],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\Student.js",["35","36","37"],"import React from 'react';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport StudentDelete from './StudentDelete';\r\n\r\nclass Student extends React.Component{\r\n render(){\r\n return(\r\n <TableRow>\r\n <TableCell> {this.props.st_Code} </TableCell>\r\n <TableCell> {this.props.st_Name} </TableCell>\r\n <TableCell> {this.props.st_Id} </TableCell>\r\n <TableCell> {this.props.st_Major} </TableCell>\r\n <TableCell> {this.props.st_Midscore} </TableCell>\r\n <TableCell> {this.props.st_Finalscore} </TableCell>\r\n <TableCell> {this.props.st_Assignscore} </TableCell>\r\n <TableCell> {this.props.st_Attendscore} </TableCell>\r\n <TableCell> {this.props.st_Score} </TableCell>\r\n <TableCell><StudentDelete stateRefresh={this.props.stateRefresh} st_Code={this.props.st_Code}/></TableCell>\r\n </TableRow>\r\n \r\n /*<div>\r\n \r\n <Searchscores st_Midscore={this.props.st_Midscore} \r\n st_Finalscore = {this.props.st_Finalscore}\r\n st_Assignscore = {this.props.st_Assignscore}\r\n st_Attendscore = {this.props.st_Attendscore}/>\r\n\r\n <Searchscore st_Score={this.props.st_Score}/>\r\n\r\n <Searchothers st_Midscore={this.props.st_Midscore} \r\n st_Finalscore = {this.props.st_Finalscore}\r\n st_Assignscore = {this.props.st_Assignscore}\r\n st_Attendscore = {this.props.st_Attendscore}\r\n st_Score = {this.props.st_Score}/>\r\n\r\n </div>*/\r\n\r\n )\r\n }\r\n}\r\n\r\nclass Searchscores extends React.Component{\r\n render(){\r\n return(\r\n <div>\r\n\r\n <p>{this.props.st_Midscore}</p>\r\n <p>{this.props.st_Finalscore}</p>\r\n <p>{this.props.st_Assignscore}</p>\r\n <p>{this.props.st_Attendscore}</p>\r\n\r\n </div> \r\n )\r\n }\r\n}\r\n\r\n\r\nclass Searchscore extends React.Component{\r\n render(){\r\n return(\r\n <div>\r\n <p>{this.props.st_Score}</p>\r\n </div> \r\n )\r\n }\r\n}\r\n\r\nclass Searchothers extends React.Component{\r\n render(){\r\n return(\r\n <div>\r\n <p>{this.props.st_Midscore}</p>\r\n <p>{this.props.st_Finalscore}</p>\r\n <p>{this.props.st_Assignscore}</p>\r\n <p>{this.props.st_Attendscore}</p>\r\n <p>{this.props.st_Score}</p>\r\n </div> \r\n )\r\n }\r\n}\r\n\r\nexport default Student;","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\StudentAdd.js",["38","39","40"],"import React from 'react';\r\nimport {post} from 'axios';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport Textfield from '@material-ui/core/TextField';\r\nimport Button from '@material-ui/core/Button';\r\nimport{withStyles}from '@material-ui/core/styles';\r\nimport { createMuiTheme } from '@material-ui/core/styles';\r\nimport {blue, pink} from '@material-ui/core/colors';\r\n\r\nconst theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: blue[100],\r\n },\r\n secondary: {\r\n main: pink[100],\r\n },\r\n },\r\n});\r\n\r\nconst primary = blue[100]; //#bbdefb\r\n\r\nconst styles = theme=>({\r\n hidden:{\r\n display:'none'\r\n }\r\n\r\n});\r\n\r\nclass StudentAdd extends React.Component{\r\n\r\n constructor(props){\r\n super(props);\r\n this.state={\r\n st_Code:'',\r\n st_Name:'',\r\n st_Id:'',\r\n st_Major:'',\r\n st_Midscore:'',\r\n st_Finalscore:'',\r\n st_Assignscore:'',\r\n st_Attendscore:'',\r\n st_Score:'',\r\n open:false\r\n }\r\n }\r\n\r\n handleFormSubmit = (e) => {\r\n e.preventDefault()\r\n this.addStudent()\r\n .then((response) => {\r\n console.log(response.data);\r\n this.props.stateRefresh();\r\n })\r\n this.setState({\r\n st_Code:'',\r\n st_Name:'',\r\n st_Id:'',\r\n st_Major:'',\r\n st_Midscore:'',\r\n st_Finalscore:'',\r\n st_Assignscore:'',\r\n st_Attendscore:'',\r\n st_Score:'',\r\n open: false\r\n })\r\n\r\n }\r\n\r\n handleValueChange = (e) => {\r\n let nextState = {};\r\n nextState[e.target.name]=e.target.value;\r\n this.setState(nextState);\r\n }\r\n\r\n addStudent = () =>{\r\n const url ='/api/students';\r\n const formData=new FormData();\r\n formData.append('st_Code',this.state.st_Code);\r\n formData.append('st_Name',this.state.st_Name);\r\n formData.append('st_Id',this.state.st_Id);\r\n formData.append('st_Major',this.state.st_Major);\r\n formData.append('st_Midscore',this.state.st_Midscore);\r\n formData.append('st_Finalscore',this.state.st_Finalscore);\r\n formData.append('st_Assignscore',this.state.st_Assignscore);\r\n formData.append('st_Attendscore',this.state.st_Attendscore);\r\n formData.append('st_Score',this.state.st_Score);\r\n const config = {\r\n headers: {\r\n 'content-tupe': 'multipart/form-data' \r\n }\r\n\r\n }\r\n return post(url, formData, config);\r\n }\r\n\r\n handleClickOpen = () => {\r\n this.setState({\r\n open:true\r\n });\r\n }\r\n\r\n handleClose = () => {\r\n this.setState({\r\n st_Code:'',\r\n st_Name:'',\r\n st_Id:'',\r\n st_Major:'',\r\n st_Midscore:'',\r\n st_Finalscore:'',\r\n st_Assignscore:'',\r\n st_Attendscore:'',\r\n st_Score:'',\r\n open: false\r\n })\r\n }\r\n\r\n render(){\r\n const{classes}=this.props;\r\n return(\r\n <div>\r\n <Button variant=\"contained\" color=\"primary\" onClick={this.handleClickOpen}>\r\n 학생 추가하기\r\n </Button>\r\n <Dialog open={this.state.open} onClose={this.handleClose}>\r\n <DialogTitle>학생 추가</DialogTitle>\r\n <DialogContent>\r\n <Textfield label=\"코드 번호\" type=\"text\" name=\"st_Code\" value={this.state.st_Code} onChange={this.handleValueChange}/><br/>\r\n <Textfield label=\"이름\" name=\"st_Name\" value={this.state.st_Name} onChange={this.handleValueChange}/><br/>\r\n <Textfield label=\"학번\" name=\"st_Id\" value={this.state.st_Id} onChange={this.handleValueChange}/><br/>\r\n <Textfield label=\"전공\" name=\"st_Major\" value={this.state.st_Major} onChange={this.handleValueChange}/><br/>\r\n <Textfield label=\"중간 점수\" name=\"st_Midscore\" value={this.state.st_Midscore} onChange={this.handleValueChange}/><br/>\r\n <Textfield label=\"기말 점수\" name=\"st_Finalscore\" value={this.state.st_Finalscore} onChange={this.handleValueChange}/><br/>\r\n <Textfield label=\"과제 점수\" name=\"st_Assignscore\" value={this.state.st_Assignscore} onChange={this.handleValueChange}/><br/>\r\n <Textfield label=\"출석 점수\" name=\"st_Attendscore\" value={this.state.st_Attendscore} onChange={this.handleValueChange}/><br/>\r\n <Textfield label=\"학점\" name=\"st_Score\" value={this.state.st_Score} onChange={this.handleValueChange}/><br/>\r\n </DialogContent>\r\n <DialogActions>\r\n <Button varient=\"contained\" color=\"primary\" onClick={this.handleFormSubmit}>추가</Button>\r\n <Button varient=\"outlined\" color=\"primary\" onClick={this.handleClose}>닫기</Button>\r\n </DialogActions>\r\n </Dialog>\r\n </div>\r\n /*\r\n <form onSubmit={this.handleFormSubmit}>\r\n <h1>학생 추가</h1>\r\n 코드 번호 : <input type=\"text\" name=\"st_Code\" value={this.state.st_Code} onChange={this.handleValueChange}/><br/>\r\n 이름 : <input type=\"text\" name=\"st_Name\" value={this.state.st_Name} onChange={this.handleValueChange}/><br/>\r\n 학번 : <input type=\"text\" name=\"st_Id\" value={this.state.st_Id} onChange={this.handleValueChange}/><br/>\r\n 전공 : <input type=\"text\" name=\"st_Major\" value={this.state.st_Major} onChange={this.handleValueChange}/><br/>\r\n 중간 점수 : <input type=\"text\" name=\"st_Midscore\" value={this.state.st_Midscore} onChange={this.handleValueChange}/><br/>\r\n 기말 점수 : <input type=\"text\" name=\"st_Finalscore\" value={this.state.st_Finalscore} onChange={this.handleValueChange}/><br/>\r\n 과제 점수 : <input type=\"text\" name=\"st_Assignscore\" value={this.state.st_Assignscore} onChange={this.handleValueChange}/><br/>\r\n 출석 점수 : <input type=\"text\" name=\"st_Attendscore\" value={this.state.st_Attendscore} onChange={this.handleValueChange}/><br/>\r\n 학점 : <input type=\"text\" name=\"st_Score\" value={this.state.st_Score} onChange={this.handleValueChange}/><br/>\r\n <button type=\"submit\">추가하기</button>\r\n\r\n </form>\r\n */\r\n )\r\n }\r\n}\r\n\r\nexport default withStyles(styles)(StudentAdd);","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\StudentDelete.js",["41"],"import React from 'react';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport Button from '@material-ui/core/Button';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport { createMuiTheme } from '@material-ui/core/styles';\r\nimport {blue, pink} from '@material-ui/core/colors';\r\n\r\nconst theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: blue[100],\r\n },\r\n secondary: {\r\n main: pink[100],\r\n },\r\n },\r\n});\r\n\r\nclass StudentDelete extends React.Component{\r\n\r\n constructor(props){\r\n super(props);\r\n this.state = {\r\n open: false\r\n }\r\n }\r\n\r\n handleClickOpen = () => {\r\n this.setState({\r\n open:true\r\n });\r\n }\r\n\r\n handleClose = () => {\r\n this.setState({\r\n open: false\r\n })\r\n }\r\n\r\n deleteStudent(st_Code){\r\n const url='/api/students/'+st_Code;\r\n fetch(url,{\r\n method:'DELETE'\r\n });\r\n this.props.stateRefresh();\r\n }\r\n \r\n render(){\r\n\r\n return(\r\n <div>\r\n <Button variant=\"contained\" color=\"secondary\" onClick={this.handleClickOpen}>삭제</Button>\r\n <Dialog open={this.state.open} onClose={this.handleClose}>\r\n <DialogTitle onClose={this.handleClose}>\r\n 삭제 경고\r\n </DialogTitle>\r\n <DialogContent>\r\n <Typography gutterBottom>\r\n 선택한 학생의 정보가 삭제됩니다!\r\n </Typography>\r\n </DialogContent>\r\n <DialogActions>\r\n <Button variant=\"contained\" color=\"secondary\" onClick={(e)=>{this.deleteStudent(this.props.st_Code)}}>삭제</Button>\r\n <Button variant=\"outlined\" color=\"secondary\" onClick={this.handleClose}>닫기</Button>\r\n </DialogActions>\r\n </Dialog> \r\n </div>\r\n\r\n )\r\n }\r\n}\r\n\r\nexport default StudentDelete;",{"ruleId":"42","replacedBy":"43"},{"ruleId":"44","replacedBy":"45"},{"ruleId":"46","severity":1,"message":"47","line":1,"column":27,"nodeType":"48","messageId":"49","endLine":1,"endColumn":37},{"ruleId":"46","severity":1,"message":"50","line":12,"column":8,"nodeType":"48","messageId":"49","endLine":12,"endColumn":24},{"ruleId":"46","severity":1,"message":"51","line":96,"column":7,"nodeType":"48","messageId":"49","endLine":96,"endColumn":15},{"ruleId":"46","severity":1,"message":"52","line":43,"column":7,"nodeType":"48","messageId":"49","endLine":43,"endColumn":19},{"ruleId":"46","severity":1,"message":"53","line":59,"column":7,"nodeType":"48","messageId":"49","endLine":59,"endColumn":18},{"ruleId":"46","severity":1,"message":"54","line":69,"column":7,"nodeType":"48","messageId":"49","endLine":69,"endColumn":19},{"ruleId":"46","severity":1,"message":"55","line":13,"column":7,"nodeType":"48","messageId":"49","endLine":13,"endColumn":12},{"ruleId":"46","severity":1,"message":"56","line":24,"column":7,"nodeType":"48","messageId":"49","endLine":24,"endColumn":14},{"ruleId":"46","severity":1,"message":"57","line":122,"column":15,"nodeType":"48","messageId":"49","endLine":122,"endColumn":22},{"ruleId":"46","severity":1,"message":"55","line":11,"column":7,"nodeType":"48","messageId":"49","endLine":11,"endColumn":12},"no-native-reassign",["58"],"no-negated-in-lhs",["59"],"no-unused-vars","'components' is defined but never used.","Identifier","unusedVar","'curcularProgress' is defined but never used.","'students' is assigned a value but never used.","'Searchscores' is defined but never used.","'Searchscore' is defined but never used.","'Searchothers' is defined but never used.","'theme' is assigned a value but never used.","'primary' is assigned a value but never used.","'classes' is assigned a value but never used.","no-global-assign","no-unsafe-negation"]
...\ No newline at end of file ...\ No newline at end of file
1 +[{"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\index.js":"1","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\App.js":"2","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\reportWebVitals.js":"3","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\Student.js":"4","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\StudentAdd.js":"5","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\StudentDelete.js":"6"},{"size":500,"mtime":499162500000,"results":"7","hashOfConfig":"8"},{"size":6931,"mtime":1607522029372,"results":"9","hashOfConfig":"8"},{"size":362,"mtime":499162500000,"results":"10","hashOfConfig":"8"},{"size":2602,"mtime":1607450773121,"results":"11","hashOfConfig":"8"},{"size":6706,"mtime":1607522392604,"results":"12","hashOfConfig":"8"},{"size":2077,"mtime":1607521718381,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},"15hdric",{"filePath":"17","messages":"18","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"23","usedDeprecatedRules":"16"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"26","messages":"27","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\index.js",[],["28","29"],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\App.js",["30","31","32","33"],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\reportWebVitals.js",[],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\Student.js",["34","35","36"],"import React from 'react';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport StudentDelete from './StudentDelete';\r\n\r\nclass Student extends React.Component{\r\n render(){\r\n return(\r\n <TableRow>\r\n <TableCell> {this.props.st_Code} </TableCell>\r\n <TableCell> {this.props.st_Name} </TableCell>\r\n <TableCell> {this.props.st_Id} </TableCell>\r\n <TableCell> {this.props.st_Major} </TableCell>\r\n <TableCell> {this.props.st_Midscore} </TableCell>\r\n <TableCell> {this.props.st_Finalscore} </TableCell>\r\n <TableCell> {this.props.st_Assignscore} </TableCell>\r\n <TableCell> {this.props.st_Attendscore} </TableCell>\r\n <TableCell> {this.props.st_Score} </TableCell>\r\n <TableCell><StudentDelete stateRefresh={this.props.stateRefresh} st_Code={this.props.st_Code}/></TableCell>\r\n </TableRow>\r\n \r\n /*<div>\r\n \r\n <Searchscores st_Midscore={this.props.st_Midscore} \r\n st_Finalscore = {this.props.st_Finalscore}\r\n st_Assignscore = {this.props.st_Assignscore}\r\n st_Attendscore = {this.props.st_Attendscore}/>\r\n\r\n <Searchscore st_Score={this.props.st_Score}/>\r\n\r\n <Searchothers st_Midscore={this.props.st_Midscore} \r\n st_Finalscore = {this.props.st_Finalscore}\r\n st_Assignscore = {this.props.st_Assignscore}\r\n st_Attendscore = {this.props.st_Attendscore}\r\n st_Score = {this.props.st_Score}/>\r\n\r\n </div>*/\r\n\r\n )\r\n }\r\n}\r\n\r\nclass Searchscores extends React.Component{\r\n render(){\r\n return(\r\n <div>\r\n\r\n <p>{this.props.st_Midscore}</p>\r\n <p>{this.props.st_Finalscore}</p>\r\n <p>{this.props.st_Assignscore}</p>\r\n <p>{this.props.st_Attendscore}</p>\r\n\r\n </div> \r\n )\r\n }\r\n}\r\n\r\n\r\nclass Searchscore extends React.Component{\r\n render(){\r\n return(\r\n <div>\r\n <p>{this.props.st_Score}</p>\r\n </div> \r\n )\r\n }\r\n}\r\n\r\nclass Searchothers extends React.Component{\r\n render(){\r\n return(\r\n <div>\r\n <p>{this.props.st_Midscore}</p>\r\n <p>{this.props.st_Finalscore}</p>\r\n <p>{this.props.st_Assignscore}</p>\r\n <p>{this.props.st_Attendscore}</p>\r\n <p>{this.props.st_Score}</p>\r\n </div> \r\n )\r\n }\r\n}\r\n\r\nexport default Student;","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\StudentAdd.js",["37","38","39"],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\components\\StudentDelete.js",["40"],{"ruleId":"41","replacedBy":"42"},{"ruleId":"43","replacedBy":"44"},{"ruleId":"45","severity":1,"message":"46","line":1,"column":27,"nodeType":"47","messageId":"48","endLine":1,"endColumn":37},{"ruleId":"45","severity":1,"message":"49","line":12,"column":8,"nodeType":"47","messageId":"48","endLine":12,"endColumn":24},{"ruleId":"45","severity":1,"message":"50","line":19,"column":16,"nodeType":"47","messageId":"48","endLine":19,"endColumn":26},{"ruleId":"45","severity":1,"message":"51","line":95,"column":7,"nodeType":"47","messageId":"48","endLine":95,"endColumn":15},{"ruleId":"45","severity":1,"message":"52","line":43,"column":7,"nodeType":"47","messageId":"48","endLine":43,"endColumn":19},{"ruleId":"45","severity":1,"message":"53","line":59,"column":7,"nodeType":"47","messageId":"48","endLine":59,"endColumn":18},{"ruleId":"45","severity":1,"message":"54","line":69,"column":7,"nodeType":"47","messageId":"48","endLine":69,"endColumn":19},{"ruleId":"45","severity":1,"message":"55","line":13,"column":7,"nodeType":"47","messageId":"48","endLine":13,"endColumn":12},{"ruleId":"45","severity":1,"message":"56","line":24,"column":7,"nodeType":"47","messageId":"48","endLine":24,"endColumn":14},{"ruleId":"45","severity":1,"message":"57","line":122,"column":15,"nodeType":"47","messageId":"48","endLine":122,"endColumn":22},{"ruleId":"45","severity":1,"message":"55","line":11,"column":7,"nodeType":"47","messageId":"48","endLine":11,"endColumn":12},"no-native-reassign",["58"],"no-negated-in-lhs",["59"],"no-unused-vars","'components' is defined but never used.","Identifier","unusedVar","'curcularProgress' is defined but never used.","'makeStyles' is defined but never used.","'students' is assigned a value but never used.","'Searchscores' is defined but never used.","'Searchscore' is defined but never used.","'Searchothers' is defined but never used.","'theme' is assigned a value but never used.","'primary' is assigned a value but never used.","'classes' is assigned a value but never used.","no-global-assign","no-unsafe-negation"]
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -16,17 +16,16 @@ import Toolbar from '@material-ui/core/Toolbar'; ...@@ -16,17 +16,16 @@ import Toolbar from '@material-ui/core/Toolbar';
16 import IconButton from '@material-ui/core/IconButton'; 16 import IconButton from '@material-ui/core/IconButton';
17 import Typography from '@material-ui/core/Typography'; 17 import Typography from '@material-ui/core/Typography';
18 import InputBase from '@material-ui/core/InputBase'; 18 import InputBase from '@material-ui/core/InputBase';
19 -import { fade } from '@material-ui/core/styles/colorManipulator'; 19 +import { fade, makeStyles } from '@material-ui/core/styles';
20 import MenuIcon from '@material-ui/icons/Menu'; 20 import MenuIcon from '@material-ui/icons/Menu';
21 import SearchIcon from '@material-ui/icons/Search'; 21 import SearchIcon from '@material-ui/icons/Search';
22 22
23 -
24 const styles = theme => ({ 23 const styles = theme => ({
25 root: { 24 root: {
26 width: '100%', 25 width: '100%',
27 minWidth:1080 26 minWidth:1080
28 }, 27 },
29 - table: { 28 + paper: {
30 marginLeft:18, 29 marginLeft:18,
31 marginRight:18 30 marginRight:18
32 }, 31 },
...@@ -96,8 +95,8 @@ const styles = theme => ({ ...@@ -96,8 +95,8 @@ const styles = theme => ({
96 const students = [ 95 const students = [
97 { 96 {
98 'st_Code': 6666, 97 'st_Code': 6666,
99 - 'st_Name': '육현진', 98 + //'st_Name': '육현진',
100 - 'st_Id': 2018102210, 99 + //'st_Id': 2018102210,
101 'st_Major':'컴퓨터공학과', 100 'st_Major':'컴퓨터공학과',
102 'st_Midscore': 100, 101 'st_Midscore': 100,
103 'st_Finalscore': 100, 102 'st_Finalscore': 100,
...@@ -107,8 +106,8 @@ const students = [ ...@@ -107,8 +106,8 @@ const students = [
107 }, 106 },
108 { 107 {
109 'st_Code': 1111, 108 'st_Code': 1111,
110 - 'st_Name': '김창동', 109 + //'st_Name': '김창동',
111 - 'st_Id': 2020021120, 110 + //'st_Id': 2020021120,
112 'st_Major':'컴퓨터공학과', 111 'st_Major':'컴퓨터공학과',
113 'st_Midscore': 79, 112 'st_Midscore': 79,
114 'st_Finalscore': 85, 113 'st_Finalscore': 85,
...@@ -174,8 +173,8 @@ class App extends Component{ ...@@ -174,8 +173,8 @@ class App extends Component{
174 return <Student stateRefresh={this.stateRefresh} 173 return <Student stateRefresh={this.stateRefresh}
175 key={c.st_Code} 174 key={c.st_Code}
176 st_Code={c.st_Code} 175 st_Code={c.st_Code}
177 - st_Name={c.st_Name} 176 + //st_Name={c.st_Name}
178 - st_Id={c.st_Id} 177 + //st_Id={c.st_Id}
179 st_Major={c.st_Major} 178 st_Major={c.st_Major}
180 st_Midscore={c.st_Midscore} 179 st_Midscore={c.st_Midscore}
181 st_Finalscore={c.st_Finalscore} 180 st_Finalscore={c.st_Finalscore}
...@@ -186,7 +185,7 @@ class App extends Component{ ...@@ -186,7 +185,7 @@ class App extends Component{
186 } 185 }
187 186
188 const {classes}= this.props; 187 const {classes}= this.props;
189 - const cellList=["코드번호","이름","학번","전공","중간","기말","과제","출석","설정"]; 188 + const cellList=["코드번호","이름","학번","전공","중간","기말","과제","출석","성적","설정"];
190 return ( 189 return (
191 <div className={classes.root}> 190 <div className={classes.root}>
192 <AppBar position="static"> 191 <AppBar position="static">
...@@ -200,8 +199,9 @@ class App extends Component{ ...@@ -200,8 +199,9 @@ class App extends Component{
200 <MenuIcon /> 199 <MenuIcon />
201 </IconButton> 200 </IconButton>
202 <Typography className={classes.title} variant="h6" noWrap> 201 <Typography className={classes.title} variant="h6" noWrap>
203 - 학생 성적 관리 프로그램 202 + 성적 조회 프로그램
204 </Typography> 203 </Typography>
204 +
205 <div className={classes.search}> 205 <div className={classes.search}>
206 <div className={classes.searchIcon}> 206 <div className={classes.searchIcon}>
207 <SearchIcon /> 207 <SearchIcon />
...@@ -212,14 +212,15 @@ class App extends Component{ ...@@ -212,14 +212,15 @@ class App extends Component{
212 root: classes.inputRoot, 212 root: classes.inputRoot,
213 input: classes.inputInput, 213 input: classes.inputInput,
214 }} 214 }}
215 - name="searchKeyword" 215 + st_Name="searchKeyword"
216 value={this.state.searchKeyword} 216 value={this.state.searchKeyword}
217 onChange={this.handleValueChange} 217 onChange={this.handleValueChange}
218 - //inputProps={{ 'aria-label': 'search' }} 218 + inputProps={{ 'aria-label': 'search' }}
219 /> 219 />
220 </div> 220 </div>
221 </Toolbar> 221 </Toolbar>
222 </AppBar> 222 </AppBar>
223 +
223 <div className={classes.menu}> 224 <div className={classes.menu}>
224 <StudentAdd stateRefresh={this.stateRefresh}/> 225 <StudentAdd stateRefresh={this.stateRefresh}/>
225 </div> 226 </div>
......
...@@ -36,8 +36,8 @@ class StudentAdd extends React.Component{ ...@@ -36,8 +36,8 @@ class StudentAdd extends React.Component{
36 super(props); 36 super(props);
37 this.state={ 37 this.state={
38 st_Code:'', 38 st_Code:'',
39 - st_Name:'', 39 + //st_Name:'',
40 - st_Id:'', 40 + //st_Id:'',
41 st_Major:'', 41 st_Major:'',
42 st_Midscore:'', 42 st_Midscore:'',
43 st_Finalscore:'', 43 st_Finalscore:'',
...@@ -57,8 +57,8 @@ class StudentAdd extends React.Component{ ...@@ -57,8 +57,8 @@ class StudentAdd extends React.Component{
57 }) 57 })
58 this.setState({ 58 this.setState({
59 st_Code:'', 59 st_Code:'',
60 - st_Name:'', 60 + //st_Name:'',
61 - st_Id:'', 61 + //st_Id:'',
62 st_Major:'', 62 st_Major:'',
63 st_Midscore:'', 63 st_Midscore:'',
64 st_Finalscore:'', 64 st_Finalscore:'',
...@@ -80,8 +80,8 @@ class StudentAdd extends React.Component{ ...@@ -80,8 +80,8 @@ class StudentAdd extends React.Component{
80 const url ='/api/students'; 80 const url ='/api/students';
81 const formData=new FormData(); 81 const formData=new FormData();
82 formData.append('st_Code',this.state.st_Code); 82 formData.append('st_Code',this.state.st_Code);
83 - formData.append('st_Name',this.state.st_Name); 83 + //formData.append('st_Name',this.state.st_Name);
84 - formData.append('st_Id',this.state.st_Id); 84 + //formData.append('st_Id',this.state.st_Id);
85 formData.append('st_Major',this.state.st_Major); 85 formData.append('st_Major',this.state.st_Major);
86 formData.append('st_Midscore',this.state.st_Midscore); 86 formData.append('st_Midscore',this.state.st_Midscore);
87 formData.append('st_Finalscore',this.state.st_Finalscore); 87 formData.append('st_Finalscore',this.state.st_Finalscore);
...@@ -106,8 +106,8 @@ class StudentAdd extends React.Component{ ...@@ -106,8 +106,8 @@ class StudentAdd extends React.Component{
106 handleClose = () => { 106 handleClose = () => {
107 this.setState({ 107 this.setState({
108 st_Code:'', 108 st_Code:'',
109 - st_Name:'', 109 + //st_Name:'',
110 - st_Id:'', 110 + //st_Id:'',
111 st_Major:'', 111 st_Major:'',
112 st_Midscore:'', 112 st_Midscore:'',
113 st_Finalscore:'', 113 st_Finalscore:'',
...@@ -123,20 +123,22 @@ class StudentAdd extends React.Component{ ...@@ -123,20 +123,22 @@ class StudentAdd extends React.Component{
123 return( 123 return(
124 <div> 124 <div>
125 <Button variant="contained" color="primary" onClick={this.handleClickOpen}> 125 <Button variant="contained" color="primary" onClick={this.handleClickOpen}>
126 - 학생 추가하기 126 + 등수확인
127 </Button> 127 </Button>
128 +
128 <Dialog open={this.state.open} onClose={this.handleClose}> 129 <Dialog open={this.state.open} onClose={this.handleClose}>
129 - <DialogTitle>학생 추가</DialogTitle> 130 + <DialogTitle>학생 추가</DialogTitle>
131 +
130 <DialogContent> 132 <DialogContent>
131 <Textfield label="코드 번호" type="text" name="st_Code" value={this.state.st_Code} onChange={this.handleValueChange}/><br/> 133 <Textfield label="코드 번호" type="text" name="st_Code" value={this.state.st_Code} onChange={this.handleValueChange}/><br/>
132 - <Textfield label="이름" name="st_Name" value={this.state.st_Name} onChange={this.handleValueChange}/><br/> 134 +
133 - <Textfield label="학번" name="st_Id" value={this.state.st_Id} onChange={this.handleValueChange}/><br/> 135 +
134 - <Textfield label="전공" name="st_Major" value={this.state.st_Major} onChange={this.handleValueChange}/><br/> 136 + <Textfield label="전공" type="text" name="st_Major" value={this.state.st_Major} onChange={this.handleValueChange}/><br/>
135 - <Textfield label="중간 점수" name="st_Midscore" value={this.state.st_Midscore} onChange={this.handleValueChange}/><br/> 137 + <Textfield label="중간 점수" type="text" name="st_Midscore" value={this.state.st_Midscore} onChange={this.handleValueChange}/><br/>
136 - <Textfield label="기말 점수" name="st_Finalscore" value={this.state.st_Finalscore} onChange={this.handleValueChange}/><br/> 138 + <Textfield label="기말 점수" type="text" name="st_Finalscore" value={this.state.st_Finalscore} onChange={this.handleValueChange}/><br/>
137 - <Textfield label="과제 점수" name="st_Assignscore" value={this.state.st_Assignscore} onChange={this.handleValueChange}/><br/> 139 + <Textfield label="과제 점수" type="text" name="st_Assignscore" value={this.state.st_Assignscore} onChange={this.handleValueChange}/><br/>
138 - <Textfield label="출석 점수" name="st_Attendscore" value={this.state.st_Attendscore} onChange={this.handleValueChange}/><br/> 140 + <Textfield label="출석 점수" type="text" name="st_Attendscore" value={this.state.st_Attendscore} onChange={this.handleValueChange}/><br/>
139 - <Textfield label="학점" name="st_Score" value={this.state.st_Score} onChange={this.handleValueChange}/><br/> 141 + <Textfield label="학점" type="text" name="st_Score" value={this.state.st_Score} onChange={this.handleValueChange}/><br/>
140 </DialogContent> 142 </DialogContent>
141 <DialogActions> 143 <DialogActions>
142 <Button varient="contained" color="primary" onClick={this.handleFormSubmit}>추가</Button> 144 <Button varient="contained" color="primary" onClick={this.handleFormSubmit}>추가</Button>
...@@ -144,6 +146,12 @@ class StudentAdd extends React.Component{ ...@@ -144,6 +146,12 @@ class StudentAdd extends React.Component{
144 </DialogActions> 146 </DialogActions>
145 </Dialog> 147 </Dialog>
146 </div> 148 </div>
149 +
150 + )
151 + }
152 +}
153 +
154 +export default withStyles(styles)(StudentAdd);
147 /* 155 /*
148 <form onSubmit={this.handleFormSubmit}> 156 <form onSubmit={this.handleFormSubmit}>
149 <h1>학생 추가</h1> 157 <h1>학생 추가</h1>
...@@ -159,9 +167,4 @@ class StudentAdd extends React.Component{ ...@@ -159,9 +167,4 @@ class StudentAdd extends React.Component{
159 <button type="submit">추가하기</button> 167 <button type="submit">추가하기</button>
160 168
161 </form> 169 </form>
162 - */
163 - )
164 - }
165 -}
166 -
167 -export default withStyles(styles)(StudentAdd);
...\ No newline at end of file ...\ No newline at end of file
170 + */
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -52,7 +52,7 @@ class StudentDelete extends React.Component{ ...@@ -52,7 +52,7 @@ class StudentDelete extends React.Component{
52 52
53 return( 53 return(
54 <div> 54 <div>
55 - <Button variant="contained" color="secondary" onClick={this.handleClickOpen}>삭제</Button> 55 +
56 <Dialog open={this.state.open} onClose={this.handleClose}> 56 <Dialog open={this.state.open} onClose={this.handleClose}>
57 <DialogTitle onClose={this.handleClose}> 57 <DialogTitle onClose={this.handleClose}>
58 삭제 경고 58 삭제 경고
......
...@@ -29,6 +29,7 @@ app.get('/api/students', (req, res)=>{ ...@@ -29,6 +29,7 @@ app.get('/api/students', (req, res)=>{
29 "SELECT * FROM dbproject.Students WHERE isDeleted=0", 29 "SELECT * FROM dbproject.Students WHERE isDeleted=0",
30 (err,rows,fields)=>{ 30 (err,rows,fields)=>{
31 res.send(rows); 31 res.send(rows);
32 + console.log(err);
32 } 33 }
33 ); 34 );
34 }); 35 });
...@@ -36,10 +37,10 @@ app.get('/api/students', (req, res)=>{ ...@@ -36,10 +37,10 @@ app.get('/api/students', (req, res)=>{
36 app.use('/image', express.static('./upload')); 37 app.use('/image', express.static('./upload'));
37 38
38 app.post('/api/students',upload.single('image'), (req, res) =>{ 39 app.post('/api/students',upload.single('image'), (req, res) =>{
39 - let sql = 'INSERT INTO dbproject.Students VALUES (?,?,?,?,?,?,?,?,?,now(),0)'; 40 + let sql = 'INSERT INTO dbproject.Students VALUES (?,?,?,?,?,?,?,?,?,now)';
40 let st_Code= req.body.st_Code; 41 let st_Code= req.body.st_Code;
41 - let st_Name = req.body.st_Name; 42 + //let st_Name = req.body.st_Name;
42 - let st_Id = req.body.st_Id; 43 + //let st_Id = req.body.st_Id;
43 let st_Major = req.body.st_Major; 44 let st_Major = req.body.st_Major;
44 let st_Midscore = req.body.st_Midscore; 45 let st_Midscore = req.body.st_Midscore;
45 let st_Finalscore = req.body.st_Finalscore; 46 let st_Finalscore = req.body.st_Finalscore;
...@@ -47,8 +48,8 @@ app.post('/api/students',upload.single('image'), (req, res) =>{ ...@@ -47,8 +48,8 @@ app.post('/api/students',upload.single('image'), (req, res) =>{
47 let st_Attendscore = req.body.st_Attendscore; 48 let st_Attendscore = req.body.st_Attendscore;
48 let st_Score = req.body.st_Score; 49 let st_Score = req.body.st_Score;
49 console.log(st_Code); 50 console.log(st_Code);
50 - console.log(st_Name); 51 + //console.log(st_Name);
51 - console.log(st_Id); 52 + //console.log(st_Id);
52 console.log(st_Major); 53 console.log(st_Major);
53 console.log(st_Midscore); 54 console.log(st_Midscore);
54 console.log(st_Finalscore); 55 console.log(st_Finalscore);
...@@ -56,8 +57,9 @@ app.post('/api/students',upload.single('image'), (req, res) =>{ ...@@ -56,8 +57,9 @@ app.post('/api/students',upload.single('image'), (req, res) =>{
56 console.log(st_Attendscore); 57 console.log(st_Attendscore);
57 console.log(st_Score); 58 console.log(st_Score);
58 59
59 - let params=[st_Code, st_Name, 60 + let params=[st_Code,
60 - st_Id, 61 + //st_Name,
62 + //st_Id,
61 st_Major, 63 st_Major,
62 st_Midscore, 64 st_Midscore,
63 st_Finalscore, 65 st_Finalscore,
......
1 + st_Code:'',
2 + st_Name
3 + st_Id
4 + st_Major
5 + st_Midscore
6 + st_Finalscore
7 + st_Assignscore
8 + st_Attendscore
9 + st_Score
10 +
11 + this.state.students.map(c=>{
12 + return (
13 + <Student stateRefresh={this.stateRefresh}
14 + key={c.st_Code}
15 + st_Code={c.st_Code}
16 + st_Name={c.st_Name}
17 + st_Id={c.st_Id}
18 + st_Major={c.st_Major}
19 + st_Midscore={c.st_Midscore}
20 + st_Finalscore={c.st_Finalscore}
21 + st_Assignscore={c.st_Assignscore}
22 + st_Attendscore={c.st_Attendscore}
23 + st_Score={c.st_Score}
24 + />
25 + );
26 + //<Button variant="contained" color = "secondary" onClick={this.handleClickOpen}>삭제</Button>
27 +
28 +<Textfield label="이름" type="text" name="st_Name" value={this.state.st_Name} onChange={this.handleValueChange}/><br/>
29 +<Textfield label="학번" type="text" name="st_Id" value={this.state.st_Id} onChange={this.handleValueChange}/><br/>
30 +
31 +SELECT @RNUM := @RNUM + 1 AS ROWNUM, t.*
32 +
33 +FROM
34 +
35 + (
36 +
37 + SELECT *
38 +
39 + FROM dbproject.Students
40 +
41 + ORDER BY st_Score
42 +
43 + ) t,
44 +
45 + ( SELECT @RNUM := 0 ) R
...\ No newline at end of file ...\ No newline at end of file