diff -r 279e1dffa213 -r a1fb2ced3049 client/src/components/Session.js --- a/client/src/components/Session.js Thu Aug 03 23:04:33 2017 +0200 +++ b/client/src/components/Session.js Fri Aug 04 09:48:09 2017 +0200 @@ -13,6 +13,7 @@ import * as userActions from '../actions/userActions'; import { getSession, getSessionNotes } from '../selectors/coreSelectors'; import { getAutoSubmit } from '../selectors/authSelectors'; +import { extractAnnotationCategories, defaultAnnotationsCategories } from '../constants'; class Session extends Component { render() { @@ -31,6 +32,7 @@ notes={this.props.notes} deleteNote={this.props.notesActions.deleteNote} updateNote={this.props.notesActions.updateNote} + annotationCategories={this.props.annotationCategories} /> @@ -42,7 +44,8 @@ session={this.props.currentSession} autoSubmit={this.props.autoSubmit} addNote={this.props.notesActions.addNote} - setAutoSubmit={this.props.userActions.setAutoSubmit} /> + setAutoSubmit={this.props.userActions.setAutoSubmit} + annotationCategories={this.props.annotationCategories}/> @@ -60,11 +63,13 @@ const autoSubmit = getAutoSubmit(state); const currentSession = getSession(sessionId, state); const currentNotes = getSessionNotes(sessionId, state); + const annotationCategories = currentSession?extractAnnotationCategories(currentSession.get('protocol')):defaultAnnotationsCategories; return { currentSession, notes: currentNotes, - autoSubmit + autoSubmit, + annotationCategories }; }