Toggle navigation
Toggle navigation
This project
Loading...
Sign in
육현진
/
DBproject
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
육현진
2020-12-08 04:50:00 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
37bc508fce042602ed2b8501e8e43c9df15516b2
37bc508f
1 parent
cb102ed8
Loading view
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
client/.eslintcache
client/src/App.js
client/.eslintcache
View file @
37bc508
[{"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"},{"size":500,"mtime":499162500000,"results":"5","hashOfConfig":"6"},{"size":2833,"mtime":1607369354407,"results":"7","hashOfConfig":"6"},{"size":362,"mtime":499162500000,"results":"8","hashOfConfig":"6"},{"size":2433,"mtime":1607363898200,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},"15hdric",{"filePath":"13","messages":"14","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"15","usedDeprecatedRules":"12"},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"20","usedDeprecatedRules":"21"},"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\index.js",[],["22","23"],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\App.js",["24","25"],"import React, {Component, components} from 'react';\nimport Student from './components/Student';\nimport './App.css';\nimport Paper from '@material-ui/core/Paper'\nimport Table from '@material-ui/core/Table'\nimport TableHead from '@material-ui/core/TableHead'\nimport TableBody from '@material-ui/core/TableBody'\nimport TableRow from '@material-ui/core/TableRow'\nimport TableCell from '@material-ui/core/TableCell'\nimport {withStyles} from '@material-ui/core/styles';\n\nconst styles = theme => ({\n root: {\n width: '100%',\n marginTop: theme.spacing.unit * 3,\n overflowX: \"auto\"\n },\n table: {\n minWidth:1000\n }\n})\n\nconst students = [\n {\n 'st_Code': 6666,\n 'st_Name': '육현진',\n 'st_Id': 2018102210,\n 'st_Major':'컴퓨터공학과',\n 'st_Midscore': 100,\n 'st_Finalscore': 100,\n 'st_Assignscore': 100,\n 'st_Attendscore': 100,\n 'st_Score':'A+'\n},\n{\n 'st_Code': 1111,\n 'st_Name': '김창동',\n 'st_Id': 2020021120,\n 'st_Major':'컴퓨터공학과',\n 'st_Midscore': 79,\n 'st_Finalscore': 85,\n 'st_Assignscore': 100,\n 'st_Attendscore': 90,\n 'st_Score':'A0'\n}]\n\nclass App extends Component{\n\n state = {\n students: \"\"\n }\n\n componentDidMount() {\n this.callApi()\n .then(res => this.setState({students: res}))\n .catch(err => console.log(err));\n }\n\n callApi=async()=>{\n const response = await fetch('/api/students');\n const body = await response.json();\n return body;\n }\n\n render(){\n\n const {classes}= this.props;\n\n return ( \n <Paper className={classes.root}>\n <Table className={classes.table}>\n\n <TableHead>\n <TableRow>\n <TableCell>코드번호</TableCell>\n <TableCell>이름</TableCell>\n <TableCell>학번</TableCell>\n <TableCell>전공</TableCell>\n <TableCell>중간</TableCell>\n <TableCell>기말</TableCell>\n <TableCell>과제</TableCell>\n <TableCell>출석</TableCell>\n <TableCell>학점</TableCell>\n </TableRow>\n </TableHead>\n \n <TableBody>\n {\n this.state.students ?\n this.state.students.map(c=>{\n return (\n <Student\n key={c.st_Code}\n st_Code={c.st_Code}\n st_Name={c.st_Name}\n st_Id={c.st_Id}\n st_Major={c.st_Major}\n st_Midscore={c.st_Midscore}\n st_Finalscore={c.st_Finalscore}\n st_Assignscore={c.st_Assignscore}\n st_Attendscore={c.st_Attendscore}\n st_Score={c.st_Score}\n />\n );\n }) : \"\"\n } \n </TableBody>\n\n </Table>\n\n </Paper>\n\n );\n }\n}\n\nexport default withStyles(styles)(App);\n","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",["26","27","28"],"import React from 'react';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\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\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;",["29","30"],{"ruleId":"31","replacedBy":"32"},{"ruleId":"33","replacedBy":"34"},{"ruleId":"35","severity":1,"message":"36","line":1,"column":27,"nodeType":"37","messageId":"38","endLine":1,"endColumn":37},{"ruleId":"35","severity":1,"message":"39","line":23,"column":7,"nodeType":"37","messageId":"38","endLine":23,"endColumn":15},{"ruleId":"35","severity":1,"message":"40","line":42,"column":7,"nodeType":"37","messageId":"38","endLine":42,"endColumn":19},{"ruleId":"35","severity":1,"message":"41","line":58,"column":7,"nodeType":"37","messageId":"38","endLine":58,"endColumn":18},{"ruleId":"35","severity":1,"message":"42","line":68,"column":7,"nodeType":"37","messageId":"38","endLine":68,"endColumn":19},{"ruleId":"31","replacedBy":"43"},{"ruleId":"33","replacedBy":"44"},"no-native-reassign",["45"],"no-negated-in-lhs",["46"],"no-unused-vars","'components' is defined but never used.","Identifier","unusedVar","'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.",["45"],["46"],"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"},{"size":500,"mtime":499162500000,"results":"5","hashOfConfig":"6"},{"size":3341,"mtime":1607370487893,"results":"7","hashOfConfig":"6"},{"size":362,"mtime":499162500000,"results":"8","hashOfConfig":"6"},{"size":2433,"mtime":1607363898200,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},"15hdric",{"filePath":"13","messages":"14","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"15","messages":"16","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},{"filePath":"17","messages":"18","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"19","usedDeprecatedRules":"12"},"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\index.js",[],["20","21"],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\client\\src\\App.js",["22","23","24"],"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",["25","26","27"],"import React from 'react';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\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\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;",{"ruleId":"28","replacedBy":"29"},{"ruleId":"30","replacedBy":"31"},{"ruleId":"32","severity":1,"message":"33","line":1,"column":27,"nodeType":"34","messageId":"35","endLine":1,"endColumn":37},{"ruleId":"32","severity":1,"message":"36","line":11,"column":8,"nodeType":"34","messageId":"35","endLine":11,"endColumn":24},{"ruleId":"32","severity":1,"message":"37","line":28,"column":7,"nodeType":"34","messageId":"35","endLine":28,"endColumn":15},{"ruleId":"32","severity":1,"message":"38","line":42,"column":7,"nodeType":"34","messageId":"35","endLine":42,"endColumn":19},{"ruleId":"32","severity":1,"message":"39","line":58,"column":7,"nodeType":"34","messageId":"35","endLine":58,"endColumn":18},{"ruleId":"32","severity":1,"message":"40","line":68,"column":7,"nodeType":"34","messageId":"35","endLine":68,"endColumn":19},"no-native-reassign",["41"],"no-negated-in-lhs",["42"],"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.","no-global-assign","no-unsafe-negation"]
\ No newline at end of file
...
...
client/src/App.js
View file @
37bc508
...
...
@@ -8,6 +8,8 @@ import TableBody from '@material-ui/core/TableBody'
import
TableRow
from
'@material-ui/core/TableRow'
import
TableCell
from
'@material-ui/core/TableCell'
import
{
withStyles
}
from
'@material-ui/core/styles'
;
import
curcularProgress
from
'@material-ui/core/CircularProgress'
;
import
CircularProgress
from
'@material-ui/core/CircularProgress'
;
const
styles
=
theme
=>
({
root
:
{
...
...
@@ -17,6 +19,9 @@ const styles = theme => ({
},
table
:
{
minWidth
:
1000
},
progress
:{
margin
:
theme
.
spacing
.
unit
*
2
}
})
...
...
@@ -47,10 +52,12 @@ const students = [
class
App
extends
Component
{
state
=
{
students
:
""
students
:
""
,
completed
:
0
}
componentDidMount
()
{
this
.
timer
=
setInterval
(
this
.
progress
,
20
);
this
.
callApi
()
.
then
(
res
=>
this
.
setState
({
students
:
res
}))
.
catch
(
err
=>
console
.
log
(
err
));
...
...
@@ -62,6 +69,11 @@ class App extends Component{
return
body
;
}
progress
=
()
=>
{
const
{
completed
}
=
this
.
state
;
this
.
setState
({
completed
:
completed
>=
100
?
0
:
completed
+
1
});
}
render
(){
const
{
classes
}
=
this
.
props
;
...
...
@@ -102,7 +114,12 @@ class App extends Component{
st_Score
=
{
c
.
st_Score
}
/
>
);
})
:
""
})
:
<
TableRow
>
<
TableCell
colSpan
=
"9"
allign
=
"center"
>
<
CircularProgress
className
=
{
classes
.
progress
}
variant
=
"determinate"
value
=
{
this
.
state
.
completed
}
/
>
<
/TableCell
>
<
/TableRow
>
}
<
/TableBody
>
...
...
Please
register
or
login
to post a comment