-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2212 from hawkrives/more-modules
More modules
- Loading branch information
Showing
120 changed files
with
817 additions
and
770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
save-exact=true | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ modules/gob-web/styles/normalize.scss | |
*.md | ||
*.json | ||
flow-typed/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "@gob/colors", | ||
"version": "3.0.0-rc.2", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"polished": "^1.9.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import forEach from 'lodash/forEach' | ||
import toPairs from 'lodash/toPairs' | ||
import fromPairs from 'lodash/fromPairs' | ||
import filter from 'lodash/filter' | ||
import includes from 'lodash/includes' | ||
|
||
const whitelist = [ | ||
'clbid', | ||
'credits', | ||
'crsid', | ||
'department', | ||
'gereqs', | ||
'groupid', | ||
'level', | ||
'name', | ||
'number', | ||
'pf', | ||
'semester', | ||
'type', | ||
'year', | ||
] | ||
const mapping = { | ||
departments: 'department', | ||
} | ||
export function alterForEvaluation(course) { | ||
course = {...course} | ||
|
||
forEach(mapping, (toKey, fromKey) => { | ||
course[toKey] = course[fromKey] | ||
}) | ||
|
||
let pairs = toPairs(course) | ||
pairs = filter(pairs, ([key]) => includes(whitelist, key)) | ||
return fromPairs(pairs) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {alterForEvaluation} from './alter-for-evaluation' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "@gob/courses", | ||
"version": "3.0.0-rc.2", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"lodash": "^4.17.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ | |
"author": "Hawken MacKay Rives", | ||
"license": "MIT", | ||
"dependencies": { | ||
"lodash": "4.17.5" | ||
"lodash": "^4.17.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import uniqBy from 'lodash/uniqBy' | ||
import filter from 'lodash/filter' | ||
import flatMap from 'lodash/flatMap' | ||
|
||
export function getActiveCourses(student) { | ||
/* | ||
- At it's core, this method just needs to get the list of courses that a student has chosen. | ||
- Each schedule has a list of courses that are a part of that schedule. | ||
- Additionally, we only care about the schedules that are marked as "active". | ||
- Keep in mind that each list of courses is actually a *promise* for the courses. | ||
- We also need to make sure to de-duplicate the final list of courses, so that each `clbid` only appears once. | ||
- Finally, remember that a given `clbid` might not exist in the database, in which case we get back 'undefined'. | ||
In this case, we need to know where the `clbid` came from, so that we can render an error in the correct location. | ||
*/ | ||
|
||
const activeSchedules = filter(student.schedules, {active: true}) | ||
let courses = flatMap(activeSchedules, s => s.courses) | ||
courses = uniqBy(filter(courses, c => c), course => course.clbid) | ||
|
||
return courses | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ | |
"author": "Hawken MacKay Rives", | ||
"license": "MIT", | ||
"dependencies": { | ||
"lodash": "4.17.5" | ||
"lodash": "^4.17.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "@gob/treo-plugin-batch-get", | ||
"version": "3.0.0-rc.2", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"idb-request": "^3.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.