육현진

add usermode page

[{"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
[{"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
......
......@@ -16,17 +16,16 @@ import Toolbar from '@material-ui/core/Toolbar';
import IconButton from '@material-ui/core/IconButton';
import Typography from '@material-ui/core/Typography';
import InputBase from '@material-ui/core/InputBase';
import { fade } from '@material-ui/core/styles/colorManipulator';
import { fade, makeStyles } from '@material-ui/core/styles';
import MenuIcon from '@material-ui/icons/Menu';
import SearchIcon from '@material-ui/icons/Search';
const styles = theme => ({
root: {
width: '100%',
minWidth:1080
},
table: {
paper: {
marginLeft:18,
marginRight:18
},
......@@ -96,8 +95,8 @@ const styles = theme => ({
const students = [
{
'st_Code': 6666,
'st_Name': '육현진',
'st_Id': 2018102210,
//'st_Name': '육현진',
//'st_Id': 2018102210,
'st_Major':'컴퓨터공학과',
'st_Midscore': 100,
'st_Finalscore': 100,
......@@ -107,8 +106,8 @@ const students = [
},
{
'st_Code': 1111,
'st_Name': '김창동',
'st_Id': 2020021120,
//'st_Name': '김창동',
//'st_Id': 2020021120,
'st_Major':'컴퓨터공학과',
'st_Midscore': 79,
'st_Finalscore': 85,
......@@ -174,8 +173,8 @@ class App extends Component{
return <Student stateRefresh={this.stateRefresh}
key={c.st_Code}
st_Code={c.st_Code}
st_Name={c.st_Name}
st_Id={c.st_Id}
//st_Name={c.st_Name}
//st_Id={c.st_Id}
st_Major={c.st_Major}
st_Midscore={c.st_Midscore}
st_Finalscore={c.st_Finalscore}
......@@ -186,7 +185,7 @@ class App extends Component{
}
const {classes}= this.props;
const cellList=["코드번호","이름","학번","전공","중간","기말","과제","출석","설정"];
const cellList=["코드번호","이름","학번","전공","중간","기말","과제","출석","성적","설정"];
return (
<div className={classes.root}>
<AppBar position="static">
......@@ -200,8 +199,9 @@ class App extends Component{
<MenuIcon />
</IconButton>
<Typography className={classes.title} variant="h6" noWrap>
학생 성적 관리 프로그램
성적 조회 프로그램
</Typography>
<div className={classes.search}>
<div className={classes.searchIcon}>
<SearchIcon />
......@@ -212,14 +212,15 @@ class App extends Component{
root: classes.inputRoot,
input: classes.inputInput,
}}
name="searchKeyword"
st_Name="searchKeyword"
value={this.state.searchKeyword}
onChange={this.handleValueChange}
//inputProps={{ 'aria-label': 'search' }}
inputProps={{ 'aria-label': 'search' }}
/>
</div>
</Toolbar>
</AppBar>
<div className={classes.menu}>
<StudentAdd stateRefresh={this.stateRefresh}/>
</div>
......
......@@ -36,8 +36,8 @@ class StudentAdd extends React.Component{
super(props);
this.state={
st_Code:'',
st_Name:'',
st_Id:'',
//st_Name:'',
//st_Id:'',
st_Major:'',
st_Midscore:'',
st_Finalscore:'',
......@@ -57,8 +57,8 @@ class StudentAdd extends React.Component{
})
this.setState({
st_Code:'',
st_Name:'',
st_Id:'',
//st_Name:'',
//st_Id:'',
st_Major:'',
st_Midscore:'',
st_Finalscore:'',
......@@ -80,8 +80,8 @@ class StudentAdd extends React.Component{
const url ='/api/students';
const formData=new FormData();
formData.append('st_Code',this.state.st_Code);
formData.append('st_Name',this.state.st_Name);
formData.append('st_Id',this.state.st_Id);
//formData.append('st_Name',this.state.st_Name);
//formData.append('st_Id',this.state.st_Id);
formData.append('st_Major',this.state.st_Major);
formData.append('st_Midscore',this.state.st_Midscore);
formData.append('st_Finalscore',this.state.st_Finalscore);
......@@ -106,8 +106,8 @@ class StudentAdd extends React.Component{
handleClose = () => {
this.setState({
st_Code:'',
st_Name:'',
st_Id:'',
//st_Name:'',
//st_Id:'',
st_Major:'',
st_Midscore:'',
st_Finalscore:'',
......@@ -123,20 +123,22 @@ class StudentAdd extends React.Component{
return(
<div>
<Button variant="contained" color="primary" onClick={this.handleClickOpen}>
학생 추가하기
등수확인
</Button>
<Dialog open={this.state.open} onClose={this.handleClose}>
<DialogTitle>학생 추가</DialogTitle>
<DialogTitle>학생 추가</DialogTitle>
<DialogContent>
<Textfield label="코드 번호" type="text" name="st_Code" value={this.state.st_Code} onChange={this.handleValueChange}/><br/>
<Textfield label="이름" name="st_Name" value={this.state.st_Name} onChange={this.handleValueChange}/><br/>
<Textfield label="학번" name="st_Id" value={this.state.st_Id} onChange={this.handleValueChange}/><br/>
<Textfield label="전공" name="st_Major" value={this.state.st_Major} onChange={this.handleValueChange}/><br/>
<Textfield label="중간 점수" name="st_Midscore" value={this.state.st_Midscore} onChange={this.handleValueChange}/><br/>
<Textfield label="기말 점수" name="st_Finalscore" value={this.state.st_Finalscore} onChange={this.handleValueChange}/><br/>
<Textfield label="과제 점수" name="st_Assignscore" value={this.state.st_Assignscore} onChange={this.handleValueChange}/><br/>
<Textfield label="출석 점수" name="st_Attendscore" value={this.state.st_Attendscore} onChange={this.handleValueChange}/><br/>
<Textfield label="학점" name="st_Score" value={this.state.st_Score} onChange={this.handleValueChange}/><br/>
<Textfield label="전공" type="text" name="st_Major" value={this.state.st_Major} onChange={this.handleValueChange}/><br/>
<Textfield label="중간 점수" type="text" name="st_Midscore" value={this.state.st_Midscore} onChange={this.handleValueChange}/><br/>
<Textfield label="기말 점수" type="text" name="st_Finalscore" value={this.state.st_Finalscore} onChange={this.handleValueChange}/><br/>
<Textfield label="과제 점수" type="text" name="st_Assignscore" value={this.state.st_Assignscore} onChange={this.handleValueChange}/><br/>
<Textfield label="출석 점수" type="text" name="st_Attendscore" value={this.state.st_Attendscore} onChange={this.handleValueChange}/><br/>
<Textfield label="학점" type="text" name="st_Score" value={this.state.st_Score} onChange={this.handleValueChange}/><br/>
</DialogContent>
<DialogActions>
<Button varient="contained" color="primary" onClick={this.handleFormSubmit}>추가</Button>
......@@ -144,6 +146,12 @@ class StudentAdd extends React.Component{
</DialogActions>
</Dialog>
</div>
)
}
}
export default withStyles(styles)(StudentAdd);
/*
<form onSubmit={this.handleFormSubmit}>
<h1>학생 추가</h1>
......@@ -159,9 +167,4 @@ class StudentAdd extends React.Component{
<button type="submit">추가하기</button>
</form>
*/
)
}
}
export default withStyles(styles)(StudentAdd);
\ No newline at end of file
*/
\ No newline at end of file
......
......@@ -52,7 +52,7 @@ class StudentDelete extends React.Component{
return(
<div>
<Button variant="contained" color="secondary" onClick={this.handleClickOpen}>삭제</Button>
<Dialog open={this.state.open} onClose={this.handleClose}>
<DialogTitle onClose={this.handleClose}>
삭제 경고
......
......@@ -29,6 +29,7 @@ app.get('/api/students', (req, res)=>{
"SELECT * FROM dbproject.Students WHERE isDeleted=0",
(err,rows,fields)=>{
res.send(rows);
console.log(err);
}
);
});
......@@ -36,10 +37,10 @@ app.get('/api/students', (req, res)=>{
app.use('/image', express.static('./upload'));
app.post('/api/students',upload.single('image'), (req, res) =>{
let sql = 'INSERT INTO dbproject.Students VALUES (?,?,?,?,?,?,?,?,?,now(),0)';
let sql = 'INSERT INTO dbproject.Students VALUES (?,?,?,?,?,?,?,?,?,now)';
let st_Code= req.body.st_Code;
let st_Name = req.body.st_Name;
let st_Id = req.body.st_Id;
//let st_Name = req.body.st_Name;
//let st_Id = req.body.st_Id;
let st_Major = req.body.st_Major;
let st_Midscore = req.body.st_Midscore;
let st_Finalscore = req.body.st_Finalscore;
......@@ -47,8 +48,8 @@ app.post('/api/students',upload.single('image'), (req, res) =>{
let st_Attendscore = req.body.st_Attendscore;
let st_Score = req.body.st_Score;
console.log(st_Code);
console.log(st_Name);
console.log(st_Id);
//console.log(st_Name);
//console.log(st_Id);
console.log(st_Major);
console.log(st_Midscore);
console.log(st_Finalscore);
......@@ -56,8 +57,9 @@ app.post('/api/students',upload.single('image'), (req, res) =>{
console.log(st_Attendscore);
console.log(st_Score);
let params=[st_Code, st_Name,
st_Id,
let params=[st_Code,
//st_Name,
//st_Id,
st_Major,
st_Midscore,
st_Finalscore,
......
st_Code:'',
st_Name
st_Id
st_Major
st_Midscore
st_Finalscore
st_Assignscore
st_Attendscore
st_Score
this.state.students.map(c=>{
return (
<Student stateRefresh={this.stateRefresh}
key={c.st_Code}
st_Code={c.st_Code}
st_Name={c.st_Name}
st_Id={c.st_Id}
st_Major={c.st_Major}
st_Midscore={c.st_Midscore}
st_Finalscore={c.st_Finalscore}
st_Assignscore={c.st_Assignscore}
st_Attendscore={c.st_Attendscore}
st_Score={c.st_Score}
/>
);
//<Button variant="contained" color = "secondary" onClick={this.handleClickOpen}>삭제</Button>
<Textfield label="이름" type="text" name="st_Name" value={this.state.st_Name} onChange={this.handleValueChange}/><br/>
<Textfield label="학번" type="text" name="st_Id" value={this.state.st_Id} onChange={this.handleValueChange}/><br/>
SELECT @RNUM := @RNUM + 1 AS ROWNUM, t.*
FROM
(
SELECT *
FROM dbproject.Students
ORDER BY st_Score
) t,
( SELECT @RNUM := 0 ) R
\ No newline at end of file