diff --git a/.gitignore b/.gitignore index f528d722..bfab4cae 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ yarn-debug.log* #Ignore AWS env vars /aws.env +.idea/ diff --git a/Gemfile.lock b/Gemfile.lock index 4a2183db..3f2e0a92 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,38 +1,38 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.0.3) - actionpack (= 6.0.3) + actioncable (6.0.3.4) + actionpack (= 6.0.3.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.3) - actionpack (= 6.0.3) - activejob (= 6.0.3) - activerecord (= 6.0.3) - activestorage (= 6.0.3) - activesupport (= 6.0.3) + actionmailbox (6.0.3.4) + actionpack (= 6.0.3.4) + activejob (= 6.0.3.4) + activerecord (= 6.0.3.4) + activestorage (= 6.0.3.4) + activesupport (= 6.0.3.4) mail (>= 2.7.1) - actionmailer (6.0.3) - actionpack (= 6.0.3) - actionview (= 6.0.3) - activejob (= 6.0.3) + actionmailer (6.0.3.4) + actionpack (= 6.0.3.4) + actionview (= 6.0.3.4) + activejob (= 6.0.3.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.3) - actionview (= 6.0.3) - activesupport (= 6.0.3) + actionpack (6.0.3.4) + actionview (= 6.0.3.4) + activesupport (= 6.0.3.4) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.3) - actionpack (= 6.0.3) - activerecord (= 6.0.3) - activestorage (= 6.0.3) - activesupport (= 6.0.3) + actiontext (6.0.3.4) + actionpack (= 6.0.3.4) + activerecord (= 6.0.3.4) + activestorage (= 6.0.3.4) + activesupport (= 6.0.3.4) nokogiri (>= 1.8.5) - actionview (6.0.3) - activesupport (= 6.0.3) + actionview (6.0.3.4) + activesupport (= 6.0.3.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -42,89 +42,90 @@ GEM activemodel (>= 4.1, < 6.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (6.0.3) - activesupport (= 6.0.3) + activejob (6.0.3.4) + activesupport (= 6.0.3.4) globalid (>= 0.3.6) - activemodel (6.0.3) - activesupport (= 6.0.3) + activemodel (6.0.3.4) + activesupport (= 6.0.3.4) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (6.0.3) - activemodel (= 6.0.3) - activesupport (= 6.0.3) - activestorage (6.0.3) - actionpack (= 6.0.3) - activejob (= 6.0.3) - activerecord (= 6.0.3) + activerecord (6.0.3.4) + activemodel (= 6.0.3.4) + activesupport (= 6.0.3.4) + activestorage (6.0.3.4) + actionpack (= 6.0.3.4) + activejob (= 6.0.3.4) + activerecord (= 6.0.3.4) marcel (~> 0.3.1) - activesupport (6.0.3) + activesupport (6.0.3.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) zeitwerk (~> 2.2, >= 2.2.2) - ast (2.4.0) + ast (2.4.1) aws-eventstream (1.1.0) - aws-partitions (1.308.0) - aws-sdk-core (3.94.0) + aws-partitions (1.383.0) + aws-sdk-core (3.109.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.30.0) - aws-sdk-core (~> 3, >= 3.71.0) + aws-sdk-kms (1.39.0) + aws-sdk-core (~> 3, >= 3.109.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.63.0) - aws-sdk-core (~> 3, >= 3.83.0) + aws-sdk-s3 (1.83.1) + aws-sdk-core (~> 3, >= 3.109.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) - aws-sigv4 (1.1.3) - aws-eventstream (~> 1.0, >= 1.0.2) + aws-sigv4 (1.2.2) + aws-eventstream (~> 1, >= 1.0.2) babel-source (5.8.35) babel-transpiler (0.7.0) babel-source (>= 4.0, < 6) execjs (~> 2.0) backport (1.1.2) - bcrypt (3.1.13) + bcrypt (3.1.16) benchmark (0.1.0) bindex (0.8.1) - bootsnap (1.4.6) + bootsnap (1.4.8) msgpack (~> 1.0) builder (3.2.4) byebug (11.1.3) case_transform (0.2) activesupport - coderay (1.1.2) - concurrent-ruby (1.1.6) - connection_pool (2.2.2) + coderay (1.1.3) + concurrent-ruby (1.1.7) + connection_pool (2.2.3) crass (1.0.6) - devise (4.7.1) + devise (4.7.3) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - diff-lcs (1.3) + diff-lcs (1.4.4) e2mmap (0.1.0) erubi (1.9.0) execjs (2.7.0) - faker (2.11.0) + faker (2.14.0) i18n (>= 1.6, < 2) - faraday (1.0.1) + faraday (1.1.0) multipart-post (>= 1.2, < 3) - ffi (1.12.2) + ruby2_keywords + ffi (1.13.1) globalid (0.4.2) activesupport (>= 4.2.0) - haml (5.1.2) + haml (5.2.0) temple (>= 0.8.0) tilt hashie (4.1.0) - i18n (1.8.2) + i18n (1.8.5) concurrent-ruby (~> 1.0) jaro_winkler (1.5.4) - jbuilder (2.10.0) + jbuilder (2.10.1) activesupport (>= 5.0.0) jmespath (1.4.0) jquery-rails (4.4.0) @@ -134,24 +135,24 @@ GEM jquery-ui-rails (6.0.1) railties (>= 3.2.16) jsonapi-renderer (0.2.2) - jwt (2.2.1) - kaminari (1.2.0) + jwt (2.2.2) + kaminari (1.2.1) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.0) - kaminari-activerecord (= 1.2.0) - kaminari-core (= 1.2.0) - kaminari-actionview (1.2.0) + kaminari-actionview (= 1.2.1) + kaminari-activerecord (= 1.2.1) + kaminari-core (= 1.2.1) + kaminari-actionview (1.2.1) actionview - kaminari-core (= 1.2.0) - kaminari-activerecord (1.2.0) + kaminari-core (= 1.2.1) + kaminari-activerecord (1.2.1) activerecord - kaminari-core (= 1.2.0) - kaminari-core (1.2.0) + kaminari-core (= 1.2.1) + kaminari-core (1.2.1) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) - loofah (2.5.0) + loofah (2.7.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -163,14 +164,14 @@ GEM mimemagic (0.3.5) mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.14.0) + minitest (5.14.2) msgpack (1.3.3) - multi_json (1.14.1) + multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) nested_form (0.3.2) - nio4r (2.5.2) - nokogiri (1.10.9) + nio4r (2.5.4) + nokogiri (1.10.10) mini_portile2 (~> 2.4.0) oauth2 (1.4.4) faraday (>= 0.8, < 2.0) @@ -185,13 +186,13 @@ GEM jwt (>= 2.0) omniauth (>= 1.1.1) omniauth-oauth2 (>= 1.6) - omniauth-oauth2 (1.6.0) - oauth2 (~> 1.1) + omniauth-oauth2 (1.7.0) + oauth2 (~> 1.4) omniauth (~> 1.9) orm_adapter (0.5.0) - parallel (1.19.1) - parser (2.7.1.2) - ast (~> 2.4.0) + parallel (1.19.2) + parser (2.7.2.0) + ast (~> 2.4.1) pg (1.2.3) pry (0.13.1) coderay (~> 1.1) @@ -199,10 +200,10 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) - puma (3.12.4) + puma (3.12.6) pundit (2.1.0) activesupport (>= 3.0.0) - rack (2.2.2) + rack (2.2.3) rack-pjax (1.1.0) nokogiri (~> 1.5) rack (>= 1.1) @@ -210,20 +211,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.0.3) - actioncable (= 6.0.3) - actionmailbox (= 6.0.3) - actionmailer (= 6.0.3) - actionpack (= 6.0.3) - actiontext (= 6.0.3) - actionview (= 6.0.3) - activejob (= 6.0.3) - activemodel (= 6.0.3) - activerecord (= 6.0.3) - activestorage (= 6.0.3) - activesupport (= 6.0.3) + rails (6.0.3.4) + actioncable (= 6.0.3.4) + actionmailbox (= 6.0.3.4) + actionmailer (= 6.0.3.4) + actionpack (= 6.0.3.4) + actiontext (= 6.0.3.4) + actionview (= 6.0.3.4) + activejob (= 6.0.3.4) + activemodel (= 6.0.3.4) + activerecord (= 6.0.3.4) + activestorage (= 6.0.3.4) + activesupport (= 6.0.3.4) bundler (>= 1.3.0) - railties (= 6.0.3) + railties (= 6.0.3.4) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) @@ -242,9 +243,9 @@ GEM rails (>= 5.0, < 7) remotipart (~> 1.3) sassc-rails (>= 1.3, < 3) - railties (6.0.3) - actionpack (= 6.0.3) - activesupport (= 6.0.3) + railties (6.0.3.4) + actionpack (= 6.0.3.4) + activesupport (= 6.0.3.4) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) @@ -259,14 +260,15 @@ GEM execjs railties (>= 3.2) tilt + regexp_parser (1.8.2) remotipart (1.4.4) - responders (3.0.0) + responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) - reverse_markdown (1.4.0) + reverse_markdown (2.0.0) nokogiri rexml (3.2.4) - rspec-core (3.9.2) + rspec-core (3.9.3) rspec-support (~> 3.9.3) rspec-expectations (3.9.2) diff-lcs (>= 1.2.0, < 2.0) @@ -274,7 +276,7 @@ GEM rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-rails (4.0.0) + rspec-rails (4.0.1) actionpack (>= 4.2) activesupport (>= 4.2) railties (>= 4.2) @@ -283,14 +285,19 @@ GEM rspec-mocks (~> 3.9) rspec-support (~> 3.9) rspec-support (3.9.3) - rubocop (0.83.0) + rubocop (0.93.1) parallel (~> 1.10) - parser (>= 2.7.0.1) + parser (>= 2.7.1.5) rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8) rexml + rubocop-ast (>= 0.6.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) + rubocop-ast (0.8.0) + parser (>= 2.7.1.5) ruby-progressbar (1.10.1) + ruby2_keywords (0.0.2) ruby_dep (1.5.0) sass (3.7.4) sass-listen (~> 4.0.0) @@ -303,7 +310,7 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (2.3.0) + sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) @@ -311,9 +318,9 @@ GEM sprockets (> 3.0) sprockets-rails tilt - sentry-raven (3.0.0) + sentry-raven (3.1.1) faraday (>= 1.0) - solargraph (0.39.7) + solargraph (0.39.17) backport (~> 1.1) benchmark bundler (>= 1.17.2) @@ -322,19 +329,19 @@ GEM maruku (~> 0.7, >= 0.7.3) nokogiri (~> 1.9, >= 1.9.1) parser (~> 2.3) - reverse_markdown (~> 1.0, >= 1.0.5) + reverse_markdown (>= 1.0.5, < 3) rubocop (~> 0.52) thor (~> 1.0) tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) - spring (2.1.0) + spring (2.1.1) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) @@ -348,22 +355,22 @@ GEM tzinfo (1.2.7) thread_safe (~> 0.1) unicode-display_width (1.7.0) - warden (1.2.8) - rack (>= 2.0.6) - web-console (4.0.2) + warden (1.2.9) + rack (>= 2.0.9) + web-console (4.0.4) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webpacker (4.2.2) + webpacker (4.3.0) activesupport (>= 4.2) rack-proxy (>= 0.6.1) railties (>= 4.2) - websocket-driver (0.7.1) + websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.4) + websocket-extensions (0.1.5) yard (0.9.25) - zeitwerk (2.3.0) + zeitwerk (2.4.0) PLATFORMS ruby @@ -401,4 +408,4 @@ RUBY VERSION ruby 2.6.3p62 BUNDLED WITH - 2.0.2 + 2.1.4 diff --git a/app/javascript/components/ActionItemCard/index.js b/app/javascript/components/ActionItemCard/index.js index f1614e2d..6419a133 100644 --- a/app/javascript/components/ActionItemCard/index.js +++ b/app/javascript/components/ActionItemCard/index.js @@ -253,7 +253,7 @@ function ActionItemCard({ item container justify="flex-end" - style={{ 'padding-left': '16px', width: 'calc(100% - 100px)' }} + style={{ paddingLeft: '16px', width: 'calc(100% - 100px)' }} > {/* Make sure renderClose + participantShowPage are not both true, or else you get two edit buttons. */} {renderCompleteButton()} @@ -280,8 +280,8 @@ ActionItemCard.propTypes = { removeActionItem: PropTypes.func, addBorderBottom: PropTypes.bool, participantShowPage: PropTypes.bool, - initialCompletedStaff: PropTypes.bool.isRequired, - initialCompletedParticipant: PropTypes.bool.isRequired, + initialCompletedStaff: PropTypes.bool, + initialCompletedParticipant: PropTypes.bool, assignmentId: PropTypes.number, }; diff --git a/app/javascript/components/ActionItemCreationPage/index.js b/app/javascript/components/ActionItemCreationPage/index.js index 1e3ac33b..426bf01d 100644 --- a/app/javascript/components/ActionItemCreationPage/index.js +++ b/app/javascript/components/ActionItemCreationPage/index.js @@ -18,11 +18,17 @@ import { apiPost, apiDelete } from 'utils/axios'; import * as Sentry from '@sentry/browser'; import styles from './styles'; +const steps = { + CHOOSE_ASSIGNMENT: 0, + CHOOSE_PARTICIPANT: 1, + CONFIRM_SUBMIT: 2, +}; + class ActionItemCreationPage extends React.Component { constructor(props) { super(props); this.state = { - step: 0, + step: steps.CHOOSE_ASSIGNMENT, participants: this.props.participants, selectedParticipants: [], actionItemTitle: '', @@ -372,17 +378,23 @@ class ActionItemCreationPage extends React.Component { let leftComponentText; let rightComponentText; let headerText; + let forwardButtonEnabled; switch (stepSize) { - case 0: + case steps.CHOOSE_ASSIGNMENT: leftComponentText = 'Assignments'; rightComponentText = 'Add Assignments'; headerText = 'Add Assignments to List'; - leftComponent = ( + leftComponent = this.state.selectedActionItems.length ? ( + ) : ( + + Select or create from scratch at least one assignment to assign to + participants. + ); rightComponent = ( ); + forwardButtonEnabled = !!this.state.selectedActionItems.length; break; - case 1: + case steps.CHOOSE_PARTICIPANT: leftComponentText = 'Students'; rightComponentText = 'Add Students'; headerText = 'Add Students to Assignments'; - leftComponent = ( + leftComponent = this.state.selectedParticipants.length ? ( + ) : ( + + Select at least one individual from the right to attach your + assignments to. + ); rightComponent = ( ); + forwardButtonEnabled = !!this.state.selectedParticipants.length; break; - case 2: + case steps.CONFIRM_SUBMIT: leftComponentText = 'Review Students'; rightComponentText = this.state.submitErrored ? 'Failed Assignments' @@ -449,6 +468,7 @@ class ActionItemCreationPage extends React.Component { handleOpenModal={this.handleOpenModal} /> ); + forwardButtonEnabled = true; break; default: leftComponent = null; @@ -456,6 +476,7 @@ class ActionItemCreationPage extends React.Component { leftComponentText = null; rightComponentText = null; headerText = null; + forwardButtonEnabled = false; } return { leftComponent, @@ -463,14 +484,16 @@ class ActionItemCreationPage extends React.Component { leftComponentText, rightComponentText, headerText, + forwardButtonEnabled, }; } - getButtons(stepSize) { + getButtons(stepSize, forwardButtonEnabled) { const { classes } = this.props; - const forwardButtonText = stepSize === 2 ? 'ASSIGN' : 'SAVE & CONTINUE'; + const forwardButtonText = + stepSize === steps.CONFIRM_SUBMIT ? 'ASSIGN' : 'SAVE & CONTINUE'; const handleForwardButtonClick = - stepSize === 2 ? this.handleSubmit : this.nextStep; + stepSize === steps.CONFIRM_SUBMIT ? this.handleSubmit : this.nextStep; const backButton = ( @@ -489,13 +512,14 @@ class ActionItemCreationPage extends React.Component { ); const forwardButton = ( - + @@ -522,8 +546,12 @@ class ActionItemCreationPage extends React.Component { rightComponent, rightComponentText, headerText, + forwardButtonEnabled, } = this.getMainComponents(this.state.step); - const buttonsGrid = this.getButtonsGrid(this.state.step); + const buttonsGrid = this.getButtonsGrid( + this.state.step, + forwardButtonEnabled, + ); return (
@@ -603,7 +631,7 @@ class ActionItemCreationPage extends React.Component { item direction="row" alignItems="flex-start" - justifyContent="center" + justifycontent="center" className={classes.headerStyle} > diff --git a/app/javascript/components/ActionItemForm/index.js b/app/javascript/components/ActionItemForm/index.js index 9aba5658..51d36c64 100644 --- a/app/javascript/components/ActionItemForm/index.js +++ b/app/javascript/components/ActionItemForm/index.js @@ -63,7 +63,7 @@ function ActionItemForm({ color: failedSubmit && !categorySelected ? 'red' : 'black', }} > - Choose Category + Choose Category {categoryList.slice(0, 4)} @@ -81,7 +81,7 @@ function ActionItemForm({ >
- Assignment Title + Assignment Title
- Assignment Description + Assignment Description
-
Due Date (Optional)
+ Due Date (Optional) diff --git a/app/javascript/components/ActionItemSearchParticipants/index.js b/app/javascript/components/ActionItemSearchParticipants/index.js index 81fbf66b..dc11432a 100644 --- a/app/javascript/components/ActionItemSearchParticipants/index.js +++ b/app/javascript/components/ActionItemSearchParticipants/index.js @@ -5,6 +5,7 @@ import { InputBase, Fab, Grid, + Typography, } from '@material-ui/core'; import { withStyles } from '@material-ui/core/styles'; import PropTypes from 'prop-types'; @@ -176,19 +177,18 @@ class ActionItemSearchParticipants extends React.Component { className={classes.boundaryBox} direction="column" alignItems="center" - justifyContent="space-evenly" + justifycontent="space-evenly" + justify="center" > {/* Filter By Category */} - FILTER BY CATEGORY - - {this.statusButtons()} - + FILTER BY CATEGORY + {this.statusButtons()} {/* Search for an individual */} - SEARCH FOR INDIVIDUAL + SEARCH FOR INDIVIDUAL {/* Select All Button */} - + - SEARCH BY CATEGORY + SEARCH BY CATEGORY {categoryList.slice(0, 4)} @@ -194,7 +195,7 @@ class AddFromExistingForm extends React.Component { -
SEARCH FOR ASSIGNMENT
+ SEARCH FOR ASSIGNMENT {headCell.sortable ? ( @@ -124,7 +123,7 @@ function EnhancedTable(props) { - {titleText} + {titleText} diff --git a/app/javascript/components/Main/index.js b/app/javascript/components/Main/index.js index 8691f17f..58c85bb5 100644 --- a/app/javascript/components/Main/index.js +++ b/app/javascript/components/Main/index.js @@ -61,10 +61,11 @@ function Main(props) { (window.location.href = '/admin')} + onClick={() => { + window.location.href = '/admin'; + }} >
Admin View
@@ -80,6 +81,7 @@ function Main(props) { case 'Assessments': return ; default: + return null; } }; @@ -126,6 +128,7 @@ function Main(props) { ); default: + return null; } }; @@ -151,7 +154,6 @@ function Main(props) { Sign Out {props.isAdmin ? renderAdminButton() : null} - {props.userType !== 'participant' - ? Object.entries({ + {props.userType !== 'participant' && + Object.entries({ Dashboard: '/', 'Bulk Assign': '/assignments', - Assessments: '/studio_assessments', - }).map(n => getButton(n[0], n[1])) - : null} + Assessments: '/studio_assessments', + }).map(n => getButton(n[0], n[1]))} ({ drawerPaper: { width: drawerWidth, backgroundColor: '#29313C', + overflow: 'hidden', }, // necessary for content to be below app bar content: { diff --git a/app/javascript/components/ParticipantCard/styles.js b/app/javascript/components/ParticipantCard/styles.js index 5aca0787..339bde80 100644 --- a/app/javascript/components/ParticipantCard/styles.js +++ b/app/javascript/components/ParticipantCard/styles.js @@ -34,7 +34,6 @@ const styles = theme => ({ case 'Studio': return theme.palette.common.studio; default: - console.error('Participant has no status'); return theme.palette.common.darkestBlue; } }, diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index 4076a32e..4dbc888f 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -147,7 +147,7 @@ ParticipantShowPage.propTypes = { personalQuestionnaire: PropTypes.object.isRequired, professionalQuestionnaire: PropTypes.object.isRequired, studioAssessments: PropTypes.array.isRequired, - resumeURL: PropTypes.string.isRequired, + resumeURL: PropTypes.string, categories: PropTypes.array.isRequired, assignmentList: PropTypes.array, }; diff --git a/app/javascript/components/StudioAssessmentForm/index.js b/app/javascript/components/StudioAssessmentForm/index.js index 7748e4da..7219cb19 100644 --- a/app/javascript/components/StudioAssessmentForm/index.js +++ b/app/javascript/components/StudioAssessmentForm/index.js @@ -88,7 +88,7 @@ export const StudioAssessmentForm = ({ }; StudioAssessmentForm.propTypes = { - studioAssessment: PropTypes.object.isRequired, + studioAssessment: PropTypes.object, participantId: PropTypes.number.isRequired, userType: PropTypes.oneOf(['staff', 'participant']).isRequired, onClose: PropTypes.func, diff --git a/app/javascript/components/ViewMoreModal/index.js b/app/javascript/components/ViewMoreModal/index.js index 064e07d0..b752eaa6 100644 --- a/app/javascript/components/ViewMoreModal/index.js +++ b/app/javascript/components/ViewMoreModal/index.js @@ -119,7 +119,7 @@ ViewMoreModal.propTypes = { classes: PropTypes.object.isRequired, description: PropTypes.string, title: PropTypes.string, - category: PropTypes.string.isRequired, + category: PropTypes.string, dueDate: PropTypes.string, open: PropTypes.bool.isRequired, isCaseNote: PropTypes.bool, diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 1322b3ed..e9da5921 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,5 +1,3 @@ - - <%- if devise_mapping.omniauthable? %> <%- resource_class.omniauth_providers.each do |provider| %>
@@ -8,5 +6,32 @@ <% end %> <% end %> +<%# Show user/pass login if in development environment so we can use test users %> +<%- if Rails.env.development? %> + +

Dev environment log in

+
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> +
+ <%= f.label :email %>
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %> +
+ +
+ <%= f.label :password %>
+ <%= f.password_field :password, autocomplete: "current-password" %> +
+ <% if devise_mapping.rememberable? %> +
+ <%= f.check_box :remember_me %> + <%= f.label :remember_me %> +
+ <% end %> +
+ <%= f.submit "Log in" %> +
+ <% end %> +
+<% end %> \ No newline at end of file diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index f1b9ccaa..6329142b 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -Cu8bv6DTSY+mZ8KJPw6tqNeW9MRvc6fl+Wy6xNRemztwGCire8mu2sP58iP5PMoann47afI8Yxs8H+HvAD4wczCQwZ28ipy8PywrJWhqsWaKhA5iz4PgJUniKHAM0Xcrbfei2F2pUqDpipEmSjtNirXDjeQIMMQO8mUDhylWxk0D51s/V0Ia421t9v11kFBayeqQJh4/80cdur0f9RYctet1a3UPJrwsjVP4CkmYUlP+E2xddEY4JRI0hX4d/w9XqgO/vIFZeGH4W7pGRVyR6mB0cugJOWj2IyJldW82wYtRpbgN+Fs+PagHojOS1UoKu9e7qW8B8GJ5LjW7V3xQ1A/9zzMwRApwT2QrCbyGUW9uD4GO9pL0hKPwQcMPC4/eZ2Ye4Nr/EmvFEfczhyKpsMnkYH9tiSO8iPXzJI22stZaiBRUbaeuoL8M1DeRKxlr6rR81t95uRC6bMBXqoG25S3k3OAGET6XGSOJzkWOT61LVd/TqZamIPMlRVABzlkzHaSPJb6HmAgaSsK0nfnoWVwtLvagwiaA6hKTeFHQFj0uESd50Qt19P09WnN0daLUsA==--kXdPerAvKX9BNqcO--oBpfONbfQTSKGMIe526QIw== \ No newline at end of file +wAPvYLoQ4I0Stta+1ndMCaixAECubpqZCpWXcf62evlD9hnSM9H2f6YfcG46Y0XGK3neXOvVqT92H2zBwJdD6MbL6NCANuXiq/IG5BSdlAakpqbi396mrHH6bHjMg3FDAneFCyjtd1U0QKqRNwZQVSdfMR3581bXElQpAyBAVxdaHD4KOwdPorZnt3y7VhMFhpDp7shJltQuoNcVUSbgVLk20CzLvXloF2cI87n4uWtuhIhROmk5LHu/C7LazoiSyBcyoYKWWmEobcuKFVlyIQp+9EGRkxW7eivvn8HVjZkbJiND45U6DWLT4wZw5aqBrkCc4viAnRBz5vzfNKl+OvlIv5BiXFMOJZLFSpORIky8BgEPAtWL52NLE+Iyg4QM1YKVXRR2tIhISGdVDcbEOSoHXflyBaRXANQfUg4BZ1//HFTkeoQhFikkgW4f7wEU5W21VBc7pd2s6+mhbl2FrT5GR8A44Qc6AuoOfoTDtptVv8HAImgJmk7X6oQqu3aQJ+u9JnOKC814fhxEyg3ER6/M9m6gGtpZWPY+BLgzFh02knAKHRPFQpiz0G36FpRJJmw=--movjFc6h8FNhHEai--YHq4omfIAC6NXqvhqRimdA== \ No newline at end of file diff --git a/config/initializers/rails_admin.rb b/config/initializers/rails_admin.rb index 48045546..15cef2f1 100644 --- a/config/initializers/rails_admin.rb +++ b/config/initializers/rails_admin.rb @@ -29,9 +29,7 @@ config.actions do dashboard # mandatory - index do - except ['Participant', 'Staff'] - end + index new export bulk_delete diff --git a/package.json b/package.json index 2be1eaa4..211e8308 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "axios": "^0.19.0", "babel-eslint": "^10.0.3", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", - "dotenv": "^8.2.0", "date-fns": "^2.12.0", + "dotenv": "^8.2.0", "draft-js": "^0.11.2", "draft-js-plugins-editor": "^3.0.0", "draftail": "^1.3.0",