/**************************************************/
/** INDIVIDUAL COURSE SEARCH BASED ON COURSE NUMBER FROM URL
/**************************************************/
class LookupCourse extends React.Component {
constructor(props) {
super()
this.state = { course:props.match.params.course, loaded:false, data:[] }
}
componentDidMount() {
callDb("/api/build.php?course="+this.state.course, this)
// callDb("/api/build.php?course=KINE352", this)
// console.log('asfdas');
}
createUniLinks = (data) => {
let unis = []
data.map(function(val) {
unis.indexOf(val.remote_school) == -1 && unis.push(val.remote_school)
})
return
}
createUniTables = (data) => {
let tables = []
let fdata = filterBySingleCourse(data)
for(let x in fdata) {
tables.push()
}
return tables
}
render() {
let tables, unis
if(this.state.loaded){
unis = this.createUniLinks(this.state.data)
tables = this.createUniTables(this.state.data)
}
return (
SVSU Transfer Equivalencies
Back to SVSU Course Lookup
{ unis }
{ tables }
)
}
}
class NewCourseRow extends React.Component {
render() {
let y = this.props.data;
return(
{ y.svsu_course } |
{ y.svsu_title } |
{ y.svsu_credits } |
{ y.remote_course } |
{ y.remote_title } |
{ y.remote_credits } |
)
}
}
class GroupedCourseRow extends React.Component {
render() {
let y = this.props.data;
return(
| | |
{ y.remote_course } |
{ y.remote_title } |
{ y.remote_credits } |
)
}
}
class Testing extends React.Component {
render() {
let y = this.props.data;
return(
{ y.svsu_course } |
{ y.svsu_title } |
{ y.svsu_credits } |
| | |
)
}
}
class CommentsRow extends React.Component {
render() {
let y = this.props.data;
return(
Comments: { y.trans_comments } |
)
}
}
class CourseTables extends React.Component {
render() {
let rows = [];
let comments;
let data = this.props.data;
let uid = this.props.data[0].remote_school.replace(/ /g, '')
data.forEach(function(y, key) {
if(key > 0 && data[key].svsu_course == data[key-1].svsu_course && y.svsu_credit < 3){
rows.push()
}
else if(key > 0 && data[key].remote_course == data[key-1].remote_course){
rows.push()
}
else{
rows.push()
}
if(y.trans_comments != ''){
comments =
}
})
return (
{ this.props.data[0].remote_school }
SVSU | Transfer |
Course |
Title |
Credits |
Course |
Title |
Credits |
{ rows }
{ comments }
)
}
}