Skip to content

Commit

Permalink
Merge pull request #1078 from UniversityOfHelsinkiCS/trunk
Browse files Browse the repository at this point in the history
UVANJ MK;.
  • Loading branch information
sasumaki authored Jul 5, 2019
2 parents f358d17 + b11e508 commit 12e945d
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 41 deletions.
35 changes: 0 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,5 @@
"cypress": "^3.2.0",
"husky": "^1.3.1"
},
"dependencies": {
"umzug": "^2.2.0"
}
"dependencies": {}
}
2 changes: 2 additions & 0 deletions services/backend/updater_writer/database/connection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const Sequelize = require('sequelize')
const Umzug = require('umzug')

const conf = require('../conf-backend')

const sequelize = new Sequelize(conf.DB_URL, {
Expand Down
28 changes: 28 additions & 0 deletions services/backend/updater_writer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion services/backend/updater_writer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"node-nats-streaming": "^0.2.2",
"nodemon": "^1.19.0",
"pg": "^7.10.0",
"sequelize": "^5.8.5"
"sequelize": "^5.8.5",
"umzug": "^2.2.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ const CourseTable = ({ courses, onSelectCourse, hidden, title, emptyListText, ma
)

const toCourseRow = course => (
<Table.Row style={{ cursor: 'pointer' }} key={course.code} onClick={() => (course.min_attainment_date || mandatory ? onSelectCourse(course) : null)} >
<Table.Cell width={10}>
// kinda hax solution for the problem, after fetching course course is array of selected course code letters
<Table.Row style={{ cursor: 'pointer' }} key={course.code ? course.code : course[0]} onClick={() => (course.min_attainment_date || mandatory ? onSelectCourse(course) : null)} >
<Table.Cell key={course.code} width={10}>
<div>{course.name}</div>
<div>{getActiveYears(course)}</div>
</Table.Cell>
<Table.Cell content={course.code} />
</Table.Row>
)


return (
!hidden && (
<Segment basic style={{ padding: '0' }} >
Expand Down

0 comments on commit 12e945d

Please sign in to comment.