Home Reference Source Repository

Function

Static Public Summary
public

adds purchasers to coursePurchasers

public

Gets user information passed in and will create the account for the user and remove the old user from the signup list.

public

changeMenu(menuNum: object): object

sidebar options for profile page

public

fetchACourse(courseName: object): object

Grabs the courseName from the Course in the database.

public

Grabs the addition resources from the additional resouce SignUp list in the database.

public

Grabs the purchasers from the Purchaser SignUp list in the database.

public

Grabs the bookmarks from the database.

public

Grabs the courses from the CourseList in the database.

public

Grabs the courses from the course child in the database.

public

Grabs the eoikey from the database.

public

Grabs the EOIs from the database.

public

Grabs the key and role from the database.

public

Grabs the notifcation from the database.

public

Grabs the purchasers from the Purchaser SignUp list in the database.

public

Grabs the RFPfromEOIs from the database.

public

Grabs the rfpkey from the database.

public

Grabs the RFPs from the database.

public

Grabs the ReqEOIs from the database.

public

Grabs the Users from the database.

public

Grabs the vendor courses from the Vendor Course in the database.

public

Grabs the vendors from the Vendor SignUp list in the database.

public

Checks to see if the user is logged in and then returns information about the current user logged in.

public

Logs in the user using firebase authentication and sets notifications to false, error if invalid information.

public

Logs out the user using firebase authentication.

public

reducer(action: object): state

Profile Reducer

public

reducer(action: object): state

Course Reducer

public

reducer(action: object): state

User Reducer

public

Gets user information passed in and will remove the user from the signup list.

public

removeBookmark(bookmarks: object): *

removes the bookmark from the database.

public

removeEOI(info: *): *

Removes from EOI table

public

removeRFP(key: *): *

Removes from RFP table

public

saveACourse(courseName: object): object

Saves a course to the database.

public

setBookmarks(bookmarks: object): *

sets the bookmarks from the database.

public

sets the notifcation from the database.

public

Gets additional resource user information passed in and will add the user to the additional resource signup list.

public

Gets purchaser user information passed in and will add the user to the purchaser signup list.

public

Gets vendor user information passed in and will add the user to the vendor signup list.

public

sortByName(courseList: object): object

Sort the course by name.

public

Sort the course by vendor's email.

public

sets the eoikey.

public

sets the EOI to the database.

public

sets the key and role to the database.

public

sets the rfpkey.

public

sets the RFP to the database.

public

sets the ReqEOI to the database.

public

submits RFP prompt from EOI details.

public

updates course

public

updateProfile(user: *): object

Updates user profile.

public

updates RFP

public

uploadAnnualReport(email: *, fileObj: *): object

Upload vendor's annual report.

public

Upload a course into the database.

public

uploadCourseDetail(user: *, fileObj: *): *

public

upload course files

Static Public

public addCoursePurchaser(info,: object): object source

import {addCoursePurchaser} from 'learnenergy401/component/Actions/courseActions.js'

adds purchasers to coursePurchasers

Params:

NameTypeAttributeDescription
info, object

courseID - information on course and purchaser id

Return:

object

dispatch

Throw:

object

err - Returns an error if failed to fetch from database.

public approveUser(user: object): object source

Gets user information passed in and will create the account for the user and remove the old user from the signup list.

Params:

NameTypeAttributeDescription
user object

object which contains information for us to register into firebase with and store in our database.

Return:

object

dispatch - Returns the state which contains user object

Throw:

object

err - Returns an error if failed to grab, remove from database or add to firebase.

public changeMenu(menuNum: object): object source

sidebar options for profile page

Params:

NameTypeAttributeDescription
menuNum object

object of menuNum

Return:

object

dispatch - Returns the new state of the sidebar.

public fetchACourse(courseName: object): object source

Grabs the courseName from the Course in the database.

Params:

NameTypeAttributeDescription
courseName object

Object containing course names

Return:

object

aCourseName - Returns the object aCourseName

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchADSignup(): object source

Grabs the addition resources from the additional resouce SignUp list in the database.

Return:

object

ads - Returns the object of additional resources.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchAdminSignup(): object source

import {fetchAdminSignup} from 'learnenergy401/component/Actions/userActions.js'

Grabs the purchasers from the Purchaser SignUp list in the database.

Return:

object

purchasers - Returns the object of purchasers.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchBookmarks(): object source

Grabs the bookmarks from the database.

Return:

object

bookmarks - Returns the object of bookmarks.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchCourse(): object source

Grabs the courses from the CourseList in the database.

Return:

object

courseList - Returns the object of courseList.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchCourseList(): object source

Grabs the courses from the course child in the database.

Return:

object

courses - Returns the object of courses.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchEOIkey(): object source

Grabs the eoikey from the database.

Return:

object

eoikey - Returns the object of eoikey.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchEOIs(): object source

Grabs the EOIs from the database.

Return:

object

eoi - Returns the object of eoi.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchKeyRole(): object source

Grabs the key and role from the database.

Return:

object

key - Returns the object of key.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchNotificationAdmin(): object source

import {fetchNotificationAdmin} from 'learnenergy401/component/Actions/userActions.js'

Grabs the notifcation from the database.

Return:

object

notification - Returns the object of notification.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchPurchaserSignup(): object source

import {fetchPurchaserSignup} from 'learnenergy401/component/Actions/userActions.js'

Grabs the purchasers from the Purchaser SignUp list in the database.

Return:

object

purchasers - Returns the object of purchasers.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchRFPfromEOI(): object source

import {fetchRFPfromEOI} from 'learnenergy401/component/Actions/userActions.js'

Grabs the RFPfromEOIs from the database.

Return:

object

rfpfromeoi - Returns the object of rfpfromeoi.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchRFPkey(): object source

Grabs the rfpkey from the database.

Return:

object

rfpkey - Returns the object of rfpkey.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchRFPs(): object source

Grabs the RFPs from the database.

Return:

object

rfp - Returns the object of rfp.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchReqEOI(): object source

Grabs the ReqEOIs from the database.

Return:

object

reqeoi - Returns the object of reqeoi.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchUsers(): object source

Grabs the Users from the database.

Return:

object

users - Returns the object of users.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchVendorCourse(email: object): object source

import {fetchVendorCourse} from 'learnenergy401/component/Actions/courseActions.js'

Grabs the vendor courses from the Vendor Course in the database.

Params:

NameTypeAttributeDescription
email object

object containing email

Return:

object

currentVendorCourseList - Returns the object of courses.

Throw:

object

err - Returns an error if failed to fetch from database.

public fetchVendorSignup(): object source

import {fetchVendorSignup} from 'learnenergy401/component/Actions/userActions.js'

Grabs the vendors from the Vendor SignUp list in the database.

Return:

object

vendors - Returns the object of vendors.

Throw:

object

err - Returns an error if failed to fetch from database.

public getCurrentUser(): object source

Checks to see if the user is logged in and then returns information about the current user logged in.

Return:

object

user - Returns the object of user.

Throw:

object

err - Returns an error if failed to find current logged in user.

public logInUser(user: object): object source

Logs in the user using firebase authentication and sets notifications to false, error if invalid information.

Params:

NameTypeAttributeDescription
user object

object which contains information about the user to log in with.

Return:

object

dispatch - Returns the state which contains user object

Throw:

object

err - Returns an error if failed to login.

public logOutUser(): object source

Logs out the user using firebase authentication.

Return:

object

dispatch - Returns the state which contains user object

Throw:

object

err - Returns an error if fail to logout.

public reducer(action: object): state source

Profile Reducer

Params:

NameTypeAttributeDescription
action object

Return:

state

state

public reducer(action: object): state source

Course Reducer

Params:

NameTypeAttributeDescription
action object

Return:

state

state

public reducer(action: object): state source

User Reducer

Params:

NameTypeAttributeDescription
action object

Return:

state

state

public rejectUser(user: object): object source

Gets user information passed in and will remove the user from the signup list.

Params:

NameTypeAttributeDescription
user object

object which contains information about the user.

Return:

object

dispatch - Returns the state which contains user object

Throw:

object

err - Returns an error if failed to remove from database.

public removeBookmark(bookmarks: object): * source

removes the bookmark from the database.

Params:

NameTypeAttributeDescription
bookmarks object

information on bookmarks

Return:

*

Throw:

object

err - Returns an error if failed to fetch from database.

public removeEOI(info: *): * source

Removes from EOI table

Params:

NameTypeAttributeDescription
info *

Return:

*

public removeRFP(key: *): * source

Removes from RFP table

Params:

NameTypeAttributeDescription
key *

Return:

*

public saveACourse(courseName: object): object source

Saves a course to the database.

Params:

NameTypeAttributeDescription
courseName object

Object containing course names

Return:

object

courseName - Returns the object containing course names.

Throw:

object

err - Returns an error if failed to fetch from database.

public setBookmarks(bookmarks: object): * source

sets the bookmarks from the database.

Params:

NameTypeAttributeDescription
bookmarks object

information on bookmarks

Return:

*

Throw:

object

err - Returns an error if failed to fetch from database.

public setNotificationAdmin(): * source

import {setNotificationAdmin} from 'learnenergy401/component/Actions/userActions.js'

sets the notifcation from the database.

Return:

*

Throw:

object

err - Returns an error if failed to fetch from database.

public signUpAD(user: object): object source

Gets additional resource user information passed in and will add the user to the additional resource signup list.

Params:

NameTypeAttributeDescription
user object

object which contains information about the user additional resource.

Return:

object

dispatch - Returns the state which contains user object

Throw:

object

err - Returns an error if failed to push to database.

public signUpPurchaser(user: object): object source

import {signUpPurchaser} from 'learnenergy401/component/Actions/userActions.js'

Gets purchaser user information passed in and will add the user to the purchaser signup list.

Params:

NameTypeAttributeDescription
user object

object which contains information about the user purchaser.

Return:

object

dispatch - Returns the state which contains user object

Throw:

object

err - Returns an error if failed to push to database.

public signUpVendor(user: object): object source

Gets vendor user information passed in and will add the user to the vendor signup list.

Params:

NameTypeAttributeDescription
user object

object which contains information about the user vendor.

Return:

object

dispatch - Returns the state which contains user object

Throw:

object

err - Returns an error if failed to push to database.

public sortByName(courseList: object): object source

Sort the course by name.

Params:

NameTypeAttributeDescription
courseList object

Object containing course list

Return:

object

number - Returns the value that decides sorting method.

public sortByVendorEmail(courseList: object): object source

import {sortByVendorEmail} from 'learnenergy401/component/Actions/courseActions.js'

Sort the course by vendor's email.

Params:

NameTypeAttributeDescription
courseList object

Object containing course list

Return:

object

number - Returns the value that decides sorting method.

public storeEOIkey(info: object): object source

sets the eoikey.

Params:

NameTypeAttributeDescription
info object

object which contains information about the eoikey.

Return:

object

dispatch - Returns the state which contains eoikey object

Throw:

object

err - Returns an error if failed to push to database.

public storeEOIs(data: object): object source

sets the EOI to the database.

Params:

NameTypeAttributeDescription
data object

object which contains information about the eoi.

Return:

object

dispatch - Returns the state which contains eoi object

Throw:

object

err - Returns an error if failed to push to database.

public storeKeyRole(data: object): object source

sets the key and role to the database.

Params:

NameTypeAttributeDescription
data object

object which contains information about the key and role of the user.

Return:

object

dispatch - Returns the state which contains keys_roles object

Throw:

object

err - Returns an error if failed to push to database.

public storeRFPkey(info: object): object source

sets the rfpkey.

Params:

NameTypeAttributeDescription
info object

object which contains information about the eoikey.

Return:

object

dispatch - Returns the state which contains rfpkey object

Throw:

object

err - Returns an error if failed to push to database.

public storeRFPs(data: object): object source

sets the RFP to the database.

Params:

NameTypeAttributeDescription
data object

object which contains information about the rfp.

Return:

object

dispatch - Returns the state which contains rfp object

Throw:

object

err - Returns an error if failed to push to database.

public storeReqEOI(data: object): object source

sets the ReqEOI to the database.

Params:

NameTypeAttributeDescription
data object

object which contains information about the reqeoi.

Return:

object

dispatch - Returns the state which contains reqeoi object

Throw:

object

err - Returns an error if failed to push to database.

public submitRFPfromEOI(info: object): object source

import {submitRFPfromEOI} from 'learnenergy401/component/Actions/userActions.js'

submits RFP prompt from EOI details.

Params:

NameTypeAttributeDescription
info object

object which contains information about the vendor for rfp.

Return:

object

dispatch - Returns the state which contains rfp object

Throw:

object

err - Returns an error if failed to push to database.

public updateCourse(course,: object): object source

updates course

Params:

NameTypeAttributeDescription
course, object

courseID - information on course

Return:

object

dispatch

Throw:

object

err - Returns an error if failed to fetch from database.

public updateProfile(user: *): object source

Updates user profile.

Params:

NameTypeAttributeDescription
user *

Return:

object

dispatch - Returns the state which contains user object

Throw:

object

err - Returns an error if fail to logout.

public updateRFP(RFP: object): object source

updates RFP

Params:

NameTypeAttributeDescription
RFP object

information on RFP

Return:

object

dispatch

Throw:

object

err - Returns an error if failed to fetch from database.

public uploadAnnualReport(email: *, fileObj: *): object source

import {uploadAnnualReport} from 'learnenergy401/component/Actions/userActions.js'

Upload vendor's annual report.

Params:

NameTypeAttributeDescription
email *
fileObj *

Return:

object

dispatch - Returns the state which contains download link

Throw:

object

err - Returns an error if fail to logout.

public uploadCourse(course: object): object source

Upload a course into the database.

Params:

NameTypeAttributeDescription
course object

object containing course info

Return:

object

courses - Returns the object of courses.

Throw:

object

err - Returns an error if failed to fetch from database.

public uploadCourseDetail(user: *, fileObj: *): * source

import {uploadCourseDetail} from 'learnenergy401/component/Actions/courseActions.js'

Params:

NameTypeAttributeDescription
user *
fileObj *

Return:

*

public uploadCourseFiles(course,: object): object source

import {uploadCourseFiles} from 'learnenergy401/component/Actions/courseActions.js'

upload course files

Params:

NameTypeAttributeDescription
course, object

courseID, fileObj - information on course and selected file

Return:

object

dispatch

Throw:

object

err - Returns an error if failed to fetch from database.