From ecc1d7fe9ca8cb97797733d9fe3185177ce044fa Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Thu, 16 Apr 2020 12:22:14 -0700 Subject: [PATCH 01/58] Changing the components around --- .../components/ActionItemCard/index.js | 108 ++++++++++++++ .../components/ActionItemCard/styles.js | 36 +++++ .../components/ParticipantShowPage/dummy.js | 140 ++++++++++++++++++ .../components/ParticipantShowPage/index.js | 53 ++++++- 4 files changed, 332 insertions(+), 5 deletions(-) create mode 100644 app/javascript/components/ActionItemCard/index.js create mode 100644 app/javascript/components/ActionItemCard/styles.js create mode 100644 app/javascript/components/ParticipantShowPage/dummy.js diff --git a/app/javascript/components/ActionItemCard/index.js b/app/javascript/components/ActionItemCard/index.js new file mode 100644 index 00000000..51585388 --- /dev/null +++ b/app/javascript/components/ActionItemCard/index.js @@ -0,0 +1,108 @@ +import React from 'react'; +import { withStyles, ThemeProvider } from '@material-ui/core/styles'; +import IconButton from '@material-ui/core/IconButton'; +import AddIcon from '@material-ui/icons/Add'; +import Grid from '@material-ui/core/Grid'; +import Typography from '@material-ui/core/Typography'; +import PropTypes from 'prop-types'; +import Fab from '@material-ui/core/Fab'; +import Button from '@material-ui/core/Button'; +import theme from 'utils/theme'; +import styles from './styles'; + +function ActionItemCard({ + classes, + title, + description, + dueDate, + category, + // Used by style file + // eslint-disable-next-line no-unused-vars + lastEntry = false, + selectCardFunc, +}) { + const renderSelectIcon = () => ( + + + + ); + + return ( + + + + + {title} + + + + + {category.toUpperCase()} + + + + + + + + {description} + + + {selectCardFunc ? renderSelectIcon() : null} + + + + {dueDate ? ( + Due date: {dueDate} + ) : null} + + + + + + + + + + + + + ); +} + +ActionItemCard.propTypes = { + classes: PropTypes.object.isRequired, + title: PropTypes.string.isRequired, + description: PropTypes.string.isRequired, + category: PropTypes.string.isRequired, + dueDate: PropTypes.string, + selectCardFunc: PropTypes.func, + lastEntry: PropTypes.bool, +}; +export default withStyles(styles)(ActionItemCard); diff --git a/app/javascript/components/ActionItemCard/styles.js b/app/javascript/components/ActionItemCard/styles.js new file mode 100644 index 00000000..852bca3f --- /dev/null +++ b/app/javascript/components/ActionItemCard/styles.js @@ -0,0 +1,36 @@ +const styles = theme => ({ + iconStyle: { + backgroundColor: theme.palette.common.lighterBlue, + margin: '0px 10px', + boxShadow: 'None', + }, + categoryButtonStyle: { + fontSize: '10px', + width: '60px', + textAlign: 'center', + paddingLeft: '8px', + paddingRight: '8px', + }, + cardStyle: { + width: '95%', + height: '140px', + padding: '0px', + margin: '0px 15px', + boxShadow: '0px 0px 0px 0px', + borderBottom: ({ lastEntry }) => + lastEntry ? '0px' : `.75px solid ${theme.palette.common.lightGrey}`, + }, + descriptionStyle: { + textOverflow: 'ellipsis', + fontSize: '14px', + overflow: 'hidden', + lineHeight: '1.5em', + height: '4.5em', + margin: '0px', + marginBottom: '15px', + }, + buttonStyle: { + color: theme.palette.common.r0, + }, +}); +export default styles; diff --git a/app/javascript/components/ParticipantShowPage/dummy.js b/app/javascript/components/ParticipantShowPage/dummy.js new file mode 100644 index 00000000..cdbb7df9 --- /dev/null +++ b/app/javascript/components/ParticipantShowPage/dummy.js @@ -0,0 +1,140 @@ +/** + * + * ParticipantShowPage + * + */ + +import React from 'react'; +import PropTypes from 'prop-types'; +import { ThemeProvider, withStyles } from '@material-ui/core/styles'; +import QuestionnaireModal from 'components/QuestionnaireModal'; +import PaperworkList from 'components/PaperworkList'; +import CaseNoteContainer from 'components/CaseNoteContainer'; +import theme from 'utils/theme'; +import Navbar from 'components/Navbar'; +import { Grid, Typography, Avatar } from '@material-ui/core'; +import styles from './styles'; + +class Dummy extends React.Component { + onFormFieldChange = model => (field, value) => { + this.setState(prevState => ({ + [model]: { + ...prevState[model], + [field]: value, + }, + })); + }; + + formatDate = dateString => { + const dateObj = new Date(dateString); + const year = dateObj.getFullYear(); + const month = dateObj.getMonth() + 1; + const dt = dateObj.getDate(); + return `${month.toString()}/${dt.toString()}/${year.toString()}`; + }; + + render() { + const { + classes, + paperworks, + caseNotes, + participant, + fullName, + status, + participantId, + personalQuestionnaire, + professionalQuestionnaire, + userType, + isAdmin, + } = this.props; + + return ( + + + + + + + + {fullName} + + + + {status.toUpperCase()} + + + + + + + + + + + + + {/* These are paperwork lists */} + + + + + + {/* These are case notes */} + + + + + ); + } +} + +Dummy.propTypes = { + userType: PropTypes.string.isRequired, + isAdmin: PropTypes.bool.isRequired, + classes: PropTypes.object.isRequired, + paperworks: PropTypes.array.isRequired, + caseNotes: PropTypes.array.isRequired, + participant: PropTypes.object.isRequired, + fullName: PropTypes.string.isRequired, + status: PropTypes.string.isRequired, + participantId: PropTypes.number.isRequired, + personalQuestionnaire: PropTypes.object.isRequired, + professionalQuestionnaire: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(Dummy); diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index 4b6abaf3..b93993c7 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -13,6 +13,7 @@ import CaseNoteContainer from 'components/CaseNoteContainer'; import theme from 'utils/theme'; import Navbar from 'components/Navbar'; import { Grid, Typography, Avatar } from '@material-ui/core'; +import ActionItemCard from 'components/ActionItemCard'; import styles from './styles'; class ParticipantShowPage extends React.Component { @@ -99,6 +100,15 @@ class ParticipantShowPage extends React.Component { + {/* These are caseNotes */} + + + + {/* These are paperwork lists */} - + + {/* These are assignment lists */} + + { + console.log(e); + }} + lastEntry + /> + + + {/* These are studio assessments lists */} + + @@ -121,6 +154,16 @@ class ParticipantShowPage extends React.Component { } } +// ActionItemCard.propTypes = { +// classes: PropTypes.object.isRequired, +// title: PropTypes.string.isRequired, +// description: PropTypes.string.isRequired, +// category: PropTypes.string.isRequired, +// dueDate: PropTypes.string, +// selectCardFunc: PropTypes.func, +// lastEntry: PropTypes.bool, +// }; + ParticipantShowPage.propTypes = { userType: PropTypes.string.isRequired, isAdmin: PropTypes.bool.isRequired, From 26fa800d0a66f737816124f855a5d3a93225108c Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Thu, 16 Apr 2020 12:44:27 -0700 Subject: [PATCH 02/58] Adding CJ's ActionItemForm modal to CaseNoteContainer --- .../components/ActionItemForm/index.js | 395 ++++++++++++++++++ .../components/ActionItemForm/styles.js | 0 .../components/CaseNoteContainer/index.js | 2 + 3 files changed, 397 insertions(+) create mode 100644 app/javascript/components/ActionItemForm/index.js create mode 100644 app/javascript/components/ActionItemForm/styles.js diff --git a/app/javascript/components/ActionItemForm/index.js b/app/javascript/components/ActionItemForm/index.js new file mode 100644 index 00000000..4cd7b3ae --- /dev/null +++ b/app/javascript/components/ActionItemForm/index.js @@ -0,0 +1,395 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import validator from 'validator'; +import MUIRichTextEditor from 'mui-rte'; +import { makeStyles } from '@material-ui/core/styles'; +import { apiPost, apiPatch } from 'utils/axios'; +import { + Button, + TextField, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + MenuItem, + Switch, + Grid, + Paper +} from '@material-ui/core'; +import { createMuiTheme, MuiThemeProvider} from '@material-ui/core/styles' +import { EditorState, convertToRaw } from 'draft-js'; + + +const styles = { + buttonStyle: { + marginLeft: 'auto', + marginRight: '0', + }, + actionItemDescStyle: { + marginLeft: '20px', + paddingTop: '20px', + }, + dialogActionsStyle: { + padding: '30px', + }, + dialogStyle: { + padding: '20px', + }, + dialogContentTextStyle: { + color: 'black', + marginBottom: '2px', + }, + dialogContentTextFieldStyle: { + marginTop: '2px', + borderStyle: 'solid 4px grey', + }, + MUIRichTextEditorStyle: { + border: '5px solid', + padding: '10px', + }, + modalItems: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + width: '750px', + height: '100%', + margin: 'auto', + backgroundColor: 'white', + padding: '50px' + }, + actionItemDescriptionStyle: { + height: '380px', + overflow: 'auto', + }, + backgroundColor: { + backgroundColor: '#28303B', + padding: '50px', + }, + titleStyle: { + color: 'white', + fontSize: '36px', + marginBottom: '0', + marginTop: '0', + }, + }; + + + const theme = createMuiTheme(); + Object.assign(theme, { + overrides: { + MUIRichTextEditor: { + root: { + borderLeft: 'solid 1px #C4C4C4', + borderRight: 'solid 1px #C4C4C4', + borderBottom: 'solid 1px #C4C4C4', + borderRadius: '4px', + overflow: 'auto', + }, + editorContainer: { + padding: '20px', + overflow: 'auto', + height: '130px', + }, + toolbar: { + backgroundColor: '#F4F4F4', + }, + }, + }, + }); + +// const textStyles = makeStyles(theme => ({ +// root: { +// '& > *': { +// margin: theme.spacing(1), +// width: '25ch', +// }, +// }, +// })); + + +// const classes = textStyles(); +// return ( +//
+// +// +// ); + + + +class ActionItemForm extends React.Component { + constructor(props) { + super(props); + this.state = { + description: this.props.description, + participant_id: this.props.participant_id, + internal: this.props.internal, + type: this.props.type, + id: this.props.id, + title: this.props.title, + default: false, + completed: false, + open: false, + editorState: EditorState.createEmpty(), + errors: { + title: '', + }, + display: this.props.display + }; + this.onChange = editorState => this.setState({ editorState }); + this.handleClose = this.handleClose.bind(this); + this.handleOpen = this.handleOpen.bind(this); + this.handleInternalChange = this.handleInternalChange.bind(this); + this.handleChange = this.handleChange.bind(this); + this.handleDescriptionChange = this.handleDescriptionChange.bind(this); + this.handleSubmit = this.handleSubmit.bind(this); + + } + handleOpen() { + this.setState({open: true}); + } + handleClose() { + this.setState({ + open: false, + internal: this.props.internal, + title: this.props.title + }); + //handleInternalChange = + if(this.state.type == 'edit') { + this.state.internal = this.props.internal, + this.state.title = this.props.title, + this.state.description = this.props.description + } + } + checkErrors = field => () => { + let errorMessage = ''; + if (field === 'title') { + const { title } = this.state; + if ( + title === '' || + validator.isEmpty(title, { ignore_whitespace: true }) + ) { + errorMessage = 'Title is required'; + } + } + this.setState(prevState => ({ + errors: { ...prevState.errors, [field]: errorMessage }, + })); + }; + + handleChange = name => event => { + const { value } = event.target; + this.setState({ [name]: value }); + }; + + handleInternalChange = name => event => { + this.setState( + { [name]: event.target.checked } + ); + }; + + handleDescriptionChange = name => state => { + const value = JSON.stringify(convertToRaw(state.getCurrentContent())); + this.setState({ [name]: value }); + }; + + handleSubmit() { + const { type } = this.state; + + let hasErrors = false; + Object.keys(this.state.errors).forEach(field => { + this.checkErrors(field)(); + hasErrors = hasErrors || this.state.errors[field] !== ''; + }); + + if (!hasErrors) { + if (type === 'create') { + const body = { + title: this.state.title, + description: this.state.description, + internal: this.state.internal, + participant_id: this.state.participant_id, + }; + + apiPost('/api/case_notes', { case_note: body }) + .then(() => window.location.reload()) + .catch(error => console.error(error)); + } else { + + const newTitle = this.state.title; + const newDescription = this.state.tempDescription; + const newInternal = this.state.internal; + + this.setState({ + title: newTitle, + description: newDescription, + internal: newInternal, + }); + + const body = { + title: this.state.title, + description: this.state.description, + internal: this.state.internal, + participant_id: this.state.participant_id + }; + apiPatch(`/api/case_note/${this.state.id}/`, {case_note: body}).then(() => window.location.reload()) + .catch(error => console.error(error)); + } + } +} +button = () => { + let ret; + if (this.state.display == 'plus') { + ret = ( + + ); + } else if (this.state.type === 'create') { + ret = ( + + ); + } else if (this.state.type === 'edit') { + ret = Edit; + } + return ret; +}; + + + + render(){ + let description; + if(this.state.type = 'create') { + description = 'description'; + } + else if (this.state.type == 'edit') { + description = 'newDescription' + } + let dialog; + if(this.state.type == 'create' || this.state.type == 'edit') { + dialog = ( + + + + Title + + + +
+ + + + Description + + + + + +
+ + + Visible to Participant + + + + + + + + + +
+ ); + } + return( + <> + {this.button()} + {dialog} + + ); + } +} + ActionItemForm.propTypes= { + type: PropTypes.oneOf(['create', 'edit']), + title: PropTypes.string, + description: PropTypes.string, + internal: PropTypes.bool, + open: PropTypes.bool, + }; + ActionItemForm.defaultProps = { + title: '', + default: false, + completed: false, + open: false, + itnernal: true, + type: 'create', + description: '', + }; + +export default ActionItemForm; \ No newline at end of file diff --git a/app/javascript/components/ActionItemForm/styles.js b/app/javascript/components/ActionItemForm/styles.js new file mode 100644 index 00000000..e69de29b diff --git a/app/javascript/components/CaseNoteContainer/index.js b/app/javascript/components/CaseNoteContainer/index.js index bfa707b4..71c6ae76 100644 --- a/app/javascript/components/CaseNoteContainer/index.js +++ b/app/javascript/components/CaseNoteContainer/index.js @@ -8,6 +8,7 @@ import CaseNoteForm from 'components/CaseNoteForm'; import CaseNoteCard from 'components/CaseNoteCard'; import PropTypes from 'prop-types'; import styles from './styles'; +import ActionItemForm from 'components/ActionItemForm'; class CaseNoteContainer extends React.Component { constructor(props) { @@ -122,6 +123,7 @@ class CaseNoteContainer extends React.Component { marginBottom: '25px', }} > +

Casenotes

From 5aa01fb33d9e9bbaa4f696054c5ad170b14c783a Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Thu, 16 Apr 2020 12:45:02 -0700 Subject: [PATCH 03/58] Adding forms again --- .../components/ActionItemForm/index.js | 464 +++++++++--------- .../components/CaseNoteContainer/index.js | 4 +- 2 files changed, 232 insertions(+), 236 deletions(-) diff --git a/app/javascript/components/ActionItemForm/index.js b/app/javascript/components/ActionItemForm/index.js index 4cd7b3ae..138f9379 100644 --- a/app/javascript/components/ActionItemForm/index.js +++ b/app/javascript/components/ActionItemForm/index.js @@ -2,102 +2,104 @@ import React from 'react'; import PropTypes from 'prop-types'; import validator from 'validator'; import MUIRichTextEditor from 'mui-rte'; -import { makeStyles } from '@material-ui/core/styles'; +import { + makeStyles, + createMuiTheme, + MuiThemeProvider, +} from '@material-ui/core/styles'; import { apiPost, apiPatch } from 'utils/axios'; import { - Button, - TextField, - Dialog, - DialogActions, - DialogContent, - DialogContentText, - MenuItem, - Switch, - Grid, - Paper + Button, + TextField, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + MenuItem, + Switch, + Grid, + Paper, } from '@material-ui/core'; -import { createMuiTheme, MuiThemeProvider} from '@material-ui/core/styles' -import { EditorState, convertToRaw } from 'draft-js'; +import { EditorState, convertToRaw } from 'draft-js'; const styles = { - buttonStyle: { - marginLeft: 'auto', - marginRight: '0', - }, - actionItemDescStyle: { - marginLeft: '20px', - paddingTop: '20px', - }, - dialogActionsStyle: { - padding: '30px', - }, - dialogStyle: { - padding: '20px', - }, - dialogContentTextStyle: { - color: 'black', - marginBottom: '2px', - }, - dialogContentTextFieldStyle: { - marginTop: '2px', - borderStyle: 'solid 4px grey', - }, - MUIRichTextEditorStyle: { - border: '5px solid', - padding: '10px', - }, - modalItems: { - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - width: '750px', - height: '100%', - margin: 'auto', - backgroundColor: 'white', - padding: '50px' - }, - actionItemDescriptionStyle: { - height: '380px', + buttonStyle: { + marginLeft: 'auto', + marginRight: '0', + }, + actionItemDescStyle: { + marginLeft: '20px', + paddingTop: '20px', + }, + dialogActionsStyle: { + padding: '30px', + }, + dialogStyle: { + padding: '20px', + }, + dialogContentTextStyle: { + color: 'black', + marginBottom: '2px', + }, + dialogContentTextFieldStyle: { + marginTop: '2px', + borderStyle: 'solid 4px grey', + }, + MUIRichTextEditorStyle: { + border: '5px solid', + padding: '10px', + }, + modalItems: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + width: '750px', + height: '100%', + margin: 'auto', + backgroundColor: 'white', + padding: '50px', + }, + actionItemDescriptionStyle: { + height: '380px', overflow: 'auto', - }, - backgroundColor: { - backgroundColor: '#28303B', - padding: '50px', - }, - titleStyle: { - color: 'white', - fontSize: '36px', - marginBottom: '0', - marginTop: '0', - }, - }; - + }, + backgroundColor: { + backgroundColor: '#28303B', + padding: '50px', + }, + titleStyle: { + color: 'white', + fontSize: '36px', + marginBottom: '0', + marginTop: '0', + }, +}; - const theme = createMuiTheme(); - Object.assign(theme, { - overrides: { - MUIRichTextEditor: { - root: { - borderLeft: 'solid 1px #C4C4C4', - borderRight: 'solid 1px #C4C4C4', - borderBottom: 'solid 1px #C4C4C4', - borderRadius: '4px', - overflow: 'auto', - }, - editorContainer: { - padding: '20px', - overflow: 'auto', - height: '130px', - }, - toolbar: { - backgroundColor: '#F4F4F4', - }, - }, +const theme = createMuiTheme(); +Object.assign(theme, { + overrides: { + MUIRichTextEditor: { + root: { + borderLeft: 'solid 1px #C4C4C4', + borderRight: 'solid 1px #C4C4C4', + borderBottom: 'solid 1px #C4C4C4', + borderRadius: '4px', + overflow: 'auto', }, - }); + editorContainer: { + padding: '20px', + overflow: 'auto', + height: '130px', + }, + toolbar: { + backgroundColor: '#F4F4F4', + }, + }, + }, +}); -// const textStyles = makeStyles(theme => ({ +// const textStyles = makeStyles(theme => ({ // root: { // '& > *': { // margin: theme.spacing(1), @@ -106,7 +108,6 @@ const styles = { // }, // })); - // const classes = textStyles(); // return ( //
@@ -114,52 +115,52 @@ const styles = { //
// ); - - class ActionItemForm extends React.Component { - constructor(props) { - super(props); - this.state = { - description: this.props.description, - participant_id: this.props.participant_id, - internal: this.props.internal, - type: this.props.type, - id: this.props.id, - title: this.props.title, - default: false, - completed: false, - open: false, - editorState: EditorState.createEmpty(), - errors: { - title: '', - }, - display: this.props.display - }; - this.onChange = editorState => this.setState({ editorState }); - this.handleClose = this.handleClose.bind(this); - this.handleOpen = this.handleOpen.bind(this); - this.handleInternalChange = this.handleInternalChange.bind(this); - this.handleChange = this.handleChange.bind(this); - this.handleDescriptionChange = this.handleDescriptionChange.bind(this); - this.handleSubmit = this.handleSubmit.bind(this); + constructor(props) { + super(props); + this.state = { + description: this.props.description, + participant_id: this.props.participant_id, + internal: this.props.internal, + type: this.props.type, + id: this.props.id, + title: this.props.title, + default: false, + completed: false, + open: false, + editorState: EditorState.createEmpty(), + errors: { + title: '', + }, + display: this.props.display, + }; + this.onChange = editorState => this.setState({ editorState }); + this.handleClose = this.handleClose.bind(this); + this.handleOpen = this.handleOpen.bind(this); + this.handleInternalChange = this.handleInternalChange.bind(this); + this.handleChange = this.handleChange.bind(this); + this.handleDescriptionChange = this.handleDescriptionChange.bind(this); + this.handleSubmit = this.handleSubmit.bind(this); + } - } - handleOpen() { - this.setState({open: true}); - } - handleClose() { - this.setState({ - open: false, - internal: this.props.internal, - title: this.props.title - }); - //handleInternalChange = - if(this.state.type == 'edit') { - this.state.internal = this.props.internal, - this.state.title = this.props.title, - this.state.description = this.props.description + handleOpen() { + this.setState({ open: true }); + } + + handleClose() { + this.setState({ + open: false, + internal: this.props.internal, + title: this.props.title, + }); + // handleInternalChange = + if (this.state.type == 'edit') { + (this.state.internal = this.props.internal), + (this.state.title = this.props.title), + (this.state.description = this.props.description); } } + checkErrors = field => () => { let errorMessage = ''; if (field === 'title') { @@ -182,9 +183,7 @@ class ActionItemForm extends React.Component { }; handleInternalChange = name => event => { - this.setState( - { [name]: event.target.checked } - ); + this.setState({ [name]: event.target.checked }); }; handleDescriptionChange = name => state => { @@ -214,7 +213,6 @@ class ActionItemForm extends React.Component { .then(() => window.location.reload()) .catch(error => console.error(error)); } else { - const newTitle = this.state.title; const newDescription = this.state.tempDescription; const newInternal = this.state.internal; @@ -225,67 +223,65 @@ class ActionItemForm extends React.Component { internal: newInternal, }); - const body = { - title: this.state.title, - description: this.state.description, - internal: this.state.internal, - participant_id: this.state.participant_id - }; - apiPatch(`/api/case_note/${this.state.id}/`, {case_note: body}).then(() => window.location.reload()) - .catch(error => console.error(error)); + const body = { + title: this.state.title, + description: this.state.description, + internal: this.state.internal, + participant_id: this.state.participant_id, + }; + apiPatch(`/api/case_note/${this.state.id}/`, { case_note: body }) + .then(() => window.location.reload()) + .catch(error => console.error(error)); + } } } -} -button = () => { - let ret; - if (this.state.display == 'plus') { - ret = ( - - ); - } else if (this.state.type === 'create') { - ret = ( - - ); - } else if (this.state.type === 'edit') { - ret = Edit; - } - return ret; -}; - + button = () => { + let ret; + if (this.state.display == 'plus') { + ret = ( + + ); + } else if (this.state.type === 'create') { + ret = ( + + ); + } else if (this.state.type === 'edit') { + ret = Edit; + } + return ret; + }; - render(){ - let description; - if(this.state.type = 'create') { - description = 'description'; - } - else if (this.state.type == 'edit') { - description = 'newDescription' - } - let dialog; - if(this.state.type == 'create' || this.state.type == 'edit') { - dialog = ( - + > - - Title - - Title + { fullWidth error={this.state.errors.title !== ''} helperText={this.state.errors.title} - /> - -
+ /> + +
- + Description @@ -330,7 +326,7 @@ button = () => { /> -
+
Visible to Participant @@ -345,51 +341,51 @@ button = () => { - - - - + - -
- ); - } - return( - <> - {this.button()} - {dialog} - + + + + ); + } + return ( + <> + {this.button()} + {dialog} + ); } } - ActionItemForm.propTypes= { - type: PropTypes.oneOf(['create', 'edit']), - title: PropTypes.string, - description: PropTypes.string, - internal: PropTypes.bool, - open: PropTypes.bool, - }; - ActionItemForm.defaultProps = { - title: '', - default: false, - completed: false, - open: false, - itnernal: true, - type: 'create', - description: '', - }; - -export default ActionItemForm; \ No newline at end of file +ActionItemForm.propTypes = { + type: PropTypes.oneOf(['create', 'edit']), + title: PropTypes.string, + description: PropTypes.string, + internal: PropTypes.bool, + open: PropTypes.bool, +}; +ActionItemForm.defaultProps = { + title: '', + default: false, + completed: false, + open: false, + itnernal: true, + type: 'create', + description: '', +}; + +export default ActionItemForm; diff --git a/app/javascript/components/CaseNoteContainer/index.js b/app/javascript/components/CaseNoteContainer/index.js index 71c6ae76..e6411d9e 100644 --- a/app/javascript/components/CaseNoteContainer/index.js +++ b/app/javascript/components/CaseNoteContainer/index.js @@ -7,8 +7,8 @@ import Grid from '@material-ui/core/Grid'; import CaseNoteForm from 'components/CaseNoteForm'; import CaseNoteCard from 'components/CaseNoteCard'; import PropTypes from 'prop-types'; -import styles from './styles'; import ActionItemForm from 'components/ActionItemForm'; +import styles from './styles'; class CaseNoteContainer extends React.Component { constructor(props) { @@ -123,7 +123,7 @@ class CaseNoteContainer extends React.Component { marginBottom: '25px', }} > - +

Casenotes

From 6160d552d37ba2babddbdcc06f8ca1aad1819fef Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Thu, 16 Apr 2020 16:32:39 -0700 Subject: [PATCH 04/58] Tinkering with Joelene's PR --- .../components/ParticipantShowPage/index.js | 2 +- .../components/StudioAssessmentForm/index.js | 6 ++-- .../components/StudioAssessmentList/index.js | 1 + .../StudioAssessmentQuestion/radioButtons.js | 21 +++++++------ .../StudioAssessmentQuestionView/index.js | 31 ++++++++++++++----- app/views/participants/dashboard.html.erb | 2 +- config/credentials.yml.enc | 2 +- db/schema.rb | 1 + yarn.lock | 31 ------------------- 9 files changed, 43 insertions(+), 54 deletions(-) diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index 60821f78..94882b49 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -109,7 +109,7 @@ class ParticipantShowPage extends React.Component { userType={userType} /> - {type !== 'view' ? + {type !== 'view' ? ( - : + ) : ( - } + )} ); }; diff --git a/app/javascript/components/StudioAssessmentList/index.js b/app/javascript/components/StudioAssessmentList/index.js index 948c7cb8..289eddc8 100644 --- a/app/javascript/components/StudioAssessmentList/index.js +++ b/app/javascript/components/StudioAssessmentList/index.js @@ -60,6 +60,7 @@ function StudioAssessmentList({ diff --git a/app/javascript/components/StudioAssessmentQuestion/radioButtons.js b/app/javascript/components/StudioAssessmentQuestion/radioButtons.js index 18e82b49..8a46b59b 100644 --- a/app/javascript/components/StudioAssessmentQuestion/radioButtons.js +++ b/app/javascript/components/StudioAssessmentQuestion/radioButtons.js @@ -5,21 +5,22 @@ import FormControlLabel from '@material-ui/core/FormControlLabel'; import FormControl from '@material-ui/core/FormControl'; import FormLabel from '@material-ui/core/FormLabel'; -export default function RadioButtonsGroup({ - rubricItems, questionType, score, radioHandler +export default function RadioButtonsGroup({ + rubricItems, + questionType, + score, + radioHandler, }) { - const [value, setValue] = React.useState( - `${questionType}_score${score}` - ); + const [value, setValue] = React.useState(`${questionType}_score${score}`); const rubricList = rubricItems; const handleChange = event => { - console.log(`${questionType}_score${score}`) - console.log("radio") - console.log(event.target.value) - radioHandler(event.target.value.slice(-1)) + console.log(`${questionType}_score${score}`); + console.log('radio'); + console.log(event.target.value); + radioHandler(event.target.value.slice(-1)); setValue(event.target.value); - console.log(event.target.value) + console.log(event.target.value); }; return ( diff --git a/app/javascript/components/StudioAssessmentQuestionView/index.js b/app/javascript/components/StudioAssessmentQuestionView/index.js index 46118ab1..7d51e3f7 100644 --- a/app/javascript/components/StudioAssessmentQuestionView/index.js +++ b/app/javascript/components/StudioAssessmentQuestionView/index.js @@ -130,23 +130,40 @@ class QuestionView extends React.Component {

- {this.state.studioAssessment[`${this.props.questionType}_score`] !== null ? + {this.state.studioAssessment[`${this.props.questionType}_score`] !== null ? (
-

Score: {this.state.studioAssessment[`${this.props.questionType}_score`].toString()}

-

{rubricItems[this.state.studioAssessment[`${this.props.questionType}_score`]]}

+

+ Score:{' '} + {this.state.studioAssessment[ + `${this.props.questionType}_score` + ].toString()} +

+

+ { + rubricItems[ + this.state.studioAssessment[ + `${this.props.questionType}_score` + ] + ] + } +

- : + ) : (

Score:

No score entered yet

- } + )}

Comments

- {this.state.studioAssessment[`${this.props.questionType}_comment`] !== null - ? this.state.studioAssessment[`${this.props.questionType}_comment`] + {this.state.studioAssessment[ + `${this.props.questionType}_comment` + ] !== null + ? this.state.studioAssessment[ + `${this.props.questionType}_comment` + ] : 'No comment yet'}

diff --git a/app/views/participants/dashboard.html.erb b/app/views/participants/dashboard.html.erb index e56310e5..a06360ed 100644 --- a/app/views/participants/dashboard.html.erb +++ b/app/views/participants/dashboard.html.erb @@ -9,5 +9,5 @@ case_notes: @case_notes.all, personal_questionnaire: @personal_questionnaire, professional_questionnaire: @professional_questionnaire, - studio_assessment: @studio_assessments.all + studio_assessments: @studio_assessments.all }) %> \ No newline at end of file diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index f0a48f4c..81628e8a 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -6Ju91e7ig4WNIOp8T6LCgUsKb1l5jrVadjJluxF/ExRIv8MNcsR1oaZuc6GGJAhEcJ8ll3U+q//rfWVsr+/PkKZby2HDdU//JnBgT6r1pR5GmBq0GAgoaUdQVgOn9sIuXw+SRPUIOAKANDIukUrRNLYy2T6pHztKItK2NdVGlmiQN3FdMOmoUon7GfTSz8Ft3jPhlM43h8F7xO0leCDMkRuPf9B8Tano9RYdJeXE+7+MD3N1fjR71zdcBErc2BhQXfj+ACbn7Y8HdOqFRCta58kQYiiTzaBkicNrias94nhjrn/WEj+Fwnu+V+OFYRz+7YVkL4fgtXULg92Sowiftm0SyiPtMSkcVEJS3FPEabyPGUmr4rpuhWi5BLI+vjJackJEXJe4WQmCkz6RC84NcuVfjVk6nXRKCsYKed1uBTosfPtfW9I0YSGZjasFFbRSHbHVmoLnqDyXya3QZMBHiMnPExi74ZImaxckiHcwZt4ynMdyqaYM8F5qQ83dzoVoef7SXZBPyk2Wb9QPk54EdeDyl0/asoFefMBPSZcCbsz8+JoZfGFVORODtaY6xBHPYyg=--egL6aHEuSVKVzDjB--/Dm5giyRjtLboPMuTAZx6g== +wUqD2xvoN2rjUEi2qYEV27mrgQXSNDrTcIntBqNMx+fienGjy0Dw+qPvXrMEJ/U9qV49s8uaxLyGhCKmAaT6Hkhfthc03Fvcxwh6xbU+uiBaQHjvkaBpjqLk+wMHHXtFJi59BJqAINgz/E2Xnhp/ZV+g1GKSaRQXJ0D5HD+yCa47oVEVYaRmvHQQWYWIYR3Cnmhwp8E/uW7xRe4W8QfcgSMYmmBiU/IU2/QCA4DjESs+8ufn7Vhi5q1XDbEdS9IqK4FIQJSmHyP7A24JpFA4wiZ52mQLf4/CuJVZrA7zaJzdQLgnjZhz80hkH4Ic1pixlEOFiKNE4uG2fKvcW4GXBmZw1FM+8pfNmMMxusNiVCTrkA6yrVfarB+v2mXjXkgSMLqDk/1gVO9YEIewGs+l5Zgvkg3ECa2tiMDG--woX7Nosjm8F+3eQx--QoYYzZI+0UMjU693tNd4wg== \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 15903e29..37177619 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,6 +11,7 @@ # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 2020_04_13_091115) do + # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/yarn.lock b/yarn.lock index 67dbef1a..d6d07fb6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -900,17 +900,6 @@ dependencies: "@babel/runtime" "^7.4.4" -"@material-ui/lab@^4.0.0-alpha.49": - version "4.0.0-alpha.49" - resolved "https://registry.yarnpkg.com/@material-ui/lab/-/lab-4.0.0-alpha.49.tgz#da2bd29ecad3620924f078c0bab8f4483e821475" - integrity sha512-Shx+wktDCj7YDlNSkgMeFhijTyqWT0CGn7wDBMck36kZlh3GQhNwaj1y5p219sCYJY44SPgnrDaCxBStlzj8KQ== - dependencies: - "@babel/runtime" "^7.4.4" - "@material-ui/utils" "^4.9.6" - clsx "^1.0.4" - prop-types "^15.7.2" - react-is "^16.8.0" - "@material-ui/styles@^4.6.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.6.0.tgz#15679fab6dcbe0cc2416f01a22966f3ea26607c5" @@ -954,15 +943,6 @@ prop-types "^15.7.2" react-is "^16.8.6" -"@material-ui/utils@^4.9.6": - version "4.9.6" - resolved "https://registry.yarnpkg.com/@material-ui/utils/-/utils-4.9.6.tgz#5f1f9f6e4df9c8b6a263293b68c94834248ff157" - integrity sha512-gqlBn0JPPTUZeAktn1rgMcy9Iczrr74ecx31tyZLVGdBGGzsxzM6PP6zeS7FuoLS6vG4hoZP7hWnOoHtkR0Kvw== - dependencies: - "@babel/runtime" "^7.4.4" - prop-types "^15.7.2" - react-is "^16.8.0" - "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -1097,7 +1077,6 @@ "@sentry/utils@5.15.4": version "5.15.4" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.15.4.tgz#02865ab3c9b745656cea0ab183767ec26c96f6e6" - dependencies: "@sentry/types" "5.15.4" tslib "^1.9.3" @@ -2357,11 +2336,6 @@ clsx@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.0.4.tgz#0c0171f6d5cb2fe83848463c15fcc26b4df8c2ec" -clsx@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.0.tgz#62937c6adfea771247c34b54d320fb99624f5702" - integrity sha512-3avwM37fSK5oP6M5rQ9CNe99lwxhXDOeSWVPAOYF6OazUTgZCMb0yWlJpmdD74REy1gkEaFiub2ULv4fq9GUhA== - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -8048,11 +8022,6 @@ react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: version "16.11.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.11.0.tgz#b85dfecd48ad1ce469ff558a882ca8e8313928fa" -react-is@^16.8.0: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - react-side-effect@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.2.0.tgz#0e940c78faba0c73b9b0eba9cd3dda8dfb7e7dae" From cc6c115a12c3d0d028ea5c50f10d92755214c572 Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Thu, 16 Apr 2020 20:54:39 -0700 Subject: [PATCH 05/58] Messing with back-end queries --- app/controllers/pages_controller.rb | 2 + app/controllers/participants_controller.rb | 2 + .../components/AssignmentList/index.js | 111 ++++++++++++++++++ .../components/AssignmentList/styles.js | 46 ++++++++ .../components/CaseNoteContainer/index.js | 1 - .../components/ParticipantShowPage/index.js | 19 ++- .../components/StudioAssessmentList/index.js | 109 +++++++++++++++++ .../components/StudioAssessmentList/styles.js | 46 ++++++++ app/models/participant.rb | 2 + app/views/participants/dashboard.html.erb | 6 +- app/views/participants/show.html.erb | 6 +- db/seeds.rb | 31 ++++- 12 files changed, 373 insertions(+), 8 deletions(-) create mode 100644 app/javascript/components/AssignmentList/index.js create mode 100644 app/javascript/components/AssignmentList/styles.js create mode 100644 app/javascript/components/StudioAssessmentList/index.js create mode 100644 app/javascript/components/StudioAssessmentList/styles.js diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 4edcdb4d..f1892d1b 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -27,6 +27,8 @@ def dashboard @participant = @user.participant @paperworks = @user.participant.paperworks @case_notes = @user.participant.case_notes.where(visible: true) + @assignments = Assignment.where('assigned_to_id': @participant.id) + @studio_assessments = @user.participant.studio_assessments if @participant.personal_questionnaire.nil? @personal_questionnaire = PersonalQuestionnaire.create("participant_id": @participant.id) diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index 4dcb86bc..3321ccc8 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -3,6 +3,8 @@ def show @participant = authorize Participant.find(params[:id]) @paperworks = @participant.paperworks @case_notes = @participant.case_notes + @assignments = @participant.assignments + @studio_assessments = @participant.studio_assessments if @participant.personal_questionnaire.nil? personal_q = PersonalQuestionnaire.create("participant_id": @participant.id) diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js new file mode 100644 index 00000000..6ae05f07 --- /dev/null +++ b/app/javascript/components/AssignmentList/index.js @@ -0,0 +1,111 @@ +/** + * + * AssignmentsList + * + */ + +import React, { useState } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { Grid, Paper, List } from '@material-ui/core'; +import PaperworkEntry from 'components/PaperworkEntry'; +import PaperworkForm from 'components/PaperworkForm'; +import ActionItemForm from 'components/ActionItemForm'; +import { + Fab, + Typography, +} from '@material-ui/core'; + +import styles from './styles'; + +function AssignmentsList({ + classes, + initialPaperworks, + participantId, + userType, + formatDate, +}) { + const [paperworks, setPaperworks] = useState(initialPaperworks); + + const updatePaperwork = updatedPaperwork => { + const allPaperworks = [...paperworks]; + const paperworkIndex = allPaperworks.findIndex( + paperwork => paperwork.id === updatedPaperwork.id, + ); + if (paperworkIndex !== -1) { + allPaperworks[paperworkIndex] = updatedPaperwork; + setPaperworks(allPaperworks); + } + }; + +// Switch these out with different assignment entries + const paperworkEntries = paperworks.map((paperwork, i) => ( + + )); + + return ( + + + +

Assignments

+
+ + {/* Switch logic for rendering the button properly */} + {userType !== 'staff' ? ( + + ) : ( +
+ )} + + + + {/* Change these to handle rendering assignments instead */} + + {/* + {assignments.length !== 0 ? ( + assignmentEntries + ) : ( +
+ no Case Notes +
+

No assignments yet

+ {userType === 'staff' ? ( +

Click on ASSIGN ASSIGNMENT + to assign one.

+ ) : ( +
+ )} +
+
+ )} + */} + + ); +} + +AssignmentsList.propTypes = { + userType: PropTypes.string.isRequired, + classes: PropTypes.object.isRequired, + initialPaperworks: PropTypes.array.isRequired, + participantId: PropTypes.number.isRequired, + formatDate: PropTypes.func.isRequired, +}; + +export default withStyles(styles)(AssignmentsList); diff --git a/app/javascript/components/AssignmentList/styles.js b/app/javascript/components/AssignmentList/styles.js new file mode 100644 index 00000000..ad5ab137 --- /dev/null +++ b/app/javascript/components/AssignmentList/styles.js @@ -0,0 +1,46 @@ +/* + * PaperworkList Styles + * + * This contains all the styles for the PaperworkList component. + */ + +const styles = theme => ({ + containerStyle: { + padding: '18px 28px', + borderRadius: 10, + marginLeft: 0, + marginRight: 0, + }, + componentTitle: { + paddingBottom: 16, + borderBottom: `5px solid ${theme.palette.primary.main}`, + }, + headerStyle: { + marginTop: '0px', + marginBottom: '0px', + fontSize: '24px', + }, + listStyle: { + paddingTop: 0, + maxHeight: '600px', + height: '53vh', + overflow: 'auto', + overflowX: 'hidden', + overflowY: 'auto', + paddingRight: '10px', + }, + noPaperworksImg: { + width: '50%', + height: '50%', + display: 'block', + marginTop: '10%', + marginLeft: 'auto', + marginRight: 'auto', + }, + noPaperworksTxt: { + textAlign: 'center', + }, + }); + + export default styles; + \ No newline at end of file diff --git a/app/javascript/components/CaseNoteContainer/index.js b/app/javascript/components/CaseNoteContainer/index.js index e6411d9e..123252e6 100644 --- a/app/javascript/components/CaseNoteContainer/index.js +++ b/app/javascript/components/CaseNoteContainer/index.js @@ -123,7 +123,6 @@ class CaseNoteContainer extends React.Component { marginBottom: '25px', }} > -

Casenotes

diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index b93993c7..708bcd4c 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -9,6 +9,8 @@ import PropTypes from 'prop-types'; import { ThemeProvider, withStyles } from '@material-ui/core/styles'; import QuestionnaireModal from 'components/QuestionnaireModal'; import PaperworkList from 'components/PaperworkList'; +import AssignmentList from 'components/AssignmentList'; +import StudioAssessmentList from 'components/StudioAssessmentList'; import CaseNoteContainer from 'components/CaseNoteContainer'; import theme from 'utils/theme'; import Navbar from 'components/Navbar'; @@ -47,8 +49,14 @@ class ParticipantShowPage extends React.Component { professionalQuestionnaire, userType, isAdmin, + assignments, + studioAssessments, } = this.props; + console.log("case notes", caseNotes); + console.log("assignments", assignments); + console.log("participantId", participantId); + return ( {/* These are assignment lists */} - {/* These are studio assessments lists */} - { + const allPaperworks = [...paperworks]; + const paperworkIndex = allPaperworks.findIndex( + paperwork => paperwork.id === updatedPaperwork.id, + ); + if (paperworkIndex !== -1) { + allPaperworks[paperworkIndex] = updatedPaperwork; + setPaperworks(allPaperworks); + } + }; + +// Switch these out with different assignment entries + const paperworkEntries = paperworks.map((paperwork, i) => ( + + )); + + return ( + + +

Studio Assessments

+
+ + {/* Switch logic for rendering the button properly */} + {userType !== 'staff' ? ( + + ) : ( +
+ )} + + + + // {/* Change these to handle rendering assignments instead */} + + // {/* + // {assignments.length !== 0 ? ( + // assignmentEntries + // ) : ( + //
+ // no Case Notes + //
+ //

No assignments yet

+ // {userType === 'staff' ? ( + //

Click on ASSIGN ASSIGNMENT + to assign one.

+ // ) : ( + //
+ // )} + //
+ //
+ // )} + // */} + ); +} + +StudioAssignmentList.propTypes = { + userType: PropTypes.string.isRequired, + classes: PropTypes.object.isRequired, + initialPaperworks: PropTypes.array.isRequired, + participantId: PropTypes.number.isRequired, + formatDate: PropTypes.func.isRequired, +}; + +export default withStyles(styles)(StudioAssignmentList); diff --git a/app/javascript/components/StudioAssessmentList/styles.js b/app/javascript/components/StudioAssessmentList/styles.js new file mode 100644 index 00000000..ad5ab137 --- /dev/null +++ b/app/javascript/components/StudioAssessmentList/styles.js @@ -0,0 +1,46 @@ +/* + * PaperworkList Styles + * + * This contains all the styles for the PaperworkList component. + */ + +const styles = theme => ({ + containerStyle: { + padding: '18px 28px', + borderRadius: 10, + marginLeft: 0, + marginRight: 0, + }, + componentTitle: { + paddingBottom: 16, + borderBottom: `5px solid ${theme.palette.primary.main}`, + }, + headerStyle: { + marginTop: '0px', + marginBottom: '0px', + fontSize: '24px', + }, + listStyle: { + paddingTop: 0, + maxHeight: '600px', + height: '53vh', + overflow: 'auto', + overflowX: 'hidden', + overflowY: 'auto', + paddingRight: '10px', + }, + noPaperworksImg: { + width: '50%', + height: '50%', + display: 'block', + marginTop: '10%', + marginLeft: 'auto', + marginRight: 'auto', + }, + noPaperworksTxt: { + textAlign: 'center', + }, + }); + + export default styles; + \ No newline at end of file diff --git a/app/models/participant.rb b/app/models/participant.rb index d5651865..b08cc1a6 100644 --- a/app/models/participant.rb +++ b/app/models/participant.rb @@ -2,6 +2,8 @@ class Participant < ApplicationRecord belongs_to :user, dependent: :destroy has_many :case_notes has_many :paperworks + has_many :assignments + has_many :studio_assessments has_one :personal_questionnaire has_one :professional_questionnaire diff --git a/app/views/participants/dashboard.html.erb b/app/views/participants/dashboard.html.erb index 52852e52..88b6bc8b 100644 --- a/app/views/participants/dashboard.html.erb +++ b/app/views/participants/dashboard.html.erb @@ -8,5 +8,9 @@ paperworks: @paperworks.all, case_notes: @case_notes.all, personal_questionnaire: @personal_questionnaire, - professional_questionnaire: @professional_questionnaire + professional_questionnaire: @professional_questionnaire, + # just pass the assignments forward. Look at paperworks, case_notes + # just pass the studio assessments forward. + assignments: @assignments.all, + studio_assessments: @studio_assessments.all, }) %> \ No newline at end of file diff --git a/app/views/participants/show.html.erb b/app/views/participants/show.html.erb index 6820cb17..416c7c89 100644 --- a/app/views/participants/show.html.erb +++ b/app/views/participants/show.html.erb @@ -8,5 +8,9 @@ paperworks: @paperworks.all, case_notes: @case_notes.all, personal_questionnaire: @personal_questionnaire, - professional_questionnaire: @professional_questionnaire + professional_questionnaire: @professional_questionnaire, + # just pass the assignments forward. Look at paperworks, case_notes + # just pass the studio assessments forward. + assignments: @assignments.all, + studio_assessments: @studio_assessments.all, }) %> diff --git a/db/seeds.rb b/db/seeds.rb index 17e022ba..dacb3d98 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -7,7 +7,7 @@ NUM_PROF_QUESTIONNAIRE = 25 NUM_TEMPLATE_ACTION_ITEMS = 10 NUM_ACTION_ITEMS = 25 - +NUM_STUDIO_ASSESSMENTS = 25 STAFF_START_ID = Staff.count + 1 STAFF_END_ID = STAFF_START_ID + NUM_STAFF - 1 PARTICIPANT_START_ID = Participant.count + 1 @@ -144,6 +144,34 @@ def create_google_accounts end end +def create_studio_assesments + 1.upto(NUM_STUDIO_ASSESSMENTS) do |i| + StudioAssessment.create!( + bigpicture_score: Faker::Number.between(from: 0, to: 3), + bigpicture_comment: Faker::Cannabis.buzzword, + progfundamentals_score: Faker::Number.between(from: 0, to: 3), + progfundamentals_comment: Faker::Cannabis.buzzword, + versioncontrol_score: Faker::Number.between(from: 0, to: 3), + versioncontrol_comment: Faker::Cannabis.buzzword, + react_score: Faker::Number.between(from: 0, to: 3), + react_comment: Faker::Cannabis.buzzword, + node_score: Faker::Number.between(from: 0, to: 3), + node_comment: Faker::Cannabis.buzzword, + db_score: Faker::Number.between(from: 0, to: 3), + db_comment: Faker::Cannabis.buzzword, + problemsolving_score: Faker::Number.between(from: 0, to: 3), + problemsolving_comment:Faker::Cannabis.buzzword, + problemsolvingalt_score: Faker::Number.between(from: 0, to: 3), + problemsolvingalt_comment:Faker::Cannabis.buzzword, + capstone_passed: Faker::Boolean.boolean, + capstone_comment:Faker::Cannabis.buzzword, + assessment_type: Faker::Hacker.say_something_smart, + staff_id: Faker::Number.between(from: STAFF_START_ID, to: STAFF_END_ID), + participant_id: Faker::Number.between(from: PARTICIPANT_START_ID, to: PARTICIPANT_END_ID) + ) + end + puts "Created #{NUM_STUDIO_ASSESSMENTS} Studio Assessments" +end create_staff create_participants @@ -154,3 +182,4 @@ def create_google_accounts create_questionnaires create_template_action_items create_assignments +create_studio_assesments \ No newline at end of file From 26ed93ba1cec245d752a1b90460eca527065ba0f Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Fri, 17 Apr 2020 17:33:07 -0700 Subject: [PATCH 06/58] Making styling changes + pre-merge before CJ's --- app/controllers/pages_controller.rb | 2 +- app/controllers/participants_controller.rb | 1 - .../components/CaseNoteCard/styles.js | 2 +- .../components/CaseNoteContainer/index.js | 5 +- .../components/ParticipantShowPage/index.js | 24 +-- .../components/StudioAssessmentList/index.js | 179 ++++++++++-------- .../components/StudioAssessmentList/styles.js | 23 ++- .../components/StudioAssessmentModal/index.js | 3 +- app/models/participant.rb | 2 - 9 files changed, 127 insertions(+), 114 deletions(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 57034e7c..3cab5b8b 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -26,7 +26,7 @@ def dashboard @user = current_user @participant = @user.participant @paperworks = @user.participant.paperworks - @case_notes = @user.participant.case_notes.where(visible: true) + @case_notes = @user.participant.case_notes#.where(visible: true), changing for testing purposes @assignments = Assignment.where('assigned_to_id': @participant.id) @studio_assessments = @user.participant.studio_assessments diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index 56309b20..aad6e2dc 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -13,7 +13,6 @@ def show end @personal_questionnaire = PersonalQuestionnaireSerializer.new(personal_q) - if @participant.professional_questionnaire.nil? professional_q = ProfessionalQuestionnaire.create("participant_id": @participant.id) else diff --git a/app/javascript/components/CaseNoteCard/styles.js b/app/javascript/components/CaseNoteCard/styles.js index f71b0e69..37c058b3 100644 --- a/app/javascript/components/CaseNoteCard/styles.js +++ b/app/javascript/components/CaseNoteCard/styles.js @@ -10,7 +10,7 @@ export const styles = () => ({ marginBottom: '10px', }, caseNoteCardStyle: { - marginLeft: '20px', + // marginLeft: '20px', padding: '20px', boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.15)', borderRadius: '10px', diff --git a/app/javascript/components/CaseNoteContainer/index.js b/app/javascript/components/CaseNoteContainer/index.js index 123252e6..c8b66733 100644 --- a/app/javascript/components/CaseNoteContainer/index.js +++ b/app/javascript/components/CaseNoteContainer/index.js @@ -9,6 +9,7 @@ import CaseNoteCard from 'components/CaseNoteCard'; import PropTypes from 'prop-types'; import ActionItemForm from 'components/ActionItemForm'; import styles from './styles'; +import theme from '../../utils/theme'; class CaseNoteContainer extends React.Component { constructor(props) { @@ -108,7 +109,7 @@ class CaseNoteContainer extends React.Component { return ( <> - + diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index e14b7a06..9115084e 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -51,13 +51,14 @@ class ParticipantShowPage extends React.Component { userType, isAdmin, assignments, - studioAssessments, } = this.props; console.log("case notes", caseNotes); + console.log("paperworks", paperworks); console.log("assignments", assignments); console.log("participantId", participantId); - + console.log("studio assessments", studioAssessments[0]); + return ( - - {/* */} @@ -161,10 +151,10 @@ class ParticipantShowPage extends React.Component { {/* These are studio assessments lists */} @@ -196,13 +186,9 @@ ParticipantShowPage.propTypes = { participantId: PropTypes.number.isRequired, personalQuestionnaire: PropTypes.object.isRequired, professionalQuestionnaire: PropTypes.object.isRequired, -<<<<<<< HEAD // Need the following for the assignments and studioAssessments assignments: PropTypes.array.isRequired, studioAssessments: PropTypes.array.isRequired, -======= - studioAssessments: PropTypes.object.isRequired, ->>>>>>> joelene/studio-assessment-form }; export default withStyles(styles)(ParticipantShowPage); diff --git a/app/javascript/components/StudioAssessmentList/index.js b/app/javascript/components/StudioAssessmentList/index.js index 58d004ad..500f5907 100644 --- a/app/javascript/components/StudioAssessmentList/index.js +++ b/app/javascript/components/StudioAssessmentList/index.js @@ -7,104 +7,127 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; -import { Grid, Paper, List } from '@material-ui/core'; -import StudioAssessmentModal from 'components/StudioAssessmentModal'; -import PaperworkEntry from 'components/PaperworkEntry'; -import PaperworkForm from 'components/PaperworkForm'; -import ActionItemForm from 'components/ActionItemForm'; -import { - Fab, - Typography, +import { + Grid, + Paper, + List, + Container } from '@material-ui/core'; - +import StudioAssessmentModal from 'components/StudioAssessmentModal'; import styles from './styles'; -function StudioAssignmentList({ +function StudioAssessmentList({ classes, - initialPaperworks, + formatDate, + initialStudioAssessments, participantId, userType, - formatDate, }) { - const [paperworks, setPaperworks] = useState(initialPaperworks); + const [studioAssessments] = useState(initialStudioAssessments); + // const updateStudioAssessment = updatedAssessments => { + // const allAssessments = [...studioAssessments]; + // const assessmentIndex = allAssessments.findIndex( + // assessment => assessment.id === updatedAssessments.id, + // ); + // if (assessmentIndex !== -1) { + // allAssessments[assessmentIndex] = updatedAssessments; + // setPaperworks(allAssessments); + // } + // }; + console.log("studioAssessments", studioAssessments); + console.log("formatDate", formatDate); + console.log("initialStudioAssessments", initialStudioAssessments); + console.log("participantId", participantId); + console.log("userType", userType); - const updatePaperwork = updatedPaperwork => { - const allPaperworks = [...paperworks]; - const paperworkIndex = allPaperworks.findIndex( - paperwork => paperwork.id === updatedPaperwork.id, - ); - if (paperworkIndex !== -1) { - allPaperworks[paperworkIndex] = updatedPaperwork; - setPaperworks(allPaperworks); - } - }; + // let createdDate = studioAssessments['created_at']; -// Switch these out with different assignment entries - const paperworkEntries = paperworks.map((paperwork, i) => ( - + const studioAssessmentEntries = studioAssessments.map(studioAssessment => ( +
+ {/* Only admins can edit the different studioAssessments */} + {userType === 'admin' ? ( + + ) : ( +
+ )} + + +
+

+ {formatDate(studioAssessment['created_at'])} +

+ {/* Everyone should be able to view */} + +
+
+
+
)); return ( - - -

Studio Assessments

+ + // This should render similarly to Paperwork notes + + // 1. Title Bar (without surrounding box, maybe like CaseNotes?) + // 2. Render new assessment button if the current user is a 'staff' + // 3. List out all the cards, but only let staff modify the modal. Participants + // can only view (similar to how questionaires look for participants) + +
+ + +

Studio Assessments

+
+ + {/* Only admins can see the create button */} + {userType === 'admin' ? ( + + ) : ( +
+ )} + - - {/* Switch logic for rendering the button properly */} - {userType !== 'staff' ? ( - + {/* Listing out the different studioAssessments */} + + {studioAssessments.length !== 0 ? ( + studioAssessmentEntries ) : ( -
+
+

no studio assessments assigned

+
)} - - - - // {/* Change these to handle rendering assignments instead */} - - // {/* - // {assignments.length !== 0 ? ( - // assignmentEntries - // ) : ( - //
- // no Case Notes - //
- //

No assignments yet

- // {userType === 'staff' ? ( - //

Click on ASSIGN ASSIGNMENT + to assign one.

- // ) : ( - //
- // )} - //
- //
- // )} - // */} + +
); } -StudioAssignmentList.propTypes = { +StudioAssessmentList.propTypes = { userType: PropTypes.string.isRequired, classes: PropTypes.object.isRequired, - initialPaperworks: PropTypes.array.isRequired, + formatDate: PropTypes.func, + initialStudioAssessments: PropTypes.array.isRequired, participantId: PropTypes.number.isRequired, - formatDate: PropTypes.func.isRequired, }; -export default withStyles(styles)(StudioAssignmentList); +export default withStyles(styles)(StudioAssessmentList); \ No newline at end of file diff --git a/app/javascript/components/StudioAssessmentList/styles.js b/app/javascript/components/StudioAssessmentList/styles.js index 61653ee3..5b2c01d0 100644 --- a/app/javascript/components/StudioAssessmentList/styles.js +++ b/app/javascript/components/StudioAssessmentList/styles.js @@ -20,15 +20,22 @@ const styles = theme => ({ marginBottom: '0px', fontSize: '24px', }, - listStyle: { - paddingTop: 0, - maxHeight: '600px', - height: '53vh', - overflow: 'auto', - overflowX: 'hidden', - overflowY: 'auto', - paddingRight: '10px', + paddingBox: { + marginLeft: '20px', + padding: '10px', + display: 'flex', + boxShadow: '5px', + justifyContent: 'space-between', }, + // listStyle: { + // paddingTop: 0, + // maxHeight: '600px', + // height: '53vh', + // overflow: 'auto', + // overflowX: 'hidden', + // overflowY: 'auto', + // paddingRight: '10px', + // }, noPaperworksImg: { width: '50%', height: '50%', diff --git a/app/javascript/components/StudioAssessmentModal/index.js b/app/javascript/components/StudioAssessmentModal/index.js index 4925f19b..901e9592 100644 --- a/app/javascript/components/StudioAssessmentModal/index.js +++ b/app/javascript/components/StudioAssessmentModal/index.js @@ -35,13 +35,12 @@ function StudioAssessmentModal({ return ( <> - Date: Sun, 19 Apr 2020 20:06:46 -0700 Subject: [PATCH 07/58] Deleting Action-i-tem --- .../components/ActionitemParticipant/index.js | 68 ------------------- .../ActionitemParticipant/styles.js | 26 ------- 2 files changed, 94 deletions(-) delete mode 100644 app/javascript/components/ActionitemParticipant/index.js delete mode 100644 app/javascript/components/ActionitemParticipant/styles.js diff --git a/app/javascript/components/ActionitemParticipant/index.js b/app/javascript/components/ActionitemParticipant/index.js deleted file mode 100644 index f0c0ef83..00000000 --- a/app/javascript/components/ActionitemParticipant/index.js +++ /dev/null @@ -1,68 +0,0 @@ -import React from 'react'; -import AddIcon from '@material-ui/icons/Add'; -import CheckCircleIcon from '@material-ui/icons/CheckCircle'; -import Divider from '@material-ui/core/Divider'; -import Box from '@material-ui/core/Box'; -import { withStyles } from '@material-ui/core/styles'; -import theme from 'utils/theme'; -import PropTypes from 'prop-types'; -import styles from './styles'; - -function ActionItemParticipant({ - classes, - checked, - participant, - changeChecked, -}) { - let button; - - if (checked != null) { - // Checked or search, unchecked for display - if (!checked) { - button = ; - } else { - button = ( - - ); - } - } - - return ( -
changeChecked(participant)} - onClick={() => changeChecked(participant)} - > -
-
- - {participant.name} -
- {button} -
- -
- ); -} - -ActionItemParticipant.propTypes = { - classes: PropTypes.object.isRequired, - checked: PropTypes.bool, - participant: PropTypes.object.isRequired, - changeChecked: PropTypes.func, -}; - -export default withStyles(styles)(ActionItemParticipant); diff --git a/app/javascript/components/ActionitemParticipant/styles.js b/app/javascript/components/ActionitemParticipant/styles.js deleted file mode 100644 index 26c2c9aa..00000000 --- a/app/javascript/components/ActionitemParticipant/styles.js +++ /dev/null @@ -1,26 +0,0 @@ -export const styles = () => ({ - participantSelect: { - position: 'absolute', - right: '0px', - horizontalAlign: 'right', - float: 'right', - }, - - participant: { - marginTop: '12px', - height: '30px', - display: 'flex', - alignItems: 'center', - justifyContent: 'space-between', - width: '100%', - }, - - participantBar: { - width: '0.4rem', - height: '36px', - marginRight: '7%', - borderRadius: '16px', - }, -}); - -export default styles; From 403ff7b7f564184b4bca1a419a2032897cbd291d Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Sun, 26 Apr 2020 20:38:42 -0700 Subject: [PATCH 08/58] Finalizing component locations on participant view --- app/controllers/pages_controller.rb | 3 +- app/controllers/participants_controller.rb | 1 + .../ActionItemParticipant/index 2.js | 68 +++++++++++ .../ActionItemParticipant/styles 2.js | 26 +++++ .../components/AssignmentList/index.js | 61 ++++------ .../components/ParticipantShowPage/index.js | 106 ++++++------------ .../components/ParticipantShowPage/styles.js | 4 +- .../components/StudioAssessmentForm/index.js | 1 + .../components/StudioAssessmentList/index.js | 25 +++-- .../StudioAssessmentQuestionView/index.js | 7 +- .../StudioAssessmentQuestionView/styles.js | 51 +++++++++ 11 files changed, 225 insertions(+), 128 deletions(-) create mode 100644 app/javascript/components/ActionItemParticipant/index 2.js create mode 100644 app/javascript/components/ActionItemParticipant/styles 2.js create mode 100644 app/javascript/components/StudioAssessmentQuestionView/styles.js diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index db1f33e5..3850f930 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -25,7 +25,8 @@ def dashboard @participant = @user.participant @paperworks = @user.participant.paperworks @case_notes = @user.participant.case_notes#.where(visible: true), changing for testing purposes - @assignments = Assignment.where('assigned_to_id': @participant.id) + @assignments = Assignment.where('assigned_to_id': @user.id) + @action_items = ActionItem.where(id: @assignments[0].action_item_id) @studio_assessments = @user.participant.studio_assessments if @participant.personal_questionnaire.nil? diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index 5fd9f38d..0526cfcf 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -7,6 +7,7 @@ def show @case_notes = @participant.case_notes @assignments = @participant.assignments @studio_assessments = @participant.studio_assessments + @action_items = @participant.action_items if @participant.personal_questionnaire.nil? personal_q = PersonalQuestionnaire.create("participant_id": @participant.id) diff --git a/app/javascript/components/ActionItemParticipant/index 2.js b/app/javascript/components/ActionItemParticipant/index 2.js new file mode 100644 index 00000000..494567b1 --- /dev/null +++ b/app/javascript/components/ActionItemParticipant/index 2.js @@ -0,0 +1,68 @@ +import React from 'react'; +import AddIcon from '@material-ui/icons/Add'; +import CheckCircleIcon from '@material-ui/icons/CheckCircle'; +import Divider from '@material-ui/core/Divider'; +import Box from '@material-ui/core/Box'; +import { withStyles } from '@material-ui/core/styles'; +import theme from 'utils/theme'; +import PropTypes from 'prop-types'; +import styles from './styles'; + +function ActionItemParticipant({ + classes, + checked, + participant, + changeChecked, +}) { + let button; + + if (checked != null) { + // Checked or search, unchecked for display + if (!checked) { + button = ; + } else { + button = ( + + ); + } + } + + return ( +
changeChecked(participant)} + onClick={() => changeChecked(participant)} + > +
+
+ + {participant.name} +
+ {button} +
+ +
+ ); +} + +ActionItemParticipant.propTypes = { + classes: PropTypes.object.isRequired, + checked: PropTypes.bool, + participant: PropTypes.object.isRequired, + changeChecked: PropTypes.func, +}; + +export default withStyles(styles)(ActionItemParticipant); diff --git a/app/javascript/components/ActionItemParticipant/styles 2.js b/app/javascript/components/ActionItemParticipant/styles 2.js new file mode 100644 index 00000000..26c2c9aa --- /dev/null +++ b/app/javascript/components/ActionItemParticipant/styles 2.js @@ -0,0 +1,26 @@ +export const styles = () => ({ + participantSelect: { + position: 'absolute', + right: '0px', + horizontalAlign: 'right', + float: 'right', + }, + + participant: { + marginTop: '12px', + height: '30px', + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', + width: '100%', + }, + + participantBar: { + width: '0.4rem', + height: '36px', + marginRight: '7%', + borderRadius: '16px', + }, +}); + +export default styles; diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index 6ae05f07..dc5644ed 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -1,6 +1,6 @@ /** * - * AssignmentsList + * AssignmentList * */ @@ -8,46 +8,26 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import { Grid, Paper, List } from '@material-ui/core'; -import PaperworkEntry from 'components/PaperworkEntry'; -import PaperworkForm from 'components/PaperworkForm'; import ActionItemForm from 'components/ActionItemForm'; -import { - Fab, - Typography, -} from '@material-ui/core'; +import ActionItemCard from 'components/ActionItemCard'; import styles from './styles'; -function AssignmentsList({ +function AssignmentList({ classes, - initialPaperworks, - participantId, + initialAssignments, userType, formatDate, }) { - const [paperworks, setPaperworks] = useState(initialPaperworks); + const [assignments] = useState(initialAssignments); - const updatePaperwork = updatedPaperwork => { - const allPaperworks = [...paperworks]; - const paperworkIndex = allPaperworks.findIndex( - paperwork => paperwork.id === updatedPaperwork.id, - ); - if (paperworkIndex !== -1) { - allPaperworks[paperworkIndex] = updatedPaperwork; - setPaperworks(allPaperworks); - } - }; - -// Switch these out with different assignment entries - const paperworkEntries = paperworks.map((paperwork, i) => ( - ( + )); @@ -64,18 +44,19 @@ function AssignmentsList({

Assignments

- {/* Switch logic for rendering the button properly */} + {/* Set logic to !== for rendering the button properly */} {userType !== 'staff' ? ( + // Make this a button to pop-up the modal to add a new assignment ) : ( -
+
)} - + {/* Change these to handle rendering assignments instead */} - {/* + {assignments.length !== 0 ? ( assignmentEntries ) : ( @@ -95,17 +76,17 @@ function AssignmentsList({
)} -
*/} + ); } -AssignmentsList.propTypes = { +AssignmentList.propTypes = { userType: PropTypes.string.isRequired, classes: PropTypes.object.isRequired, - initialPaperworks: PropTypes.array.isRequired, + initialAssignments: PropTypes.array.isRequired, participantId: PropTypes.number.isRequired, formatDate: PropTypes.func.isRequired, }; -export default withStyles(styles)(AssignmentsList); +export default withStyles(styles)(AssignmentList); diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index a8a66564..d65507ec 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -7,13 +7,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; -import QuestionnaireModal from 'components/QuestionnaireModal'; import PaperworkList from 'components/PaperworkList'; import AssignmentList from 'components/AssignmentList'; import StudioAssessmentList from 'components/StudioAssessmentList'; import CaseNoteContainer from 'components/CaseNoteContainer'; import { Grid, Typography, Avatar } from '@material-ui/core'; -import ActionItemCard from 'components/ActionItemCard'; import styles from './styles'; class ParticipantShowPage extends React.Component { @@ -34,6 +32,19 @@ class ParticipantShowPage extends React.Component { return `${month.toString()}/${dt.toString()}/${year.toString()}`; }; + sampleActionItem = [ + { + id: 13, + title: 'panel', + description: + 'Try to synthesize the XSS panel, maybe it will input the open-source hard drive!', + is_template: false, + created_at: '2020-04-17 02:07:27', + updated_at: '2020-04-17 02:07:27', + category: 'Community', + }, + ]; + render() { const { classes, @@ -51,12 +62,13 @@ class ParticipantShowPage extends React.Component { assignments, } = this.props; - console.log("case notes", caseNotes); - console.log("paperworks", paperworks); - console.log("assignments", assignments); - console.log("participantId", participantId); - console.log("studio assessments", studioAssessments[0]); - + // console.log('case notes', caseNotes); + // console.log('paperworks', paperworks); + // console.log('assignments', assignments); + // console.log('participantId', participantId); + // console.log('studio assessments', studioAssessments[0]); + // console.log('sample action item', this.sampleActionItem); + return ( @@ -93,15 +105,6 @@ class ParticipantShowPage extends React.Component { userType={userType} /> - - {/* These are paperwork lists */} - - - - - - - - - {/* These are assignment lists */} - - { - console.log(e); - }} - lastEntry - /> - - - {/* These are studio assessments lists */} - - - - + {/* */} + {/* + */} + + + @@ -163,16 +139,6 @@ class ParticipantShowPage extends React.Component { } } -// ActionItemCard.propTypes = { -// classes: PropTypes.object.isRequired, -// title: PropTypes.string.isRequired, -// description: PropTypes.string.isRequired, -// category: PropTypes.string.isRequired, -// dueDate: PropTypes.string, -// selectCardFunc: PropTypes.func, -// lastEntry: PropTypes.bool, -// }; - ParticipantShowPage.propTypes = { userType: PropTypes.string.isRequired, classes: PropTypes.object.isRequired, diff --git a/app/javascript/components/ParticipantShowPage/styles.js b/app/javascript/components/ParticipantShowPage/styles.js index b9943422..0912517f 100644 --- a/app/javascript/components/ParticipantShowPage/styles.js +++ b/app/javascript/components/ParticipantShowPage/styles.js @@ -14,8 +14,8 @@ const styles = theme => ({ height: 'max(100%, 100vh)', }, rightHalf: { - paddingLeft: 28, - paddingRight: 28, + paddingLeft: 40, + // paddingRight: 28, paddingTop: 20, width: '50%', height: 'max(100%, 100vh)', diff --git a/app/javascript/components/StudioAssessmentForm/index.js b/app/javascript/components/StudioAssessmentForm/index.js index 519bb0d6..5446209b 100644 --- a/app/javascript/components/StudioAssessmentForm/index.js +++ b/app/javascript/components/StudioAssessmentForm/index.js @@ -5,6 +5,7 @@ import Stepper from '@material-ui/core/Stepper'; import Step from '@material-ui/core/Step'; import StepLabel from '@material-ui/core/StepLabel'; import Question from 'components/StudioAssessmentQuestion'; +import QuestionView from 'components/StudioAssessmentQuestionView'; const useStyles = makeStyles(theme => ({ root: { diff --git a/app/javascript/components/StudioAssessmentList/index.js b/app/javascript/components/StudioAssessmentList/index.js index 2d5ea5c3..aea59f24 100644 --- a/app/javascript/components/StudioAssessmentList/index.js +++ b/app/javascript/components/StudioAssessmentList/index.js @@ -39,21 +39,22 @@ function StudioAssessmentList({ const studioAssessmentEntries = studioAssessments.map(studioAssessment => (
- {/* Only admins can edit the different studioAssessments */} - {userType === 'admin' ? ( - - ) : ( -
- )}
-

{formatDate(studioAssessment.created_at)}

+ {/* The following line renders the date the studio assessment was created at as the title, but might not be what we want to render here */} +

{formatDate(studioAssessment.created_at)}

+ {/* Only admins can edit the different studioAssessments */} + {userType !== 'admin' ? ( + + ) : ( +
+ )} {/* Everyone should be able to view */}
- {this.state.studioAssessment[`${this.props.questionType}_score`] !== null ? ( + {this.state.studioAssessment[`${this.props.questionType}_score`] !== + null ? (

- Score:{' '} + Score:{' '} {this.state.studioAssessment[ `${this.props.questionType}_score` ].toString()} diff --git a/app/javascript/components/StudioAssessmentQuestionView/styles.js b/app/javascript/components/StudioAssessmentQuestionView/styles.js new file mode 100644 index 00000000..dacf3ade --- /dev/null +++ b/app/javascript/components/StudioAssessmentQuestionView/styles.js @@ -0,0 +1,51 @@ +/* + * StudioAssessmentQuestionView Styles + * + * This contains all the styles for the StudioAssessmentQuestionView component. + */ + +const styles = theme => ({ + form: { + paddingLeft: '50px', + paddingRight: '50px', + paddingTop: '20px', + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + alignItems: 'left', + }, + questions: { + backgroundColor: theme.palette.common.lightBlue, + padding: '20px', + borderRadius: '10px', + }, + header: { + borderBottom: `5px solid ${theme.palette.primary.main}`, + }, + button: { + margin: theme.spacing(1), + width: '20%', + }, + TextField: { + width: '100%', + paddingBottom: '20px', + }, + radio: { + marginTop: '20px', + padding: '20px', + borderRadius: '10px', + backgroundColor: theme.palette.common.lightBlue, + }, + comments: { + paddingBottom: '50px', + }, + buttons: { + paddingTop: '20px', + display: 'flex', + flexDirection: 'row', + alignItems: 'right', + justifyContent: 'right', + }, +}); + +export default styles; From 608444567b4c2b9132f835cb5d0afa1635da3b6e Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Sun, 26 Apr 2020 21:05:29 -0700 Subject: [PATCH 09/58] Adding button for new assignment modal --- .../components/ActionItemForm/styles.js | 1 + .../ActionItemParticipant/index 2.js | 68 ------------------- .../ActionItemParticipant/styles 2.js | 26 ------- .../components/AssignmentList/index.js | 27 +++++--- .../components/CaseNoteContainer/index.js | 7 +- .../components/StudioAssessmentList/index.js | 4 +- 6 files changed, 25 insertions(+), 108 deletions(-) delete mode 100644 app/javascript/components/ActionItemParticipant/index 2.js delete mode 100644 app/javascript/components/ActionItemParticipant/styles 2.js diff --git a/app/javascript/components/ActionItemForm/styles.js b/app/javascript/components/ActionItemForm/styles.js index 79993f14..d4edef65 100644 --- a/app/javascript/components/ActionItemForm/styles.js +++ b/app/javascript/components/ActionItemForm/styles.js @@ -11,6 +11,7 @@ const styles = theme => ({ padding: '10px', minHeight: '425px', display: 'block', + overflow: 'hidden', }, iconStyle: { boxShadow: 'None', diff --git a/app/javascript/components/ActionItemParticipant/index 2.js b/app/javascript/components/ActionItemParticipant/index 2.js deleted file mode 100644 index 494567b1..00000000 --- a/app/javascript/components/ActionItemParticipant/index 2.js +++ /dev/null @@ -1,68 +0,0 @@ -import React from 'react'; -import AddIcon from '@material-ui/icons/Add'; -import CheckCircleIcon from '@material-ui/icons/CheckCircle'; -import Divider from '@material-ui/core/Divider'; -import Box from '@material-ui/core/Box'; -import { withStyles } from '@material-ui/core/styles'; -import theme from 'utils/theme'; -import PropTypes from 'prop-types'; -import styles from './styles'; - -function ActionItemParticipant({ - classes, - checked, - participant, - changeChecked, -}) { - let button; - - if (checked != null) { - // Checked or search, unchecked for display - if (!checked) { - button = ; - } else { - button = ( - - ); - } - } - - return ( -
changeChecked(participant)} - onClick={() => changeChecked(participant)} - > -
-
- - {participant.name} -
- {button} -
- -
- ); -} - -ActionItemParticipant.propTypes = { - classes: PropTypes.object.isRequired, - checked: PropTypes.bool, - participant: PropTypes.object.isRequired, - changeChecked: PropTypes.func, -}; - -export default withStyles(styles)(ActionItemParticipant); diff --git a/app/javascript/components/ActionItemParticipant/styles 2.js b/app/javascript/components/ActionItemParticipant/styles 2.js deleted file mode 100644 index 26c2c9aa..00000000 --- a/app/javascript/components/ActionItemParticipant/styles 2.js +++ /dev/null @@ -1,26 +0,0 @@ -export const styles = () => ({ - participantSelect: { - position: 'absolute', - right: '0px', - horizontalAlign: 'right', - float: 'right', - }, - - participant: { - marginTop: '12px', - height: '30px', - display: 'flex', - alignItems: 'center', - justifyContent: 'space-between', - width: '100%', - }, - - participantBar: { - width: '0.4rem', - height: '36px', - marginRight: '7%', - borderRadius: '16px', - }, -}); - -export default styles; diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index dc5644ed..5089c169 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -7,21 +7,17 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; -import { Grid, Paper, List } from '@material-ui/core'; +import { Grid, Paper, List, Button, Dialog } from '@material-ui/core'; import ActionItemForm from 'components/ActionItemForm'; import ActionItemCard from 'components/ActionItemCard'; import styles from './styles'; -function AssignmentList({ - classes, - initialAssignments, - userType, - formatDate, -}) { +function AssignmentList({ classes, initialAssignments, userType, formatDate }) { const [assignments] = useState(initialAssignments); + const [open, setOpen] = useState(false); - const assignmentEntries = assignments.map((assignment) => ( + const assignmentEntries = assignments.map(assignment => ( +
+ + setOpen(false)} + aria-labelledby="form-dialog-title" + maxWidth="sm" + classes={{ overflow: 'hidden' }} + > + + +
) : (
)} diff --git a/app/javascript/components/CaseNoteContainer/index.js b/app/javascript/components/CaseNoteContainer/index.js index c8b66733..34741251 100644 --- a/app/javascript/components/CaseNoteContainer/index.js +++ b/app/javascript/components/CaseNoteContainer/index.js @@ -7,7 +7,6 @@ import Grid from '@material-ui/core/Grid'; import CaseNoteForm from 'components/CaseNoteForm'; import CaseNoteCard from 'components/CaseNoteCard'; import PropTypes from 'prop-types'; -import ActionItemForm from 'components/ActionItemForm'; import styles from './styles'; import theme from '../../utils/theme'; @@ -109,7 +108,9 @@ class CaseNoteContainer extends React.Component { return ( <> - + diff --git a/app/javascript/components/StudioAssessmentList/index.js b/app/javascript/components/StudioAssessmentList/index.js index aea59f24..78cfa62a 100644 --- a/app/javascript/components/StudioAssessmentList/index.js +++ b/app/javascript/components/StudioAssessmentList/index.js @@ -43,7 +43,7 @@ function StudioAssessmentList({
{/* The following line renders the date the studio assessment was created at as the title, but might not be what we want to render here */} -

{formatDate(studioAssessment.created_at)}

+

{formatDate(studioAssessment.created_at)}

{/* Only admins can edit the different studioAssessments */} {userType !== 'admin' ? ( {/* Only admins can see the create button */} - {userType === 'admin' ? ( + {userType !== 'admin' ? ( Date: Sun, 26 Apr 2020 21:22:18 -0700 Subject: [PATCH 10/58] Fixing weird double scrolling bug --- app/javascript/components/CaseNoteContainer/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/components/CaseNoteContainer/index.js b/app/javascript/components/CaseNoteContainer/index.js index 34741251..a8a9fc2b 100644 --- a/app/javascript/components/CaseNoteContainer/index.js +++ b/app/javascript/components/CaseNoteContainer/index.js @@ -133,8 +133,8 @@ class CaseNoteContainer extends React.Component {
{this.renderCaseNoteCards()} From a2858bd3b719ba82d32363f8d6f0bb9a41fd0421 Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Fri, 1 May 2020 22:09:30 -0700 Subject: [PATCH 11/58] Making back-end hook changes --- app/controllers/pages_controller.rb | 2 +- app/controllers/participants_controller.rb | 1 - .../components/ParticipantShowPage/index.js | 14 +++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index ba5fe687..bbe490df 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -25,7 +25,7 @@ def dashboard @participant = @user.participant @paperworks = @user.participant.paperworks @case_notes = @user.participant.case_notes#.where(visible: true), changing for testing purposes - @assignments = Assignment.where('assigned_to_id': @user.id) + @assignments = @user.participant.assignments # @action_items = ActionItem.where(id: @assignments[0].action_item_id) @studio_assessments = @user.participant.studio_assessments diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index 37365174..5fd9f38d 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -7,7 +7,6 @@ def show @case_notes = @participant.case_notes @assignments = @participant.assignments @studio_assessments = @participant.studio_assessments - #@assignments = @participant.ass if @participant.personal_questionnaire.nil? personal_q = PersonalQuestionnaire.create("participant_id": @participant.id) diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index 366c778d..1402834e 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -62,12 +62,12 @@ class ParticipantShowPage extends React.Component { assignments, } = this.props; - // console.log('case notes', caseNotes); - // console.log('paperworks', paperworks); - // console.log('assignments', assignments); - // console.log('participantId', participantId); - // console.log('studio assessments', studioAssessments[0]); - // console.log('sample action item', this.sampleActionItem); + console.log('case notes', caseNotes); + console.log('paperworks', paperworks); + console.log('assignments', assignments); + console.log('participantId', participantId); + console.log('studio assessments', studioAssessments[0]); + console.log('sample action item', this.sampleActionItem); return ( From 07992d4593c3f0a00fa9806ab7af47d6191dd3c5 Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Sat, 2 May 2020 02:48:51 -0700 Subject: [PATCH 12/58] Fixing up participantView and adding additional logic --- app/controllers/participants_controller.rb | 17 +++++- .../components/AssignmentList/index.js | 56 ++++++++++++------- .../components/CaseNoteContainer/index.js | 2 +- .../components/ParticipantShowPage/index.js | 11 ++-- app/views/participants/dashboard.html.erb | 1 - app/views/participants/show.html.erb | 2 +- 6 files changed, 58 insertions(+), 31 deletions(-) diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index 2032b990..a62a2d4d 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -22,10 +22,23 @@ def show professional_q = @participant.professional_questionnaire end @professional_questionnaire = ProfessionalQuestionnairesSerializer.new(professional_q) - @studio_assessments = @participant.studio_assessments - # @dummy = 0 # for loop over assignments + @assignment_list = [] + @assignments.each do |a| + action_item = ActionItem.where(id: a.action_item_id).first + complete_assignment = { + "id" => a.id, + "title" => action_item.title, + "description" => action_item.description, + "category" => action_item.category, + "is_template" => action_item.is_template, + "created_at" => a.created_at, + "updated_at" => a.updated_at, + "due_date" => a.due_date, + } + @assignment_list.push(complete_assignment) + end end diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index 07156201..e75ac5fc 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -15,21 +15,30 @@ import { apiPost, apiDelete } from 'utils/axios'; import * as Sentry from '@sentry/browser'; import styles from './styles'; -function AssignmentList({ classes, initialAssignments, userType, formatDate }) { - const [assignments] = useState(initialAssignments); +function AssignmentList({ classes, initialAssignments, participantId, userType, formatDate }) { + const [assignments, setAssignments] = useState(initialAssignments); const [open, setOpen] = useState(false); - const assignmentEntries = assignments.map(assignment => ( - - )); + const appendAssignment = (assignment) => { + setAssignments([assignment, ...assignments]); + } + const assignmentEntries = assignments.map(assignment => { + console.log(assignment); + return ( + + ) + }); + + // Generalize this function for deleting any action items const deleteTemplate = (templateActionItem) => { if (!templateActionItem.is_template || !templateActionItem.id) { return; @@ -51,7 +60,12 @@ function AssignmentList({ classes, initialAssignments, userType, formatDate }) { }); Sentry.captureException(error); }); - }; + }; + + // Make the function for editing any assignments here + const editAssignment = (assignment) => { + // TODO + } const handleSubmit = ( title, @@ -72,8 +86,9 @@ function AssignmentList({ classes, initialAssignments, userType, formatDate }) { dueDate, is_template: addToTemplates, }; + apiPost('/api/assignments/templates', { assignment: template }) - .then(resp => console.log(resp)) + .then(response => console.log(response)) .catch(error => { Sentry.configureScope(function(scope) { scope.setExtra('file', 'AssignmentList'); @@ -84,20 +99,20 @@ function AssignmentList({ classes, initialAssignments, userType, formatDate }) { } // Add ActionItem to ActionItems - const actionItemBody = { + const body = { assignments: [{ title, description, category: categorySelected, due_date: dueDate, }], - participant_ids: [1], + participant_ids: [participantId], } - console.log(actionItemBody); - apiPost('/api/assignments', actionItemBody) - .then((e) => { + + apiPost('/api/assignments', body) + .then((response) => { setOpen(false); - console.log(e); + appendAssignment(response.data); // Limited testing for this functionality since MailCatcher fails for me }) .catch(error => { Sentry.configureScope(function(scope) { @@ -133,6 +148,7 @@ function AssignmentList({ classes, initialAssignments, userType, formatDate }) { open={open} handleClose={() => setOpen(false)} handleSubmit={handleSubmit} // this.handleSubmit + participantId={participantId} />
) : ( diff --git a/app/javascript/components/CaseNoteContainer/index.js b/app/javascript/components/CaseNoteContainer/index.js index 8146a41a..7235be4a 100644 --- a/app/javascript/components/CaseNoteContainer/index.js +++ b/app/javascript/components/CaseNoteContainer/index.js @@ -32,7 +32,7 @@ class CaseNoteContainer extends React.Component { } renderCaseNoteCreationIfStaff() { - if (this.state.userType !== 'staff') { + if (this.state.userType === 'staff') { return ( @@ -153,10 +153,9 @@ ParticipantShowPage.propTypes = { participantId: PropTypes.number.isRequired, personalQuestionnaire: PropTypes.object.isRequired, professionalQuestionnaire: PropTypes.object.isRequired, - // Need the following for the assignments and studioAssessments assignments: PropTypes.array.isRequired, studioAssessments: PropTypes.array.isRequired, - dummy: PropTypes.object.isRequired, + assignmentList: PropTypes.array, }; export default withStyles(styles)(ParticipantShowPage); diff --git a/app/views/participants/dashboard.html.erb b/app/views/participants/dashboard.html.erb index aa23a7d1..4a6fc699 100644 --- a/app/views/participants/dashboard.html.erb +++ b/app/views/participants/dashboard.html.erb @@ -16,5 +16,4 @@ # just pass the studio assessments forward. assignments: @assignments.all, studio_assessments: @studio_assessments.all, - # dummy: @dummy, }) %> \ No newline at end of file diff --git a/app/views/participants/show.html.erb b/app/views/participants/show.html.erb index 1636c54f..a6c9bb5e 100644 --- a/app/views/participants/show.html.erb +++ b/app/views/participants/show.html.erb @@ -16,5 +16,5 @@ # just pass the studio assessments forward. assignments: @assignments.all, studio_assessments: @studio_assessments.all, - # dummy: @dummy, + assignment_list: @assignment_list, }) %> From ba0dfa8952c0f6140cf1178a0c0912155c7fb5df Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Sat, 2 May 2020 18:25:51 -0700 Subject: [PATCH 13/58] Pushing some more changes for edit + delete logics --- .../components/ActionItemCard/index.js | 41 +- .../components/AssignmentList/index.js | 454 +++++++++++++----- .../components/StudioAssessmentList/index.js | 10 +- config/routes.rb | 3 + 4 files changed, 369 insertions(+), 139 deletions(-) diff --git a/app/javascript/components/ActionItemCard/index.js b/app/javascript/components/ActionItemCard/index.js index 60500903..38dd4a96 100644 --- a/app/javascript/components/ActionItemCard/index.js +++ b/app/javascript/components/ActionItemCard/index.js @@ -26,6 +26,7 @@ function ActionItemCard({ lastEntry = false, handleIconClick, removeActionItem, + editActionItem, }) { const renderSelectIcon = () => ( @@ -39,15 +40,23 @@ function ActionItemCard({ ); - const renderDeleteButton = () => ( - - ); + const renderButton = (type) => { + let clickFunc; + if (type === "EDIT") { + clickFunc = editActionItem; + } else if (type === "DELETE") { + clickFunc = removeActionItem; + } + return ( + + ); + } return ( @@ -108,17 +117,8 @@ function ActionItemCard({ xs={6} justify="space-evenly" > - {/* Commented out because it doesn't have functionality right now */} - - - - {renderClose ? null : renderDeleteButton()} + {renderButton("EDIT")} + {renderClose ? null : renderButton("DELETE")}
@@ -136,6 +136,7 @@ ActionItemCard.propTypes = { dueDate: PropTypes.string, handleIconClick: PropTypes.func, removeActionItem: PropTypes.func, + editActionItem: PropTypes.func, lastEntry: PropTypes.bool, }; export default withStyles(styles)(ActionItemCard); diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index e75ac5fc..6af1478b 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -7,74 +7,153 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; -import { Grid, Paper, List, Button, Dialog } from '@material-ui/core'; -// import ActionItemForm from 'components/ActionItemForm'; +import { + Grid, + Paper, + List, + Button, + Dialog, + DialogContent, + DialogActions, + DialogTitle, +} from '@material-ui/core'; import ActionItemCard from 'components/ActionItemCard'; import ActionItemForm from 'components/ActionItemModal'; import { apiPost, apiDelete } from 'utils/axios'; import * as Sentry from '@sentry/browser'; import styles from './styles'; -function AssignmentList({ classes, initialAssignments, participantId, userType, formatDate }) { - const [assignments, setAssignments] = useState(initialAssignments); - const [open, setOpen] = useState(false); +class AssignmentList extends React.Component { + constructor(props) { + super(props); + this.state = { + assignments: this.props.initialAssignments, + participantId: this.props.participantId, + userType: this.props.userType, + formatDate: this.props.formatDate, + deleteModalOpen: false, + newModalOpen: false, + assignmentToDelete: null, + assignmentToEdit: null, + }; + this.appendStateAssignment = this.appendStateAssignment.bind(this); + this.editStateAssignment = this.editStateAssignment.bind(this); + this.deleteStateAssignment = this.deleteStateAssignment.bind(this); + this.handleNewAssignment = this.handleNewAssignment.bind(this); + this.handleEditAssignment = this.handleEditAssignment.bind(this); + this.handleDeleteAssignment = this.handleDeleteAssignment.bind(this); + this.handleOpenNewModal = this.handleOpenNewModal.bind(this); + this.handleOpenEditModal = this.handleOpenEditModal.bind(this); + this.handleOpenDeleteModal = this.handleOpenDeleteModal.bind(this); + } + + +// function AssignmentList({ classes, initialAssignments, participantId, userType, formatDate }) { +// const [assignments, setAssignments] = useState(initialAssignments); +// const [open, setOpen] = useState(false); +// const [openDeleteModal, setDeleteModal] = useState(false); - const appendAssignment = (assignment) => { - setAssignments([assignment, ...assignments]); + handleOpenNewModal(state) { + this.setState(prevState => ({ + newModalOpen: state + })); } - const assignmentEntries = assignments.map(assignment => { - console.log(assignment); - return ( - - ) - }); - - // Generalize this function for deleting any action items - const deleteTemplate = (templateActionItem) => { - if (!templateActionItem.is_template || !templateActionItem.id) { - return; - } - apiDelete(`/api/assignments/templates/${templateActionItem.id}`) - .then(() => - this.setState(prevState => { - const remainingTemplates = prevState.templateActionItems.filter( - item => item !== templateActionItem, - ); - return { templateActionItems: remainingTemplates }; - }), - ) - .catch(error => { - Sentry.configureScope(function(scope) { - scope.setExtra('file', 'ActionItemCreationPage'); - scope.setExtra('action', 'apiDelete'); - scope.setExtra('templateActionItemId', templateActionItem.id); - }); - Sentry.captureException(error); - }); - }; + handleOpenEditModal(state) { + this.setState(prevState => ({ + editModalOpen: state + })) + } + + handleOpenDeleteModal(state) { + this.setState(prevState => ({ + deleteModalOpen: state + })); + } + + appendStateAssignment(assignment) { + this.setState(prevState => ({ + assignments: [assignment, ...prevState.assignments], + })); + } // Make the function for editing any assignments here - const editAssignment = (assignment) => { - // TODO + editStateAssignment(updatedAssignment) { + this.setState(prevState => { + const toUpdate = [...prevState.assignments]; + const foundIndex = toUpdate.findIndex( + assignment => assignment.id === updatedAssignment.id + ); + if (foundIndex !== -1) { + toUpdate[foundIndex] = updatedAssignment; + return { assignments: toUpdate}; + } + return {}; + }) + } + + deleteStateAssignment(assignment) { + this.setState(prevState => { + const remainingAssignments = prevState.assignments.filter(item => item.id !== assignment.id); + return { assignments: remainingAssignments }; + }); } - const handleSubmit = ( + // New Assignment modal taken from ActionItemModal + + editModal() { + if (this.state.assignmentToEdit) { + console.log("trying to edit this one", this.state.assignmentToEdit); + console.log("new title", this.state.assignmentToEdit.title); + return ( + this.handleOpenEditModal(false)} + handleSubmit={this.handleEditAssignment} + participantId={this.state.participantId} + // actionItemId={this.state.assignmentToEdit.actionItemId} This doesn't exist yet for some reason + /> + ) + } + } + + deleteModal() { + return ( + this.handleOpenDeleteModal(false)} + aria-labelledby="form-dialog-title" + maxWidth="sm" + fullWidth + > + Are you sure you want to delete this assignment? + + + + + ); + } + + handleNewAssignment( title, description, categorySelected, dueDate, addToTemplates, participantId, - ) => { + ) { // Make new ActionItemTemplate if (addToTemplates) { @@ -109,79 +188,226 @@ function AssignmentList({ classes, initialAssignments, participantId, userType, participant_ids: [participantId], } - apiPost('/api/assignments', body) - .then((response) => { - setOpen(false); - appendAssignment(response.data); // Limited testing for this functionality since MailCatcher fails for me - }) - .catch(error => { - Sentry.configureScope(function(scope) { - scope.setExtra('file', 'AssignmentList'); - scope.setExtra('action', 'apiPost (handleSubmit)'); - scope.setExtra('participantId', participantId); - scope.setExtra('body', JSON.stringify(actionItemBody)); + const production = false; + if (production) { + + apiPost('/api/assignments', body) + .then((response) => { + this.handleOpenNewModal(false); + this.appendStateAssignment(response.data); // Limited testing for this functionality since MailCatcher fails for me + }) + .catch(error => { + Sentry.configureScope(function(scope) { + scope.setExtra('file', 'AssignmentList'); + scope.setExtra('action', 'apiPost (handleNewAssignment)'); + scope.setExtra('participantId', participantId); + scope.setExtra('body', JSON.stringify(actionItemBody)); + }); + Sentry.captureException(error); }); - Sentry.captureException(error); - }); + + } else { + + this.handleOpenNewModal(false); + this.appendStateAssignment(body.assignments[0]); + + } } - return ( - - - -

Assignments

+ handleEditAssignment( + title, + description, + categorySelected, + dueDate, + addToTemplates, + participantId, + ) { + console.log("trying to edit here!"); + } + + // const editActionItem = (actionItem) => { + + // } + + // For editing caseNotes + + // this.setState(prevState => ({ + // description: prevState.tempDescription, + // })); + + // const body = { + // title: this.state.title, + // description: this.state.tempDescription, + // visible: this.state.visible, + // participant_id: this.state.participant_id, + // }; + // apiPatch(`/api/case_notes/${this.state.caseNoteId}`, { + // case_note: body, + // }) + // .then(response => { + // this.props.updateCaseNote(response.data); + // this.setState({ open: false }); + // }) + // .catch(error => { + // Sentry.configureScope(function(scope) { + // scope.setExtra('file', 'CaseNoteForm'); + // scope.setExtra('action', 'apiPatch'); + // scope.setExtra('case_note', JSON.stringify(body)); + // }); + // Sentry.captureException(error); + // }); + + handleDeleteAssignment() { + if (!this.state.assignmentToDelete) { + console.log("Trying to delete an assignment without selecting one! This error should not be possible."); + } else { + const assignment = this.state.assignmentToDelete; + + const production = false; + if (production) { // For testing purposes + + // Make API request to delete assignment and remove assignment from state + apiDelete(`api/assignments/${assignment.id}`) + .then(() => { + this.handleOpenDeleteModal(false); + this.deleteStateAssignment(assignment); + }) + .catch(error => { + Sentry.configureScope(function(scope) { + scope.setExtra('file', 'AssignmentList'); + scope.setExtra('action', 'apiDelete'); + scope.setExtra('assignmentId', assignment.id); + }); + Sentry.captureException(error); + }); + + } else { + this.handleOpenDeleteModal(false); + this.deleteStateAssignment(assignment); + this.setState(prevState => { + const remainingAssignments = prevState.assignments.filter(item => item.id !== assignment.id); + return { assignments: remainingAssignments }; + }); + + } + } + } + + // ActionItemForm.propTypes = { + // classes: PropTypes.object.isRequired, + // type: PropTypes.oneOf(['create', 'edit']), + // title: PropTypes.string, + // description: PropTypes.string, + // dueDate: PropTypes.string, + // categorySelected: PropTypes.string, + // open: PropTypes.bool.isRequired, + // participantId: PropTypes.number, + // actionItemId: PropTypes.number, + // handleClose: PropTypes.func.isRequired, + // handleSubmit: PropTypes.func.isRequired, + // }; + // ActionItemForm.defaultProps = { + // title: '', + // type: 'create', + // description: '', + // dueDate: '', + // categorySelected: '', + // }; + + + + assignmentEntries() { + if (this.state.assignments.length !== 0) { + const assignmentCards = this.state.assignments.map(assignment => ( + { + this.handleOpenEditModal(true); + console.log("trying to edit", assignment); + this.setState({ + assignmentToEdit: assignment + }) + console.log(this.state.assignmentToEdit); + }} + removeActionItem={() => { + this.handleOpenDeleteModal(true); + this.setState({ + assignmentToDelete: assignment + }) + }} + /> + )); + return assignmentCards; + } + } + + render() { + const { classes } = this.props; + return ( + + {this.editModal()} + + +

Assignments

+
+ + {this.state.userType === 'staff' ? ( + // Make this a button to pop-up the modal to add a new assignment +
+ + this.handleOpenNewModal(false)} + handleSubmit={this.handleNewAssignment} + participantId={this.state.participantId} + /> +
+ ) : ( +
+ )} + - - {userType === 'staff' ? ( - // Make this a button to pop-up the modal to add a new assignment + + {/* Change these to handle rendering assignments instead */} + + + {this.state.assignments.length !== 0 ? ( + this.assignmentEntries() + ) : (
- - setOpen(false)} - handleSubmit={handleSubmit} // this.handleSubmit - participantId={participantId} + no Assignments +
+

No assignments yet

+ {this.state.userType === 'staff' ? ( +

Click on ASSIGN ASSIGNMENT + to assign one.

+ ) : ( +
+ )} +
- ) : ( -
)} - - - - {/* Change these to handle rendering assignments instead */} - - - {assignments.length !== 0 ? ( - assignmentEntries - ) : ( -
- no Assignments -
-

No assignments yet

- {userType === 'staff' ? ( -

Click on ASSIGN ASSIGNMENT + to assign one.

- ) : ( -
- )} -
-
- )} - - - ); + + + ); + } } AssignmentList.propTypes = { diff --git a/app/javascript/components/StudioAssessmentList/index.js b/app/javascript/components/StudioAssessmentList/index.js index 93d77566..0940c24c 100644 --- a/app/javascript/components/StudioAssessmentList/index.js +++ b/app/javascript/components/StudioAssessmentList/index.js @@ -29,11 +29,11 @@ function StudioAssessmentList({ // setPaperworks(allAssessments); // } // }; - console.log('studioAssessments', studioAssessments); - console.log('formatDate', formatDate); - console.log('initialStudioAssessments', initialStudioAssessments); - console.log('participantId', participantId); - console.log('userType', userType); + // console.log('studioAssessments', studioAssessments); + // console.log('formatDate', formatDate); + // console.log('initialStudioAssessments', initialStudioAssessments); + // console.log('participantId', participantId); + // console.log('userType', userType); // let createdDate = studioAssessments['created_at']; diff --git a/config/routes.rb b/config/routes.rb index efb6b8c0..621a1dae 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -39,6 +39,9 @@ patch 'not_visible', to: 'case_notes#not_visible', on: :member end + # resources :assignments, only: [:show, :create, :update, :destroy] do + + scope '/assignments' do post 'templates', to: 'assignments#create_template' get 'templates', to: 'assignments#get_templates' From b404124e69f05d54cbc9f3b6a545081653798bc9 Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Sat, 2 May 2020 21:59:07 -0700 Subject: [PATCH 14/58] Pushing changes for API endpoints (patch, delete) --- app/controllers/participants_controller.rb | 1 + .../components/ActionItemModal/index.js | 2 +- .../components/AssignmentList/index.js | 301 ++++++++---------- .../components/ParticipantShowPage/index.js | 8 - .../components/StudioAssessmentList/index.js | 7 - app/views/participants/show.html.erb | 2 - config/routes.rb | 8 - 7 files changed, 141 insertions(+), 188 deletions(-) diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index a62a2d4d..e741bf69 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -36,6 +36,7 @@ def show "created_at" => a.created_at, "updated_at" => a.updated_at, "due_date" => a.due_date, + "action_item_id" => a.action_item_id, } @assignment_list.push(complete_assignment) end diff --git a/app/javascript/components/ActionItemModal/index.js b/app/javascript/components/ActionItemModal/index.js index a0466ac7..0eaab6ab 100644 --- a/app/javascript/components/ActionItemModal/index.js +++ b/app/javascript/components/ActionItemModal/index.js @@ -181,7 +181,7 @@ class ActionItemForm extends React.Component { Description ({ - newModalOpen: state - })); + handleOpenModal(type, assignment) { + if (!assignment) { + assignment = null; + } + let modalOpen; + switch (type) { + case 'new': + modalOpen = 'newModalOpen'; + break; + case 'edit': + modalOpen = 'editModalOpen'; + break; + case 'delete': + modalOpen = 'deleteModalOpen'; + break; + } + this.setState({ + modalAssignment: assignment, + [modalOpen]: true, + }) } - handleOpenEditModal(state) { - this.setState(prevState => ({ - editModalOpen: state - })) + handleCloseModal() { + this.setState({ + modalAssignment: null, + newModalOpen: false, + editModalOpen: false, + deleteModalOpen: false + }) } - handleOpenDeleteModal(state) { - this.setState(prevState => ({ - deleteModalOpen: state - })); - } - appendStateAssignment(assignment) { + console.log("trying to append"); this.setState(prevState => ({ assignments: [assignment, ...prevState.assignments], })); } - // Make the function for editing any assignments here - editStateAssignment(updatedAssignment) { + editStateAssignment(assignmentResponse) { + let actionItem = assignmentResponse.action_item; + let correctAssignment = { + actionItemId: actionItem.id, + category: actionItem.category, + description: actionItem.description, + title: actionItem.title, + dueDate: assignmentResponse.due_date, + id: assignmentResponse.id, + isTemplate: false, // Not sure about this one + // createdAt: Not sure how to find this one + // updatedAt: Not sure how to find this one + } this.setState(prevState => { const toUpdate = [...prevState.assignments]; const foundIndex = toUpdate.findIndex( - assignment => assignment.id === updatedAssignment.id + assignment => assignment.id === correctAssignment.id ); if (foundIndex !== -1) { - toUpdate[foundIndex] = updatedAssignment; + toUpdate[foundIndex] = correctAssignment; return { assignments: toUpdate}; } return {}; @@ -99,24 +118,20 @@ class AssignmentList extends React.Component { }); } - // New Assignment modal taken from ActionItemModal - editModal() { - if (this.state.assignmentToEdit) { - console.log("trying to edit this one", this.state.assignmentToEdit); - console.log("new title", this.state.assignmentToEdit.title); + if (this.state.modalAssignment) { return ( this.handleOpenEditModal(false)} + handleClose={() => this.handleCloseModal()} handleSubmit={this.handleEditAssignment} participantId={this.state.participantId} - // actionItemId={this.state.assignmentToEdit.actionItemId} This doesn't exist yet for some reason + actionItemId={this.state.modalAssignment.actionItemId} /> ) } @@ -126,7 +141,7 @@ class AssignmentList extends React.Component { return ( this.handleOpenDeleteModal(false)} + onClose={() => this.handleCloseModal()} aria-labelledby="form-dialog-title" maxWidth="sm" fullWidth @@ -141,6 +156,13 @@ class AssignmentList extends React.Component { > Delete + ); @@ -167,7 +189,10 @@ class AssignmentList extends React.Component { }; apiPost('/api/assignments/templates', { assignment: template }) - .then(response => console.log(response)) + .then((response) => { + this.handleCloseModal(); + this.appendStateAssignment(response.data); + }) .catch(error => { Sentry.configureScope(function(scope) { scope.setExtra('file', 'AssignmentList'); @@ -175,25 +200,23 @@ class AssignmentList extends React.Component { scope.setExtra('template', JSON.stringify(template)); }) }) - } - // Add ActionItem to ActionItems - const body = { - assignments: [{ - title, - description, - category: categorySelected, - due_date: dueDate, - }], - participant_ids: [participantId], - } + } else { - const production = false; - if (production) { + // Add ActionItem to ActionItems + const body = { + assignments: [{ + title, + description, + category: categorySelected, + due_date: dueDate, + }], + participant_ids: [participantId], + } apiPost('/api/assignments', body) .then((response) => { - this.handleOpenNewModal(false); + this.handleCloseModal(); this.appendStateAssignment(response.data); // Limited testing for this functionality since MailCatcher fails for me }) .catch(error => { @@ -205,12 +228,24 @@ class AssignmentList extends React.Component { }); Sentry.captureException(error); }); + // THIS IS ACTIONITEMCREATIONPAGE PAYLOAD FORMAT - } else { - - this.handleOpenNewModal(false); - this.appendStateAssignment(body.assignments[0]); - + // const participantIds = this.state.selectedParticipants.map( + // participant => participant.id, + // ); + + // const assignments = this.state.selectedActionItems.map(actionItem => ({ + // title: actionItem.title, + // description: actionItem.description, + // due_date: actionItem.dueDate, + // category: actionItem.category, + // })); + + // const body = { + // assignments, + // participant_ids: participantIds, + // }; + // apiPost('/api/assignments', body) } } @@ -222,100 +257,52 @@ class AssignmentList extends React.Component { addToTemplates, participantId, ) { - console.log("trying to edit here!"); - } - - // const editActionItem = (actionItem) => { - - // } - // For editing caseNotes - - // this.setState(prevState => ({ - // description: prevState.tempDescription, - // })); + // Edit ActionItem and send PATCH request + const body = { + assignment: { + title, + description, + category: categorySelected, + due_date: dueDate, + }, + participant_ids: [participantId], + } - // const body = { - // title: this.state.title, - // description: this.state.tempDescription, - // visible: this.state.visible, - // participant_id: this.state.participant_id, - // }; - // apiPatch(`/api/case_notes/${this.state.caseNoteId}`, { - // case_note: body, - // }) - // .then(response => { - // this.props.updateCaseNote(response.data); - // this.setState({ open: false }); - // }) - // .catch(error => { - // Sentry.configureScope(function(scope) { - // scope.setExtra('file', 'CaseNoteForm'); - // scope.setExtra('action', 'apiPatch'); - // scope.setExtra('case_note', JSON.stringify(body)); - // }); - // Sentry.captureException(error); - // }); + apiPatch(`/api/assignments/${this.state.modalAssignment.id}`, body) + .then((response) => { + this.handleCloseModal(); + this.editStateAssignment(response.data); + }) + .catch(error => { + Sentry.configureScope(function(scope) { + scope.setExtra('file', 'AssignmentList'); + scope.setExtra('action', 'apiPatch (handleEditAssignment)'); + scope.setExtra('assignmentId', this.state.modalAssignment.id); + }); + Sentry.captureException(error); + }); + } handleDeleteAssignment() { - if (!this.state.assignmentToDelete) { - console.log("Trying to delete an assignment without selecting one! This error should not be possible."); - } else { - const assignment = this.state.assignmentToDelete; - - const production = false; - if (production) { // For testing purposes - - // Make API request to delete assignment and remove assignment from state - apiDelete(`api/assignments/${assignment.id}`) - .then(() => { - this.handleOpenDeleteModal(false); - this.deleteStateAssignment(assignment); - }) - .catch(error => { - Sentry.configureScope(function(scope) { - scope.setExtra('file', 'AssignmentList'); - scope.setExtra('action', 'apiDelete'); - scope.setExtra('assignmentId', assignment.id); - }); - Sentry.captureException(error); - }); + const assignment = this.state.modalAssignment; - } else { - this.handleOpenDeleteModal(false); + // Make API request to delete assignment and remove assignment from state + apiDelete(`/api/assignments/${assignment.id}`) + .then(() => { + this.handleCloseModal(); this.deleteStateAssignment(assignment); - this.setState(prevState => { - const remainingAssignments = prevState.assignments.filter(item => item.id !== assignment.id); - return { assignments: remainingAssignments }; + }) + .catch(error => { + Sentry.configureScope(function(scope) { + scope.setExtra('file', 'AssignmentList'); + scope.setExtra('action', 'apiDelete (handleDeleteAssignment)'); + scope.setExtra('assignmentId', assignment.id); }); - - } - } + Sentry.captureException(error); + }); } - // ActionItemForm.propTypes = { - // classes: PropTypes.object.isRequired, - // type: PropTypes.oneOf(['create', 'edit']), - // title: PropTypes.string, - // description: PropTypes.string, - // dueDate: PropTypes.string, - // categorySelected: PropTypes.string, - // open: PropTypes.bool.isRequired, - // participantId: PropTypes.number, - // actionItemId: PropTypes.number, - // handleClose: PropTypes.func.isRequired, - // handleSubmit: PropTypes.func.isRequired, - // }; - // ActionItemForm.defaultProps = { - // title: '', - // type: 'create', - // description: '', - // dueDate: '', - // categorySelected: '', - // }; - - - assignmentEntries() { if (this.state.assignments.length !== 0) { const assignmentCards = this.state.assignments.map(assignment => ( @@ -328,18 +315,10 @@ class AssignmentList extends React.Component { selected={false} // Dummy prop for this specific usage of ActionItemCard renderClose={false} editActionItem={() => { - this.handleOpenEditModal(true); - console.log("trying to edit", assignment); - this.setState({ - assignmentToEdit: assignment - }) - console.log(this.state.assignmentToEdit); + this.handleOpenModal("edit", assignment); }} removeActionItem={() => { - this.handleOpenDeleteModal(true); - this.setState({ - assignmentToDelete: assignment - }) + this.handleOpenModal("delete", assignment); }} /> )); @@ -352,6 +331,7 @@ class AssignmentList extends React.Component { return ( {this.editModal()} + {this.deleteModal()} {this.state.userType === 'staff' ? ( - // Make this a button to pop-up the modal to add a new assignment
- this.handleOpenNewModal(false)} + handleClose={() => this.handleCloseModal()} handleSubmit={this.handleNewAssignment} participantId={this.state.participantId} /> @@ -382,8 +361,6 @@ class AssignmentList extends React.Component { - {/* Change these to handle rendering assignments instead */} - {this.state.assignments.length !== 0 ? ( this.assignmentEntries() diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index 53158561..0a010d23 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -63,14 +63,6 @@ class ParticipantShowPage extends React.Component { assignmentList, } = this.props; - console.log('case notes', caseNotes); - console.log('paperworks', paperworks); - console.log('assignments', assignments); - console.log('participantId', participantId); - console.log('studio assessments', studioAssessments[0]); - console.log('sample action item', this.sampleActionItem); - console.log("assignmentList", assignmentList); - return ( (
diff --git a/app/views/participants/show.html.erb b/app/views/participants/show.html.erb index a6c9bb5e..68c6e3ef 100644 --- a/app/views/participants/show.html.erb +++ b/app/views/participants/show.html.erb @@ -1,5 +1,3 @@ -# This is viewed when you're a staff viewing a participant's page - <%= react_component('Main', { content: 'ParticipantShowPage', participant: @participant, diff --git a/config/routes.rb b/config/routes.rb index 621a1dae..4261ac1f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -39,9 +39,6 @@ patch 'not_visible', to: 'case_notes#not_visible', on: :member end - # resources :assignments, only: [:show, :create, :update, :destroy] do - - scope '/assignments' do post 'templates', to: 'assignments#create_template' get 'templates', to: 'assignments#get_templates' @@ -50,11 +47,6 @@ delete 'templates/:id', to: 'assignments#destroy_template' end - # # Need to add more routing for editing and deleting assignments? - # scope '/assignments' do - # # Create - # post ':id' - resources :studio_assessments, only: [:show, :create, :update, :destroy] resources :assignments, only: [:show, :create, :update, :destroy] resources :professional_questionnaires, only: [:show, :create, :update, :destroy] From 48451fbc6f0c4248a65eadce7abf820af4462839 Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Sat, 2 May 2020 22:32:08 -0700 Subject: [PATCH 15/58] Fixing modal logic for assignmentList --- .../components/AssignmentList/index.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index 85a01d9f..a392f31e 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -348,12 +348,17 @@ class AssignmentList extends React.Component { - this.handleCloseModal()} - handleSubmit={this.handleNewAssignment} - participantId={this.state.participantId} - /> + {this.state.newModalOpen ? ( + this.handleCloseModal()} + handleSubmit={this.handleNewAssignment} + participantId={this.state.participantId} + /> + ) : ( + null + )}
) : (
From cd1e510203b7aa56b84f80add53f6fe7f059ac36 Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Sun, 3 May 2020 20:52:02 -0700 Subject: [PATCH 16/58] Merging in remote master --- .../components/AssignmentList/index.js | 86 ++++++++++--------- 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index a392f31e..ca3a1a62 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -80,6 +80,8 @@ class AssignmentList extends React.Component { appendStateAssignment(assignment) { console.log("trying to append"); + console.log(this.state.assignments); + console.log(assignment); this.setState(prevState => ({ assignments: [assignment, ...prevState.assignments], })); @@ -191,7 +193,7 @@ class AssignmentList extends React.Component { apiPost('/api/assignments/templates', { assignment: template }) .then((response) => { this.handleCloseModal(); - this.appendStateAssignment(response.data); + // this.appendStateAssignment(response.data); }) .catch(error => { Sentry.configureScope(function(scope) { @@ -201,51 +203,51 @@ class AssignmentList extends React.Component { }) }) - } else { + // } else { - // Add ActionItem to ActionItems - const body = { - assignments: [{ - title, - description, - category: categorySelected, - due_date: dueDate, - }], - participant_ids: [participantId], - } + // Add ActionItem to ActionItems + const body = { + assignments: [{ + title, + description, + category: categorySelected, + due_date: dueDate, + }], + participant_ids: [participantId], + } - apiPost('/api/assignments', body) - .then((response) => { - this.handleCloseModal(); - this.appendStateAssignment(response.data); // Limited testing for this functionality since MailCatcher fails for me - }) - .catch(error => { - Sentry.configureScope(function(scope) { - scope.setExtra('file', 'AssignmentList'); - scope.setExtra('action', 'apiPost (handleNewAssignment)'); - scope.setExtra('participantId', participantId); - scope.setExtra('body', JSON.stringify(actionItemBody)); - }); - Sentry.captureException(error); + apiPost('/api/assignments', body) + .then((response) => { + this.handleCloseModal(); + this.appendStateAssignment(response.data); // Limited testing for this functionality since MailCatcher fails for me + }) + .catch(error => { + Sentry.configureScope(function(scope) { + scope.setExtra('file', 'AssignmentList'); + scope.setExtra('action', 'apiPost (handleNewAssignment)'); + scope.setExtra('participantId', participantId); + scope.setExtra('body', JSON.stringify(actionItemBody)); }); - // THIS IS ACTIONITEMCREATIONPAGE PAYLOAD FORMAT + Sentry.captureException(error); + }); + // THIS IS ACTIONITEMCREATIONPAGE PAYLOAD FORMAT - // const participantIds = this.state.selectedParticipants.map( - // participant => participant.id, - // ); - - // const assignments = this.state.selectedActionItems.map(actionItem => ({ - // title: actionItem.title, - // description: actionItem.description, - // due_date: actionItem.dueDate, - // category: actionItem.category, - // })); - - // const body = { - // assignments, - // participant_ids: participantIds, - // }; - // apiPost('/api/assignments', body) + // const participantIds = this.state.selectedParticipants.map( + // participant => participant.id, + // ); + + // const assignments = this.state.selectedActionItems.map(actionItem => ({ + // title: actionItem.title, + // description: actionItem.description, + // due_date: actionItem.dueDate, + // category: actionItem.category, + // })); + + // const body = { + // assignments, + // participant_ids: participantIds, + // }; + // apiPost('/api/assignments', body) } } From 6423572253f1abc0eb80ae1d05afaf141fd6ea29 Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Sun, 3 May 2020 23:19:28 -0700 Subject: [PATCH 17/58] Fixing button logic, merging handleNew and handleEdit assignment, merging with Julian's ActionItemCard --- .../components/ActionItemCard/index.js | 20 +- .../components/ActionItemModal/index.js | 4 +- .../components/AssignmentList/index.js | 420 +++++++++++------- 3 files changed, 262 insertions(+), 182 deletions(-) diff --git a/app/javascript/components/ActionItemCard/index.js b/app/javascript/components/ActionItemCard/index.js index 5b0163ca..49a8f93f 100644 --- a/app/javascript/components/ActionItemCard/index.js +++ b/app/javascript/components/ActionItemCard/index.js @@ -7,7 +7,6 @@ import CloseIcon from '@material-ui/icons/Close'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; import PropTypes from 'prop-types'; -import Fab from '@material-ui/core/Fab'; import Button from '@material-ui/core/Button'; import theme from 'utils/theme'; import styles from './styles'; @@ -26,6 +25,7 @@ function ActionItemCard({ lastEntry = false, handleIconClick, removeActionItem, + renderEditOverMore, }) { const renderSelectIcon = () => ( @@ -94,13 +94,7 @@ function ActionItemCard({ - +
{category ? category.toUpperCase() : category} - +
{renderClose ? renderCloseIcon() : null} @@ -137,7 +131,10 @@ function ActionItemCard({ {renderClose ? renderEditButton() : renderDeleteButton()} - {renderViewMoreButton()} + {/* Make sure renderClose + renderEditOverMore are not both true, or else you get two edit buttons. */} + + {renderEditOverMore ? renderEditButton() : renderViewMoreButton()} + @@ -157,5 +154,6 @@ ActionItemCard.propTypes = { handleIconClick: PropTypes.func, removeActionItem: PropTypes.func, lastEntry: PropTypes.bool, + renderEditOverMore: PropTypes.bool, }; -export default withStyles(styles)(ActionItemCard); \ No newline at end of file +export default withStyles(styles)(ActionItemCard); diff --git a/app/javascript/components/ActionItemModal/index.js b/app/javascript/components/ActionItemModal/index.js index d4573665..997dfa5f 100644 --- a/app/javascript/components/ActionItemModal/index.js +++ b/app/javascript/components/ActionItemModal/index.js @@ -182,7 +182,7 @@ class ActionItemForm extends React.Component { Description - {this.props.type === 'CREATE' + {this.props.type === 'create' ? 'CREATE ACTION ITEM' : 'EDIT ACTION ITEM'} diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index ca3a1a62..2cf9524a 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -4,16 +4,15 @@ * */ -import React, { useState } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; -import { - Grid, - Paper, - List, - Button, +import { + Grid, + Paper, + List, + Button, Dialog, - DialogContent, DialogActions, DialogTitle, } from '@material-ui/core'; @@ -32,64 +31,55 @@ class AssignmentList extends React.Component { userType: this.props.userType, formatDate: this.props.formatDate, deleteModalOpen: false, - newModalOpen: false, + createModalOpen: false, editModalOpen: false, - // assignmentToDelete: null, - // assignmentToEdit: null, modalAssignment: null, }; this.appendStateAssignment = this.appendStateAssignment.bind(this); this.editStateAssignment = this.editStateAssignment.bind(this); this.deleteStateAssignment = this.deleteStateAssignment.bind(this); - this.handleNewAssignment = this.handleNewAssignment.bind(this); - this.handleEditAssignment = this.handleEditAssignment.bind(this); this.handleDeleteAssignment = this.handleDeleteAssignment.bind(this); this.handleCloseModal = this.handleCloseModal.bind(this); + this.handleCreateAndEditAssignment = this.handleCreateAndEditAssignment.bind( + this, + ); } - handleOpenModal(type, assignment) { - if (!assignment) { - assignment = null; - } - let modalOpen; - switch (type) { - case 'new': - modalOpen = 'newModalOpen'; - break; - case 'edit': + handleOpenModal(assignment) { + return modalType => { + let modalOpen; + if (modalType === 'create') { + modalOpen = 'createModalOpen'; + } else if (modalType === 'edit') { modalOpen = 'editModalOpen'; - break; - case 'delete': + } else if (modalType === 'delete') { modalOpen = 'deleteModalOpen'; - break; - } - this.setState({ - modalAssignment: assignment, - [modalOpen]: true, - }) + } + this.setState({ + modalAssignment: assignment, + [modalOpen]: true, + }); + }; } handleCloseModal() { this.setState({ modalAssignment: null, - newModalOpen: false, + createModalOpen: false, editModalOpen: false, - deleteModalOpen: false - }) + deleteModalOpen: false, + }); } appendStateAssignment(assignment) { - console.log("trying to append"); - console.log(this.state.assignments); - console.log(assignment); this.setState(prevState => ({ assignments: [assignment, ...prevState.assignments], })); } editStateAssignment(assignmentResponse) { - let actionItem = assignmentResponse.action_item; - let correctAssignment = { + const actionItem = assignmentResponse.action_item; + const correctAssignment = { actionItemId: actionItem.id, category: actionItem.category, description: actionItem.description, @@ -99,23 +89,25 @@ class AssignmentList extends React.Component { isTemplate: false, // Not sure about this one // createdAt: Not sure how to find this one // updatedAt: Not sure how to find this one - } + }; this.setState(prevState => { const toUpdate = [...prevState.assignments]; const foundIndex = toUpdate.findIndex( - assignment => assignment.id === correctAssignment.id + assignment => assignment.id === correctAssignment.id, ); if (foundIndex !== -1) { toUpdate[foundIndex] = correctAssignment; - return { assignments: toUpdate}; + return { assignments: toUpdate }; } return {}; - }) + }); } deleteStateAssignment(assignment) { this.setState(prevState => { - const remainingAssignments = prevState.assignments.filter(item => item.id !== assignment.id); + const remainingAssignments = prevState.assignments.filter( + item => item.id !== assignment.id, + ); return { assignments: remainingAssignments }; }); } @@ -124,19 +116,20 @@ class AssignmentList extends React.Component { if (this.state.modalAssignment) { return ( this.handleCloseModal()} - handleSubmit={this.handleEditAssignment} + handleSubmit={this.handleCreateAndEditAssignment('edit')} participantId={this.state.participantId} actionItemId={this.state.modalAssignment.actionItemId} /> - ) + ); } + return null; } deleteModal() { @@ -148,7 +141,9 @@ class AssignmentList extends React.Component { maxWidth="sm" fullWidth > - Are you sure you want to delete this assignment? + + Are you sure you want to delete this assignment? + - {this.state.newModalOpen ? ( + {this.state.createModalOpen ? ( this.handleCloseModal()} - handleSubmit={this.handleNewAssignment} + handleSubmit={this.handleCreateAndEditAssignment('create')} participantId={this.state.participantId} /> - ) : ( - null - )} + ) : null}
) : (
@@ -403,3 +367,121 @@ AssignmentList.propTypes = { }; export default withStyles(styles)(AssignmentList); + +// OLD METHODS, probably not needed, but reference just in case + +// handleNewAssignment( +// title, +// description, +// categorySelected, +// dueDate, +// addToTemplates, +// participantId, +// ) { +// console.log("making a new thing!"); +// // Make new ActionItemTemplate +// if (addToTemplates) { + +// const template = { +// title, +// description, +// category: categorySelected, +// dueDate, +// is_template: addToTemplates, +// }; + +// apiPost('/api/assignments/templates', { assignment: template }) +// .then((response) => { +// this.handleCloseModal(); +// // this.appendStateAssignment(response.data); +// }) +// .catch(error => { +// Sentry.configureScope(function(scope) { +// scope.setExtra('file', 'AssignmentList'); +// scope.setExtra('action', 'apiPost (createActionItem)'); +// scope.setExtra('template', JSON.stringify(template)); +// }) +// }) + +// } else { + +// // Add ActionItem to ActionItems +// const body = { +// assignments: [{ +// title, +// description, +// category: categorySelected, +// due_date: dueDate, +// }], +// participant_ids: [participantId], +// } +// console.log("body", body); +// apiPost('/api/assignments/', body) +// .then((response) => { +// this.handleCloseModal(); +// this.appendStateAssignment(response.data); // Limited testing for this functionality since MailCatcher fails for me +// }) +// .catch(error => { +// Sentry.configureScope(function(scope) { +// scope.setExtra('file', 'AssignmentList'); +// scope.setExtra('action', 'apiPost (handleNewAssignment)'); +// scope.setExtra('participantId', participantId); +// scope.setExtra('body', JSON.stringify(actionItemBody)); +// }); +// Sentry.captureException(error); +// }); +// // THIS IS ACTIONITEMCREATIONPAGE PAYLOAD FORMAT + +// // const participantIds = this.state.selectedParticipants.map( +// // participant => participant.id, +// // ); + +// // const assignments = this.state.selectedActionItems.map(actionItem => ({ +// // title: actionItem.title, +// // description: actionItem.description, +// // due_date: actionItem.dueDate, +// // category: actionItem.category, +// // })); + +// // const body = { +// // assignments, +// // participant_ids: participantIds, +// // }; +// // apiPost('/api/assignments', body) +// } +// } + +// handleEditAssignment( +// title, +// description, +// categorySelected, +// dueDate, +// addToTemplates, +// participantId, +// ) { + +// // Edit ActionItem and send PATCH request +// const body = { +// assignment: { +// title, +// description, +// category: categorySelected, +// due_date: dueDate, +// }, +// participant_ids: [participantId], +// } + +// apiPatch(`/api/assignments/${this.state.modalAssignment.id}`, body) +// .then((response) => { +// this.handleCloseModal(); +// this.editStateAssignment(response.data); +// }) +// .catch(error => { +// Sentry.configureScope(function(scope) { +// scope.setExtra('file', 'AssignmentList'); +// scope.setExtra('action', 'apiPatch (handleEditAssignment)'); +// scope.setExtra('assignmentId', this.state.modalAssignment.id); +// }); +// Sentry.captureException(error); +// }); +// } From bf656001739e1432244a908761dd74aae8502a57 Mon Sep 17 00:00:00 2001 From: didvi Date: Mon, 4 May 2020 12:18:23 -0700 Subject: [PATCH 18/58] fixed template api call and callbacks for assignment creation --- app/controllers/api/assignments_controller.rb | 2 +- .../components/ActionItemCard/index.js | 13 +- .../components/AssignmentList/index.js | 187 ++++++++++-------- 3 files changed, 117 insertions(+), 85 deletions(-) diff --git a/app/controllers/api/assignments_controller.rb b/app/controllers/api/assignments_controller.rb index f9eecce3..0783e6bb 100644 --- a/app/controllers/api/assignments_controller.rb +++ b/app/controllers/api/assignments_controller.rb @@ -30,7 +30,7 @@ def create prepare_bulk_assignment(participant_ids, action_item, due_date).each do |assignment| assignment_sentry_helper(assignment) if assignment.save - AssignmentMailer.with(assignment: assignment, action_item: action_item).new_assignment.deliver_now + # AssignmentMailer.with(assignment: assignment, action_item: action_item).new_assignment.deliver_now created_assignments.append(assignment) else action_item.destroy diff --git a/app/javascript/components/ActionItemCard/index.js b/app/javascript/components/ActionItemCard/index.js index 49a8f93f..f17941d6 100644 --- a/app/javascript/components/ActionItemCard/index.js +++ b/app/javascript/components/ActionItemCard/index.js @@ -16,6 +16,7 @@ function ActionItemCard({ title, description, dueDate, + formatDate, category, selected, renderClose, @@ -70,6 +71,13 @@ function ActionItemCard({ ); + const formattedDueDate = () => { + if (formatDate) { + return formatDate(dueDate); + } + return dueDate; + }; + return ( {dueDate ? ( - Due Date: {dueDate} + + Due Date: {formattedDueDate()} + ) : null} this.handleCloseModal()} - handleSubmit={this.handleCreateAndEditAssignment('edit')} - participantId={this.state.participantId} + handleSubmit={this.handleEditAssignment} + participantId={this.props.participantId} actionItemId={this.state.modalAssignment.actionItemId} /> ); @@ -165,88 +161,112 @@ class AssignmentList extends React.Component { ); } - handleCreateAndEditAssignment(type) { - return ( - title, - description, - categorySelected, - dueDate, - addToTemplates, - participantId, - ) => { - // For whether or not the actionItem is a template - let endPoint; - let payload; - if (addToTemplates) { - endPoint = '/api/assignments/templates/'; - payload = { - assignment: { - title, - description, - category: categorySelected, - dueDate, - is_template: addToTemplates, - }, - }; - } else { - endPoint = '/api/assignments/'; - const body = { - title, - description, - category: categorySelected, - due_date: dueDate, - }; - - // Slight modification between payloads - if (type === 'create') { - payload = { - assignments: [body], - }; - } else if (type === 'edit') { - payload = { - assignment: body, - }; - } - payload.participant_ids = [participantId]; - } + handleCreateAssignment( + title, + description, + categorySelected, + dueDate, + addToTemplates, + participantId, + ) { + // two api calls need to happen if making a template action item + const templateBody = { + assignment: { + title, + description, + category: categorySelected, + is_template: true, + }, + }; - // For making a new assignment or editing an existing one - let apiReqType; - if (type === 'create') { - apiReqType = apiPost; - } else if (type === 'edit') { - apiReqType = apiPatch; - endPoint = endPoint.concat(this.state.modalAssignment.id); // Adding ID to edit request - } + const assignments = [ + { + title, + description, + due_date: dueDate, + category: categorySelected, + }, + ]; + + const body = { + assignments, + participant_ids: [participantId], + }; - // Making the API request - apiReqType(endPoint, payload) + if (addToTemplates) { + Promise.all([ + apiPost('/api/assignments/templates/', templateBody), + apiPost('/api/assignments', body), + ]) + .then(responses => { + const response = responses[1]; + console.log(response.data); + this.handleCloseModal(); + this.appendStateAssignment(response.data[0].action_item); + }) + .catch(error => { + Sentry.configureScope(function(scope) { + scope.setExtra('file', 'AssignmentList'); + const apiType = 'apiPost'; + scope.setExtra('action', apiType.concat(' (handleCreateTemplate)')); + scope.setExtra('body', JSON.stringify(body)); + scope.setExtra('templateBody', JSON.stringify(templateBody)); + }); + Sentry.captureException(error); + }); + } else { + apiPost('/api/assignments', body) .then(response => { this.handleCloseModal(); - if (type === 'create') { - this.appendStateAssignment(response.data); - } else if (type === 'edit') { - this.editStateAssignment(response.data); - } + this.appendStateAssignment(response.data[0].action_item); }) .catch(error => { Sentry.configureScope(function(scope) { scope.setExtra('file', 'AssignmentList'); - let apiType; - if (type === 'create') { - apiType = 'apiPost'; - } else if (type === 'edit') { - apiType = 'apiPatch'; - } - scope.setExtra( - 'action', - apiType.concat(' (handleCreateAndEditAssignment)'), - ); - scope.setExtra('payload', JSON.stringify(payload)); + scope.setExtra('action', 'apiPost (handleCreateAssignment)'); + scope.setExtra('participantId', participantId); + scope.setExtra('body', JSON.stringify(body)); }); Sentry.captureException(error); }); + } + } + + handleEditAssignment( + title, + description, + categorySelected, + dueDate, + addToTemplates, + participantId, + ) { + const assignment = { + title, + description, + due_date: dueDate, + category: categorySelected, + }; + + const body = { + assignment, + participant_ids: [participantId], }; + + const endpoint = '/api/assignments/'.concat(this.state.modalAssignment.id); + apiPatch(endpoint, body) + .then(response => { + this.handleCloseModal(); + this.editStateAssignment(response.data); + }) + .catch(error => { + Sentry.configureScope(function(scope) { + scope.setExtra('file', 'AssignmentList'); + scope.setExtra('action', 'apiPatch (handleEditAssignment)'); + scope.setExtra('participantId', participantId); + scope.setExtra('body', JSON.stringify(body)); + }); + Sentry.captureException(error); + }); } handleDeleteAssignment() { @@ -279,7 +299,8 @@ class AssignmentList extends React.Component { selected={false} // Dummy prop for not rendering check or add icons renderClose={false} // Don't render close icon in dashboard assignment list handleOpenModal={this.handleOpenModal(assignment)} - dueDate={this.state.formatDate(assignment.dueDate)} + dueDate={assignment.dueDate} + formatDate={this.props.formatDate} removeActionItem={() => { this.handleOpenModal(assignment)('delete'); }} @@ -308,7 +329,7 @@ class AssignmentList extends React.Component {

Assignments

- {this.state.userType === 'staff' ? ( + {this.props.userType === 'staff' ? (
@@ -344,7 +365,7 @@ class AssignmentList extends React.Component { />

No assignments yet

- {this.state.userType === 'staff' ? ( + {this.props.userType === 'staff' ? (

Click on ASSIGN ASSIGNMENT + to assign one.

) : (
From bdbfbcd35e3f8fac2e7d5f95cd69a3cc56f3b554 Mon Sep 17 00:00:00 2001 From: didvi Date: Mon, 4 May 2020 14:27:52 -0700 Subject: [PATCH 19/58] fixed errors on participant show page for participant --- .../components/AssignmentList/index.js | 4 ++-- .../components/StudioAssessmentList/index.js | 21 +++++-------------- app/views/participants/dashboard.html.erb | 2 -- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index be1481c2..cbb83670 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -289,7 +289,7 @@ class AssignmentList extends React.Component { } assignmentEntries() { - if (this.state.assignments.length !== 0) { + if (this.state.assignments) { const assignmentCards = this.state.assignments.map(assignment => ( - {this.state.assignments.length !== 0 ? ( + {this.state.assignments ? ( this.assignmentEntries() ) : (
diff --git a/app/javascript/components/StudioAssessmentList/index.js b/app/javascript/components/StudioAssessmentList/index.js index 36217d59..8deb144d 100644 --- a/app/javascript/components/StudioAssessmentList/index.js +++ b/app/javascript/components/StudioAssessmentList/index.js @@ -19,17 +19,7 @@ function StudioAssessmentList({ userType, }) { const [studioAssessments] = useState(initialStudioAssessments); - // const updateStudioAssessment = updatedAssessments => { - // const allAssessments = [...studioAssessments]; - // const assessmentIndex = allAssessments.findIndex( - // assessment => assessment.id === updatedAssessments.id, - // ); - // if (assessmentIndex !== -1) { - // allAssessments[assessmentIndex] = updatedAssessments; - // setPaperworks(allAssessments); - // } - // }; - + const studioAssessmentEntries = studioAssessments.map(studioAssessment => (
@@ -38,7 +28,7 @@ function StudioAssessmentList({ {/* The following line renders the date the studio assessment was created at as the title, but might not be what we want to render here */}

{formatDate(studioAssessment.created_at)}

{/* Only admins can edit the different studioAssessments */} - {userType !== 'admin' ? ( + {userType !== 'participant' ? ( Studio Assessments

- {/* Only admins can see the create button */} - {userType !== 'admin' ? ( + {/* Only admins and staff can see the create button */} + {userType !== 'participant' ? ( @@ -100,7 +89,7 @@ function StudioAssessmentList({ studioAssessmentEntries ) : (
-

no studio assessments assigned

+

No Studio Assessments

)} diff --git a/app/views/participants/dashboard.html.erb b/app/views/participants/dashboard.html.erb index 4a6fc699..ea3d8bcf 100644 --- a/app/views/participants/dashboard.html.erb +++ b/app/views/participants/dashboard.html.erb @@ -1,5 +1,3 @@ -# This is viewed when you're a participant viewing your own page - <%= react_component('Main', { content: "ParticipantShowPage", participant: @participant, From 8464af4ac3898f61fafc011b73d9cc9e9935c15a Mon Sep 17 00:00:00 2001 From: didvi Date: Mon, 4 May 2020 19:06:10 -0700 Subject: [PATCH 20/58] removed check box for participant page and modified date format --- app/controllers/pages_controller.rb | 21 +++++- app/controllers/participants_controller.rb | 2 +- .../components/ActionItemModal/index.js | 47 ++++++------ .../components/AssignmentList/index.js | 72 ++++++------------- .../components/CaseNoteContainer/index.js | 2 +- .../components/ParticipantShowPage/index.js | 4 +- 6 files changed, 68 insertions(+), 80 deletions(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index bbe490df..58dfbdb1 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -25,8 +25,25 @@ def dashboard @participant = @user.participant @paperworks = @user.participant.paperworks @case_notes = @user.participant.case_notes#.where(visible: true), changing for testing purposes - @assignments = @user.participant.assignments - # @action_items = ActionItem.where(id: @assignments[0].action_item_id) + @assignments = @participant.assignments + + @assignment_list = [] + @assignments.each do |a| + action_item = ActionItem.where(id: a.action_item_id).first + complete_assignment = { + "id" => a.id, + "title" => action_item.title, + "description" => action_item.description, + "category" => action_item.category, + "is_template" => action_item.is_template, + "created_at" => a.created_at, + "updated_at" => a.updated_at, + "due_date" => a.due_date&.strftime("%Y-%m-%d"), + "action_item_id" => a.action_item_id, + } + @assignment_list.push(complete_assignment) + end + @studio_assessments = @user.participant.studio_assessments if @participant.personal_questionnaire.nil? diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index e741bf69..0743736a 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -35,7 +35,7 @@ def show "is_template" => action_item.is_template, "created_at" => a.created_at, "updated_at" => a.updated_at, - "due_date" => a.due_date, + "due_date" => a.due_date&.strftime("%Y-%m-%d"), "action_item_id" => a.action_item_id, } @assignment_list.push(complete_assignment) diff --git a/app/javascript/components/ActionItemModal/index.js b/app/javascript/components/ActionItemModal/index.js index 997dfa5f..af4e6912 100644 --- a/app/javascript/components/ActionItemModal/index.js +++ b/app/javascript/components/ActionItemModal/index.js @@ -15,7 +15,7 @@ import { } from '@material-ui/core'; import { withStyles, ThemeProvider } from '@material-ui/core/styles'; import styles from './styles'; -class ActionItemForm extends React.Component { +class ActionItemModal extends React.Component { constructor(props) { super(props); this.state = { @@ -83,6 +83,7 @@ class ActionItemForm extends React.Component { const categoryList = categories.map(category => { const isSelectedCategory = categorySelected && categorySelected === category; + return ( + { + const newValue = { target: { value: e.target.checked } }; + this.handleChange('addToTemplates')(newValue); + }} + /> + + ADD TO COMMON ASSIGNMENTS + + + ); + return ( - - { - const newValue = { target: { value: e.target.checked } }; - this.handleChange('addToTemplates')(newValue); - }} - /> - - ADD TO COMMON ASSIGNMENTS - - + {this.props.showAddToTemplates ? addToTemplatesCheckbox : null} {this.state.createModalOpen ? ( - this.handleCloseModal()} handleSubmit={this.handleCreateAssignment} participantId={this.props.participantId} + showAddToTemplates={false} /> ) : null}
diff --git a/app/javascript/components/CaseNoteContainer/index.js b/app/javascript/components/CaseNoteContainer/index.js index de541be6..0a434877 100644 --- a/app/javascript/components/CaseNoteContainer/index.js +++ b/app/javascript/components/CaseNoteContainer/index.js @@ -40,7 +40,7 @@ class CaseNoteContainer extends React.Component { const dateObj = new Date(dateString); const year = dateObj.getFullYear(); const month = dateObj.getMonth() + 1; - const dt = dateObj.getDate(); + const dt = dateObj.getDate() + 1; return `${month.toString()}/${dt.toString()}/${year.toString()}`; } diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index ac146105..1732cef8 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -29,7 +29,7 @@ class ParticipantShowPage extends React.Component { const dateObj = new Date(dateString); const year = dateObj.getFullYear(); const month = dateObj.getMonth() + 1; - const dt = dateObj.getDate(); + const dt = dateObj.getDate() + 1; return `${month.toString()}/${dt.toString()}/${year.toString()}`; }; @@ -59,8 +59,6 @@ class ParticipantShowPage extends React.Component { professionalQuestionnaire, studioAssessments, userType, - isAdmin, - assignments, // Do we even need these anymore? assignmentList, } = this.props; From e67db5cf147a5f5a3794d0e3a4f2ff0520fae04b Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Tue, 5 May 2020 21:27:35 -0700 Subject: [PATCH 21/58] Fixing date formatting --- app/javascript/components/ActionItemModal/index.js | 2 +- app/javascript/components/AssignmentList/index.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/javascript/components/ActionItemModal/index.js b/app/javascript/components/ActionItemModal/index.js index af4e6912..d354064a 100644 --- a/app/javascript/components/ActionItemModal/index.js +++ b/app/javascript/components/ActionItemModal/index.js @@ -219,7 +219,7 @@ class ActionItemModal extends React.Component { Due Date { this.handleCloseModal(); - console.log(response.data[0].action_item); - this.appendStateAssignment(response.data[0].action_item); + const newAssignment = response.data[0].action_item; + newAssignment.dueDate = response.data[0].due_date; + this.appendStateAssignment(newAssignment); }) .catch(error => { Sentry.configureScope(function(scope) { From fc5731740f67532f4403286da53de6c891de9e8c Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Thu, 7 May 2020 00:49:45 -0700 Subject: [PATCH 22/58] Created ActionItemCategoryTag component and ActionItemForm and AddFromExistingForm use it --- .../components/ActionItemCategoryTag/index.js | 47 +++++++++++++++++++ .../ActionItemCategoryTag/styles.js | 24 ++++++++++ .../components/ActionItemForm/index.js | 44 +++++------------ .../components/AddFromExistingForm/index.js | 32 +++---------- 4 files changed, 89 insertions(+), 58 deletions(-) create mode 100644 app/javascript/components/ActionItemCategoryTag/index.js create mode 100644 app/javascript/components/ActionItemCategoryTag/styles.js diff --git a/app/javascript/components/ActionItemCategoryTag/index.js b/app/javascript/components/ActionItemCategoryTag/index.js new file mode 100644 index 00000000..58332b4a --- /dev/null +++ b/app/javascript/components/ActionItemCategoryTag/index.js @@ -0,0 +1,47 @@ +import React from 'react'; +import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; +import PropTypes from 'prop-types'; +import Fab from '@material-ui/core/Fab'; +import styles from './styles'; + +function ActionItemCategoryTag({ + classes, + category, + handleClick, + // Used by style file + // eslint-disable-next-line no-unused-vars + selected, +}) { + return ( + handleClick(category)} + > + + {category.toUpperCase()} + + + ); +} + +ActionItemCategoryTag.propTypes = { + classes: PropTypes.object.isRequired, + category: PropTypes.oneOf([ + 'Finances', + 'Project', + 'Community', + 'Startup', + 'Treatment', + 'Health', + 'Education', + ]).isRequired, + selected: PropTypes.bool.isRequired, + handleClick: PropTypes.func, +}; + +export default withStyles(styles)(ActionItemCategoryTag); diff --git a/app/javascript/components/ActionItemCategoryTag/styles.js b/app/javascript/components/ActionItemCategoryTag/styles.js new file mode 100644 index 00000000..9a371d3c --- /dev/null +++ b/app/javascript/components/ActionItemCategoryTag/styles.js @@ -0,0 +1,24 @@ +const styles = theme => ({ + categoryButtonStyle: { + fontSize: '10px', + textAlign: 'center', + width: 60, + paddingLeft: '8px', + paddingRight: '8px', + color: ({ selected }) => + selected ? theme.palette.common.lighterBlue : theme.palette.primary.main, + }, + iconStyle: { + boxShadow: 'None', + backgroundColor: ({ selected }) => + selected ? theme.palette.primary.main : theme.palette.common.lighterBlue, + '&:hover': { + backgroundColor: ({ selected }) => + selected + ? theme.palette.primary.main + : theme.palette.common.lighterBlue, + }, + }, +}); + +export default styles; diff --git a/app/javascript/components/ActionItemForm/index.js b/app/javascript/components/ActionItemForm/index.js index b8487aec..ec739999 100644 --- a/app/javascript/components/ActionItemForm/index.js +++ b/app/javascript/components/ActionItemForm/index.js @@ -6,8 +6,8 @@ import Typography from '@material-ui/core/Typography'; import PropTypes from 'prop-types'; import Checkbox from '@material-ui/core/Checkbox'; import Button from '@material-ui/core/Button'; -import Fab from '@material-ui/core/Fab'; import Paper from '@material-ui/core/Paper'; +import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; import theme from 'utils/theme'; import styles from './styles'; @@ -37,42 +37,22 @@ function ActionItemForm({ }) { const [failedSubmit, setFailedSubmit] = useState(false); + const handleCategoryChange = category => { + // setCategory expects this form + const newCategory = categorySelected !== category ? category : null; + setCategory({ target: { value: newCategory } }); + }; + const categoryList = categories.map(category => { const isSelectedCategory = categorySelected && categorySelected === category; return ( - - setCategory( - categorySelected !== category - ? { target: { value: category } } - : { target: { value: null } }, - ) - } - > - - {category.toUpperCase()} - - + ); }); diff --git a/app/javascript/components/AddFromExistingForm/index.js b/app/javascript/components/AddFromExistingForm/index.js index 2c295793..9132e9cd 100644 --- a/app/javascript/components/AddFromExistingForm/index.js +++ b/app/javascript/components/AddFromExistingForm/index.js @@ -4,7 +4,6 @@ import Grid from '@material-ui/core/Grid'; import TextField from '@material-ui/core/TextField'; import Typography from '@material-ui/core/Typography'; import PropTypes from 'prop-types'; -import Fab from '@material-ui/core/Fab'; import Button from '@material-ui/core/Button'; import DialogTitle from '@material-ui/core/DialogTitle'; import Dialog from '@material-ui/core/Dialog'; @@ -13,6 +12,7 @@ import DialogContent from '@material-ui/core/DialogContent'; import Paper from '@material-ui/core/Paper'; import ActionItemCard from 'components/ActionItemCard'; import theme from 'utils/theme'; +import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; import styles from './styles'; const TrieSearch = require('trie-search'); @@ -141,31 +141,11 @@ class AddFromExistingForm extends React.Component { this.state.categorySelected && this.state.categorySelected === category; return ( - this.selectCategory(category)} - > - - {category.toUpperCase()} - - + ); }); From b2664dbfb994814fc068e4cc932ef33a1a163c4b Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Thu, 7 May 2020 01:31:53 -0700 Subject: [PATCH 23/58] Created util file for categories. Disabled clicking category tag on ActionItemCard and ViewMoreModal. --- .../components/ActionItemCard/index.js | 30 ++++++++----------- .../components/ActionItemCategoryTag/index.js | 24 ++++++++------- .../components/ActionItemForm/index.js | 13 ++------ .../components/AddFromExistingForm/index.js | 14 ++------- .../components/ViewMoreModal/index.js | 29 ++++-------------- app/javascript/utils/utils.js | 9 ++++++ 6 files changed, 45 insertions(+), 74 deletions(-) create mode 100644 app/javascript/utils/utils.js diff --git a/app/javascript/components/ActionItemCard/index.js b/app/javascript/components/ActionItemCard/index.js index 478a0598..57ceff10 100644 --- a/app/javascript/components/ActionItemCard/index.js +++ b/app/javascript/components/ActionItemCard/index.js @@ -6,9 +6,10 @@ import CheckCircleIcon from '@material-ui/icons/CheckCircle'; import CloseIcon from '@material-ui/icons/Close'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; +import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; import PropTypes from 'prop-types'; -import Fab from '@material-ui/core/Fab'; import Button from '@material-ui/core/Button'; +import { categories } from 'utils/utils'; import theme from 'utils/theme'; import styles from './styles'; @@ -86,28 +87,21 @@ function ActionItemCard({ wrap="nowrap" spacing={2} > - + {title} - - - {category ? category.toUpperCase() : category} - - + @@ -150,7 +144,7 @@ ActionItemCard.propTypes = { classes: PropTypes.object.isRequired, title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, - category: PropTypes.string.isRequired, + category: PropTypes.oneOf(categories).isRequired, selected: PropTypes.bool.isRequired, renderClose: PropTypes.bool.isRequired, handleOpenModal: PropTypes.func.isRequired, diff --git a/app/javascript/components/ActionItemCategoryTag/index.js b/app/javascript/components/ActionItemCategoryTag/index.js index 58332b4a..28af0eca 100644 --- a/app/javascript/components/ActionItemCategoryTag/index.js +++ b/app/javascript/components/ActionItemCategoryTag/index.js @@ -3,23 +3,35 @@ import { withStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; import PropTypes from 'prop-types'; import Fab from '@material-ui/core/Fab'; +import { categories } from 'utils/utils'; +import theme from 'utils/theme'; import styles from './styles'; function ActionItemCategoryTag({ classes, category, + // If handleClick not passed it is assumed the component is not clickable handleClick, // Used by style file // eslint-disable-next-line no-unused-vars selected, }) { + const notInteractable = handleClick === undefined; + const notInteractableStyle = notInteractable + ? { backgroundColor: theme.palette.common.lighterBlue } + : null; return ( handleClick(category)} > @@ -31,16 +43,8 @@ function ActionItemCategoryTag({ ActionItemCategoryTag.propTypes = { classes: PropTypes.object.isRequired, - category: PropTypes.oneOf([ - 'Finances', - 'Project', - 'Community', - 'Startup', - 'Treatment', - 'Health', - 'Education', - ]).isRequired, - selected: PropTypes.bool.isRequired, + category: PropTypes.oneOf(categories).isRequired, + selected: PropTypes.bool, handleClick: PropTypes.func, }; diff --git a/app/javascript/components/ActionItemForm/index.js b/app/javascript/components/ActionItemForm/index.js index ec739999..a6fa58ec 100644 --- a/app/javascript/components/ActionItemForm/index.js +++ b/app/javascript/components/ActionItemForm/index.js @@ -9,18 +9,9 @@ import Button from '@material-ui/core/Button'; import Paper from '@material-ui/core/Paper'; import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; import theme from 'utils/theme'; +import { categories } from 'utils/utils'; import styles from './styles'; -const categories = [ - 'Finances', - 'Project', - 'Community', - 'Startup', - 'Treatment', - 'Health', - 'Education', -]; - function ActionItemForm({ classes, title, @@ -38,7 +29,7 @@ function ActionItemForm({ const [failedSubmit, setFailedSubmit] = useState(false); const handleCategoryChange = category => { - // setCategory expects this form + // setCategory uses ActionItemCreationPage's handleChange which expects this form const newCategory = categorySelected !== category ? category : null; setCategory({ target: { value: newCategory } }); }; diff --git a/app/javascript/components/AddFromExistingForm/index.js b/app/javascript/components/AddFromExistingForm/index.js index 9132e9cd..74cf750e 100644 --- a/app/javascript/components/AddFromExistingForm/index.js +++ b/app/javascript/components/AddFromExistingForm/index.js @@ -13,6 +13,7 @@ import Paper from '@material-ui/core/Paper'; import ActionItemCard from 'components/ActionItemCard'; import theme from 'utils/theme'; import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; +import { categories } from 'utils/utils'; import styles from './styles'; const TrieSearch = require('trie-search'); @@ -127,15 +128,6 @@ class AddFromExistingForm extends React.Component { ); }); - const categories = [ - 'Finances', - 'Project', - 'Community', - 'Startup', - 'Treatment', - 'Health', - 'Education', - ]; const categoryList = categories.map(category => { const isSelectedCategory = this.state.categorySelected && this.state.categorySelected === category; @@ -178,10 +170,10 @@ class AddFromExistingForm extends React.Component { SEARCH BY CATEGORY - + {categoryList.slice(0, 4)} - + {categoryList.slice(4)} diff --git a/app/javascript/components/ViewMoreModal/index.js b/app/javascript/components/ViewMoreModal/index.js index 3d0f2ba7..b0eede7a 100644 --- a/app/javascript/components/ViewMoreModal/index.js +++ b/app/javascript/components/ViewMoreModal/index.js @@ -4,14 +4,9 @@ import MUIRichTextEditor from 'mui-rte'; import 'draft-js/dist/Draft.css'; import 'draftail/dist/draftail.css'; import { withStyles } from '@material-ui/core/styles'; -import { - Dialog, - Grid, - Paper, - Input, - Fab, - Typography, -} from '@material-ui/core/'; +import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; +import { Dialog, Grid, Paper, Input } from '@material-ui/core/'; +import { categories } from 'utils/utils'; import styles from './styles'; function ViewMoreModal({ @@ -32,21 +27,7 @@ function ViewMoreModal({ ); const renderCategory = categorySelected => ( - - - {categorySelected.toUpperCase()} - - + ); const renderDueDate = date => { @@ -106,7 +87,7 @@ ViewMoreModal.propTypes = { classes: PropTypes.object.isRequired, description: PropTypes.string, title: PropTypes.string, - category: PropTypes.string, + category: PropTypes.oneOf(categories), dueDate: PropTypes.string, open: PropTypes.bool.isRequired, isCaseNote: PropTypes.bool, diff --git a/app/javascript/utils/utils.js b/app/javascript/utils/utils.js new file mode 100644 index 00000000..8ee9de53 --- /dev/null +++ b/app/javascript/utils/utils.js @@ -0,0 +1,9 @@ +export const categories = [ + 'Finances', + 'Project', + 'Community', + 'Startup', + 'Treatment', + 'Health', + 'Education', +]; From cc83a24bea0f622680474a896aa492ad2cf4e0c0 Mon Sep 17 00:00:00 2001 From: didvi Date: Thu, 7 May 2020 12:08:51 -0700 Subject: [PATCH 24/58] removed most routes that are not needed for main app --- .../professional_questionnaires_controller.rb | 2 +- app/controllers/application_controller.rb | 3 +- .../professional_questionnaires_controller.rb | 3 +- .../studio_assessments_controller.rb | 6 +- app/policies/application_policy.rb | 10 +- app/policies/questionnaire_policy.rb | 26 ++--- .../personal_questionnaires/edit.html.erb | 10 -- .../personal_questionnaires/index.html.erb | 27 +---- .../professional_questionnaires/edit.html.erb | 10 -- .../index.html.erb | 28 +---- app/views/studio_assessments/edit.html.erb | 6 - app/views/studio_assessments/show.html.erb | 109 ------------------ config/routes.rb | 7 +- 13 files changed, 20 insertions(+), 227 deletions(-) delete mode 100644 app/views/personal_questionnaires/edit.html.erb delete mode 100644 app/views/professional_questionnaires/edit.html.erb delete mode 100644 app/views/studio_assessments/edit.html.erb delete mode 100644 app/views/studio_assessments/show.html.erb diff --git a/app/controllers/api/professional_questionnaires_controller.rb b/app/controllers/api/professional_questionnaires_controller.rb index ee1eb64a..55856e5c 100644 --- a/app/controllers/api/professional_questionnaires_controller.rb +++ b/app/controllers/api/professional_questionnaires_controller.rb @@ -1,7 +1,7 @@ class Api::ProfessionalQuestionnairesController < ApplicationController before_action :set_questionnaire, only: [:show, :update, :destroy] respond_to :json - + def show render json: @questionnaire end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a6f8fe17..8661f1cb 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -4,8 +4,7 @@ class ApplicationController < ActionController::Base protect_from_forgery with: :exception before_action :authenticate_user! before_action :set_raven_context - after_action :verify_authorized, except: :index, unless: :devise_controller? - after_action :verify_policy_scoped, only: :index + after_action :verify_authorized, unless: :devise_controller? rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized diff --git a/app/controllers/professional_questionnaires_controller.rb b/app/controllers/professional_questionnaires_controller.rb index 06cb655b..f9c4afb8 100644 --- a/app/controllers/professional_questionnaires_controller.rb +++ b/app/controllers/professional_questionnaires_controller.rb @@ -2,8 +2,7 @@ class ProfessionalQuestionnairesController < ApplicationController before_action :set_professional_questionnaire, only: [:show, :edit] def index - skip_policy_scope - @questionnaires = ProfessionalQuestionnaire.all + @questionnaires = authorize ProfessionalQuestionnaire.all @questionnaireFields = ProfessionalQuestionnaire.column_names @user = current_user end diff --git a/app/controllers/studio_assessments_controller.rb b/app/controllers/studio_assessments_controller.rb index f91ce7fb..59a25b7d 100644 --- a/app/controllers/studio_assessments_controller.rb +++ b/app/controllers/studio_assessments_controller.rb @@ -30,6 +30,7 @@ def index # GET /studio_assessments/1 # GET /studio_assessments/1.json def show + authorize @studio_assessment end # GET /studio_assessments/new @@ -38,11 +39,6 @@ def new @participants = Participant.all end - # GET /studio_assessments/1/edit - def edit - @participants = Participant.all - end - private def set_studio_assessment @studio_assessment = authorize StudioAssessment.find(params[:id]) diff --git a/app/policies/application_policy.rb b/app/policies/application_policy.rb index deff5590..e7bd0ba8 100644 --- a/app/policies/application_policy.rb +++ b/app/policies/application_policy.rb @@ -3,9 +3,10 @@ class ApplicationPolicy # In your controller, Pundit will call the current_user method # to retrieve what to send into the argument - def initialize(user, resource) - @user = user - @resource = resource + def initialize(user, record) + raise Pundit::NotAuthorizedError, "must be logged in" unless user + @user = user + @record = record end def index? @@ -35,8 +36,7 @@ def edit? def destroy? false end - - + class Scope attr_reader :user, :scope diff --git a/app/policies/questionnaire_policy.rb b/app/policies/questionnaire_policy.rb index 7331f16b..aee54285 100644 --- a/app/policies/questionnaire_policy.rb +++ b/app/policies/questionnaire_policy.rb @@ -9,33 +9,21 @@ def show? create? or (user.participant? && user.participant.id == resource.participant_id) end - def set_questionnaire? - show? - end - def index? - create? + staff? end def update? - create? + staff? end def destroy? - create? + staff? end - class Scope < Scope - # The first argument is a user. In your controller, Pundit will call the current_user method - # to retrieve what to send into this argument. - # The second argument is a scope of some kind on which to perform some kind of query. - # It will usually be an ActiveRecord class or a ActiveRecord::Relation. - def resolve - if user.staff? - scope.all - else - scope.where(participant_id: user.participant.id) - end - end + private + + def staff? + user.present? && user.staff? end end diff --git a/app/views/personal_questionnaires/edit.html.erb b/app/views/personal_questionnaires/edit.html.erb deleted file mode 100644 index afbfbe15..00000000 --- a/app/views/personal_questionnaires/edit.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -

Edit Questionnaire

-<%= form_with(model: @questionnaire, url: api_personal_questionnaire_path, local: true) do |form| %> - Medical:
- <%= form.text_field :medical %>
- Emergency Contact:
- <%= form.text_field :emergency_contact_name %>
-
- <%= form.submit "Submit" %> -<% end %> -<%= link_to 'Back', personal_questionnaires_path %> \ No newline at end of file diff --git a/app/views/personal_questionnaires/index.html.erb b/app/views/personal_questionnaires/index.html.erb index 2b16fb25..bbb179bc 100644 --- a/app/views/personal_questionnaires/index.html.erb +++ b/app/views/personal_questionnaires/index.html.erb @@ -1,25 +1,2 @@ -

All Personal Questionnaires

- - - - - - - - - - <% @questionnaires.each do |q| %> - - - - - - - - <% end %> -
MedicalContact infoEmergency ContactParticipant
<%= q.medical %><%= q.participant.first_name %><%= link_to 'Show', personal_questionnaire_path(q) %><%= link_to 'Edit', edit_personal_questionnaire_path(q) %><%= link_to 'Delete', api_personal_questionnaire_path(q), - method: :delete, - data: { confirm: 'Are you sure?' } %>
-<% if @user.present? && @user.staff? %> - <%= react_component("QuestionnaireForm", {questionnaireType: "Personal", fields: @questionnaireFields, participant_id: 1}) %> -<% end %> +<%= react_component("QuestionnaireForm", {questionnaireType: "Personal", fields: @questionnaireFields}) %> + diff --git a/app/views/professional_questionnaires/edit.html.erb b/app/views/professional_questionnaires/edit.html.erb deleted file mode 100644 index 1d55180a..00000000 --- a/app/views/professional_questionnaires/edit.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -

Edit Questionnaire

-<%= form_with(model: @questionnaire, url: api_professional_questionnaire_path, local: true) do |form| %> - Medical:
- <%= form.text_field :medical %>
- Emergency Contact:
- <%= form.text_field :emergency_contact_name %>
-
- <%= form.submit "Submit" %> -<% end %> -<%= link_to 'Back', professional_questionnaires_path %> \ No newline at end of file diff --git a/app/views/professional_questionnaires/index.html.erb b/app/views/professional_questionnaires/index.html.erb index b8b978b9..67b85228 100644 --- a/app/views/professional_questionnaires/index.html.erb +++ b/app/views/professional_questionnaires/index.html.erb @@ -1,27 +1 @@ -

All Professional Questionnaires

- - - - - - - - - - <% @questionnaires.each do |q| %> - - - - - - - - - - <% end %> -
Course CompletionWork HistoryProfessional GoalsParticipant
<%= q.course_completion %><%= q.work_history %><%= q.professional_goals %><%= q.participant.first_name %><%= link_to 'Show', professional_questionnaire_path(q) %><%= link_to 'Edit', edit_professional_questionnaire_path(q) %><%= link_to 'Delete', api_professional_questionnaire_path(q), - method: :delete, - data: { confirm: 'Are you sure?' } %>
-<% if @user.present? && @user.staff? %> - <%= react_component("QuestionnaireForm", {questionnaireType: "Professional", fields: @questionnaireFields, participant_id: 1}) %> -<% end %> +<%= react_component("QuestionnaireForm", {questionnaireType: "Professional", fields: @questionnaireFields}) %> diff --git a/app/views/studio_assessments/edit.html.erb b/app/views/studio_assessments/edit.html.erb deleted file mode 100644 index 9a6c0617..00000000 --- a/app/views/studio_assessments/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -

Editing Studio Assessment

- -<%= render 'form', studio_assessment: @studio_assessment %> - -<%= link_to 'Show', @studio_assessment %> | -<%= link_to 'Back', studio_assessments_path %> diff --git a/app/views/studio_assessments/show.html.erb b/app/views/studio_assessments/show.html.erb deleted file mode 100644 index 90f6f238..00000000 --- a/app/views/studio_assessments/show.html.erb +++ /dev/null @@ -1,109 +0,0 @@ -

<%= notice %>

- -

- Participant: - <%= @studio_assessment.participant.full_name %> -

- -

- Staff: - <%= @studio_assessment.staff.full_name %> -

- -

- Bigpicture score: - <%= @studio_assessment.bigpicture_score %> -

- -

- Bigpicture comment: - <%= @studio_assessment.bigpicture_comment %> -

- -

- Progfundamentals score: - <%= @studio_assessment.progfundamentals_score %> -

- -

- Progfundamentals comment: - <%= @studio_assessment.progfundamentals_comment %> -

- -

- Versioncontrol score: - <%= @studio_assessment.versioncontrol_score %> -

- -

- Versioncontrol comment: - <%= @studio_assessment.versioncontrol_comment %> -

- -

- React score: - <%= @studio_assessment.react_score %> -

- -

- React comment: - <%= @studio_assessment.react_comment %> -

- -

- Node score: - <%= @studio_assessment.node_score %> -

- -

- Node comment: - <%= @studio_assessment.node_comment %> -

- -

- Db score: - <%= @studio_assessment.db_score %> -

- -

- Db comment: - <%= @studio_assessment.db_comment %> -

- -

- Problemsolving score: - <%= @studio_assessment.problemsolving_score %> -

- -

- Problemsolving comment: - <%= @studio_assessment.problemsolving_comment %> -

- -

- Problemsolvingalt score: - <%= @studio_assessment.problemsolvingalt_score %> -

- -

- Problemsolvingalt comment: - <%= @studio_assessment.problemsolvingalt_comment %> -

- -

- Passed capstone: - <%= @studio_assessment.capstone_passed %> -

- -

- Capstone comment: - <%= @studio_assessment.capstone_comment %> -

- -

- Assessment type: - <%= @studio_assessment.assessment_type %> -

- -<%= link_to 'Edit', edit_studio_assessment_path(@studio_assessment) %> | -<%= link_to 'Back', studio_assessments_path %> diff --git a/config/routes.rb b/config/routes.rb index 35dfd712..e10d5c92 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,4 @@ Rails.application.routes.draw do - resources :studio_assessments # Routes for Google authentication devise_for :users, controllers: { omniauth_callbacks: 'users/omniauth_callbacks' } get 'auth/:provider/callback', to: 'sessions#googleAuth' @@ -12,11 +11,7 @@ mount RailsAdmin::Engine => '/admin', as: 'rails_admin' - resources :assignments, :paperworks, :case_notes, :studio_assessments, :professional_questionnaires, :personal_questionnaires, only: [:index, :show, :new, :edit] - - get '/assignments', to: 'assignments#index' - - get '/studio_assessments', to: 'studio_assessments#index' + resources :assignments, :studio_assessments, only: :index resources :staffs, only: [] do collection do From 61854ee9d22f68536bfb452ec2ee6b749549ce5b Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Fri, 8 May 2020 21:01:56 -0700 Subject: [PATCH 25/58] Removed utils file. Passing categories from view --- app/javascript/components/ActionItemCard/index.js | 3 +-- app/javascript/components/ActionItemCategoryTag/index.js | 3 +-- .../components/ActionItemCreationContainer/index.js | 4 ++++ .../components/ActionItemCreationPage/index.js | 2 ++ app/javascript/components/ActionItemForm/index.js | 3 ++- app/javascript/components/AddFromExistingForm/index.js | 4 ++-- app/javascript/components/ViewMoreModal/index.js | 3 +-- app/javascript/utils/utils.js | 9 --------- app/views/assignments/index.html.erb | 1 + 9 files changed, 14 insertions(+), 18 deletions(-) delete mode 100644 app/javascript/utils/utils.js diff --git a/app/javascript/components/ActionItemCard/index.js b/app/javascript/components/ActionItemCard/index.js index 57ceff10..32641210 100644 --- a/app/javascript/components/ActionItemCard/index.js +++ b/app/javascript/components/ActionItemCard/index.js @@ -9,7 +9,6 @@ import Typography from '@material-ui/core/Typography'; import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; import PropTypes from 'prop-types'; import Button from '@material-ui/core/Button'; -import { categories } from 'utils/utils'; import theme from 'utils/theme'; import styles from './styles'; @@ -144,7 +143,7 @@ ActionItemCard.propTypes = { classes: PropTypes.object.isRequired, title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, - category: PropTypes.oneOf(categories).isRequired, + category: PropTypes.string.isRequired, selected: PropTypes.bool.isRequired, renderClose: PropTypes.bool.isRequired, handleOpenModal: PropTypes.func.isRequired, diff --git a/app/javascript/components/ActionItemCategoryTag/index.js b/app/javascript/components/ActionItemCategoryTag/index.js index 28af0eca..4460fe7d 100644 --- a/app/javascript/components/ActionItemCategoryTag/index.js +++ b/app/javascript/components/ActionItemCategoryTag/index.js @@ -3,7 +3,6 @@ import { withStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; import PropTypes from 'prop-types'; import Fab from '@material-ui/core/Fab'; -import { categories } from 'utils/utils'; import theme from 'utils/theme'; import styles from './styles'; @@ -43,7 +42,7 @@ function ActionItemCategoryTag({ ActionItemCategoryTag.propTypes = { classes: PropTypes.object.isRequired, - category: PropTypes.oneOf(categories).isRequired, + category: PropTypes.string.isRequired, selected: PropTypes.bool, handleClick: PropTypes.func, }; diff --git a/app/javascript/components/ActionItemCreationContainer/index.js b/app/javascript/components/ActionItemCreationContainer/index.js index f93d6713..9d4b1668 100644 --- a/app/javascript/components/ActionItemCreationContainer/index.js +++ b/app/javascript/components/ActionItemCreationContainer/index.js @@ -31,6 +31,7 @@ function ActionItemCreationContainer({ createActionItem, deleteTemplate, handleOpenModal, + categories, }) { const [creationSetting, setCreationSetting] = useState(Setting.SCRATCH); const [addToTemplates, setAddToTemplates] = useState(false); @@ -98,6 +99,7 @@ function ActionItemCreationContainer({ addToTemplates={addToTemplates} setAddToTemplates={setAddToTemplates} createActionItem={createActionItem} + categories={categories} /> ) : ( )}
@@ -132,6 +135,7 @@ ActionItemCreationContainer.propTypes = { setCategory: PropTypes.func.isRequired, deleteTemplate: PropTypes.func.isRequired, handleOpenModal: PropTypes.func.isRequired, + categories: PropTypes.array.isRequired, }; export default withStyles(styles)(ActionItemCreationContainer); diff --git a/app/javascript/components/ActionItemCreationPage/index.js b/app/javascript/components/ActionItemCreationPage/index.js index 90700f32..c0cb4b2a 100644 --- a/app/javascript/components/ActionItemCreationPage/index.js +++ b/app/javascript/components/ActionItemCreationPage/index.js @@ -356,6 +356,7 @@ class ActionItemCreationPage extends React.Component { selectActionItemTemplate={this.selectActionItemTemplate} deleteTemplate={this.deleteTemplate} handleOpenModal={this.handleOpenModal} + categories={this.props.categories} /> ); break; @@ -685,6 +686,7 @@ ActionItemCreationPage.propTypes = { templates: PropTypes.array.isRequired, statuses: PropTypes.object.isRequired, participants: PropTypes.array.isRequired, + categories: PropTypes.array.isRequired, }; export default withStyles(styles)(ActionItemCreationPage); diff --git a/app/javascript/components/ActionItemForm/index.js b/app/javascript/components/ActionItemForm/index.js index a6fa58ec..84187663 100644 --- a/app/javascript/components/ActionItemForm/index.js +++ b/app/javascript/components/ActionItemForm/index.js @@ -9,7 +9,6 @@ import Button from '@material-ui/core/Button'; import Paper from '@material-ui/core/Paper'; import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; import theme from 'utils/theme'; -import { categories } from 'utils/utils'; import styles from './styles'; function ActionItemForm({ @@ -25,6 +24,7 @@ function ActionItemForm({ addToTemplates, setAddToTemplates, createActionItem, + categories, }) { const [failedSubmit, setFailedSubmit] = useState(false); @@ -179,6 +179,7 @@ ActionItemForm.propTypes = { addToTemplates: PropTypes.bool.isRequired, setAddToTemplates: PropTypes.func.isRequired, createActionItem: PropTypes.func.isRequired, + categories: PropTypes.array.isRequired, }; export default withStyles(styles)(ActionItemForm); diff --git a/app/javascript/components/AddFromExistingForm/index.js b/app/javascript/components/AddFromExistingForm/index.js index 74cf750e..aa324154 100644 --- a/app/javascript/components/AddFromExistingForm/index.js +++ b/app/javascript/components/AddFromExistingForm/index.js @@ -13,7 +13,6 @@ import Paper from '@material-ui/core/Paper'; import ActionItemCard from 'components/ActionItemCard'; import theme from 'utils/theme'; import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; -import { categories } from 'utils/utils'; import styles from './styles'; const TrieSearch = require('trie-search'); @@ -128,7 +127,7 @@ class AddFromExistingForm extends React.Component {
); }); - const categoryList = categories.map(category => { + const categoryList = this.props.categories.map(category => { const isSelectedCategory = this.state.categorySelected && this.state.categorySelected === category; return ( @@ -218,6 +217,7 @@ AddFromExistingForm.propTypes = { removeSelectedActionItem: PropTypes.func.isRequired, handleOpenModal: PropTypes.func.isRequired, deleteTemplate: PropTypes.func.isRequired, + categories: PropTypes.array.isRequired, }; export default withStyles(styles)(AddFromExistingForm); diff --git a/app/javascript/components/ViewMoreModal/index.js b/app/javascript/components/ViewMoreModal/index.js index b0eede7a..f89fddfc 100644 --- a/app/javascript/components/ViewMoreModal/index.js +++ b/app/javascript/components/ViewMoreModal/index.js @@ -6,7 +6,6 @@ import 'draftail/dist/draftail.css'; import { withStyles } from '@material-ui/core/styles'; import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; import { Dialog, Grid, Paper, Input } from '@material-ui/core/'; -import { categories } from 'utils/utils'; import styles from './styles'; function ViewMoreModal({ @@ -87,7 +86,7 @@ ViewMoreModal.propTypes = { classes: PropTypes.object.isRequired, description: PropTypes.string, title: PropTypes.string, - category: PropTypes.oneOf(categories), + category: PropTypes.string.isRequired, dueDate: PropTypes.string, open: PropTypes.bool.isRequired, isCaseNote: PropTypes.bool, diff --git a/app/javascript/utils/utils.js b/app/javascript/utils/utils.js deleted file mode 100644 index 8ee9de53..00000000 --- a/app/javascript/utils/utils.js +++ /dev/null @@ -1,9 +0,0 @@ -export const categories = [ - 'Finances', - 'Project', - 'Community', - 'Startup', - 'Treatment', - 'Health', - 'Education', -]; diff --git a/app/views/assignments/index.html.erb b/app/views/assignments/index.html.erb index 0cdfdea2..99ab069e 100644 --- a/app/views/assignments/index.html.erb +++ b/app/views/assignments/index.html.erb @@ -2,6 +2,7 @@ content: "ActionItemCreationPage", templates: ActionItem.where(is_template: true), participants: @participants_list, + categories: ActionItem.categories.keys, statuses: Participant.statuses.except(:studio), isAdmin: current_user.admin }) %> From 48d27b6171d1789269f8ab4856bd7e0f5e2f6846 Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Fri, 8 May 2020 21:28:56 -0700 Subject: [PATCH 26/58] Removed edit button from modal --- .../ActionItemCreationPage/index.js | 7 +--- .../components/ActionItemModal/index.js | 42 +++---------------- 2 files changed, 7 insertions(+), 42 deletions(-) diff --git a/app/javascript/components/ActionItemCreationPage/index.js b/app/javascript/components/ActionItemCreationPage/index.js index 671b19df..54c3c949 100644 --- a/app/javascript/components/ActionItemCreationPage/index.js +++ b/app/javascript/components/ActionItemCreationPage/index.js @@ -94,16 +94,13 @@ class ActionItemCreationPage extends React.Component { }; } - editActionItem( + editActionItem({ title, description, categorySelected, dueDate, - addToTemplates, - participantId, - actionItemId, actionItem, - ) { + }) { this.setState(prevState => { const newSelectedActionItems = prevState.selectedActionItems.map(item => { const itemCopy = { ...item }; diff --git a/app/javascript/components/ActionItemModal/index.js b/app/javascript/components/ActionItemModal/index.js index 5f656624..3b0674e5 100644 --- a/app/javascript/components/ActionItemModal/index.js +++ b/app/javascript/components/ActionItemModal/index.js @@ -2,7 +2,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import Fab from '@material-ui/core/Fab'; import theme from 'utils/theme'; -import Checkbox from '@material-ui/core/Checkbox'; import Typography from '@material-ui/core/Typography'; import { Button, @@ -24,7 +23,6 @@ class ActionItemForm extends React.Component { categorySelected: this.props.type === 'create' ? '' : this.props.categorySelected, dueDate: this.props.type === 'create' ? '' : this.props.dueDate, - addToTemplates: false, failedSubmit: false, }; } @@ -36,25 +34,18 @@ class ActionItemForm extends React.Component { handleSubmit = () => { const { participantId, actionItemId, actionItem } = this.props; - const { - title, - description, - categorySelected, - dueDate, - addToTemplates, - } = this.state; + const { title, description, categorySelected, dueDate } = this.state; if (title && description && categorySelected) { - this.props.handleSubmit( + this.props.handleSubmit({ title, description, categorySelected, dueDate, - addToTemplates, participantId, actionItemId, actionItem, - ); + }); this.props.handleClose(); } else { this.setState({ failedSubmit: true }); @@ -63,13 +54,7 @@ class ActionItemForm extends React.Component { render() { const { classes, open } = this.props; - const { - failedSubmit, - title, - description, - categorySelected, - addToTemplates, - } = this.state; + const { failedSubmit, title, description, categorySelected } = this.state; const categories = [ 'Finances', @@ -213,24 +198,7 @@ class ActionItemForm extends React.Component { /> - - - { - const newValue = { target: { value: e.target.checked } }; - this.handleChange('addToTemplates')(newValue); - }} - /> - - ADD TO COMMON ASSIGNMENTS - - + + + + ); + } + render() { const { classes } = this.props; @@ -172,28 +210,7 @@ class AddFromExistingForm extends React.Component { return ( - - Choose a due date (optional) - - this.handleDateChange(e)} - /> - - - - - + {this.renderChooseDateModal()} From 90856a3532f6784b0cb17a5b55cdf185a9636ac1 Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Fri, 8 May 2020 22:50:36 -0700 Subject: [PATCH 28/58] Removed extra variable --- app/javascript/components/AddFromExistingForm/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/javascript/components/AddFromExistingForm/index.js b/app/javascript/components/AddFromExistingForm/index.js index 8ab2ef45..43145976 100644 --- a/app/javascript/components/AddFromExistingForm/index.js +++ b/app/javascript/components/AddFromExistingForm/index.js @@ -36,7 +36,6 @@ class AddFromExistingForm extends React.Component { this.handleDateChange = this.handleDateChange.bind(this); this.renderChooseDateModal = this.renderChooseDateModal.bind(this); this.buttonRef = React.createRef(); - this.notButtonRef = React.createRef(); } componentDidMount() { From f1b8aaece40e714aecdbd97ff94c29313b241345 Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Sat, 9 May 2020 00:00:10 -0700 Subject: [PATCH 29/58] Added focus to button on loadModal and disabled ripple for focus --- .../ActionItemCreationPage/index.js | 21 +++++++------- .../components/AddFromExistingForm/index.js | 2 +- app/javascript/components/LoadModal/index.js | 28 ++++++++++++++++--- 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/app/javascript/components/ActionItemCreationPage/index.js b/app/javascript/components/ActionItemCreationPage/index.js index 671b19df..4b194889 100644 --- a/app/javascript/components/ActionItemCreationPage/index.js +++ b/app/javascript/components/ActionItemCreationPage/index.js @@ -108,7 +108,7 @@ class ActionItemCreationPage extends React.Component { const newSelectedActionItems = prevState.selectedActionItems.map(item => { const itemCopy = { ...item }; if (this.checkActionItemsEqual(actionItem, item)) { - // id needs to be null so eheckmark doesn't appear + // id needs to be null so checkmark doesn't appear itemCopy.id = null; itemCopy.title = title; itemCopy.description = description; @@ -579,17 +579,16 @@ class ActionItemCreationPage extends React.Component { type="edit" /> ) : null} - {this.state.submissionStatus ? ( - - ) : null} + this.buttonRef.current.focus()} + onEnter={() => this.buttonRef.current.focus()} > Choose a due date (optional) diff --git a/app/javascript/components/LoadModal/index.js b/app/javascript/components/LoadModal/index.js index 2b9f34eb..61b8a70f 100644 --- a/app/javascript/components/LoadModal/index.js +++ b/app/javascript/components/LoadModal/index.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useRef, useEffect } from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import errorMailbox from 'images/error_mailbox'; @@ -15,7 +15,7 @@ import { } from '@material-ui/core'; import styles from './styles'; -function LoadModal({ classes, status, handleClick }) { +function LoadModal({ classes, open, status, handleClick }) { const getText = () => { let titleText; let buttonText; @@ -44,10 +44,27 @@ function LoadModal({ classes, status, handleClick }) { return { titleText, buttonText, statusImage }; }; + const buttonRef = useRef(null); const { titleText, buttonText, statusImage } = getText(); + useEffect(() => { + if (buttonText && buttonRef.current) { + buttonRef.current.focus(); + } + }, [status]); + return ( - + + // Avoid blurring document.body on IE9 since it blurs the entire window + document.activeElement !== document.body + ? document.activeElement.blur() + : null + } + > @@ -67,11 +84,13 @@ function LoadModal({ classes, status, handleClick }) { {buttonText ? ( Date: Sat, 9 May 2020 00:00:10 -0700 Subject: [PATCH 30/58] Added focus to button on loadModal and disabled ripple for focus --- .../ActionItemCreationPage/index.js | 21 +++++++------- .../components/AddFromExistingForm/index.js | 2 +- app/javascript/components/LoadModal/index.js | 28 ++++++++++++++++--- 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/app/javascript/components/ActionItemCreationPage/index.js b/app/javascript/components/ActionItemCreationPage/index.js index 671b19df..4b194889 100644 --- a/app/javascript/components/ActionItemCreationPage/index.js +++ b/app/javascript/components/ActionItemCreationPage/index.js @@ -108,7 +108,7 @@ class ActionItemCreationPage extends React.Component { const newSelectedActionItems = prevState.selectedActionItems.map(item => { const itemCopy = { ...item }; if (this.checkActionItemsEqual(actionItem, item)) { - // id needs to be null so eheckmark doesn't appear + // id needs to be null so checkmark doesn't appear itemCopy.id = null; itemCopy.title = title; itemCopy.description = description; @@ -579,17 +579,16 @@ class ActionItemCreationPage extends React.Component { type="edit" /> ) : null} - {this.state.submissionStatus ? ( - - ) : null} + this.buttonRef.current.focus()} + onEnter={() => this.buttonRef.current.focus()} > Choose a due date (optional) diff --git a/app/javascript/components/LoadModal/index.js b/app/javascript/components/LoadModal/index.js index 2b9f34eb..61b8a70f 100644 --- a/app/javascript/components/LoadModal/index.js +++ b/app/javascript/components/LoadModal/index.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useRef, useEffect } from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import errorMailbox from 'images/error_mailbox'; @@ -15,7 +15,7 @@ import { } from '@material-ui/core'; import styles from './styles'; -function LoadModal({ classes, status, handleClick }) { +function LoadModal({ classes, open, status, handleClick }) { const getText = () => { let titleText; let buttonText; @@ -44,10 +44,27 @@ function LoadModal({ classes, status, handleClick }) { return { titleText, buttonText, statusImage }; }; + const buttonRef = useRef(null); const { titleText, buttonText, statusImage } = getText(); + useEffect(() => { + if (buttonText && buttonRef.current) { + buttonRef.current.focus(); + } + }, [status]); + return ( - + + // Avoid blurring document.body on IE9 since it blurs the entire window + document.activeElement !== document.body + ? document.activeElement.blur() + : null + } + > @@ -67,11 +84,13 @@ function LoadModal({ classes, status, handleClick }) { {buttonText ? ( Date: Sat, 9 May 2020 09:21:04 -0700 Subject: [PATCH 31/58] removed unused routes and views, updated controllers with more authentication --- app/controllers/application_controller.rb | 1 - app/controllers/assignments_controller.rb | 25 -------------- app/controllers/case_notes_controller.rb | 28 --------------- app/controllers/pages_controller.rb | 28 ++++++++------- app/controllers/paperworks_controller.rb | 29 ---------------- app/controllers/participants_controller.rb | 7 ++-- .../personal_questionnaires_controller.rb | 34 ------------------- .../professional_questionnaires_controller.rb | 29 ---------------- .../studio_assessments_controller.rb | 24 ------------- app/policies/action_item_policy.rb | 13 ------- app/policies/assignment_policy.rb | 15 -------- app/policies/case_note_policy.rb | 3 +- app/policies/paperwork_policy.rb | 15 +++++--- app/policies/participant_policy.rb | 10 ++---- app/policies/questionnaire_policy.rb | 9 +++-- app/policies/staff_policy.rb | 8 +---- app/policies/studio_assessment_policy.rb | 2 +- app/views/assignments/edit.html.erb | 30 ---------------- app/views/assignments/new.html.erb | 5 --- app/views/assignments/show.html.erb | 21 ------------ app/views/case_notes/edit.html.erb | 23 ------------- app/views/case_notes/index.html.erb | 26 -------------- app/views/case_notes/new.html.erb | 14 -------- app/views/case_notes/show.html.erb | 22 ------------ app/views/paperworks/edit.html.erb | 23 ------------- app/views/paperworks/index.html.erb | 27 --------------- app/views/paperworks/show.html.erb | 18 ---------- .../personal_questionnaires/index.html.erb | 2 -- .../index.html.erb | 1 - 29 files changed, 40 insertions(+), 452 deletions(-) delete mode 100644 app/views/assignments/edit.html.erb delete mode 100644 app/views/assignments/new.html.erb delete mode 100644 app/views/assignments/show.html.erb delete mode 100644 app/views/case_notes/edit.html.erb delete mode 100644 app/views/case_notes/index.html.erb delete mode 100644 app/views/case_notes/new.html.erb delete mode 100644 app/views/case_notes/show.html.erb delete mode 100644 app/views/paperworks/edit.html.erb delete mode 100644 app/views/paperworks/index.html.erb delete mode 100644 app/views/paperworks/show.html.erb delete mode 100644 app/views/personal_questionnaires/index.html.erb delete mode 100644 app/views/professional_questionnaires/index.html.erb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8661f1cb..52649375 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -21,7 +21,6 @@ def set_raven_context provider: current_user.provider, uid: current_user.uid, user_type: current_user.user_type, - admin: current_user.admin ) end end diff --git a/app/controllers/assignments_controller.rb b/app/controllers/assignments_controller.rb index b49c09b8..b28b0dfe 100644 --- a/app/controllers/assignments_controller.rb +++ b/app/controllers/assignments_controller.rb @@ -1,5 +1,4 @@ class AssignmentsController < ApplicationController - before_action :set_action_item, only:[:show, :edit] def index @assignments = authorize Assignment.all @user = current_user @@ -16,30 +15,6 @@ def index "id" => p.id} @participants_list.push(d) end - skip_policy_scope end - def new - @assignment = authorize Assignment.new - end - - def edit - authorize @assignment - @staffs = Staff.all - @all_users = User.all - end - - def show - authorize @assignment - end - - private - - def set_action_item - @assignment = Assignment.find(params[:id]) - rescue ActiveRecord::RecordNotFound => exception - Raven.extra_context(assignment: params[:id]) - Raven.capture_exception(exception) - redirect_to assignments_path - end end diff --git a/app/controllers/case_notes_controller.rb b/app/controllers/case_notes_controller.rb index 026e0070..71aeb9b8 100644 --- a/app/controllers/case_notes_controller.rb +++ b/app/controllers/case_notes_controller.rb @@ -1,31 +1,3 @@ class CaseNotesController < ApplicationController - before_action :set_case_note, only: [:show, :edit] - - def index - @case_notes = authorize CaseNote.all - skip_policy_scope - end - - def new - @case_note = authorize CaseNote.new - @participants = Participant.all - end - - def edit - @participants = Participant.all - end - - def show - end - - private - - def set_case_note - @case_note = authorize CaseNote.find(params[:id]) - rescue ActiveRecord::RecordNotFound => exception - Raven.extra_context(case_note_id: params[:id]) - Raven.capture_exception(exception) - redirect_to case_notes_path - end end diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 56872c48..da79b695 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -1,15 +1,16 @@ class PagesController < ApplicationController def dashboard - path = case current_user.user_type + @user = current_user + + path = case @user.user_type when 'staff' - @user = current_user - @participants = Participant.all + @participants = authorize Participant.all @participants_list = [] @participants.each do |p| if p.personal_questionnaire.nil? PersonalQuestionnaire.create("participant_id": p.id) end - d = {"name" => p.full_name, + d = {"name" => p.full_name, "status" => p.status, "id" => p.id, "case_notes_count" => p.case_notes.length, @@ -24,24 +25,25 @@ def dashboard authorize Staff dashboard_staffs_path when 'participant' - @user = current_user @participant = @user.participant - @paperworks = @user.participant.paperworks - @case_notes = @user.participant.case_notes.where(visible: true) + @paperworks = policy_scope(Paperwork) + @case_notes = policy_scope(CaseNote) + @studio_assessments = policy_scope(StudioAssessment) if @participant.personal_questionnaire.nil? - @personal_questionnaire = PersonalQuestionnaire.create("participant_id": @participant.id) + personal_q = PersonalQuestionnaire.create("participant_id": @participant.id) else - @personal_questionnaire = @participant.personal_questionnaire + personal_q = authorize @participant.personal_questionnaire, policy_class: QuestionnairePolicy end + @personal_questionnaire = PersonalQuestionnaireSerializer.new(personal_q) + if @participant.professional_questionnaire.nil? - @professional_questionnaire = ProfessionalQuestionnaire.create("participant_id": @participant.id) + professional_q = ProfessionalQuestionnaire.create("participant_id": @participant.id) else - @professional_questionnaire = @participant.professional_questionnaire + professional_q = authorize @participant.professional_questionnaire, policy_class: QuestionnairePolicy end - - @studio_assessments = @participant.studio_assessments + @professional_questionnaire = ProfessionalQuestionnairesSerializer.new(professional_q) authorize Participant dashboard_participants_path diff --git a/app/controllers/paperworks_controller.rb b/app/controllers/paperworks_controller.rb index d1f44fff..c8579823 100644 --- a/app/controllers/paperworks_controller.rb +++ b/app/controllers/paperworks_controller.rb @@ -1,31 +1,2 @@ class PaperworksController < ApplicationController - before_action :set_paperwork, only: [:show, :edit] - - def index - @paperworks = authorize Paperwork.all - @user = current_user - skip_policy_scope - end - - def show - end - - def new - @paperwork = authorize Paperwork.new - @participants = Participant.all - end - - def edit - @participants = Participant.all - end - - private - - def set_paperwork - @paperwork = authorize Paperwork.find(params[:id]) - rescue ActiveRecord::RecordNotFound => exception - Raven.extra_context(paperework_id: params[:id]) - Raven.capture_exception(exception) - redirect_to paperworks_path - end end diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index 4f768aeb..e3925a74 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -2,9 +2,11 @@ class ParticipantsController < ApplicationController before_action :set_participant, only: [:show] def show + # TODO CHECK IF CORRECT @participant = authorize Participant.find(params[:id]) - @paperworks = @participant.paperworks - @case_notes = @participant.case_notes + @paperworks = authorize @participant.paperworks + @case_notes = authorize @participant.case_notes + @studio_assessments = authorize @participant.studio_assessments if @participant.personal_questionnaire.nil? personal_q = PersonalQuestionnaire.create("participant_id": @participant.id) @@ -21,7 +23,6 @@ def show end @professional_questionnaire = ProfessionalQuestionnairesSerializer.new(professional_q) - @studio_assessments = @participant.studio_assessments end def dashboard diff --git a/app/controllers/personal_questionnaires_controller.rb b/app/controllers/personal_questionnaires_controller.rb index d9474794..8e89d250 100644 --- a/app/controllers/personal_questionnaires_controller.rb +++ b/app/controllers/personal_questionnaires_controller.rb @@ -1,36 +1,2 @@ class PersonalQuestionnairesController < ApplicationController - before_action :set_personal_questionnaire, only: [:show, :edit] - - def index - skip_policy_scope - @questionnaires = PersonalQuestionnaire.all - @questionnaireFields = PersonalQuestionnaire.column_names - @user = current_user - end - - def show - end - - def new - @questionnaire = authorize PersonalQuestionnaire.new, policy_class: QuestionnairePolicy - @participants = Participant.all - end - - def edit - end - - def user_not_authorized - flash[:alert] = "You are not authorized to perform this action." - redirect_to(request.referrer || root_path) - end - - private - - def set_personal_questionnaire - @questionnaire = authorize PersonalQuestionnaire.find(params[:id]), policy_class: QuestionnairePolicy - rescue ActiveRecord::RecordNotFound => exception - Raven.extra_context(personal_questionnaire_id: params[:id]) - Raven.capture_exception(exception) - redirect_to personal_questionnaires_path - end end diff --git a/app/controllers/professional_questionnaires_controller.rb b/app/controllers/professional_questionnaires_controller.rb index f9c4afb8..b5d1d373 100644 --- a/app/controllers/professional_questionnaires_controller.rb +++ b/app/controllers/professional_questionnaires_controller.rb @@ -1,31 +1,2 @@ class ProfessionalQuestionnairesController < ApplicationController - before_action :set_professional_questionnaire, only: [:show, :edit] - - def index - @questionnaires = authorize ProfessionalQuestionnaire.all - @questionnaireFields = ProfessionalQuestionnaire.column_names - @user = current_user - end - - def show - end - - def new - @questionnaire = authorize ProfessionalQuestionnaire.new, policy_class: QuestionnairePolicy - @participants = Participant.all - end - - def edit - end - - private - - def set_professional_questionnaire - @questionnaire = authorize ProfessionalQuestionnaire.find(params[:id]), policy_class: QuestionnairePolicy - rescue ActiveRecord::RecordNotFound => exception - Raven.extra_context(professional_questionnaire_id: params[:id]) - Raven.capture_exception(exception) - redirect_to professional_questionnaires_path - end - end \ No newline at end of file diff --git a/app/controllers/studio_assessments_controller.rb b/app/controllers/studio_assessments_controller.rb index 59a25b7d..e8b485ef 100644 --- a/app/controllers/studio_assessments_controller.rb +++ b/app/controllers/studio_assessments_controller.rb @@ -1,10 +1,7 @@ class StudioAssessmentsController < ApplicationController - before_action :set_studio_assessment, only: [:show, :edit] - # GET /studio_assessments # GET /studio_assessments.json def index - skip_policy_scope @studio_assessments = authorize StudioAssessment.all @studio_list = [] @studio_assessments.each do |s| @@ -26,25 +23,4 @@ def index end end - - # GET /studio_assessments/1 - # GET /studio_assessments/1.json - def show - authorize @studio_assessment - end - - # GET /studio_assessments/new - def new - @studio_assessment = authorize StudioAssessment.new - @participants = Participant.all - end - - private - def set_studio_assessment - @studio_assessment = authorize StudioAssessment.find(params[:id]) - rescue ActiveRecord::RecordNotFound => exception - Raven.extra_context(studio_assessment_id: params[:id]) - Raven.capture_exception(exception) - redirect_to studio_assessments_path - end end diff --git a/app/policies/action_item_policy.rb b/app/policies/action_item_policy.rb index 4f5c0241..1790ec08 100644 --- a/app/policies/action_item_policy.rb +++ b/app/policies/action_item_policy.rb @@ -15,19 +15,6 @@ def show? staff? end - - class Scope < Scope -# The first argument is a user. In your controller, Pundit will call the current_user method -# to retrieve what to send into this argument. -# The second argument is a scope of some kind on which to perform some kind of query. -# It will usually be an ActiveRecord class or a ActiveRecord::Relation. - def resolve - if user.staff? - scope.all - end - end - end - private def staff? diff --git a/app/policies/assignment_policy.rb b/app/policies/assignment_policy.rb index 67263fa7..a0ac8f68 100644 --- a/app/policies/assignment_policy.rb +++ b/app/policies/assignment_policy.rb @@ -19,21 +19,6 @@ def index? staff? end - - class Scope < Scope -# The first argument is a user. In your controller, Pundit will call the current_user method -# to retrieve what to send into this argument. -# The second argument is a scope of some kind on which to perform some kind of query. -# It will usually be an ActiveRecord class or a ActiveRecord::Relation. - def resolve - if user.staff? - scope.all - else - scope.where([participant_id: user.id]) - end - end - end - private def staff? diff --git a/app/policies/case_note_policy.rb b/app/policies/case_note_policy.rb index 662f9d7d..f7ab32c9 100644 --- a/app/policies/case_note_policy.rb +++ b/app/policies/case_note_policy.rb @@ -36,13 +36,12 @@ def resolve if user.staff? scope.all else - scope.where([participant_id: user.participant.id, visible: true]) + scope.where(participant_id: user.participant.id, visible: true) end end end private - def staff? user.present? && user.staff? end diff --git a/app/policies/paperwork_policy.rb b/app/policies/paperwork_policy.rb index 65127d3d..4c2e47fb 100644 --- a/app/policies/paperwork_policy.rb +++ b/app/policies/paperwork_policy.rb @@ -1,14 +1,14 @@ class PaperworkPolicy < ApplicationPolicy def index? - user.staff? + staff? end def create? - user.staff? + staff? end def destroy? - user.staff? + staff? end def viewed? @@ -20,11 +20,11 @@ def complete? end def show? - user.staff? || (user.participant? && user.participant.id == resource.participant_id) + staff? || (user.participant? && user.participant.id == resource.participant_id) end def update? - user.staff? + staff? end class Scope < Scope @@ -40,4 +40,9 @@ def resolve end end end + + private + def staff? + user.present? && user.staff? + end end diff --git a/app/policies/participant_policy.rb b/app/policies/participant_policy.rb index 6d870a8e..e4d70750 100644 --- a/app/policies/participant_policy.rb +++ b/app/policies/participant_policy.rb @@ -1,12 +1,6 @@ class ParticipantPolicy < ApplicationPolicy - class Scope < Scope - def resolve - scope.all - end - end - def show? - user.staff? + user.present? && user.staff? end def dashboard? @@ -14,6 +8,6 @@ def dashboard? end def statuses? - user.staff? + user.present? && user.staff? end end diff --git a/app/policies/questionnaire_policy.rb b/app/policies/questionnaire_policy.rb index aee54285..9425ac1b 100644 --- a/app/policies/questionnaire_policy.rb +++ b/app/policies/questionnaire_policy.rb @@ -1,8 +1,12 @@ class QuestionnairePolicy < ApplicationPolicy # this will work with personal questionnaires and professional questionnaires, but must be called with # authorize questionnaire otherwise will not be automatically called + def dashboard? + !resource or staff? or (user.participant? && user.participant.id == resource.participant_id) + end + def create? - user.present? && user.staff? + staff? end def show? @@ -20,9 +24,8 @@ def update? def destroy? staff? end - + private - def staff? user.present? && user.staff? end diff --git a/app/policies/staff_policy.rb b/app/policies/staff_policy.rb index 4971e8d7..c21fd7ef 100644 --- a/app/policies/staff_policy.rb +++ b/app/policies/staff_policy.rb @@ -1,11 +1,5 @@ class StaffPolicy < ApplicationPolicy - class Scope < Scope - def resolve - scope.all - end - end - def dashboard? - user.staff? + user.present? && user.staff? end end diff --git a/app/policies/studio_assessment_policy.rb b/app/policies/studio_assessment_policy.rb index 9cd09708..cddb7998 100644 --- a/app/policies/studio_assessment_policy.rb +++ b/app/policies/studio_assessment_policy.rb @@ -1,4 +1,4 @@ -class StudioAssessmentPolicy < ApplicationPolicy +class StudioAssessmentPolicy < ApplicationPolicy def index? staff? end diff --git a/app/views/assignments/edit.html.erb b/app/views/assignments/edit.html.erb deleted file mode 100644 index 1c9478db..00000000 --- a/app/views/assignments/edit.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -

Editing Assignment

- -<%= form_with(model: @assignment, url: api_assignment_path, local: true) do |form| %> -

- <%= form.label :title %>
- <%= form.text_field :cond_assignment_title %> -

-

- <%= form.label :description %>
- <%= form.text_field :cond_assignment_description %> -

-

- Assigned to:
- <%= form.collection_select :participant_id, @all_users, :id, :first_name, prompt: true %> -

-

- Assigned by:
- <%= form.collection_select :staff_id, @staffs, :id, :first_name, prompt: true %> -

-

- <%= form.label :completed %>
- <%= form.check_box :completed %> -

-

- <%= form.submit %> -

-<% end %> - -<%= link_to 'Show', @assignment %> | -<%= link_to 'Back', assignments_path %> diff --git a/app/views/assignments/new.html.erb b/app/views/assignments/new.html.erb deleted file mode 100644 index 0ffed097..00000000 --- a/app/views/assignments/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

New Assignment

- -<%= render 'form', assignment: @assignment %> - -<%= link_to 'Back', assignments_path %> diff --git a/app/views/assignments/show.html.erb b/app/views/assignments/show.html.erb deleted file mode 100644 index c2a70f35..00000000 --- a/app/views/assignments/show.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -

- Title: - <%= @assignment.cond_assignment_title %> -

- -

- Description: - <%= @assignment.cond_assignment_description %> -

-

- Assigned by: - <%= @assignment.staff.cond_full_name %> -

-

- Assigned to: - <%= @assignment.participant.full_name %> -

-

- -<%= link_to 'Edit', edit_assignment_path(@assignment) %> -<%= link_to 'Back', assignments_path %> diff --git a/app/views/case_notes/edit.html.erb b/app/views/case_notes/edit.html.erb deleted file mode 100644 index f7d7e043..00000000 --- a/app/views/case_notes/edit.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -

Edit Case Note

-<%= form_with(model: @case_note, url: api_case_note_path, local: true) do |form| %> -

- <%= form.label :title %>
- <%= form.text_field :title %> -

-

- <%= form.label :description %>
- <%= form.text_field :description %> -

-

- Participant:
- <%= form.collection_select :participant_id, @participants, :id, :first_name, prompt: true %> -

-

- <%= form.label :visible %>
- <%= form.check_box :visible %> -

-

- <%= form.submit %> -

-<% end %> -<%= link_to 'Back', case_notes_path %> \ No newline at end of file diff --git a/app/views/case_notes/index.html.erb b/app/views/case_notes/index.html.erb deleted file mode 100644 index 9aad859c..00000000 --- a/app/views/case_notes/index.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -

All Case Notes

- - - - - - - - - - - <% @case_notes.each do |case_note| %> - - - - - - - - - - - <% end %> -
TitleDescriptionParticipant FirstParticipant LastVisible
<%= case_note.title %><%= case_note.description %><%= case_note.participant.first_name %><%= case_note.participant.last_name %><%= case_note.visible %><%= link_to 'Show', case_note_path(case_note) %><%= link_to 'Edit', edit_case_note_path(case_note) %><%= link_to 'Delete', api_case_note_path(case_note), - method: :delete, - data: { confirm: 'Are you sure?' } %>
diff --git a/app/views/case_notes/new.html.erb b/app/views/case_notes/new.html.erb deleted file mode 100644 index d924cd04..00000000 --- a/app/views/case_notes/new.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -

New Case Notes

-<%= form_with scope: :case_note, url: api_case_notes_path, local: true do |form| %> - Title:
- <%= form.text_field :title %>
- Description:
- <%= form.text_field :description %>
- Participant:
- <%= form.collection_select :participant_id, @participants, :id, :first_name, prompt: true %> -
- Visible:
- <%= form.check_box :agree %>
- - <%= form.submit "Submit" %> -<% end %> \ No newline at end of file diff --git a/app/views/case_notes/show.html.erb b/app/views/case_notes/show.html.erb deleted file mode 100644 index 24dd9896..00000000 --- a/app/views/case_notes/show.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<%= link_to 'Edit', edit_case_note_path(@case_note) %> -<%= link_to 'Delete', api_case_note_path(@case_note), - method: :delete, - data: { confirm: 'Are you sure?' } %> -

- Title: - <%= @case_note.title %> -

-

- Description: - <%= @case_note.description %> -

-

- Participant: - <%= @case_note.participant.first_name %> -

-

- Visible: - <%= @case_note.visible %> -

-

- <%= link_to 'Back', case_notes_path%> \ No newline at end of file diff --git a/app/views/paperworks/edit.html.erb b/app/views/paperworks/edit.html.erb deleted file mode 100644 index bd4ffa6b..00000000 --- a/app/views/paperworks/edit.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -

Edit Paperwork

-<%= form_with(model: @paperwork, url: api_paperwork_path, local: true) do |form| %> -

- <%= form.label :title %>
- <%= form.text_field :title %> -

-

- <%= form.label :link %>
- <%= form.text_field :link %> -

-

- Participant:
- <%= form.collection_select :participant_id, @participants, :id, :first_name, prompt: true %> -

-

- <%= form.label :agree %>
- <%= form.check_box :agree %> -

-

- <%= form.submit %> -

-<% end %> -<%= link_to 'Back', paperworks_path %> \ No newline at end of file diff --git a/app/views/paperworks/index.html.erb b/app/views/paperworks/index.html.erb deleted file mode 100644 index 86c24e1b..00000000 --- a/app/views/paperworks/index.html.erb +++ /dev/null @@ -1,27 +0,0 @@ -

All Paperworks

- - - - - - - - - - - - <% @paperworks.each do |paperwork| %> - - - - - - - - - - - <% end %> -
TitleLinkParticipant FirstParticipant LastAgree
<%= paperwork.title %><%= paperwork.link %><%= paperwork.participant.first_name %><%= paperwork.participant.last_name %><%= paperwork.agree %><%= link_to 'Show', paperwork_path(paperwork) %><%= link_to 'Edit', edit_paperwork_path(paperwork) %><%= link_to 'Delete', api_paperwork_path(paperwork), - method: :delete, - data: { confirm: 'Are you sure?' } %>
diff --git a/app/views/paperworks/show.html.erb b/app/views/paperworks/show.html.erb deleted file mode 100644 index 1e416492..00000000 --- a/app/views/paperworks/show.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -<%= link_to 'Edit', edit_paperwork_path(@paperwork) %> -<%= link_to 'Delete', api_paperwork_path(@paperwork), - method: :delete, - data: { confirm: 'Are you sure?' } %> -

- Title: - <%= @paperwork.title %> -

-

- Link: - <%= @paperwork.link %> -

-

- Agree: - <%= @paperwork.agree %> -

-

- <%= link_to 'Back', paperworks_path%> \ No newline at end of file diff --git a/app/views/personal_questionnaires/index.html.erb b/app/views/personal_questionnaires/index.html.erb deleted file mode 100644 index bbb179bc..00000000 --- a/app/views/personal_questionnaires/index.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<%= react_component("QuestionnaireForm", {questionnaireType: "Personal", fields: @questionnaireFields}) %> - diff --git a/app/views/professional_questionnaires/index.html.erb b/app/views/professional_questionnaires/index.html.erb deleted file mode 100644 index 67b85228..00000000 --- a/app/views/professional_questionnaires/index.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= react_component("QuestionnaireForm", {questionnaireType: "Professional", fields: @questionnaireFields}) %> From 867ba52083cc68110e73c76c00c827ab54753098 Mon Sep 17 00:00:00 2001 From: didvi Date: Sat, 9 May 2020 09:51:52 -0700 Subject: [PATCH 32/58] changed login message and fixed dashboard pundit --- app/controllers/pages_controller.rb | 2 +- config/locales/devise.en.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index da79b695..d50509e1 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -4,7 +4,7 @@ def dashboard path = case @user.user_type when 'staff' - @participants = authorize Participant.all + @participants = Participant.all @participants_list = [] @participants.each do |p| if p.personal_questionnaire.nil? diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index ca3d6199..a467065d 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -14,7 +14,7 @@ en: last_attempt: "You have one more attempt before your account is locked." not_found_in_database: "Invalid %{authentication_keys} or password." timeout: "Your session expired. Please sign in again to continue." - unauthenticated: "You need to sign in or sign up before continuing." + unauthenticated: "You need to sign in or contact a staff member to create an account for you." unconfirmed: "You have to confirm your email address before continuing." mailer: confirmation_instructions: From f8dc45a97a94608b93b554ebc5c94154bba8bec1 Mon Sep 17 00:00:00 2001 From: didvi Date: Sat, 9 May 2020 09:52:23 -0700 Subject: [PATCH 33/58] fixed valid phone bug in questionnaire --- .../components/QuestionnaireForm/index.js | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/app/javascript/components/QuestionnaireForm/index.js b/app/javascript/components/QuestionnaireForm/index.js index ea94ad48..86cc35fc 100644 --- a/app/javascript/components/QuestionnaireForm/index.js +++ b/app/javascript/components/QuestionnaireForm/index.js @@ -39,9 +39,9 @@ class QuestionnaireForm extends React.Component { questionnaire[k] = this.props.questionnaire[k]; } }); - questionnaire.validPhone = true; this.setState({ questionnaire, + validPhone: true, }); } @@ -88,26 +88,21 @@ class QuestionnaireForm extends React.Component { const isValid = regex.test(value); if (isValid || value === '') { this.setState(s => ({ + validPhone: true, questionnaire: { ...s.questionnaire, - validPhone: true, + [id]: value, }, })); } else { this.setState(s => ({ + validPhone: false, questionnaire: { ...s.questionnaire, - validPhone: false, + [id]: value, }, })); } - - this.setState(s => ({ - questionnaire: { - ...s.questionnaire, - [id]: value, - }, - })); } handleRadioChange(e, fieldName, newValue) { @@ -300,11 +295,9 @@ class QuestionnaireForm extends React.Component { this.handlePhoneChange(e)} - error={!this.state.questionnaire.validPhone} + error={!this.state.validPhone} helperText={ - !this.state.questionnaire.validPhone - ? 'Please enter a valid phone number.' - : '' + !this.state.validPhone ? 'Please enter a valid phone number.' : '' } variant="outlined" id={fieldName} From 36b907473b1626587b029c3d7635a7d861f24797 Mon Sep 17 00:00:00 2001 From: didvi Date: Sat, 9 May 2020 12:07:58 -0700 Subject: [PATCH 34/58] allow questionnaires to be marked complete when optional categories are unfilled --- app/controllers/pages_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 56872c48..f64a4265 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -64,6 +64,10 @@ def completed(p) end p.personal_questionnaire.attributes.each do |a, v| + if a == 'emergency_contact_2_name' || a == 'emergency_contact_2_phone_number' || a == + 'emergency_contact_2_relationship' + next + end if !v return false end From 42e548f1e0d8078c968fd0fe5ca306a549e65076 Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Sun, 10 May 2020 20:23:46 -0700 Subject: [PATCH 35/58] Can exit submit modal on error --- .../components/ActionItemCreationPage/index.js | 11 +++++++++++ .../components/ActionItemSearchParticipants/index.js | 2 +- app/javascript/components/LoadModal/index.js | 4 +++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/javascript/components/ActionItemCreationPage/index.js b/app/javascript/components/ActionItemCreationPage/index.js index 4bec762c..6a697ab5 100644 --- a/app/javascript/components/ActionItemCreationPage/index.js +++ b/app/javascript/components/ActionItemCreationPage/index.js @@ -58,12 +58,18 @@ class ActionItemCreationPage extends React.Component { this.handleOpenModal = this.handleOpenModal.bind(this); this.editActionItem = this.editActionItem.bind(this); this.reloadPage = this.reloadPage.bind(this); + this.handleExitSubmitModal = this.handleExitSubmitModal.bind(this); } reloadPage() { window.location.href = '/assignments'; } + // Only passed to LoadModal if submissionStatus == 'error' + handleExitSubmitModal() { + this.setState({ submissionStatus: null }); + } + checkActionItemsEqual(actionItem1, actionItem2) { return ( actionItem1.title === actionItem2.title && @@ -589,6 +595,11 @@ class ActionItemCreationPage extends React.Component { ? this.reloadPage : this.handleSubmit } + handleClose={ + this.state.submissionStatus === 'error' + ? this.handleExitSubmitModal + : null + } /> { let titleText; let buttonText; @@ -58,6 +58,7 @@ function LoadModal({ classes, open, status, handleClick }) { open={open} fullWidth classes={{ paper: classes.modalStyle }} + onClose={handleClose} onExited={() => // Avoid blurring document.body on IE9 since it blurs the entire window document.activeElement !== document.body @@ -112,5 +113,6 @@ LoadModal.propTypes = { status: PropTypes.string, open: PropTypes.bool.isRequired, handleClick: PropTypes.func.isRequired, + handleClose: PropTypes.func, }; export default withStyles(styles)(LoadModal); From 6e637152f29bed46a52efee1836481216b8b09d4 Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Sun, 10 May 2020 22:22:16 -0700 Subject: [PATCH 36/58] Fixing error with dueDates --- app/javascript/components/ActionItemModal/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/components/ActionItemModal/index.js b/app/javascript/components/ActionItemModal/index.js index d354064a..cacd7fc9 100644 --- a/app/javascript/components/ActionItemModal/index.js +++ b/app/javascript/components/ActionItemModal/index.js @@ -219,7 +219,7 @@ class ActionItemModal extends React.Component { Due Date Date: Sun, 10 May 2020 23:01:09 -0700 Subject: [PATCH 37/58] Fixing errors with dueDate + isTemplate on newAssignment creation --- .../components/ActionItemCard/index.js | 4 - .../components/ActionItemModal/index.js | 19 - .../components/AssignmentList/index.js | 10 +- .../StudioAssessmentQuestion/index.js | 1 - yarn.lock | 1016 +++++++---------- 5 files changed, 437 insertions(+), 613 deletions(-) diff --git a/app/javascript/components/ActionItemCard/index.js b/app/javascript/components/ActionItemCard/index.js index 3010562d..df675fb0 100644 --- a/app/javascript/components/ActionItemCard/index.js +++ b/app/javascript/components/ActionItemCard/index.js @@ -163,12 +163,8 @@ ActionItemCard.propTypes = { dueDate: PropTypes.string, handleIconClick: PropTypes.func, removeActionItem: PropTypes.func, -<<<<<<< HEAD - lastEntry: PropTypes.bool, renderEditOverMore: PropTypes.bool, formatDate: PropTypes.func, -======= addBorderBottom: PropTypes.bool, ->>>>>>> julian/delete-edit }; export default withStyles(styles)(ActionItemCard); diff --git a/app/javascript/components/ActionItemModal/index.js b/app/javascript/components/ActionItemModal/index.js index c1ab24b4..61734bf0 100644 --- a/app/javascript/components/ActionItemModal/index.js +++ b/app/javascript/components/ActionItemModal/index.js @@ -106,23 +106,6 @@ class ActionItemModal extends React.Component { ); }); - const addToTemplatesCheckbox = ( - - { - const newValue = { target: { value: e.target.checked } }; - this.handleChange('addToTemplates')(newValue); - }} - /> - - ADD TO COMMON ASSIGNMENTS - - - ); - return (

window.location.reload()) .catch(error => { diff --git a/yarn.lock b/yarn.lock index 985b8708..f6f98bb4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,28 +9,28 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/compat-data@^7.8.6", "@babel/compat-data@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.0.tgz#04815556fc90b0c174abd2c0c1bb966faa036a6c" - integrity sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g== +"@babel/compat-data@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.6.tgz#3f604c40e420131affe6f2c8052e9a275ae2049b" + integrity sha512-5QPTrNen2bm7RBc7dsOmcA5hbrS4O2Vhmk5XOL4zWW/zD/hV0iinpefDlkm+tBBy8kDtFaaeEvmAqt+nURAV2g== dependencies: - browserslist "^4.9.1" + browserslist "^4.11.1" invariant "^2.2.4" semver "^5.5.0" "@babel/core@>=7.2.2", "@babel/core@^7.1.0", "@babel/core@^7.7.0", "@babel/core@^7.7.2": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" - integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.6.tgz#d9aa1f580abf3b2286ef40b6904d390904c63376" + integrity sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.0" + "@babel/generator" "^7.9.6" "@babel/helper-module-transforms" "^7.9.0" - "@babel/helpers" "^7.9.0" - "@babel/parser" "^7.9.0" + "@babel/helpers" "^7.9.6" + "@babel/parser" "^7.9.6" "@babel/template" "^7.8.6" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" @@ -40,12 +40,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.9.0", "@babel/generator@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.5.tgz#27f0917741acc41e6eaaced6d68f96c3fa9afaf9" - integrity sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ== +"@babel/generator@^7.4.0", "@babel/generator@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.6.tgz#5408c82ac5de98cda0d77d8124e99fa1f2170a43" + integrity sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ== dependencies: - "@babel/types" "^7.9.5" + "@babel/types" "^7.9.6" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -82,27 +82,27 @@ "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/types" "^7.9.0" -"@babel/helper-compilation-targets@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz#dac1eea159c0e4bd46e309b5a1b04a66b53c1dde" - integrity sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw== +"@babel/helper-compilation-targets@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.9.6.tgz#1e05b7ccc9d38d2f8b40b458b380a04dcfadd38a" + integrity sha512-x2Nvu0igO0ejXzx09B/1fGBxY9NXQlBW2kZsSxCJft+KHN8t9XWzIvFxtPHnBOAXpVsdxZKZFbRUC8TsNKajMw== dependencies: - "@babel/compat-data" "^7.8.6" - browserslist "^4.9.1" + "@babel/compat-data" "^7.9.6" + browserslist "^4.11.1" invariant "^2.2.4" levenary "^1.1.1" semver "^5.5.0" "@babel/helper-create-class-features-plugin@^7.8.3": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.9.5.tgz#79753d44017806b481017f24b02fd4113c7106ea" - integrity sha512-IipaxGaQmW4TfWoXdqjY0TzoXQ1HRS0kPpEgvjosb3u7Uedcq297xFqDQiCcQtRRwzIMif+N1MLVI8C5a4/PAA== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.9.6.tgz#965c8b0a9f051801fd9d3b372ca0ccf200a90897" + integrity sha512-6N9IeuyHvMBRyjNYOMJHrhwtu4WJMrYf8hVbEHD3pbbbmNOk1kmXSQs7bA4dYDUaIx4ZEzdnvo6NwC3WHd/Qow== dependencies: "@babel/helper-function-name" "^7.9.5" "@babel/helper-member-expression-to-functions" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.6" + "@babel/helper-replace-supers" "^7.9.6" "@babel/helper-split-export-declaration" "^7.8.3" "@babel/helper-create-regexp-features-plugin@^7.8.3", "@babel/helper-create-regexp-features-plugin@^7.8.8": @@ -211,15 +211,15 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" - integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== +"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6", "@babel/helper-replace-supers@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz#03149d7e6a5586ab6764996cd31d6981a17e1444" + integrity sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA== dependencies: "@babel/helper-member-expression-to-functions" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" - "@babel/traverse" "^7.8.6" - "@babel/types" "^7.8.6" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" "@babel/helper-simple-access@^7.8.3": version "7.8.3" @@ -251,14 +251,14 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helpers@^7.9.0": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" - integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== +"@babel/helpers@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.6.tgz#092c774743471d0bb6c7de3ad465ab3d3486d580" + integrity sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw== dependencies: "@babel/template" "^7.8.3" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" "@babel/highlight@^7.8.3": version "7.9.0" @@ -269,10 +269,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": - version "7.9.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" - integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.8.6", "@babel/parser@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.6.tgz#3b1bbb30dabe600cd72db58720998376ff653bc7" + integrity sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q== "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" @@ -323,10 +323,10 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-numeric-separator" "^7.8.3" -"@babel/plugin-proposal-object-rest-spread@^7.6.2", "@babel/plugin-proposal-object-rest-spread@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.5.tgz#3fd65911306d8746014ec0d0cf78f0e39a149116" - integrity sha512-VP2oXvAf7KCYTthbUHwBlewbl1Iq059f6seJGsxMizaCdgHIeczOr7FBqELhSqfkIl04Fi8okzWzl63UKbQmmg== +"@babel/plugin-proposal-object-rest-spread@^7.6.2", "@babel/plugin-proposal-object-rest-spread@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.6.tgz#7a093586fcb18b08266eb1a7177da671ac575b63" + integrity sha512-Ga6/fhGqA9Hj+y6whNpPv8psyaK5xzrQwSPsGPloVkvmH+PqW1ixdnfJ9uIO06OjQNYol3PMnfmJ8vfZtkzF+A== dependencies: "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" @@ -537,34 +537,34 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-modules-amd@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz#19755ee721912cf5bb04c07d50280af3484efef4" - integrity sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q== +"@babel/plugin-transform-modules-amd@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.6.tgz#8539ec42c153d12ea3836e0e3ac30d5aae7b258e" + integrity sha512-zoT0kgC3EixAyIAU+9vfaUVKTv9IxBDSabgHoUCBP6FqEJ+iNiN7ip7NBKcYqbfUDfuC2mFCbM7vbu4qJgOnDw== dependencies: "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz#e3e72f4cbc9b4a260e30be0ea59bdf5a39748940" - integrity sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g== +"@babel/plugin-transform-modules-commonjs@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.6.tgz#64b7474a4279ee588cacd1906695ca721687c277" + integrity sha512-7H25fSlLcn+iYimmsNe3uK1at79IE6SKW9q0/QeEHTMC9MdOZ+4bA+T1VFB5fgOqBWoqlifXRzYD0JPdmIrgSQ== dependencies: "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-simple-access" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz#e9fd46a296fc91e009b64e07ddaa86d6f0edeb90" - integrity sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ== +"@babel/plugin-transform-modules-systemjs@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.6.tgz#207f1461c78a231d5337a92140e52422510d81a4" + integrity sha512-NW5XQuW3N2tTHim8e1b7qGy7s0kZ2OH3m5octc49K1SdAKGxYxeIx7hiIz05kS1R2R+hOWcsr1eYwcGhrdHsrg== dependencies: "@babel/helper-hoist-variables" "^7.8.3" "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + babel-plugin-dynamic-import-node "^2.3.3" "@babel/plugin-transform-modules-umd@^7.9.0": version "7.9.0" @@ -683,9 +683,9 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-transform-runtime@^7.6.2": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.0.tgz#45468c0ae74cc13204e1d3b1f4ce6ee83258af0b" - integrity sha512-pUu9VSf3kI1OqbWINQ7MaugnitRss1z533436waNXp+0N3ur3zfut37sXiQMxkuCF4VUjwZucen/quskCh7NHw== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.6.tgz#3ba804438ad0d880a17bca5eaa0cdf1edeedb2fd" + integrity sha512-qcmiECD0mYOjOIt8YHNsAP1SxPooC/rDmfmiSK9BNY72EitdSc7l44WTEklaWuFtbOEBjNhWWyph/kOImbNJ4w== dependencies: "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" @@ -738,12 +738,12 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/preset-env@^7.7.1": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.5.tgz#8ddc76039bc45b774b19e2fc548f6807d8a8919f" - integrity sha512-eWGYeADTlPJH+wq1F0wNfPbVS1w1wtmMJiYk55Td5Yu28AsdR9AsC97sZ0Qq8fHqQuslVSIYSGJMcblr345GfQ== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.6.tgz#df063b276c6455ec6fcfc6e53aacc38da9b0aea6" + integrity sha512-0gQJ9RTzO0heXOhzftog+a/WyOuqMrAIugVYxMYf83gh1CQaQDjMtsOpqOwXyDL/5JcWsrCm8l4ju8QC97O7EQ== dependencies: - "@babel/compat-data" "^7.9.0" - "@babel/helper-compilation-targets" "^7.8.7" + "@babel/compat-data" "^7.9.6" + "@babel/helper-compilation-targets" "^7.9.6" "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-proposal-async-generator-functions" "^7.8.3" @@ -751,7 +751,7 @@ "@babel/plugin-proposal-json-strings" "^7.8.3" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" "@babel/plugin-proposal-numeric-separator" "^7.8.3" - "@babel/plugin-proposal-object-rest-spread" "^7.9.5" + "@babel/plugin-proposal-object-rest-spread" "^7.9.6" "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" "@babel/plugin-proposal-optional-chaining" "^7.9.0" "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" @@ -778,9 +778,9 @@ "@babel/plugin-transform-function-name" "^7.8.3" "@babel/plugin-transform-literals" "^7.8.3" "@babel/plugin-transform-member-expression-literals" "^7.8.3" - "@babel/plugin-transform-modules-amd" "^7.9.0" - "@babel/plugin-transform-modules-commonjs" "^7.9.0" - "@babel/plugin-transform-modules-systemjs" "^7.9.0" + "@babel/plugin-transform-modules-amd" "^7.9.6" + "@babel/plugin-transform-modules-commonjs" "^7.9.6" + "@babel/plugin-transform-modules-systemjs" "^7.9.6" "@babel/plugin-transform-modules-umd" "^7.9.0" "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" "@babel/plugin-transform-new-target" "^7.8.3" @@ -796,8 +796,8 @@ "@babel/plugin-transform-typeof-symbol" "^7.8.4" "@babel/plugin-transform-unicode-regex" "^7.8.3" "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.9.5" - browserslist "^4.9.1" + "@babel/types" "^7.9.6" + browserslist "^4.11.1" core-js-compat "^3.6.2" invariant "^2.2.2" levenary "^1.1.1" @@ -827,27 +827,20 @@ "@babel/plugin-transform-react-jsx-source" "^7.9.0" "@babel/runtime-corejs3@^7.8.3": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.9.2.tgz#26fe4aa77e9f1ecef9b776559bbb8e84d34284b7" - integrity sha512-HHxmgxbIzOfFlZ+tdeRKtaxWOMUoCG5Mu3wKeUmOxjYrwb3AAHgnmtCUbPPK11/raIWLIBK250t8E2BPO0p7jA== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.9.6.tgz#67aded13fffbbc2cb93247388cf84d77a4be9a71" + integrity sha512-6toWAfaALQjt3KMZQc6fABqZwUDDuWzz+cAfPhqyEnzxvdWOAkjwPNxgF8xlmo7OWLsSjaKjsskpKHRLaMArOA== dependencies: core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.6.0": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.9.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f" integrity sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ== dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.8.3": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" - integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/template@^7.4.0", "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" @@ -857,25 +850,25 @@ "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.5.tgz#6e7c56b44e2ac7011a948c21e283ddd9d9db97a2" - integrity sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.6.tgz#5540d7577697bf619cc57b92aa0f1c231a94f442" + integrity sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.5" + "@babel/generator" "^7.9.6" "@babel/helper-function-name" "^7.9.5" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.9.0" - "@babel/types" "^7.9.5" + "@babel/parser" "^7.9.6" + "@babel/types" "^7.9.6" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.2", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" - integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg== +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.2", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5", "@babel/types@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.6.tgz#2c5502b427251e9de1bd2dff95add646d95cc9f7" + integrity sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA== dependencies: "@babel/helper-validator-identifier" "^7.9.5" lodash "^4.17.13" @@ -919,37 +912,37 @@ integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== "@formatjs/intl-displaynames@^1.2.0": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-1.2.4.tgz#c9fffd19cd8a69bab202b2db90ded00c7b85093a" - integrity sha512-c9Wv/TJLrdQJvrR6NbF63ZMNHE2IVCuxwo4riVLb3YmvR6yK6dI5BT3tdLBvtg5oCY/MECx3O2UirmfQjWf1mA== + version "1.2.9" + resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-1.2.9.tgz#be30523a91b3f5102fcd1754679073be6f8ee545" + integrity sha512-XQF2rHM0DaxShGtr03wt1eWBye0t8WDSvXfpby0ewSPs0n0uUjQOkyouTqFUderNuXV3aY8vpxq+pnHEkW/VNg== dependencies: - "@formatjs/intl-utils" "^2.2.2" + "@formatjs/intl-utils" "^2.2.5" "@formatjs/intl-listformat@^1.4.1": - version "1.4.4" - resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-1.4.4.tgz#87af681a3eadaa04387269f3e36b6f5b01c0e79a" - integrity sha512-b9DFftQDQEE4fVHX8WFCIXLWdlt98XPyXoyNt9wTSOhUZBJUmu97w9y8fRZnPry6pES/D9yGLJeD4/XDjG0tbw== + version "1.4.7" + resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-1.4.7.tgz#6529663d535ba24c1a33b26bdb4f6e0c1616466e" + integrity sha512-g0oXgMYhe7CFdH8jEUz64K7sLjo2p8tQAuGGXjcibODCsJvBV+YrC69WGmzQpJPCoeK5kxG7PXQRUO1Sr6NEfA== dependencies: - "@formatjs/intl-utils" "^2.2.2" + "@formatjs/intl-utils" "^2.2.5" "@formatjs/intl-relativetimeformat@^4.5.9": - version "4.5.12" - resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-4.5.12.tgz#2d2365f62c15524a40b63627cd62924f6196dd4e" - integrity sha512-Fh57ZnwOgAIA61i3BQhTb8C8OrCP1zDLQ35xzJ7yv/UiDDExAS8rQPf80+7Hu/8+kydL1DDgVY1PXvE63fxF+Q== + version "4.5.15" + resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-4.5.15.tgz#1e31cdfc334603e380032745398186265ecc6049" + integrity sha512-DVtiHWMpwsuqPBtszOTmhv6m94RuiPN6/ltWCm6tul/lIFKotoJOvo1CkytfzWJ3ypjnfbYsfPRhvCCQTqVarQ== dependencies: - "@formatjs/intl-utils" "^2.2.2" + "@formatjs/intl-utils" "^2.2.5" "@formatjs/intl-unified-numberformat@^3.2.0": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-3.3.3.tgz#c0006fb06588ccce614df50f3469ca2ec92816f2" - integrity sha512-dic7DA8REMy8gkidkCSoWqTjaLIlCyLJ5fDtlgHzK/ftwxAlbSSHkbeozZ/IKQDPbbcSppI/t9hp9KT+co/Ksg== + version "3.3.6" + resolved "https://registry.yarnpkg.com/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-3.3.6.tgz#ab69818f7568894023cb31fdb5b5c7eed62c6537" + integrity sha512-VQYswh9Pxf4kN6FQvKprAQwSJrF93eJstCDPM1HIt3c3O6NqPFWNWhZ91PLTppOV11rLYsFK11ZxiGbnLNiPTg== dependencies: - "@formatjs/intl-utils" "^2.2.2" + "@formatjs/intl-utils" "^2.2.5" -"@formatjs/intl-utils@^2.2.0", "@formatjs/intl-utils@^2.2.2": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@formatjs/intl-utils/-/intl-utils-2.2.2.tgz#adc448035c2e3f60c550bd27c97eca336e641f5a" - integrity sha512-rKINaMRYH3FeNwYjEQwPtsA0kP2/hLLMB9mLi/QYfszz/huTqkInFmYilFRCX4oLlhFXDK5UQQMGNfEavN02Sg== +"@formatjs/intl-utils@^2.2.0", "@formatjs/intl-utils@^2.2.5": + version "2.2.5" + resolved "https://registry.yarnpkg.com/@formatjs/intl-utils/-/intl-utils-2.2.5.tgz#eaafd94df3d102ee13e54e80f992a33868a6b1e8" + integrity sha512-p7gcmazKROteL4IECCp03Qrs790fZ8tbemUAjQu0+K0AaAlK49rI1SIFFq3LzDUAqXIshV95JJhRe/yXxkal5g== "@fortawesome/fontawesome-common-types@^0.2.28": version "0.2.28" @@ -1126,16 +1119,16 @@ "@types/yargs" "^13.0.0" "@material-ui/core@^4.9.10": - version "4.9.11" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.11.tgz#02f45f4dbea6db191fdc0d993323d64cfae613fd" - integrity sha512-S2Ha9GpTxzl29XMeMc8dQX2pj97yApNzuhe/23If53fMdg5Fmd3SgbE1bMbyXeKhxwtXZjOFxd0vU+W/sez8Ew== + version "4.9.13" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.13.tgz#024962bcdda05139e1bad17a1815bf4088702b15" + integrity sha512-GEXNwUr+laZ0N+F1efmHB64Fyg+uQIRXLqbSejg3ebSXgLYNpIjnMOPRfWdu4rICq0dAIgvvNXGkKDMcf3AMpA== dependencies: "@babel/runtime" "^7.4.4" - "@material-ui/react-transition-group" "^4.2.0" - "@material-ui/styles" "^4.9.10" - "@material-ui/system" "^4.9.10" + "@material-ui/react-transition-group" "^4.3.0" + "@material-ui/styles" "^4.9.13" + "@material-ui/system" "^4.9.13" "@material-ui/types" "^5.0.1" - "@material-ui/utils" "^4.9.6" + "@material-ui/utils" "^4.9.12" "@types/react-transition-group" "^4.2.0" clsx "^1.0.4" hoist-non-react-statics "^3.3.2" @@ -1151,15 +1144,6 @@ dependencies: "@babel/runtime" "^7.4.4" -"@material-ui/react-transition-group@^4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@material-ui/react-transition-group/-/react-transition-group-4.2.0.tgz#afec833bbcc79f05a9b4d4828b3e07965cc7e321" - integrity sha512-4zapZ0gW1ZTws5aH9OGy3IMvtTV/olc7YrVSkM1WFu1FsrEhL+qarEniRjx7LjHt0gukFqoINfElI8v2boVMQA== - dependencies: - "@babel/runtime" "^7.4.5" - dom-helpers "^3.4.0" - loose-envify "^1.4.0" - prop-types "^15.6.2" "@material-ui/pickers@^3.2.10": version "3.2.10" resolved "https://registry.yarnpkg.com/@material-ui/pickers/-/pickers-3.2.10.tgz#19df024895876eb0ec7cd239bbaea595f703f0ae" @@ -1172,16 +1156,26 @@ react-transition-group "^4.0.0" rifm "^0.7.0" -"@material-ui/styles@^4.9.10": - version "4.9.10" - resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.9.10.tgz#182ccdd0bc8525a459486499bbaebcd92b0db3ab" - integrity sha512-EXIXlqVyFDnjXF6tj72y6ZxiSy+mHtrsCo3Srkm3XUeu3Z01aftDBy7ZSr3TQ02gXHTvDSBvegp3Le6p/tl7eA== +"@material-ui/react-transition-group@^4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@material-ui/react-transition-group/-/react-transition-group-4.3.0.tgz#92529142addb5cc179dbf42d246c7e3fe4d6104b" + integrity sha512-CwQ0aXrlUynUTY6sh3UvKuvye1o92en20VGAs6TORnSxUYeRmkX8YeTUN3lAkGiBX1z222FxLFO36WWh6q73rQ== + dependencies: + "@babel/runtime" "^7.5.5" + dom-helpers "^5.0.1" + loose-envify "^1.4.0" + prop-types "^15.6.2" + +"@material-ui/styles@^4.9.10", "@material-ui/styles@^4.9.13": + version "4.9.13" + resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.9.13.tgz#08b3976bdd21c38bc076693d95834f97539f3b15" + integrity sha512-lWlXJanBdHQ18jW/yphedRokHcvZD1GdGzUF/wQxKDsHwDDfO45ZkAxuSBI202dG+r1Ph483Z3pFykO2obeSRA== dependencies: "@babel/runtime" "^7.4.4" "@emotion/hash" "^0.8.0" "@material-ui/types" "^5.0.1" "@material-ui/utils" "^4.9.6" - clsx "^1.0.2" + clsx "^1.0.4" csstype "^2.5.2" hoist-non-react-statics "^3.3.2" jss "^10.0.3" @@ -1194,10 +1188,10 @@ jss-plugin-vendor-prefixer "^10.0.3" prop-types "^15.7.2" -"@material-ui/system@^4.9.10": - version "4.9.10" - resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.9.10.tgz#5de6ec7bea0f222b10b45e5bd5bb8b9a7b938926" - integrity sha512-E+t0baX2TBZk6ALm8twG6objpsxLdMM4MDm1++LMt2m7CetCAEc3aIAfDaprk4+tm5hFT1Cah5dRWk8EeIFQYw== +"@material-ui/system@^4.9.13": + version "4.9.13" + resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.9.13.tgz#adefb3b6a5ddf0b00fe4e82ac63bb48276e9749d" + integrity sha512-6AlpvdW6KJJ5bF1Xo2OD13sCN8k+nlL36412/bWnWZOKIfIMo/Lb8c8d1DOIaT/RKWxTEUaWnKZjabVnA3eZjA== dependencies: "@babel/runtime" "^7.4.4" "@material-ui/utils" "^4.9.6" @@ -1208,7 +1202,7 @@ resolved "https://registry.yarnpkg.com/@material-ui/types/-/types-5.0.1.tgz#c4954063cdc196eb327ee62c041368b1aebb6d61" integrity sha512-wURPSY7/3+MAtng3i26g+WKwwNE3HEeqa/trDBR5+zWKmcjO+u9t7Npu/J1r+3dmIa/OeziN9D/18IrBKvKffw== -"@material-ui/utils@^4.9.6": +"@material-ui/utils@^4.9.12", "@material-ui/utils@^4.9.6": version "4.9.12" resolved "https://registry.yarnpkg.com/@material-ui/utils/-/utils-4.9.12.tgz#0d639f1c1ed83fffb2ae10c21d15a938795d9e65" integrity sha512-/0rgZPEOcZq5CFA4+4n6Q6zk7fi8skHhH2Bcra8R3epoJEYy5PL55LuMazPtPH1oKeRausDV/Omz4BbgFsn1HQ== @@ -1252,21 +1246,21 @@ fastq "^1.6.0" "@rails/actioncable@^6.0.0-alpha": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.0.2.tgz#bcba9bcd6ee09a47c6628336e07399a68ca87814" - integrity sha512-vN78gohsXPlC5jxBHlmiwkUI9bv6SulcZaE72kAIg/G4ou+wTdiMWPJK1bf2IxUNf+sfOjhl+tbRmY4AzJcgrw== + version "6.0.3" + resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.0.3.tgz#722b4b639936129307ddbab3a390f6bcacf3e7bc" + integrity sha512-I01hgqxxnOgOtJTGlq0ZsGJYiTEEiSGVEGQn3vimZSqEP1HqzyFNbzGTq14Xdyeow2yGJjygjoFF1pmtE+SQaw== "@rails/activestorage@^6.0.0-alpha": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@rails/activestorage/-/activestorage-6.0.2.tgz#3882da2716d1f21091840fc52b71091d406a9c43" - integrity sha512-X0uGBLNsSKvVw5n93rH7k+7rbxc3Cq7p0ShiQbrk1cN0xflGjElzEJRY3okZZHsKkCV+h6rFCk0BOBVrLSrJ0A== + version "6.0.3" + resolved "https://registry.yarnpkg.com/@rails/activestorage/-/activestorage-6.0.3.tgz#401d2a28ecb7167cdb5e830ffddaa17c308c31aa" + integrity sha512-YdNwyfryHlcKj7Ruix89wZ2aiN3KTYULdW1Y/hNlHJlrY2/PXjT2YBTzZiVd+dcjrwHBsXV2rExdy+Z/lsrlEg== dependencies: spark-md5 "^3.0.0" "@rails/ujs@^6.0.0-alpha": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.0.2.tgz#8d32452d51c5e115374a218fb5475803dc17f4c0" - integrity sha512-KSQjJG8yzSWC1IT+UtFQglefABU37hpJ7uAz39K1/iWtoaJaI9ydGIaxxpJBT/PmYv4kS6lCSjXq13DELeJocw== + version "6.0.3" + resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.0.3.tgz#e68a03278e30daea6a110aac5dfa33c60c53055d" + integrity sha512-CM9OEvoN9eXkaX7PXEnbsQLULJ97b9rVmwliZbz/iBOERLJ68Rk3ClJe+fQEMKU4CBZfky2lIRnfslOdUs9SLQ== "@rails/webpacker@^4.0.7": version "4.2.2" @@ -1320,55 +1314,55 @@ any-observable "^0.3.0" "@sentry/browser@^5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.15.4.tgz#5a7e7bad088556665ed8e69bceb0e18784e4f6c7" - integrity sha512-l/auT1HtZM3KxjCGQHYO/K51ygnlcuOrM+7Ga8gUUbU9ZXDYw6jRi0+Af9aqXKmdDw1naNxr7OCSy6NBrLWVZw== + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.15.5.tgz#d9a51f1388581067b50d30ed9b1aed2cbb333a36" + integrity sha512-rqDvjk/EvogfdbZ4TiEpxM/lwpPKmq23z9YKEO4q81+1SwJNua53H60dOk9HpRU8nOJ1g84TMKT2Ov8H7sqDWA== dependencies: - "@sentry/core" "5.15.4" - "@sentry/types" "5.15.4" - "@sentry/utils" "5.15.4" + "@sentry/core" "5.15.5" + "@sentry/types" "5.15.5" + "@sentry/utils" "5.15.5" tslib "^1.9.3" -"@sentry/core@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.15.4.tgz#08b617e093a636168be5aebad141d1f744217085" - integrity sha512-9KP4NM4SqfV5NixpvAymC7Nvp36Zj4dU2fowmxiq7OIbzTxGXDhwuN/t0Uh8xiqlkpkQqSECZ1OjSFXrBldetQ== +"@sentry/core@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.15.5.tgz#40ea79bff5272d3fbbeeb4a98cdc59e1adbd2c92" + integrity sha512-enxBLv5eibBMqcWyr+vApqeix8uqkfn0iGsD3piKvoMXCgKsrfMwlb/qo9Ox0lKr71qIlZVt+9/A2vZohdgnlg== dependencies: - "@sentry/hub" "5.15.4" - "@sentry/minimal" "5.15.4" - "@sentry/types" "5.15.4" - "@sentry/utils" "5.15.4" + "@sentry/hub" "5.15.5" + "@sentry/minimal" "5.15.5" + "@sentry/types" "5.15.5" + "@sentry/utils" "5.15.5" tslib "^1.9.3" -"@sentry/hub@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.15.4.tgz#cb64473725a60eec63b0be58ed1143eaaf894bee" - integrity sha512-1XJ1SVqadkbUT4zLS0TVIVl99si7oHizLmghR8LMFl5wOkGEgehHSoOydQkIAX2C7sJmaF5TZ47ORBHgkqclUg== +"@sentry/hub@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.15.5.tgz#f5abbcdbe656a70e2ff02c02a5a4cffa0f125935" + integrity sha512-zX9o49PcNIVMA4BZHe//GkbQ4Jx+nVofqU/Il32/IbwKhcpPlhGX3c1sOVQo4uag3cqd/JuQsk+DML9TKkN0Lw== dependencies: - "@sentry/types" "5.15.4" - "@sentry/utils" "5.15.4" + "@sentry/types" "5.15.5" + "@sentry/utils" "5.15.5" tslib "^1.9.3" -"@sentry/minimal@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.15.4.tgz#113f01fefb86b7830994c3dfa7ad4889ba7b2003" - integrity sha512-GL4GZ3drS9ge+wmxkHBAMEwulaE7DMvAEfKQPDAjg2p3MfcCMhAYfuY4jJByAC9rg9OwBGGehz7UmhWMFjE0tw== +"@sentry/minimal@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.15.5.tgz#a0e4e071f01d9c4d808094ae7203f6c4cca9348a" + integrity sha512-zQkkJ1l9AjmU/Us5IrOTzu7bic4sTPKCatptXvLSTfyKW7N6K9MPIIFeSpZf9o1yM2sRYdK7GV08wS2eCT3JYw== dependencies: - "@sentry/hub" "5.15.4" - "@sentry/types" "5.15.4" + "@sentry/hub" "5.15.5" + "@sentry/types" "5.15.5" tslib "^1.9.3" -"@sentry/types@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.15.4.tgz#37f30e35b06e8e12ad1101f1beec3e9b88ca1aab" - integrity sha512-quPHPpeAuwID48HLPmqBiyXE3xEiZLZ5D3CEbU3c3YuvvAg8qmfOOTI6z4Z3Eedi7flvYpnx3n7N3dXIEz30Eg== +"@sentry/types@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.15.5.tgz#16c97e464cf09bbd1d2e8ce90d130e781709076e" + integrity sha512-F9A5W7ucgQLJUG4LXw1ZIy4iLevrYZzbeZ7GJ09aMlmXH9PqGThm1t5LSZlVpZvUfQ2rYA8NU6BdKJSt7B5LPw== -"@sentry/utils@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.15.4.tgz#02865ab3c9b745656cea0ab183767ec26c96f6e6" - integrity sha512-lO8SLBjrUDGADl0LOkd55R5oL510d/1SaI08/IBHZCxCUwI4TiYo5EPECq8mrj3XGfgCyq9osw33bymRlIDuSQ== +"@sentry/utils@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.15.5.tgz#dec1d4c79037c4da08b386f5d34409234dcbfb15" + integrity sha512-Nl9gl/MGnzSkuKeo3QaefoD/OJrFLB8HmwQ7HUbTXb6E7yyEzNKAQMHXGkwNAjbdYyYbd42iABP6Y5F/h39NtA== dependencies: - "@sentry/types" "5.15.4" + "@sentry/types" "5.15.5" tslib "^1.9.3" "@types/babel__core@^7.1.0": @@ -1398,13 +1392,13 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.0.10" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.10.tgz#d9a99f017317d9b3d1abc2ced45d3bca68df0daf" - integrity sha512-74fNdUGrWsgIB/V9kTO5FGHPWYY6Eqn+3Z7L6Hc4e/BxjYV7puvBqp5HwsVYYfLm6iURYBNCx4Ut37OF9yitCw== + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.11.tgz#1ae3010e8bf8851d324878b42acec71986486d18" + integrity sha512-ddHK5icION5U6q11+tV2f9Mo6CZVuT8GJKld2q9LqHSZbvLbH34Kcu2yFGckZut453+eQU6btIA3RihmnRgI+Q== dependencies: "@babel/types" "^7.3.0" -"@types/classnames@^2.2.9": +"@types/classnames@^2.2.10": version "2.2.10" resolved "https://registry.yarnpkg.com/@types/classnames/-/classnames-2.2.10.tgz#cc658ca319b6355399efc1f5b9e818f1a24bf999" integrity sha512-1UzDldn9GfYYEsWWnn/P4wkTlkZDH7lDb0wBMGbtIQc9zXEQq7FlKBdZUn6OBqD8sKZZ2RQO2mAjGpXiDGoRmQ== @@ -1414,7 +1408,7 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/draft-js@^0.10.36": +"@types/draft-js@^0.10.40": version "0.10.40" resolved "https://registry.yarnpkg.com/@types/draft-js/-/draft-js-0.10.40.tgz#d722364aa46f5a998fc22c79a5157edf336c7350" integrity sha512-XMkk8pamH/XwSOpEk/B6wFB0Y6LvMFWQZZaIVjzQUH2GCpFxbugo8gYpETsNMkJrGb3yb7hhFjjT1SyJ8AbXjA== @@ -1467,9 +1461,9 @@ rxjs ">=6.4.0" "@types/invariant@^2.2.31": - version "2.2.31" - resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.31.tgz#4444c03004f215289dbca3856538434317dd28b2" - integrity sha512-jMlgg9pIURvy9jgBHCjQp/CyBjYHUwj91etVcDdXkFl2CwTFiQlB+8tcsMeXpXf2PFE5X2pjk4Gm43hQSMHAdA== + version "2.2.32" + resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.32.tgz#cf523a609062564e36e7a7dadb5089ed87da6382" + integrity sha512-WjY4WVFaehHv+TOgm+dS3UI559NvsPGFz/C0nIo7KOOdC+HeC7Y3/yLzdJYQ3+oFQaTXrOVm7cNtIgMataIDVg== "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.1" @@ -1497,9 +1491,9 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*": - version "13.13.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.0.tgz#30d2d09f623fe32cde9cb582c7a6eda2788ce4a8" - integrity sha512-WE4IOAC6r/yBZss1oQGM5zs2D7RuKR6Q+w+X2SouPofnWn+LbCqClRyhO3ZE7Ix8nmFgo/oVuuE01cJT2XB13A== + version "13.13.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.5.tgz#96ec3b0afafd64a4ccea9107b75bf8489f0e5765" + integrity sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g== "@types/parse-json@^4.0.0": version "4.0.0" @@ -1524,9 +1518,9 @@ "@types/react" "*" "@types/react@*": - version "16.9.34" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.34.tgz#f7d5e331c468f53affed17a8a4d488cd44ea9349" - integrity sha512-8AJlYMOfPe1KGLKyHpflCg5z46n0b5DbRfqDksxBLBTUpB75ypDBAO9eCUcjNwE6LCUslwTz00yyG/X9gaVtow== + version "16.9.35" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.35.tgz#a0830d172e8aadd9bd41709ba2281a3124bbd368" + integrity sha512-q0n0SsWcGc8nDqH2GJfWQWUOmZSJhXV64CjVN5SvcNti3TdEaA3AH0D8DwNmMdzjMAC/78tB8nAZIlV8yTz+zQ== dependencies: "@types/prop-types" "*" csstype "^2.2.0" @@ -1779,15 +1773,15 @@ acorn@^5.5.3: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== -acorn@^6.0.1, acorn@^6.2.1: +acorn@^6.0.1, acorn@^6.4.1: version "6.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== acorn@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" - integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== + version "7.2.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.2.0.tgz#17ea7e40d7c8640ff54a694c889c26f31704effe" + integrity sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ== aggregate-error@^3.0.0: version "3.0.1" @@ -2176,10 +2170,10 @@ babel-loader@^8.0.6: pify "^4.0.1" schema-utils "^2.6.5" -babel-plugin-dynamic-import-node@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" - integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== +babel-plugin-dynamic-import-node@^2.3.0, babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== dependencies: object.assign "^4.1.0" @@ -2291,11 +2285,16 @@ bluebird@^3.5.5: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== +bn.js@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" + integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== + body-parser@1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -2408,7 +2407,7 @@ browserify-des@^1.0.0: inherits "^2.0.1" safe-buffer "^5.1.2" -browserify-rsa@^4.0.0: +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= @@ -2417,17 +2416,18 @@ browserify-rsa@^4.0.0: randombytes "^2.0.1" browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.1.0.tgz#4fe971b379a5aeb4925e06779f9fa1f41d249d70" + integrity sha512-VYxo7cDCeYUoBZ0ZCy4UyEUCP3smyBd4DRQM5nrFS1jJjPJjX7rP3oLRpPoWfkhQfyJ0I9ZbHbKafrFD/SGlrg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.2" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" browserify-zlib@^0.2.0: version "0.2.0" @@ -2436,13 +2436,13 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.11.1, browserslist@^4.6.4, browserslist@^4.8.5, browserslist@^4.9.1: - version "4.11.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b" - integrity sha512-DCTr3kDrKEYNw6Jb9HFxVLQNaue8z+0ZfRBRjmCunKDEXEBajKDj2Y+Uelg+Pi29OnvaSGwjOsnRyNEkXzHg5g== +browserslist@^4.0.0, browserslist@^4.11.1, browserslist@^4.6.4, browserslist@^4.8.5: + version "4.12.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.12.0.tgz#06c6d5715a1ede6c51fc39ff67fd647f740b656d" + integrity sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg== dependencies: - caniuse-lite "^1.0.30001038" - electron-to-chromium "^1.3.390" + caniuse-lite "^1.0.30001043" + electron-to-chromium "^1.3.413" node-releases "^1.1.53" pkg-up "^2.0.0" @@ -2611,11 +2611,6 @@ camelcase@^2.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= - camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" @@ -2636,10 +2631,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001038, caniuse-lite@^1.0.30001039: - version "1.0.30001043" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001043.tgz#1b561de27aefbe6ff99e41866b8d7d87840c513b" - integrity sha512-MrBDRPJPDBYwACtSQvxg9+fkna5jPXhJlKmuxenl/ml9uf8LHKlDmLpElu+zTW/bEz7lC1m0wTDD7jiIB+hgFg== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001039, caniuse-lite@^1.0.30001043: + version "1.0.30001055" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001055.tgz#7b52c3537f7a8c0408aca867e83d2b04268b54cd" + integrity sha512-MbwsBmKrBSKIWldfdIagO5OJWZclpJtS4h0Jrk/4HFrXJxTdVdH23Fd+xCiHriVGvYcWyW8mR/CPsYajlH8Iuw== capture-exit@^2.0.0: version "2.0.0" @@ -2836,24 +2831,6 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -3162,6 +3139,7 @@ cosmiconfig@^6.0.0: parse-json "^5.0.0" path-type "^4.0.0" yaml "^1.7.2" + country-flag-icons@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/country-flag-icons/-/country-flag-icons-1.2.1.tgz#166878b8734ada5c4c0a8ce9d9d05c9ddf272af5" @@ -3175,7 +3153,7 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-hash@^1.1.0, create-hash@^1.1.2: +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -3186,7 +3164,7 @@ create-hash@^1.1.0, create-hash@^1.1.2: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -3281,9 +3259,9 @@ css-has-pseudo@^0.10.0: postcss-selector-parser "^5.0.0-rc.4" css-loader@^3.2.0: - version "3.5.2" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.5.2.tgz#6483ae56f48a7f901fbe07dde2fc96b01eafab3c" - integrity sha512-hDL0DPopg6zQQSRlZm0hyeaqIRnL0wbWjay9BZxoiJBpbfOW4WHfbaYQhwnDmEa0kZUc1CJ3IFo15ot1yULMIQ== + version "3.5.3" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.5.3.tgz#95ac16468e1adcd95c844729e0bb167639eb0bcf" + integrity sha512-UEr9NH5Lmi7+dguAm+/JSPovNjYbm2k3TK58EiwQHzOHH5Jfq1Y+XoP2bQO6TMn7PptMd0opxxedAWcaSTRKHw== dependencies: camelcase "^5.3.1" cssesc "^3.0.0" @@ -3296,7 +3274,7 @@ css-loader@^3.2.0: postcss-modules-scope "^2.2.0" postcss-modules-values "^3.0.0" postcss-value-parser "^4.0.3" - schema-utils "^2.6.5" + schema-utils "^2.6.6" semver "^6.3.0" css-prefers-color-scheme@^3.1.1: @@ -3496,9 +3474,9 @@ date-fns@^1.27.2: integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== date-fns@^2.12.0: - version "2.12.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.12.0.tgz#01754c8a2f3368fc1119cf4625c3dad8c1845ee6" - integrity sha512-qJgn99xxKnFgB1qL4jpxU7Q2t0LOn1p8KMIveef3UZD7kqjT3tpFNNdXJelEHhE+rUgffriXriw/sOSU+cS1Hw== + version "2.13.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.13.0.tgz#d7b8a0a2d392e8d88a8024d0a46b980bbfdbd708" + integrity sha512-xm0c61mevGF7f0XpCGtDTGpzEFC/1fpLXHbmFpxZZQJuvByIK2ozm6cSYuU+nxFYOPh2EuCfzUwlTEFwKG+h5w== debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" @@ -3536,7 +3514,7 @@ decamelize-keys@^1.0.0: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: +decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -3762,13 +3740,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-helpers@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" - integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA== - dependencies: - "@babel/runtime" "^7.1.2" - dom-helpers@^5.0.1: version "5.1.4" resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.1.4.tgz#4609680ab5c79a45f2531441f1949b79d6587f4b" @@ -3855,7 +3826,7 @@ draft-js-plugins-editor@^3.0.0: immutable "~3.7.4" prop-types "^15.5.8" -draft-js@^0.11.1, draft-js@^0.11.2: +draft-js@^0.11.2, draft-js@^0.11.5: version "0.11.5" resolved "https://registry.yarnpkg.com/draft-js/-/draft-js-0.11.5.tgz#b5dd30c30c9316801ab9766d45a8f88b1cd43b2c" integrity sha512-RlHcoDtblwCD6Bw2ay3D0dTLA6lH8862OcdJrHGnYrY5JjlitzSzGvGQwqqumVvbGUNDSZLD3FyNpSs4z5WIUg== @@ -3907,17 +3878,17 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.390: - version "1.3.413" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.413.tgz#9c457a4165c7b42e59d66dff841063eb9bfe5614" - integrity sha512-Jm1Rrd3siqYHO3jftZwDljL2LYQafj3Kki5r+udqE58d0i91SkjItVJ5RwlJn9yko8i7MOcoidVKjQlgSdd1hg== +electron-to-chromium@^1.3.413: + version "1.3.432" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.432.tgz#3bf7b191978ff2e8bc3caf811bb52b1e9f9eab25" + integrity sha512-/GdNhXyLP5Yl2322CUX/+Xi8NhdHBqL6lD9VJVKjH6CjoPGakvwZ5CpKgj/oOlbzuWWjOvMjDw1bBuAIRCNTlw== elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4= -elliptic@^6.0.0: +elliptic@^6.0.0, elliptic@^6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== @@ -4002,9 +3973,9 @@ entities@^1.1.1: integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== entities@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" - integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== + version "2.0.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.2.tgz#ac74db0bba8d33808bbf36809c3a5c3683531436" + integrity sha512-dmD3AvJQBUjKpcNkoqr+x+IF0SdRtPz9Vk0uTy4yWqga9ibB6s4v++QFWNohjiUGoMlF552ZvNyXDxz5iW0qmw== errno@^0.1.3, errno@~0.1.7: version "0.1.7" @@ -4087,9 +4058,9 @@ eslint-config-airbnb@^18.0.1: object.entries "^1.1.1" eslint-config-prettier@^6.5.0: - version "6.10.1" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a" - integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ== + version "6.11.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" + integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== dependencies: get-stdin "^6.0.0" @@ -4308,9 +4279,9 @@ etag@~1.8.1: integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= eventemitter3@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" - integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== + version "4.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.1.tgz#3bcf626b0d3b16ce22ee88625a3772706300ba1f" + integrity sha512-MnI0l35oYL2C/c80rjJN7qu50MDx39yYE7y7oYck2YA3v+y7EaAenY8IU8AP4d1RWqE8VAKWFGSh3rfP87ll3g== events@^3.0.0: version "3.1.0" @@ -4675,7 +4646,7 @@ find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-cache-dir@^3.0.0, find-cache-dir@^3.2.0: +find-cache-dir@^3.0.0, find-cache-dir@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== @@ -4889,9 +4860,9 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.7: - version "1.2.12" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" - integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== + version "1.2.13" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== dependencies: bindings "^1.5.0" nan "^2.12.1" @@ -4942,11 +4913,6 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -5151,9 +5117,9 @@ gonzales-pe@^4.3.0: minimist "^1.2.5" graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.2.2: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== growly@^1.3.0: version "1.3.0" @@ -5256,12 +5222,13 @@ has@^1.0.0, has@^1.0.1, has@^1.0.3: function-bind "^1.1.1" hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" @@ -5363,7 +5330,7 @@ html-encoding-sniffer@^1.0.2: dependencies: whatwg-encoding "^1.0.1" -html-entities@^1.2.1: +html-entities@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.3.1.tgz#fb9a1a4b5b14c5daba82d3e34c6ae4fe701a0e44" integrity sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA== @@ -5602,7 +5569,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -5671,9 +5638,9 @@ interpret@1.2.0, interpret@^1.0.0, interpret@^1.2.0: integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== intl-format-cache@^4.2.21: - version "4.2.24" - resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-4.2.24.tgz#d6a264430553db233aa444acefc4150762d603e4" - integrity sha512-eea8rHu7ipmUilSd9+MCglgR07E+xJXmTYVFODmeLKsO3Psr/OrixDr6vWprz1whli7cwRdSc1/jHVBxrd+QBw== + version "4.2.27" + resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-4.2.27.tgz#d25fa83639913aec10ca5a8f9e3b6449bb0eacf2" + integrity sha512-blHXX9qBp8H6fGhQc0jHGh7j97HF0megj4rIB878iazMBdFk/tR7b3av0PJxE72TP8MycLFpeXW9vLY5cBmF4A== intl-messageformat-parser@^3.6.4: version "3.6.4" @@ -5697,11 +5664,6 @@ invariant@^2.2.2, invariant@^2.2.4: dependencies: loose-envify "^1.0.0" -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - invert-kv@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" @@ -6016,9 +5978,9 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: isobject "^3.0.1" is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== is-regex@^1.0.4, is-regex@^1.0.5: version "1.0.5" @@ -6563,10 +6525,10 @@ jest-worker@^24.6.0, jest-worker@^24.9.0: merge-stream "^2.0.0" supports-color "^6.1.0" -jest-worker@^25.1.0: - version "25.4.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.4.0.tgz#ee0e2ceee5a36ecddf5172d6d7e0ab00df157384" - integrity sha512-ghAs/1FtfYpMmYQ0AHqxV62XPvKdUDIBBApMZfly+E9JEmYh2K45G0R5dWxx986RN12pRCxsViwQVtGl+N4whw== +jest-worker@^25.4.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" + integrity sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw== dependencies: merge-stream "^2.0.0" supports-color "^7.0.0" @@ -6814,13 +6776,6 @@ last-call-webpack-plugin@^3.0.0: lodash "^4.17.5" webpack-sources "^1.1.0" -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" @@ -7115,7 +7070,7 @@ log-update@^2.3.0: cli-cursor "^2.0.0" wrap-ansi "^3.0.1" -loglevel@^1.6.6: +loglevel@^1.6.8: version "1.6.8" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" integrity sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA== @@ -7176,9 +7131,9 @@ make-dir@^2.0.0, make-dir@^2.1.0: semver "^5.6.0" make-dir@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" - integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== dependencies: semver "^6.0.0" @@ -7387,17 +7342,17 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== +mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== dependencies: - mime-db "1.43.0" + mime-db "1.44.0" mime@1.6.0: version "1.6.0" @@ -7405,9 +7360,9 @@ mime@1.6.0: integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mime@^2.4.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" - integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== + version "2.4.5" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.5.tgz#d8de2ecb92982dedbb6541c9b6841d7f218ea009" + integrity sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== mimic-fn@^1.0.0: version "1.2.0" @@ -7479,18 +7434,7 @@ minipass-pipeline@^1.2.2: integrity sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA== dependencies: minipass "^3.0.0" -minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -<<<<<<< Updated upstream -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - -======= ->>>>>>> Stashed changes minipass@^3.0.0, minipass@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5" @@ -7530,9 +7474,9 @@ mixin-deep@^1.2.0: minimist "^1.2.5" moment@^2.25.1: - version "2.25.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.25.1.tgz#1cb546dca1eccdd607c9324747842200b683465d" - integrity sha512-nRKMf9wDS4Fkyd0C9LXh2FFXinD+iwbJ5p/lh3CHitW9kZbRbJ8hCruiadiIXZVbeAqKZzqcTvHnK3mRhFjb6w== + version "2.25.3" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.25.3.tgz#252ff41319cf41e47761a1a88cab30edfe9808c0" + integrity sha512-PuYv0PHxZvzc15Sp8ybUCoQ+xpyPWvjOuK72a5ovzp2LI32rJXOiIfyoFoYvG3s6EwwrdkMyWuRiEHSZRLJNdg== move-concurrently@^1.0.1: version "1.0.1" @@ -7562,14 +7506,14 @@ ms@^2.1.1: integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== mui-rte@^1.8.0: - version "1.15.1" - resolved "https://registry.yarnpkg.com/mui-rte/-/mui-rte-1.15.1.tgz#74e7b0c894e5090d30f9cdad00175fa895ac172a" - integrity sha512-XiqElswlGF8uiybvnNFpgYH5msh+p2JV6pjH7R3uii3skQI8SFXs+JMwBrEzkCPhbAraLB3HJxLe9a2Mlk9MNA== + version "1.17.6" + resolved "https://registry.yarnpkg.com/mui-rte/-/mui-rte-1.17.6.tgz#f82dfcfbe112ffffd690c88d932972795a211504" + integrity sha512-lB+LxLwgPjnb34de4Ivs0drPORU/VLS6p4waTu7Dxl6dR0VFHB22S0Zz4LIKT/atatlJLVItyMssP6Cw3/WUww== dependencies: - "@types/classnames" "^2.2.9" - "@types/draft-js" "^0.10.36" + "@types/classnames" "^2.2.10" + "@types/draft-js" "^0.10.40" classnames "^2.2.6" - draft-js "^0.11.1" + draft-js "^0.11.5" immutable "^3.8.2" multicast-dns-service-types@^1.1.0: @@ -7591,9 +7535,9 @@ mute-stream@0.0.8: integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== nan@^2.12.1, nan@^2.13.2: - version "2.14.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" - integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + version "2.14.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" + integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== nanomatch@^1.2.9: version "1.2.13" @@ -7760,14 +7704,14 @@ node-plop@~0.25.0: resolve "^1.12.0" node-releases@^1.1.53: - version "1.1.53" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" - integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ== + version "1.1.55" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.55.tgz#8af23b7c561d8e2e6e36a46637bab84633b07cee" + integrity sha512-H3R3YR/8TjT5WPin/wOoHOUPHgvj8leuU/Keta/rwelEQN9pA/S2Dx8/se4pZ2LBxSd0nAGzsNzhqwa77v7F1w== node-sass@^4.13.0: - version "4.13.1" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.13.1.tgz#9db5689696bb2eec2c32b98bfea4c7a2e992d0a3" - integrity sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw== + version "4.14.1" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.14.1.tgz#99c87ec2efb7047ed638fb4c9db7f3a42e2217b5" + integrity sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g== dependencies: async-foreach "^0.1.3" chalk "^1.1.1" @@ -7783,7 +7727,7 @@ node-sass@^4.13.0: node-gyp "^3.8.0" npmlog "^4.0.0" request "^2.88.0" - sass-graph "^2.2.4" + sass-graph "2.2.5" stdout-stream "^1.4.0" "true-case-path" "^1.0.2" @@ -8098,14 +8042,7 @@ os-homedir@^1.0.0: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - dependencies: - lcid "^1.0.0" - -os-locale@^3.0.0, os-locale@^3.1.0: +os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== @@ -8166,7 +8103,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2: +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -8256,7 +8193,7 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0: +parse-asn1@^5.0.0, parse-asn1@^5.1.5: version "5.1.5" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== @@ -8571,10 +8508,10 @@ popper.js@^1.16.1-lts: resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b" integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ== -portfinder@^1.0.25: - version "1.0.25" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" - integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== +portfinder@^1.0.26: + version "1.0.26" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.26.tgz#475658d56ca30bed72ac7f1378ed350bd1b64e70" + integrity sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ== dependencies: async "^2.6.2" debug "^3.1.1" @@ -8739,9 +8676,9 @@ postcss-env-function@^2.0.2: postcss-values-parser "^2.0.0" postcss-flexbugs-fixes@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.2.0.tgz#662b3dcb6354638b9213a55eed8913bcdc8d004a" - integrity sha512-QRE0n3hpkxxS/OGvzOa+PDuy4mh/Jg4o9ui22/ko5iGYOG3M5dfJabjnAZjTdh2G9F85c7Hv8hWcEDEKW/xceQ== + version "4.2.1" + resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.2.1.tgz#9218a65249f30897deab1033aced8578562a6690" + integrity sha512-9SiofaZ9CWpQWxOwRh1b/r85KD5y7GgvsNt1056k6OYLvWUun0czCvogfJgylC22uJTwW1KzY3Gz65NZRlvoiQ== dependencies: postcss "^7.0.26" @@ -9276,9 +9213,9 @@ postcss-value-parser@^3.0.0, postcss-value-parser@^3.2.3: integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2, postcss-value-parser@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" - integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1: version "2.0.1" @@ -9290,9 +9227,9 @@ postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1: uniq "^1.0.1" postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: - version "7.0.27" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9" - integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ== + version "7.0.29" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.29.tgz#d3a903872bd52280b83bce38cdc83ce55c06129e" + integrity sha512-ba0ApvR3LxGvRMMiUa9n0WR4HjzcYm7tS+ht4/2Nd0NLtHpPIH77fuB9Xh1/yJVz9O/E/95Y/dn8ygWsyffXtw== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -9608,9 +9545,9 @@ react-testing-library@^8.0.1: integrity sha512-Gq4JC9r3prA4hYwo7afcbHHMFckO29+5Nrh2KblAEPuK/DWaU0bJE1vtpAgLhzhY9bBirmcgjjIHljHEwGAXKw== react-transition-group@^4.0.0, react-transition-group@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.3.0.tgz#fea832e386cf8796c58b61874a3319704f5ce683" - integrity sha512-1qRV1ZuVSdxPlPf4O8t7inxUGpdyO5zG9IoNfJxSO0ImU2A1YWkEQvFPuIPZmMLkg5hYs7vv5mMOyfgSkvAwvw== + version "4.4.1" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9" + integrity sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw== dependencies: "@babel/runtime" "^7.5.5" dom-helpers "^5.0.1" @@ -9712,7 +9649,7 @@ read-pkg@^3.0.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.6, readable-stream@^3.1.1: +readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -9954,11 +9891,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -10015,9 +9947,9 @@ resolve@1.1.7: integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.3.2, resolve@^1.8.1: - version "1.16.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.16.1.tgz#49fac5d8bacf1fd53f200fa51247ae736175832c" - integrity sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig== + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" @@ -10062,12 +9994,6 @@ rgba-regex@^1.0.0: resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= -<<<<<<< Updated upstream -<<<<<<< Updated upstream -<<<<<<< Updated upstream -<<<<<<< HEAD -rimraf@2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3, rimraf@^2.7.1: -======= rifm@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/rifm/-/rifm-0.7.0.tgz#debe951a9c83549ca6b33e5919f716044c2230be" @@ -10075,17 +10001,7 @@ rifm@^0.7.0: dependencies: "@babel/runtime" "^7.3.1" -rimraf@2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3: ->>>>>>> julian/delete-edit -======= -rimraf@2, rimraf@^2.5.4, rimraf@^2.6.3, rimraf@^2.7.1: ->>>>>>> Stashed changes -======= rimraf@2, rimraf@^2.5.4, rimraf@^2.6.3, rimraf@^2.7.1: ->>>>>>> Stashed changes -======= -rimraf@2, rimraf@^2.5.4, rimraf@^2.6.3, rimraf@^2.7.1: ->>>>>>> Stashed changes version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -10120,11 +10036,9 @@ rsvp@^4.8.4: integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== run-async@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" - integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== - dependencies: - is-promise "^2.1.0" + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== run-parallel@^1.1.9: version "1.1.9" @@ -10150,10 +10064,10 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" - integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== safe-regex@^1.1.0: version "1.1.0" @@ -10182,15 +10096,15 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sass-graph@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" - integrity sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k= +sass-graph@2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.5.tgz#a981c87446b8319d96dce0671e487879bd24c2e8" + integrity sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag== dependencies: glob "^7.0.0" lodash "^4.0.0" scss-tokenizer "^0.2.3" - yargs "^7.0.0" + yargs "^13.3.2" sass-loader@7.3.1: version "7.3.1" @@ -10233,7 +10147,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.5.0, schema-utils@^2.6.1, schema-utils@^2.6.4, schema-utils@^2.6.5: +schema-utils@^2.5.0, schema-utils@^2.6.1, schema-utils@^2.6.5, schema-utils@^2.6.6: version "2.6.6" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.6.tgz#299fe6bd4a3365dc23d99fd446caff8f1d6c330c" integrity sha512-wHutF/WPSbIi9x6ctjGGk2Hvl0VOz5l3EKEuKbjPlB30mKZUzb9A5k9yEXRX3pwyqVLPvpfZZEllaFq/M718hA== @@ -10318,6 +10232,11 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== +serialize-javascript@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.0.0.tgz#492e489a2d77b7b804ad391a5f5d97870952548e" + integrity sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw== + serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -10523,13 +10442,14 @@ sockjs-client@1.4.0: json3 "^3.3.2" url-parse "^1.4.3" -sockjs@0.3.19: - version "0.3.19" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d" - integrity sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw== +sockjs@0.3.20: + version "0.3.20" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.20.tgz#b26a283ec562ef8b2687b44033a4eeceac75d855" + integrity sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA== dependencies: faye-websocket "^0.10.0" - uuid "^3.0.1" + uuid "^3.4.0" + websocket-driver "0.6.5" sort-keys@^1.0.0: version "1.1.2" @@ -10555,9 +10475,9 @@ source-map-resolve@^0.5.0: urix "^0.1.0" source-map-support@^0.5.6, source-map-support@~0.5.12: - version "0.5.17" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.17.tgz#29fe1b3c98b9dbd5064ada89052ee8ff070cb46c" - integrity sha512-bwdKOBZ5L0gFRh4KOxNap/J/MpvX9Yxsq9lFDx65s3o7F/NiHy7JRaGIS8MwW6tZPAq9UXE207Il0cfcb5yu/Q== + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -10606,9 +10526,9 @@ spdx-correct@^3.0.0: spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: version "3.0.0" @@ -10635,7 +10555,7 @@ spdy-transport@^3.0.0: readable-stream "^3.0.6" wbuf "^1.7.3" -spdy@^4.0.1: +spdy@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== @@ -10783,7 +10703,7 @@ string-length@^2.0.0: astral-regex "^1.0.0" strip-ansi "^4.0.0" -string-width@^1.0.1, string-width@^1.0.2: +string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= @@ -10792,7 +10712,7 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -10965,12 +10885,12 @@ strip-json-comments@^3.0.1: integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== style-loader@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.4.tgz#1ad81283cefe51096756fd62697258edad933230" - integrity sha512-SbBHRD8fwK3pX+4UDF4ETxUF0+rCvk29LWTTI7Rt0cgsDjAj3SWM76ByTe6u2+4IlJ/WwluB7wuslWETCoPQdg== + version "1.2.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.2.1.tgz#c5cbbfbf1170d076cfdd86e0109c5bba114baa1a" + integrity sha512-ByHSTQvHLkWE9Ir5+lGbVOXhxX10fbprhLvdg96wedFZb4NDekDPxVKv5Fwmio+QcMlkkNfuK+5W1peQ5CUhZg== dependencies: loader-utils "^2.0.0" - schema-utils "^2.6.5" + schema-utils "^2.6.6" style-search@^0.1.0: version "0.1.0" @@ -11165,24 +11085,24 @@ terser-webpack-plugin@^1.4.3: worker-farm "^1.7.0" terser-webpack-plugin@^2.2.1: - version "2.3.5" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz#5ad971acce5c517440ba873ea4f09687de2f4a81" - integrity sha512-WlWksUoq+E4+JlJ+h+U+QUzXpcsMSSNXkDy9lBVkSqDn1w23Gg29L/ary9GeJVYCGiNJJX7LnVc4bwL1N3/g1w== + version "2.3.6" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.6.tgz#a4014b311a61f87c6a1b217ef4f5a75bd0665a69" + integrity sha512-I8IDsQwZrqjdmOicNeE8L/MhwatAap3mUrtcAKJuilsemUNcX+Hier/eAzwStVqhlCxq0aG3ni9bK/0BESXkTg== dependencies: cacache "^13.0.1" - find-cache-dir "^3.2.0" - jest-worker "^25.1.0" - p-limit "^2.2.2" - schema-utils "^2.6.4" - serialize-javascript "^2.1.2" + find-cache-dir "^3.3.1" + jest-worker "^25.4.0" + p-limit "^2.3.0" + schema-utils "^2.6.6" + serialize-javascript "^3.0.0" source-map "^0.6.1" - terser "^4.4.3" + terser "^4.6.12" webpack-sources "^1.4.3" -terser@^4.1.2, terser@^4.4.3: - version "4.6.11" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f" - integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA== +terser@^4.1.2, terser@^4.6.12: + version "4.6.13" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.13.tgz#e879a7364a5e0db52ba4891ecde007422c56a916" + integrity sha512-wMvqukYgVpQlymbnNbabVZbtM6PN63AzqexpwJL8tbh/mRT9LE5o+ruVduAGL7D6Fpjl+Q+06U5I9Ul82odAhw== dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -11375,9 +11295,9 @@ ts-pnp@^1.1.6: integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== tslib@^1.10.0, tslib@^1.9.0, tslib@^1.9.3: - version "1.11.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" - integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== + version "1.11.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.2.tgz#9c79d83272c9a7aaf166f73915c9667ecdde3cc9" + integrity sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg== tty-browserify@0.0.0: version "0.0.0" @@ -11437,9 +11357,9 @@ ua-parser-js@^0.7.18: integrity sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ== uglify-js@^3.1.4: - version "3.9.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.1.tgz#a56a71c8caa2d36b5556cc1fd57df01ae3491539" - integrity sha512-JUPoL1jHsc9fOjVFHdQIhqEEJsQvfKDjlubcCilu8U26uZ73qOg8VsN8O1jbuei44ZPlwL7kmbAdM4tzaUvqnA== + version "3.9.2" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.2.tgz#012b74fb6a2e440d9ba1f79110a479d3b1f2d48d" + integrity sha512-zGVwKslUAD/EeqOrD1nQaBmXIHl1Vw371we8cvS8I6mYK9rmgX5tv8AAeJdfsQ3Kk5mGax2SVV/AizxdNGhl7Q== dependencies: commander "~2.20.3" @@ -11684,7 +11604,7 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.0.1, uuid@^3.3.2: +uuid@^3.3.2, uuid@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -11714,17 +11634,10 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -<<<<<<< HEAD -validator@^12.0.0: - version "12.2.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-12.2.0.tgz#660d47e96267033fd070096c3b1a6f2db4380a0a" - integrity sha512-jJfE/DW6tIK1Ek8nCfNFqt8Wb3nzMoAbocBF6/Icgg1ZFSBpObdnwVY2jQj6qUqzhx5jc71fpvBWyLGO7Xl+nQ== -======= validator@^13.0.0: version "13.0.0" resolved "https://registry.yarnpkg.com/validator/-/validator-13.0.0.tgz#0fb6c6bb5218ea23d368a8347e6d0f5a70e3bcab" integrity sha512-anYx5fURbgF04lQV18nEQWZ/3wHGnxiKdG4aL8J+jEDsm98n/sU/bey+tYk6tnGJzm7ioh5FoqrAiQ6m03IgaA== ->>>>>>> julian/delete-edit value-equal@^1.0.1: version "1.0.1" @@ -11799,7 +11712,7 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.x" -watchpack@^1.6.0: +watchpack@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== @@ -11869,9 +11782,9 @@ webpack-dev-middleware@^3.7.2: webpack-log "^2.0.0" webpack-dev-server@^3.8.1: - version "3.10.3" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.10.3.tgz#f35945036813e57ef582c2420ef7b470e14d3af0" - integrity sha512-e4nWev8YzEVNdOMcNzNeCN947sWJNd43E5XvsJzbAL08kGc2frm1tQ32hTJslRS+H65LCb/AaUCYU7fjHCpDeQ== + version "3.11.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz#8f154a3bce1bcfd1cc618ef4e703278855e7ff8c" + integrity sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg== dependencies: ansi-html "0.0.7" bonjour "^3.5.0" @@ -11881,31 +11794,31 @@ webpack-dev-server@^3.8.1: debug "^4.1.1" del "^4.1.1" express "^4.17.1" - html-entities "^1.2.1" + html-entities "^1.3.1" http-proxy-middleware "0.19.1" import-local "^2.0.0" internal-ip "^4.3.0" ip "^1.1.5" is-absolute-url "^3.0.3" killable "^1.0.1" - loglevel "^1.6.6" + loglevel "^1.6.8" opn "^5.5.0" p-retry "^3.0.1" - portfinder "^1.0.25" + portfinder "^1.0.26" schema-utils "^1.0.0" selfsigned "^1.10.7" semver "^6.3.0" serve-index "^1.9.1" - sockjs "0.3.19" + sockjs "0.3.20" sockjs-client "1.4.0" - spdy "^4.0.1" + spdy "^4.0.2" strip-ansi "^3.0.1" supports-color "^6.1.0" url "^0.11.0" webpack-dev-middleware "^3.7.2" webpack-log "^2.0.0" ws "^6.2.1" - yargs "12.0.5" + yargs "^13.3.2" webpack-log@^2.0.0: version "2.0.0" @@ -11924,15 +11837,15 @@ webpack-sources@^1.0.0, webpack-sources@^1.0.1, webpack-sources@^1.1.0, webpack- source-map "~0.6.1" webpack@^4.41.2: - version "4.42.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.42.1.tgz#ae707baf091f5ca3ef9c38b884287cfe8f1983ef" - integrity sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg== + version "4.43.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6" + integrity sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g== dependencies: "@webassemblyjs/ast" "1.9.0" "@webassemblyjs/helper-module-context" "1.9.0" "@webassemblyjs/wasm-edit" "1.9.0" "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^6.2.1" + acorn "^6.4.1" ajv "^6.10.2" ajv-keywords "^3.4.1" chrome-trace-event "^1.0.2" @@ -11949,9 +11862,16 @@ webpack@^4.41.2: schema-utils "^1.0.0" tapable "^1.1.3" terser-webpack-plugin "^1.4.3" - watchpack "^1.6.0" + watchpack "^1.6.1" webpack-sources "^1.4.1" +websocket-driver@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" + integrity sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY= + dependencies: + websocket-extensions ">=0.1.1" + websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" @@ -12001,11 +11921,6 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -12056,14 +11971,6 @@ worker-farm@^1.7.0: dependencies: errno "~0.1.7" -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" @@ -12126,13 +12033,6 @@ xml-name-validator@^3.0.0: resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== -xregexp@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.3.0.tgz#7e92e73d9174a99a59743f67a4ce879a04b5ae50" - integrity sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g== - dependencies: - "@babel/runtime-corejs3" "^7.8.3" - xml2js@^0.4.17: version "0.4.23" resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" @@ -12146,17 +12046,19 @@ xmlbuilder@~11.0.0: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== +xregexp@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.3.0.tgz#7e92e73d9174a99a59743f67a4ce879a04b5ae50" + integrity sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g== + dependencies: + "@babel/runtime-corejs3" "^7.8.3" + xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - -"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: +y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== @@ -12177,9 +12079,9 @@ yallist@^4.0.0: integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yaml@^1.7.2: - version "1.9.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.9.1.tgz#2df608ca571a0cf94e25e417e2795c08f48acdc5" - integrity sha512-xbWX1ayUVoW8DPM8qxOBowac4XxSTi0mFLbiokRq880ViYglN+F3nJ4Dc2GdypXpykrknKS39d8I3lzFoHv1kA== + version "1.9.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.9.2.tgz#f0cfa865f003ab707663e4f04b3956957ea564ed" + integrity sha512-HPT7cGGI0DuRcsO51qC1j9O16Dh1mZ2bnXwsi0jrSpsLz0WxOLSLXfkABVl6bZO629py3CU+OMJtpNHDLB97kg== dependencies: "@babel/runtime" "^7.9.2" @@ -12190,14 +12092,6 @@ yargs-parser@^10.0.0: dependencies: camelcase "^4.1.0" -yargs-parser@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" - integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@^13.1.0, yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" @@ -12206,31 +12100,6 @@ yargs-parser@^13.1.0, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" - integrity sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo= - dependencies: - camelcase "^3.0.0" - -yargs@12.0.5: - version "12.0.5" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" - integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== - dependencies: - cliui "^4.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^1.0.1" - os-locale "^3.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1 || ^4.0.0" - yargs-parser "^11.1.1" - yargs@13.2.4: version "13.2.4" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" @@ -12248,7 +12117,7 @@ yargs@13.2.4: y18n "^4.0.0" yargs-parser "^13.1.0" -yargs@^13.3.0: +yargs@^13.3.0, yargs@^13.3.2: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== @@ -12263,22 +12132,3 @@ yargs@^13.3.0: which-module "^2.0.0" y18n "^4.0.0" yargs-parser "^13.1.2" - -yargs@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" - integrity sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg= - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^5.0.0" From 056c0ce7bfa48eeaba92dc57788b9ad58a180949 Mon Sep 17 00:00:00 2001 From: Wilson Wang Date: Mon, 11 May 2020 14:41:18 -0700 Subject: [PATCH 38/58] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..830be26b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Blueprint, Technology for Nonprofits + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From faddd507cae63f05a84af132c3613f2015b8b3b6 Mon Sep 17 00:00:00 2001 From: didvi Date: Mon, 11 May 2020 17:30:51 -0700 Subject: [PATCH 39/58] fixed auth error for /participants/dashboard route --- app/controllers/participants_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index e3925a74..d5b5bffc 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -26,6 +26,7 @@ def show end def dashboard + skip_authorization redirect_to root_path end From 271559ca6c7316d5754516b16a75a4e2b53b0e9a Mon Sep 17 00:00:00 2001 From: Divi Schmidt <41552318+didvi@users.noreply.github.com> Date: Mon, 11 May 2020 17:38:04 -0700 Subject: [PATCH 40/58] Update participants_controller.rb --- app/controllers/participants_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index d5b5bffc..1d407004 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -2,7 +2,6 @@ class ParticipantsController < ApplicationController before_action :set_participant, only: [:show] def show - # TODO CHECK IF CORRECT @participant = authorize Participant.find(params[:id]) @paperworks = authorize @participant.paperworks @case_notes = authorize @participant.case_notes From 50e69e1f9e572eb0d75a1fdab280cb822de5c860 Mon Sep 17 00:00:00 2001 From: didvi Date: Mon, 11 May 2020 20:16:29 -0700 Subject: [PATCH 41/58] removed unused shows from api controllers and deleted empty controllers --- app/controllers/api/assignments_controller.rb | 19 ++----------------- app/controllers/api/case_notes_controller.rb | 6 +----- app/controllers/api/paperworks_controller.rb | 6 +----- .../api/personal_questionnaires_controller.rb | 6 +----- .../professional_questionnaires_controller.rb | 6 +----- .../api/studio_assessments_controller.rb | 6 +----- app/controllers/case_notes_controller.rb | 3 --- app/controllers/paperworks_controller.rb | 2 -- .../personal_questionnaires_controller.rb | 2 -- .../professional_questionnaires_controller.rb | 2 -- app/controllers/staffs_controller.rb | 1 + app/policies/application_policy.rb | 6 +++--- config/routes.rb | 12 +++++------- 13 files changed, 16 insertions(+), 61 deletions(-) delete mode 100644 app/controllers/case_notes_controller.rb delete mode 100644 app/controllers/paperworks_controller.rb delete mode 100644 app/controllers/personal_questionnaires_controller.rb delete mode 100644 app/controllers/professional_questionnaires_controller.rb diff --git a/app/controllers/api/assignments_controller.rb b/app/controllers/api/assignments_controller.rb index f9eecce3..a71c1205 100644 --- a/app/controllers/api/assignments_controller.rb +++ b/app/controllers/api/assignments_controller.rb @@ -1,6 +1,6 @@ class Api::AssignmentsController < ApplicationController - before_action :set_assignment, only: [:show, :update, :destroy] - before_action :set_template, only: [:show_template, :update_template, :destroy_template] + before_action :set_assignment, only: [:update, :destroy] + before_action :set_template, only: [:update_template, :destroy_template] respond_to :json def create @@ -50,11 +50,6 @@ def create render json: created_assignments, status: :created end - def show - authorize @assignment - render json: @assignment, status: :ok - end - def update authorize @assignment action_item_copied = false @@ -105,16 +100,6 @@ def create_template end end - def get_templates - @action_items = authorize ActionItem.where(is_template: true), :show? - render json: @action_items, status: :ok - end - - def show_template - authorize @template, :show? - render json: @template, status: :ok - end - def update_template authorize @template, :update? if @template.update(action_item_params) diff --git a/app/controllers/api/case_notes_controller.rb b/app/controllers/api/case_notes_controller.rb index 6ba43f41..88926622 100644 --- a/app/controllers/api/case_notes_controller.rb +++ b/app/controllers/api/case_notes_controller.rb @@ -1,11 +1,7 @@ class Api::CaseNotesController < ApplicationController - before_action :set_case_note, only: [:show, :update, :not_visible, :destroy] + before_action :set_case_note, only: [:update, :not_visible, :destroy] respond_to :json - def show - render json: @case_note - end - def create @case_note = authorize CaseNote.new(case_notes_params) sentry_helper(@case_note) diff --git a/app/controllers/api/paperworks_controller.rb b/app/controllers/api/paperworks_controller.rb index 1ad104ea..726d10c8 100644 --- a/app/controllers/api/paperworks_controller.rb +++ b/app/controllers/api/paperworks_controller.rb @@ -1,11 +1,7 @@ class Api::PaperworksController < ApplicationController - before_action :set_paperwork, only: [:show, :update, :complete, :viewed, :destroy] + before_action :set_paperwork, only: [:update, :complete, :viewed, :destroy] respond_to :json - def show - render json: @paperwork - end - def create @paperwork = authorize Paperwork.new(paperwork_params) sentry_helper(@paperwork) diff --git a/app/controllers/api/personal_questionnaires_controller.rb b/app/controllers/api/personal_questionnaires_controller.rb index 7a045b40..bbefa63a 100644 --- a/app/controllers/api/personal_questionnaires_controller.rb +++ b/app/controllers/api/personal_questionnaires_controller.rb @@ -1,11 +1,7 @@ class Api::PersonalQuestionnairesController < ApplicationController - before_action :set_questionnaire, only: [:show, :update, :destroy] + before_action :set_questionnaire, only: [:update, :destroy] respond_to :json - def show - render json: @questionnaire - end - def create @questionnaire = PersonalQuestionnaire.new(questionnaire_params) authorize @questionnaire, policy_class: QuestionnairePolicy diff --git a/app/controllers/api/professional_questionnaires_controller.rb b/app/controllers/api/professional_questionnaires_controller.rb index 55856e5c..adca3e83 100644 --- a/app/controllers/api/professional_questionnaires_controller.rb +++ b/app/controllers/api/professional_questionnaires_controller.rb @@ -1,10 +1,6 @@ class Api::ProfessionalQuestionnairesController < ApplicationController - before_action :set_questionnaire, only: [:show, :update, :destroy] + before_action :set_questionnaire, only: [:update, :destroy] respond_to :json - - def show - render json: @questionnaire - end def create @questionnaire = ProfessionalQuestionnaire.new(questionnaire_params) diff --git a/app/controllers/api/studio_assessments_controller.rb b/app/controllers/api/studio_assessments_controller.rb index 4a8c1f2c..d33d68fe 100644 --- a/app/controllers/api/studio_assessments_controller.rb +++ b/app/controllers/api/studio_assessments_controller.rb @@ -1,5 +1,5 @@ class Api::StudioAssessmentsController < ApplicationController - before_action :set_studio_assessment, only: [:show, :update, :destroy] + before_action :set_studio_assessment, only: [:update, :destroy] respond_to :json def create @@ -17,10 +17,6 @@ def user_not_authorized render json: { error: 'You are not authorized to perform this action' }, status: :unauthorized end - def show - render json: @studio_assessment - end - def update if @studio_assessment.update(studio_assessment_params) render json: @studio_assessment, status: :ok diff --git a/app/controllers/case_notes_controller.rb b/app/controllers/case_notes_controller.rb deleted file mode 100644 index 71aeb9b8..00000000 --- a/app/controllers/case_notes_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class CaseNotesController < ApplicationController - -end diff --git a/app/controllers/paperworks_controller.rb b/app/controllers/paperworks_controller.rb deleted file mode 100644 index c8579823..00000000 --- a/app/controllers/paperworks_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class PaperworksController < ApplicationController -end diff --git a/app/controllers/personal_questionnaires_controller.rb b/app/controllers/personal_questionnaires_controller.rb deleted file mode 100644 index 8e89d250..00000000 --- a/app/controllers/personal_questionnaires_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class PersonalQuestionnairesController < ApplicationController -end diff --git a/app/controllers/professional_questionnaires_controller.rb b/app/controllers/professional_questionnaires_controller.rb deleted file mode 100644 index b5d1d373..00000000 --- a/app/controllers/professional_questionnaires_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class ProfessionalQuestionnairesController < ApplicationController -end \ No newline at end of file diff --git a/app/controllers/staffs_controller.rb b/app/controllers/staffs_controller.rb index c14efe9a..1e94087f 100644 --- a/app/controllers/staffs_controller.rb +++ b/app/controllers/staffs_controller.rb @@ -1,5 +1,6 @@ class StaffsController < ApplicationController def dashboard + skip_authorization redirect_to root_path end end diff --git a/app/policies/application_policy.rb b/app/policies/application_policy.rb index e7bd0ba8..1605be07 100644 --- a/app/policies/application_policy.rb +++ b/app/policies/application_policy.rb @@ -3,10 +3,10 @@ class ApplicationPolicy # In your controller, Pundit will call the current_user method # to retrieve what to send into the argument - def initialize(user, record) + def initialize(user, resource) raise Pundit::NotAuthorizedError, "must be logged in" unless user - @user = user - @record = record + @user = user + @resource = resource end def index? diff --git a/config/routes.rb b/config/routes.rb index e10d5c92..3ca562d4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -30,22 +30,20 @@ patch 'complete', to: 'paperworks#complete', on: :member patch 'viewed', to: 'paperworks#viewed', on: :member end - resources :case_notes, only: [:show, :create, :update, :destroy] do + resources :case_notes, only: [:create, :update, :destroy] do patch 'not_visible', to: 'case_notes#not_visible', on: :member end scope '/assignments' do post 'templates', to: 'assignments#create_template' - get 'templates', to: 'assignments#get_templates' patch 'templates/:id', to: 'assignments#update_template' - get 'templates/:id', to: 'assignments#show_template' delete 'templates/:id', to: 'assignments#destroy_template' end - resources :studio_assessments, only: [:show, :create, :update, :destroy] - resources :assignments, only: [:show, :create, :update, :destroy] - resources :professional_questionnaires, only: [:show, :create, :update, :destroy] - resources :personal_questionnaires, only: [:show, :create, :update, :destroy] + resources :studio_assessments, only: [:create, :update, :destroy] + resources :assignments, only: [:create, :update, :destroy] + resources :professional_questionnaires, only: [:create, :update, :destroy] + resources :personal_questionnaires, only: [:create, :update, :destroy] resources :participants, only: [] do collection do From 85e1a584d1feb5387f8ee1e07826486716c671b3 Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Mon, 11 May 2020 21:07:13 -0700 Subject: [PATCH 42/58] Fixing background color bug --- app/javascript/components/Login/styles.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/components/Login/styles.js b/app/javascript/components/Login/styles.js index b3b7a125..c35177a4 100644 --- a/app/javascript/components/Login/styles.js +++ b/app/javascript/components/Login/styles.js @@ -1,4 +1,6 @@ -const styles = theme => ({ +import theme from 'utils/theme'; + +export const styles = () => ({ body: { margin: 0, }, From d23160ceb432fa743d16ac110fbe59f301a6412a Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Mon, 11 May 2020 22:15:28 -0700 Subject: [PATCH 43/58] removed disableFocusRipple since it gave console warning --- app/javascript/components/Main/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/javascript/components/Main/index.js b/app/javascript/components/Main/index.js index 8fbc1067..f0055c46 100644 --- a/app/javascript/components/Main/index.js +++ b/app/javascript/components/Main/index.js @@ -71,7 +71,6 @@ function Main(props) { button key={name} component="a" - disableFocusRipple disableTouchRipple className={classes.navBarItem} onClick={() => { From bb679e8b4dfb0a93a92aa5e0e23f13405b9b40c3 Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Tue, 12 May 2020 00:02:09 -0700 Subject: [PATCH 44/58] Fixed bug with editing newly created action items --- app/javascript/components/AssignmentList/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index 536d3927..bf294a81 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -185,6 +185,8 @@ class AssignmentList extends React.Component { .then(response => { this.handleCloseModal(); const newAssignment = response.data[0].action_item; + newAssignment.id = response.data[0].id; + newAssignment.action_item_id = response.data[0].action_item.id; newAssignment.dueDate = response.data[0].due_date; this.appendStateAssignment(newAssignment); }) From e9163766f72c94841cc24cfbf8c7c6f22ac4a74c Mon Sep 17 00:00:00 2001 From: Joelene Latief Date: Tue, 12 May 2020 20:38:48 -0700 Subject: [PATCH 45/58] questions fixed# --- .../StudioAssessmentQuestion/questions.js | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/app/javascript/components/StudioAssessmentQuestion/questions.js b/app/javascript/components/StudioAssessmentQuestion/questions.js index 7f50a991..d093b9a4 100644 --- a/app/javascript/components/StudioAssessmentQuestion/questions.js +++ b/app/javascript/components/StudioAssessmentQuestion/questions.js @@ -52,44 +52,44 @@ export const questionContent = [ export const rubricItems = [ [ - 'While they may recognize technologies, the student cannot articulate roles of varying technologies, let alone be able to decide what technology to use for a particular need or how it fits into the bigger picture.', - 'The student articulates that there are different technologies with varied roles, can name the technologies involved with different roles, but struggles to decide what technology or role is involved in a particular domain. Also struggles with understanding how the technologies fit together.', - 'The student articulates the varied technologies in a web stack, their roles, the roles of the client and server, how these technologies/roles fit together and can (mostly) decided where to implement varied needs such as authorization, validation, persistence, etc.', + '1) The student articulates that there are different technologies with varied roles, can name the technologies involved with different roles, but struggles to decide what technology or role is involved in a particular domain. Also struggles with understanding how the technologies fit together.', + '2) While they may recognize technologies, the student cannot articulate roles of varying technologies, let alone be able to decide what technology to use for a particular need or how it fits into the bigger picture.', + '3) The student articulates the varied technologies in a web stack, their roles, the roles of the client and server, how these technologies/roles fit together and can (mostly) decided where to implement varied needs such as authorization, validation, persistence, etc.', ], [ - 'Can clearly articulate hoisting, scope, closures. Knows the role of “this” and can describe the value under varied circumstances. Knows OOP and FP features. May be squishy on the “...” operator, but recognizes it and has an idea of its use.', - 'Understands scope and this binding. May not know the hoisting difference between var and let, but knows what hoisting is. May not know closure or be able to articulate the concept (function plus context), but understands captured variables. Understands object encapsulation via classes/prototypes, but may not understand inheritance or clearly articulate the concepts.', - 'Does not understand core javascript concepts. May be able to say what is output in the sample code, but does not have an understanding of why. Does not know about classes/prototypes.', + '1) Does not understand core javascript concepts. May be able to say what is output in the sample code, but does not have an understanding of why. Does not know about classes/prototypes.', + '2) Understands scope and this binding. May not know the hoisting difference between var and let, but knows what hoisting is. May not know closure or be able to articulate the concept (function plus context), but understands captured variables. Understands object encapsulation via classes/prototypes, but may not understand inheritance or clearly articulate the concepts.', + '3) Can clearly articulate hoisting, scope, closures. Knows the role of “this” and can describe the value under varied circumstances. Knows OOP and FP features. May be squishy on the “...” operator, but recognizes it and has an idea of its use.', ], [ - 'Understands that git is a version control system (should use this exact term) in order to manage the history of versions of a code/package/repository', - 'Understands the role of Git but is fuzzy on the nature/purpose of continuous deployment', - 'Does not understand the role of Git nor CD.', + '1) Does not understand the role of Git nor CD.', + '2) Understands the role of Git but is fuzzy on the nature/purpose of continuous deployment', + '3) Understands that git is a version control system (should use this exact term) in order to manage the history of versions of a code/package/repository', ], [ - 'Has a solid grasp of components, how to manage state, component lifecycle, event callbacks, and lifting state. May not fully understand state management, but does understand that it’s immutable though may not know the word.', - 'Understands what components are and has an idea of their lifecycle. Has limited understanding of managing state, data binding, callbacks, and state lifting.', - 'Fails to understand any of: what a component is, that there are lifecycle methods, what the difference between props and state is, or how to hook up an event callback', + '1) Fails to understand any of: what a component is, that there are lifecycle methods, what the difference between props and state is, or how to hook up an event callback', + '2) Understands what components are and has an idea of their lifecycle. Has limited understanding of managing state, data binding, callbacks, and state lifting.', + '3) Has a solid grasp of components, how to manage state, component lifecycle, event callbacks, and lifting state. May not fully understand state management, but does understand that it’s immutable though may not know the word.', ], [ - 'Is able to describe various methods of declaring async code and can describe when they run. Understands what EventEmitters and streams are and how to use them. Begins', - 'Has an understanding of modules, async code, and node-core. May miss that these are patterns established by Node’s runtime environment, may not be able to enumerate async methods or fully grasp when it runs.', - 'Does not understand patterns. May know that async is code executed concurrently at a (possibly) later time, but does not know how and cannot write asynchronous code or identify when code is asynchronous.', + '1) Does not understand patterns. May know that async is code executed concurrently at a (possibly) later time, but does not know how and cannot write asynchronous code or identify when code is asynchronous.', + '2) Has an understanding of modules, async code, and node-core. May miss that these are patterns established by Node’s runtime environment, may not be able to enumerate async methods or fully grasp when it runs.', + '3) Is able to describe various methods of declaring async code and can describe when they run. Understands what EventEmitters and streams are and how to use them. Begins', ], [ - 'Knows the difference between organization of data in document stores and relational DBs. Can successfully write a basic SQL query. Has a notion of ACID principles and how that relates to transactions.', - 'Understands organization of data and relations between data entities in databases.', - 'Does not understand how data is organized in a database.', + '1) Does not understand how data is organized in a database.', + '2) Understands organization of data and relations between data entities in databases.', + '3) Knows the difference between organization of data in document stores and relational DBs. Can successfully write a basic SQL query. Has a notion of ACID principles and how that relates to transactions.', ], [ - 'Gives a correct solution with no bugs (eventually). If their solution started with bugs, can figure out that those bugs exist.May have bugs initially but ought to be able to test their functions by walking through line by line with mock data and find the bugs.', - 'Gives a plausible solution but may have remaining bugs even after some hinting.', - 'Can’t arrive at a solution that even remotely prints out what’s required, even with subtle proctor hints and intervention.', + '1) Can’t arrive at a solution that even remotely prints out what’s required, even with subtle proctor hints and intervention.', + '2) Gives a plausible solution but may have remaining bugs even after some hinting.', + '3) Gives a correct solution with no bugs (eventually). If their solution started with bugs, can figure out that those bugs exist.May have bugs initially but ought to be able to test their functions by walking through line by line with mock data and find the bugs.', ], ]; From 7130b1d873353d927329e95fe507e6468c7b0a96 Mon Sep 17 00:00:00 2001 From: didvi Date: Tue, 12 May 2020 20:41:16 -0700 Subject: [PATCH 46/58] added questionnaire auth" --- app/controllers/participants_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index 1d407004..2e399083 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -10,7 +10,7 @@ def show if @participant.personal_questionnaire.nil? personal_q = PersonalQuestionnaire.create("participant_id": @participant.id) else - personal_q = @participant.personal_questionnaire + personal_q = authorize @participant.personal_questionnaire, policy_class: QuestionnairePolicy end @personal_questionnaire = PersonalQuestionnaireSerializer.new(personal_q) @@ -18,7 +18,7 @@ def show if @participant.professional_questionnaire.nil? professional_q = ProfessionalQuestionnaire.create("participant_id": @participant.id) else - professional_q = @participant.professional_questionnaire + professional_q = authorize @participant.professional_questionnaire, policy_class: QuestionnairePolicy end @professional_questionnaire = ProfessionalQuestionnairesSerializer.new(professional_q) From 3c94cb3e30e3df3b46f1a604ace9a3ee4f4b6d5d Mon Sep 17 00:00:00 2001 From: Joelene Latief Date: Tue, 12 May 2020 20:50:14 -0700 Subject: [PATCH 47/58] removed the second score --- app/javascript/components/StudioAssessmentQuestion/index.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/javascript/components/StudioAssessmentQuestion/index.js b/app/javascript/components/StudioAssessmentQuestion/index.js index ee6035d8..55bce449 100644 --- a/app/javascript/components/StudioAssessmentQuestion/index.js +++ b/app/javascript/components/StudioAssessmentQuestion/index.js @@ -148,9 +148,6 @@ class Question extends React.Component { `${this.props.questionType}_score` ].toString()} -

- {this.state.studioAssessment[`${this.props.questionType}_score`]} -

) : (
From c1aa059519187e5ccee88c905dc93faef46c5fe2 Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Tue, 12 May 2020 20:57:06 -0700 Subject: [PATCH 48/58] Added unloop logo and banner --- app/assets/images/blueprint_banner.svg | 14 +++++ app/javascript/components/Main/index.js | 75 +++++++++++++++++------- app/javascript/components/Main/styles.js | 11 +++- 3 files changed, 77 insertions(+), 23 deletions(-) create mode 100644 app/assets/images/blueprint_banner.svg diff --git a/app/assets/images/blueprint_banner.svg b/app/assets/images/blueprint_banner.svg new file mode 100644 index 00000000..b6130c43 --- /dev/null +++ b/app/assets/images/blueprint_banner.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/app/javascript/components/Main/index.js b/app/javascript/components/Main/index.js index f0055c46..1621700f 100644 --- a/app/javascript/components/Main/index.js +++ b/app/javascript/components/Main/index.js @@ -4,13 +4,14 @@ import Drawer from '@material-ui/core/Drawer'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import theme from 'utils/theme'; - +import Grid from '@material-ui/core/Grid'; import HomeIcon from '@material-ui/icons/Home'; import GroupIcon from '@material-ui/icons/Group'; import BarChartIcon from '@material-ui/icons/BarChart'; import AccountCircleIcon from '@material-ui/icons/AccountCircle'; import ExitToAppIcon from '@material-ui/icons/ExitToApp'; import UnloopLogo from 'images/unloop_logo.png'; +import BlueprintBanner from 'images/blueprint_banner.svg'; import * as Sentry from '@sentry/browser'; import StaffDashboard from '../StaffDashboard'; import styles from './styles'; @@ -123,27 +124,59 @@ function Main(props) { }} anchor="left" > - - + + + + +
Sign Out
+
+ {props.isAdmin ? renderAdminButton() : null} + {props.userType !== 'participant' + ? Object.entries({ + Dashboard: '/', + 'Bulk Assign': '/assignments', + Assessments: '/studio_assessments', + }).map(n => getButton(n[0], n[1])) + : null} +
+
+ - -
Sign Out
-
- {props.isAdmin ? renderAdminButton() : null} - {props.userType !== 'participant' - ? Object.entries({ - Dashboard: '/', - 'Bulk Assign': '/assignments', - Assessments: '/studio_assessments', - }).map(n => getButton(n[0], n[1])) - : null} -
+ + Unloop logo + + + Blueprint logo + + +
{getContent()}
diff --git a/app/javascript/components/Main/styles.js b/app/javascript/components/Main/styles.js index d727fd5c..5fd826cd 100644 --- a/app/javascript/components/Main/styles.js +++ b/app/javascript/components/Main/styles.js @@ -28,11 +28,18 @@ const styles = () => ({ color: '#ffffff', paddingTop: 24, }, - unloopLogo: { + blueprintLogo: { width: '100%', height: 'auto', objectFit: 'contain', - overflowX: 'hidden', + }, + unloopLogo: { + width: '75%', + objectFit: 'contain', + // Needed to center logo because grid item not wrapping to size of image + display: 'flex', + position: 'relative', + left: '10px', }, navText: { paddingLeft: 4, From 98a8a2f683116e5b0c816e6964e89ffaa16a81bb Mon Sep 17 00:00:00 2001 From: Julian Kung Date: Tue, 12 May 2020 21:22:55 -0700 Subject: [PATCH 49/58] Using png instead of svg. Also added spacing between unloop and blueprint logos --- app/assets/images/blueprint_banner.png | Bin 0 -> 28648 bytes app/assets/images/blueprint_banner.svg | 14 -------------- app/javascript/components/Main/index.js | 3 ++- 3 files changed, 2 insertions(+), 15 deletions(-) create mode 100644 app/assets/images/blueprint_banner.png delete mode 100644 app/assets/images/blueprint_banner.svg diff --git a/app/assets/images/blueprint_banner.png b/app/assets/images/blueprint_banner.png new file mode 100644 index 0000000000000000000000000000000000000000..50c867f0ca596b516f5bd9ab1747ae2e761b41a1 GIT binary patch literal 28648 zcmX_H1yq#X)2AB&L13j(V3CrgYpDgKLqe30Zjf%IbLpi!q@_DWU};uDI>ZH5x}?L8 z*Z2K@_nbX@_BqeqnEB1`&fGf_rJ<%kOz@Nd4GoQ0@fAc14Gk+F4Gofn_DFDvgF#7f*O=f{lje$blCk``x3=sem;U0CA7F>NE1)Z$oA7W|{e! zg^*@M_#Sq7Hu!nT!(a0W4z~&;sl**?dvSUQ$o_4K*z=5#S=ngycc{JykWu!rSn{7Z zW*NG4XO(D;w1~)m+mJX=iYxiWL?<&c5pZE{knU_w0Gb=XE6Y$n9QV?Jm$=>zaRIEX z_L80DyAL{KA^$e>M-=&~QqiF78ZN%vjN??Og4{3>Ge@LLqbmrU*{>Xu_-~4GXTKa@Z3j_|H(+D2u%Q&z282W1QD+l-R#fF04e(zhYmw-+6AbA z{Xn|h;Ln5rOQCKXypd)Nq$ zxGl zJ-KAQ&;3b+c7fQINYSNu7uf6q%2i}YTF{*mJjy#s z=KY91iR3Uk>8eT5ZBPP0WqJF6RByHFNB_YTK*z@-rPEW?V)^a(vrS&>SFglUH$+xq3QU?<)$Bx0OglR;sWZLX?c*LHdc4q zeP<{OK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z0Xg>+xh*`kx74yM= z*2kw}nia{(qUf7C#~c@seAmm`{)s(>RxSmYP6qfz(&qtb=>~YK=E>K89qIyncY}~$ zORv+%1nz6#Pz2hs0Cx4eMOA7R`!VLT7)C%FK~h$OLYSBU=i@HsgJ0y!h)6NP0h?al zzt%(Cpc;7V=^hH|6m5v<->x)*fP~Kf1ke=r`fo;nzx>7gyK+;DQ=*&#}~A^n z_!mABG_e;$zFZi*<-+i<`xw=P6l%%7s>MHANldj+oeOWYcjwfo*Wem23=#NrAN39RqkppKwsRqr*4j@m5%Ks-X)p&(yn$LLnf2}!78DBj z|4Uvaut&qb^D9{Z%e)euD((9x@uA~z<=x*gBK|$U|6qql#Vi5XB%ml9UuMRZ{@`!N zRp{Q|(d~#s(aMdSiZi1;Kl87qj0KJ{0KTACdYYzfd~e%C|!I zHoP5+8K5@eA)XT6eibnZKRYqTb>)X}G||5nLKk=6?{<>7BPFQl^4RK$~CBSxCVB+WL}&#u6* zgKu#Ivz{6~XtAT=M`HU8(>i~9e^2S=n~l6IcOCdEpzi40gGgw_l;~JIO=|Jf63)%} z?@|~iaEq{#zDdVqnM7nn(D(0Xa~f_a{<~6fimKAR|JNgsD&vU%mM?4a+8=BeMU6Sc rn*A4G{_j8h@8|!F2h_%{sVW+Kao4w%P4R{KZah`hQK?gU8S#Gre@sRC literal 0 HcmV?d00001 diff --git a/app/assets/images/blueprint_banner.svg b/app/assets/images/blueprint_banner.svg deleted file mode 100644 index b6130c43..00000000 --- a/app/assets/images/blueprint_banner.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/javascript/components/Main/index.js b/app/javascript/components/Main/index.js index 1621700f..907baeb2 100644 --- a/app/javascript/components/Main/index.js +++ b/app/javascript/components/Main/index.js @@ -11,7 +11,7 @@ import BarChartIcon from '@material-ui/icons/BarChart'; import AccountCircleIcon from '@material-ui/icons/AccountCircle'; import ExitToAppIcon from '@material-ui/icons/ExitToApp'; import UnloopLogo from 'images/unloop_logo.png'; -import BlueprintBanner from 'images/blueprint_banner.svg'; +import BlueprintBanner from 'images/blueprint_banner.png'; import * as Sentry from '@sentry/browser'; import StaffDashboard from '../StaffDashboard'; import styles from './styles'; @@ -159,6 +159,7 @@ function Main(props) { alignItems="center" justify="center" direction="column" + spacing={3} style={{ padding: '5px' }} > From a7a36f0b2325b1a9c97cb22c4cd2657486f372d3 Mon Sep 17 00:00:00 2001 From: Wilson Wang Date: Tue, 12 May 2020 22:42:05 -0700 Subject: [PATCH 50/58] updated ruby version and gems --- Gemfile | 2 +- Gemfile.lock | 197 +++++++++++++++++++++++++-------------------------- 2 files changed, 99 insertions(+), 100 deletions(-) diff --git a/Gemfile b/Gemfile index e9b98cc4..5fbbdcb6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.5.6' +ruby '2.6.3' gem 'faker' diff --git a/Gemfile.lock b/Gemfile.lock index ffb8a0fc..619c1258 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,38 +1,38 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.0.2.1) - actionpack (= 6.0.2.1) + actioncable (6.0.3) + actionpack (= 6.0.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.2.1) - actionpack (= 6.0.2.1) - activejob (= 6.0.2.1) - activerecord (= 6.0.2.1) - activestorage (= 6.0.2.1) - activesupport (= 6.0.2.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) mail (>= 2.7.1) - actionmailer (6.0.2.1) - actionpack (= 6.0.2.1) - actionview (= 6.0.2.1) - activejob (= 6.0.2.1) + actionmailer (6.0.3) + actionpack (= 6.0.3) + actionview (= 6.0.3) + activejob (= 6.0.3) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.2.1) - actionview (= 6.0.2.1) - activesupport (= 6.0.2.1) + actionpack (6.0.3) + actionview (= 6.0.3) + activesupport (= 6.0.3) 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.2.1) - actionpack (= 6.0.2.1) - activerecord (= 6.0.2.1) - activestorage (= 6.0.2.1) - activesupport (= 6.0.2.1) + actiontext (6.0.3) + actionpack (= 6.0.3) + activerecord (= 6.0.3) + activestorage (= 6.0.3) + activesupport (= 6.0.3) nokogiri (>= 1.8.5) - actionview (6.0.2.1) - activesupport (= 6.0.2.1) + actionview (6.0.3) + activesupport (= 6.0.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -42,29 +42,29 @@ GEM activemodel (>= 4.1, < 6.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (6.0.2.1) - activesupport (= 6.0.2.1) + activejob (6.0.3) + activesupport (= 6.0.3) globalid (>= 0.3.6) - activemodel (6.0.2.1) - activesupport (= 6.0.2.1) + activemodel (6.0.3) + activesupport (= 6.0.3) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (6.0.2.1) - activemodel (= 6.0.2.1) - activesupport (= 6.0.2.1) - activestorage (6.0.2.1) - actionpack (= 6.0.2.1) - activejob (= 6.0.2.1) - activerecord (= 6.0.2.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) marcel (~> 0.3.1) - activesupport (6.0.2.1) + activesupport (6.0.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - zeitwerk (~> 2.2) + zeitwerk (~> 2.2, >= 2.2.2) ast (2.4.0) babel-source (5.8.35) babel-transpiler (0.7.0) @@ -74,10 +74,10 @@ GEM bcrypt (3.1.13) benchmark (0.1.0) bindex (0.8.1) - bootsnap (1.4.5) + bootsnap (1.4.6) msgpack (~> 1.0) builder (3.2.4) - byebug (11.1.1) + byebug (11.1.3) case_transform (0.2) activesupport coderay (1.1.2) @@ -94,9 +94,9 @@ GEM e2mmap (0.1.0) erubi (1.9.0) execjs (2.7.0) - faker (2.10.2) + faker (2.11.0) i18n (>= 1.6, < 2) - faraday (1.0.0) + faraday (1.0.1) multipart-post (>= 1.2, < 3) ffi (1.12.2) globalid (0.4.2) @@ -104,13 +104,13 @@ GEM haml (5.1.2) temple (>= 0.8.0) tilt - hashie (3.6.0) + hashie (4.1.0) i18n (1.8.2) concurrent-ruby (~> 1.0) jaro_winkler (1.5.4) jbuilder (2.10.0) activesupport (>= 5.0.0) - jquery-rails (4.3.5) + jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) @@ -134,7 +134,7 @@ GEM rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) - loofah (2.4.0) + loofah (2.5.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -142,8 +142,8 @@ GEM marcel (0.3.3) mimemagic (~> 0.3.2) maruku (0.7.3) - method_source (0.9.2) - mimemagic (0.3.4) + method_source (1.0.0) + mimemagic (0.3.5) mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.0) @@ -153,7 +153,7 @@ GEM multipart-post (2.1.1) nested_form (0.3.2) nio4r (2.5.2) - nokogiri (1.10.8) + nokogiri (1.10.9) mini_portile2 (~> 2.4.0) oauth2 (1.4.4) faraday (>= 0.8, < 2.0) @@ -161,8 +161,8 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - omniauth (1.9.0) - hashie (>= 3.4.6, < 3.7.0) + omniauth (1.9.1) + hashie (>= 3.4.6) rack (>= 1.6.2, < 3) omniauth-google-oauth2 (0.8.0) jwt (>= 2.0) @@ -173,16 +173,16 @@ GEM omniauth (~> 1.9) orm_adapter (0.5.0) parallel (1.19.1) - parser (2.7.0.2) + parser (2.7.1.2) ast (~> 2.4.0) - pg (1.2.2) - pry (0.12.2) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - pry-byebug (3.8.0) + pg (1.2.3) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.9.0) byebug (~> 11.0) - pry (~> 0.10) - puma (3.12.2) + pry (~> 0.13.0) + puma (3.12.4) pundit (2.1.0) activesupport (>= 3.0.0) rack (2.2.2) @@ -193,27 +193,27 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.0.2.1) - actioncable (= 6.0.2.1) - actionmailbox (= 6.0.2.1) - actionmailer (= 6.0.2.1) - actionpack (= 6.0.2.1) - actiontext (= 6.0.2.1) - actionview (= 6.0.2.1) - activejob (= 6.0.2.1) - activemodel (= 6.0.2.1) - activerecord (= 6.0.2.1) - activestorage (= 6.0.2.1) - activesupport (= 6.0.2.1) + 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) bundler (>= 1.3.0) - railties (= 6.0.2.1) + railties (= 6.0.3) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - rails_admin (2.0.1) + rails_admin (2.0.2) activemodel-serializers-xml (>= 1.0) builder (~> 3.1) haml (>= 4.0, < 6) @@ -225,15 +225,15 @@ GEM rails (>= 5.0, < 7) remotipart (~> 1.3) sassc-rails (>= 1.3, < 3) - railties (6.0.2.1) - actionpack (= 6.0.2.1) - activesupport (= 6.0.2.1) + railties (6.0.3) + actionpack (= 6.0.3) + activesupport (= 6.0.3) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) rainbow (3.0.0) rake (13.0.1) - rb-fsevent (0.10.3) + rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) react-rails (2.6.1) @@ -249,31 +249,30 @@ GEM reverse_markdown (1.4.0) nokogiri rexml (3.2.4) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.0) + rspec-core (3.9.2) + rspec-support (~> 3.9.3) + rspec-expectations (3.9.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-rails (3.9.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.2) - rubocop (0.80.0) - jaro_winkler (~> 1.5.1) + rspec-rails (4.0.0) + actionpack (>= 4.2) + activesupport (>= 4.2) + railties (>= 4.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) + rspec-support (3.9.3) + rubocop (0.83.0) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) rexml ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.7) + unicode-display_width (>= 1.4.0, < 2.0) ruby-progressbar (1.10.1) ruby_dep (1.5.0) sass (3.7.4) @@ -287,7 +286,7 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (2.2.1) + sassc (2.3.0) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) @@ -295,9 +294,9 @@ GEM sprockets (> 3.0) sprockets-rails tilt - sentry-raven (2.13.0) - faraday (>= 0.7.6, < 1.0) - solargraph (0.37.2) + sentry-raven (3.0.0) + faraday (>= 1.0) + solargraph (0.39.7) backport (~> 1.1) benchmark bundler (>= 1.17.2) @@ -310,7 +309,7 @@ GEM rubocop (~> 0.52) thor (~> 1.0) tilt (~> 2.0) - yard (~> 0.9) + yard (~> 0.9, >= 0.9.24) spring (2.1.0) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) @@ -329,12 +328,12 @@ GEM turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.6) + tzinfo (1.2.7) thread_safe (~> 0.1) - unicode-display_width (1.6.1) + unicode-display_width (1.7.0) warden (1.2.8) rack (>= 2.0.6) - web-console (4.0.1) + web-console (4.0.2) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) @@ -346,8 +345,8 @@ GEM websocket-driver (0.7.1) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.4) - yard (0.9.24) - zeitwerk (2.2.2) + yard (0.9.25) + zeitwerk (2.3.0) PLATFORMS ruby @@ -381,7 +380,7 @@ DEPENDENCIES webpacker (~> 4.0) RUBY VERSION - ruby 2.5.6p201 + ruby 2.6.3p62 BUNDLED WITH 2.0.2 From 3269478e8d37459b478a9ed25829e3f65b82e494 Mon Sep 17 00:00:00 2001 From: Wilson Wang Date: Tue, 12 May 2020 22:59:08 -0700 Subject: [PATCH 51/58] Update README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d7434a5e..f6e41f4b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Technologies -- Ruby 2.5.6 +- Ruby 2.6.3 - Rails 6.0.0 - Postgresql 11.6 @@ -97,3 +97,12 @@ You can also attach `functional` or `class` after generate to quickly specify wh ### After Generating If your component is not a root for a page or shared component, move your component to the folder that matches the page or shared component that it will live under. + +## Potential Errors and Solutions +Gems have many dependencies and also require certain ruby versions in order to be used. Be sure that the ruby version you are using is compatible with this repo's gemfile. If you run into any issues with gems while you run `bundle install`, double check that your ruby version is the same as specified above. + +###Faraday +`Bundler could not find compatible versions for gem "faraday"` +Make sure your ruby version is 2.6.3 as specificed above. Afterwards, run `bundle update`. + + From 04a8fa881babe6fef03b17d79fa9d60888cc4063 Mon Sep 17 00:00:00 2001 From: Wilson Wang Date: Tue, 12 May 2020 22:59:40 -0700 Subject: [PATCH 52/58] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6e41f4b..b0cd48e7 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ If your component is not a root for a page or shared component, move your compon ## Potential Errors and Solutions Gems have many dependencies and also require certain ruby versions in order to be used. Be sure that the ruby version you are using is compatible with this repo's gemfile. If you run into any issues with gems while you run `bundle install`, double check that your ruby version is the same as specified above. -###Faraday +### Faraday `Bundler could not find compatible versions for gem "faraday"` Make sure your ruby version is 2.6.3 as specificed above. Afterwards, run `bundle update`. From 56fb5dd9603cff694a919ccd270a74c7d74195e3 Mon Sep 17 00:00:00 2001 From: Wilson Wang Date: Tue, 12 May 2020 23:00:16 -0700 Subject: [PATCH 53/58] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b0cd48e7..f13e1771 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ Gems have many dependencies and also require certain ruby versions in order to b ### Faraday `Bundler could not find compatible versions for gem "faraday"` + Make sure your ruby version is 2.6.3 as specificed above. Afterwards, run `bundle update`. From 652a2f30acc014fdf3a17c6512c5c2383996aab2 Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Tue, 12 May 2020 23:59:24 -0700 Subject: [PATCH 54/58] Adding view more, removing studio assessments from participant view, fixing bulk assignment render --- .../components/ActionItemCard/index.js | 67 +++++++- .../components/ActionItemCard/styles.js | 17 +- .../components/AssignmentList/index.js | 146 ++++-------------- .../components/ParticipantShowPage/index.js | 22 ++- app/views/participants/dashboard.html.erb | 4 +- 5 files changed, 104 insertions(+), 152 deletions(-) diff --git a/app/javascript/components/ActionItemCard/index.js b/app/javascript/components/ActionItemCard/index.js index df675fb0..5454f8c0 100644 --- a/app/javascript/components/ActionItemCard/index.js +++ b/app/javascript/components/ActionItemCard/index.js @@ -10,10 +10,13 @@ import ActionItemCategoryTag from 'components/ActionItemCategoryTag'; import PropTypes from 'prop-types'; import Button from '@material-ui/core/Button'; import theme from 'utils/theme'; +import { faChevronRight } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import styles from './styles'; function ActionItemCard({ classes, + userType, title, description, dueDate, @@ -27,7 +30,8 @@ function ActionItemCard({ addBorderBottom, handleIconClick, removeActionItem, - renderEditOverMore, + // This prop tells whether or not the assignments are being rendered from the participantShowPage + participantShowPage, }) { const renderSelectIcon = () => ( @@ -79,6 +83,37 @@ function ActionItemCard({ return dueDate; }; + // Handles logic for the first button on bottom of ActionItemCard + const renderFirstButton = () => { + + // userType !== "participant" instead of userType === "staff" since userType is not a required prop + if (userType !== "participant") { + + // If render close is true, that means we're already rendering a close button elsewhere. + // Render the edit button here instead. + if (renderClose) { + return renderEditButton(); + } else { + return renderDeleteButton(); + } + } + return null; + } + + // Handles logic for the second button on bottom of ActionItemCard + const renderSecondButton = () => { + + // userType !== "participant" instead of userType === "staff" since userType is not a required prop + if (userType !== "participant") { + if (participantShowPage) { + return renderEditButton(); + } else { + return renderViewMoreButton(); + } + } + return null; + } + return ( {renderClose ? renderCloseIcon() : null} - + {description} - {handleIconClick ? renderSelectIcon() : null} + + {participantShowPage ? ( + handleOpenModal('viewmore')} + icon={faChevronRight} + style={{ cursor: 'pointer' }} + className={classes.iconStyle} + /> + ) : handleIconClick ? ( + renderSelectIcon() + ) : null} + @@ -139,11 +191,11 @@ function ActionItemCard({ alignItems="flex-start" > - {renderClose ? renderEditButton() : renderDeleteButton()} + {renderFirstButton()} - {/* Make sure renderClose + renderEditOverMore are not both true, or else you get two edit buttons. */} + {/* Make sure renderClose + participantShowPage are not both true, or else you get two edit buttons. */} - {renderEditOverMore ? renderEditButton() : renderViewMoreButton()} + {renderSecondButton()} @@ -154,6 +206,7 @@ function ActionItemCard({ ActionItemCard.propTypes = { classes: PropTypes.object.isRequired, + userType: PropTypes.string, title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, category: PropTypes.string.isRequired, @@ -163,8 +216,8 @@ ActionItemCard.propTypes = { dueDate: PropTypes.string, handleIconClick: PropTypes.func, removeActionItem: PropTypes.func, - renderEditOverMore: PropTypes.bool, formatDate: PropTypes.func, addBorderBottom: PropTypes.bool, + participantShowPage: PropTypes.bool, }; export default withStyles(styles)(ActionItemCard); diff --git a/app/javascript/components/ActionItemCard/styles.js b/app/javascript/components/ActionItemCard/styles.js index 193dbd2d..f984a3d8 100644 --- a/app/javascript/components/ActionItemCard/styles.js +++ b/app/javascript/components/ActionItemCard/styles.js @@ -3,16 +3,6 @@ const styles = theme => ({ maxWidth: '200px', textOverflow: 'ellipsis', }, - iconStyle: { - backgroundColor: theme.palette.common.lighterBlue, - margin: '0px 10px', - boxShadow: 'None', - width: '80px', // Not too flexible for really long categories, but is good enough for up to 10-letter words - height: '30px', - borderRadius: '17px', - textAlign: 'center', - paddingTop: '7.5px', // This was really annoying to middle-align the text - }, categoryButtonStyle: { fontSize: '10px', width: '60px', @@ -42,5 +32,12 @@ const styles = theme => ({ buttonStyle: { color: theme.palette.common.r0, }, + iconStyle: { + color: theme.palette.common.r0, + // marginLeft: '400%', // Push the chevron button all the way to the right + // height: 30, + minWidth: '13px', + minHeight: '23px', + }, }); export default styles; diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index 536d3927..504ddcb9 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -18,6 +18,7 @@ import { } from '@material-ui/core'; import ActionItemCard from 'components/ActionItemCard'; import ActionItemModal from 'components/ActionItemModal'; +import ViewMoreModal from 'components/ViewMoreModal'; import { apiPost, apiDelete, apiPatch } from 'utils/axios'; import * as Sentry from '@sentry/browser'; import styles from './styles'; @@ -30,6 +31,7 @@ class AssignmentList extends React.Component { deleteModalOpen: false, createModalOpen: false, editModalOpen: false, + viewMoreModalOpen: false, modalAssignment: null, }; this.appendStateAssignment = this.appendStateAssignment.bind(this); @@ -50,6 +52,8 @@ class AssignmentList extends React.Component { modalOpen = 'editModalOpen'; } else if (modalType === 'delete') { modalOpen = 'deleteModalOpen'; + } else if (modalType === 'viewmore') { + modalOpen = 'viewMoreModalOpen'; } this.setState({ modalAssignment: assignment, @@ -64,6 +68,7 @@ class AssignmentList extends React.Component { createModalOpen: false, editModalOpen: false, deleteModalOpen: false, + viewMoreModalOpen: false, }); } @@ -127,6 +132,22 @@ class AssignmentList extends React.Component { return null; } + viewMoreModal() { + if (this.state.modalAssignment) { + return ( + this.handleCloseModal()} + title={this.state.modalAssignment.title} + description={this.state.modalAssignment.description} + category={this.state.modalAssignment.category} + dueDate={this.state.modalAssignment.dueDate} + /> + ); + } + return null; + } + deleteModal() { return (

( { this.handleOpenModal(assignment)('delete'); }} - renderEditOverMore + // This prop tells whether or not the assignments are being rendered from the participantShowPage + participantShowPage /> )); return assignmentCards; @@ -284,6 +309,7 @@ class AssignmentList extends React.Component { {this.editModal()} {this.deleteModal()} + {this.viewMoreModal()} { -// this.handleCloseModal(); -// // this.appendStateAssignment(response.data); -// }) -// .catch(error => { -// Sentry.configureScope(function(scope) { -// scope.setExtra('file', 'AssignmentList'); -// scope.setExtra('action', 'apiPost (createActionItem)'); -// scope.setExtra('template', JSON.stringify(template)); -// }) -// }) - -// } else { - -// // Add ActionItem to ActionItems -// const body = { -// assignments: [{ -// title, -// description, -// category: categorySelected, -// due_date: dueDate, -// }], -// participant_ids: [participantId], -// } -// console.log("body", body); -// apiPost('/api/assignments/', body) -// .then((response) => { -// this.handleCloseModal(); -// this.appendStateAssignment(response.data); // Limited testing for this functionality since MailCatcher fails for me -// }) -// .catch(error => { -// Sentry.configureScope(function(scope) { -// scope.setExtra('file', 'AssignmentList'); -// scope.setExtra('action', 'apiPost (handleNewAssignment)'); -// scope.setExtra('participantId', participantId); -// scope.setExtra('body', JSON.stringify(actionItemBody)); -// }); -// Sentry.captureException(error); -// }); -// // THIS IS ACTIONITEMCREATIONPAGE PAYLOAD FORMAT - -// // const participantIds = this.state.selectedParticipants.map( -// // participant => participant.id, -// // ); - -// // const assignments = this.state.selectedActionItems.map(actionItem => ({ -// // title: actionItem.title, -// // description: actionItem.description, -// // due_date: actionItem.dueDate, -// // category: actionItem.category, -// // })); - -// // const body = { -// // assignments, -// // participant_ids: participantIds, -// // }; -// // apiPost('/api/assignments', body) -// } -// } - -// handleEditAssignment( -// title, -// description, -// categorySelected, -// dueDate, -// addToTemplates, -// participantId, -// ) { - -// // Edit ActionItem and send PATCH request -// const body = { -// assignment: { -// title, -// description, -// category: categorySelected, -// due_date: dueDate, -// }, -// participant_ids: [participantId], -// } - -// apiPatch(`/api/assignments/${this.state.modalAssignment.id}`, body) -// .then((response) => { -// this.handleCloseModal(); -// this.editStateAssignment(response.data); -// }) -// .catch(error => { -// Sentry.configureScope(function(scope) { -// scope.setExtra('file', 'AssignmentList'); -// scope.setExtra('action', 'apiPatch (handleEditAssignment)'); -// scope.setExtra('assignmentId', this.state.modalAssignment.id); -// }); -// Sentry.captureException(error); -// }); -// } diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index 1732cef8..aac31036 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -48,6 +48,7 @@ class ParticipantShowPage extends React.Component { render() { const { + userType, classes, paperworks, caseNotes, @@ -58,7 +59,6 @@ class ParticipantShowPage extends React.Component { personalQuestionnaire, professionalQuestionnaire, studioAssessments, - userType, assignmentList, } = this.props; @@ -71,7 +71,6 @@ class ParticipantShowPage extends React.Component { padding: '0px', width: '100%', }} - // justify="space-between" > @@ -135,22 +134,20 @@ class ParticipantShowPage extends React.Component { - {/* */} - {/* - */} - - + {userType === 'staff' ? ( + + ) : null} ); @@ -168,7 +165,6 @@ ParticipantShowPage.propTypes = { participantId: PropTypes.number.isRequired, personalQuestionnaire: PropTypes.object.isRequired, professionalQuestionnaire: PropTypes.object.isRequired, - assignments: PropTypes.array.isRequired, studioAssessments: PropTypes.array.isRequired, assignmentList: PropTypes.array, }; diff --git a/app/views/participants/dashboard.html.erb b/app/views/participants/dashboard.html.erb index ea3d8bcf..f0f08be2 100644 --- a/app/views/participants/dashboard.html.erb +++ b/app/views/participants/dashboard.html.erb @@ -10,8 +10,6 @@ case_notes: @case_notes.all, personal_questionnaire: @personal_questionnaire, professional_questionnaire: @professional_questionnaire, - # just pass the assignments forward. Look at paperworks, case_notes - # just pass the studio assessments forward. - assignments: @assignments.all, studio_assessments: @studio_assessments.all, + assignment_list: @assignment_list, }) %> \ No newline at end of file From bfaaa46d8fbe9a10b3d1ad5a5e281cf1b8d4cc6e Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Wed, 13 May 2020 00:10:32 -0700 Subject: [PATCH 55/58] Fixing changes to formatting date and integrated Julian's back-end changes --- app/javascript/components/AssignmentList/index.js | 3 +-- app/javascript/components/ViewMoreModal/index.js | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/javascript/components/AssignmentList/index.js b/app/javascript/components/AssignmentList/index.js index e8e5638f..db286c8a 100644 --- a/app/javascript/components/AssignmentList/index.js +++ b/app/javascript/components/AssignmentList/index.js @@ -142,6 +142,7 @@ class AssignmentList extends React.Component { description={this.state.modalAssignment.description} category={this.state.modalAssignment.category} dueDate={this.state.modalAssignment.dueDate} + formatDate={this.props.formatDate} /> ); } @@ -260,8 +261,6 @@ class AssignmentList extends React.Component { handleDeleteAssignment() { const assignment = this.state.modalAssignment; - console.log("hi there"); - console.log("trying to delete:", assignment); // Make API request to delete assignment and remove assignment from state apiDelete(`/api/assignments/${assignment.id}`) diff --git a/app/javascript/components/ViewMoreModal/index.js b/app/javascript/components/ViewMoreModal/index.js index 88d2a6c0..0728faf5 100644 --- a/app/javascript/components/ViewMoreModal/index.js +++ b/app/javascript/components/ViewMoreModal/index.js @@ -17,6 +17,7 @@ function ViewMoreModal({ isCaseNote, open, handleClose, + formatDate, }) { const renderRichText = desc => ( @@ -33,7 +34,9 @@ function ViewMoreModal({ if (dueDate) { return ( -

Due Date: {date}

+

+ Due Date: {formatDate(date)} +

); } @@ -91,6 +94,7 @@ ViewMoreModal.propTypes = { open: PropTypes.bool.isRequired, isCaseNote: PropTypes.bool, handleClose: PropTypes.func.isRequired, + formatDate: PropTypes.func, }; export default withStyles(styles)(ViewMoreModal); From 8f9e4b7f082ee93415467cd91a6fc4c0af24a23a Mon Sep 17 00:00:00 2001 From: Calvin Chen Date: Wed, 13 May 2020 17:53:49 -0700 Subject: [PATCH 56/58] Changes made from PR comments --- .../components/ParticipantShowPage/index.js | 13 ------------- .../components/ParticipantShowPage/styles.js | 1 - .../components/StudioAssessmentList/index.js | 12 +----------- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/app/javascript/components/ParticipantShowPage/index.js b/app/javascript/components/ParticipantShowPage/index.js index aac31036..8b7b1a85 100644 --- a/app/javascript/components/ParticipantShowPage/index.js +++ b/app/javascript/components/ParticipantShowPage/index.js @@ -33,19 +33,6 @@ class ParticipantShowPage extends React.Component { return `${month.toString()}/${dt.toString()}/${year.toString()}`; }; - sampleActionItem = [ - { - id: 13, - title: 'panel', - description: - 'Try to synthesize the XSS panel, maybe it will input the open-source hard drive!', - is_template: false, - created_at: '2020-04-17 02:07:27', - updated_at: '2020-04-17 02:07:27', - category: 'Community', - }, - ]; - render() { const { userType, diff --git a/app/javascript/components/ParticipantShowPage/styles.js b/app/javascript/components/ParticipantShowPage/styles.js index 0912517f..7b956943 100644 --- a/app/javascript/components/ParticipantShowPage/styles.js +++ b/app/javascript/components/ParticipantShowPage/styles.js @@ -15,7 +15,6 @@ const styles = theme => ({ }, rightHalf: { paddingLeft: 40, - // paddingRight: 28, paddingTop: 20, width: '50%', height: 'max(100%, 100vh)', diff --git a/app/javascript/components/StudioAssessmentList/index.js b/app/javascript/components/StudioAssessmentList/index.js index 8deb144d..92443b30 100644 --- a/app/javascript/components/StudioAssessmentList/index.js +++ b/app/javascript/components/StudioAssessmentList/index.js @@ -19,15 +19,13 @@ function StudioAssessmentList({ userType, }) { const [studioAssessments] = useState(initialStudioAssessments); - + const studioAssessmentEntries = studioAssessments.map(studioAssessment => (
- {/* The following line renders the date the studio assessment was created at as the title, but might not be what we want to render here */}

{formatDate(studioAssessment.created_at)}

- {/* Only admins can edit the different studioAssessments */} {userType !== 'participant' ? ( )} - {/* Everyone should be able to view */} Date: Wed, 13 May 2020 17:54:33 -0700 Subject: [PATCH 57/58] Removing credentials file from PR --- config/credentials.yml.enc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index 47cc9ba7..f1b9ccaa 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== +Cu8bv6DTSY+mZ8KJPw6tqNeW9MRvc6fl+Wy6xNRemztwGCire8mu2sP58iP5PMoann47afI8Yxs8H+HvAD4wczCQwZ28ipy8PywrJWhqsWaKhA5iz4PgJUniKHAM0Xcrbfei2F2pUqDpipEmSjtNirXDjeQIMMQO8mUDhylWxk0D51s/V0Ia421t9v11kFBayeqQJh4/80cdur0f9RYctet1a3UPJrwsjVP4CkmYUlP+E2xddEY4JRI0hX4d/w9XqgO/vIFZeGH4W7pGRVyR6mB0cugJOWj2IyJldW82wYtRpbgN+Fs+PagHojOS1UoKu9e7qW8B8GJ5LjW7V3xQ1A/9zzMwRApwT2QrCbyGUW9uD4GO9pL0hKPwQcMPC4/eZ2Ye4Nr/EmvFEfczhyKpsMnkYH9tiSO8iPXzJI22stZaiBRUbaeuoL8M1DeRKxlr6rR81t95uRC6bMBXqoG25S3k3OAGET6XGSOJzkWOT61LVd/TqZamIPMlRVABzlkzHaSPJb6HmAgaSsK0nfnoWVwtLvagwiaA6hKTeFHQFj0uESd50Qt19P09WnN0daLUsA==--kXdPerAvKX9BNqcO--oBpfONbfQTSKGMIe526QIw== \ No newline at end of file From 58497bbc72b6dfcf877d1ca03e451ca8e2ec8aeb Mon Sep 17 00:00:00 2001 From: didvi Date: Wed, 13 May 2020 20:29:09 -0700 Subject: [PATCH 58/58] deleted files that were deleted on master --- app/controllers/api/assignments_controller.rb | 2 +- app/controllers/pages_controller.rb | 2 +- .../components/ActionItemCard/styles.js | 2 - .../components/CaseNoteContainer/index.js | 4 +- .../components/StudioAssessmentForm/index.js | 45 ++-- .../StudioAssessmentQuestionView/index.js | 213 ------------------ .../StudioAssessmentQuestionView/styles.js | 51 ----- 7 files changed, 18 insertions(+), 301 deletions(-) delete mode 100644 app/javascript/components/StudioAssessmentQuestionView/index.js delete mode 100644 app/javascript/components/StudioAssessmentQuestionView/styles.js diff --git a/app/controllers/api/assignments_controller.rb b/app/controllers/api/assignments_controller.rb index 0783e6bb..f9eecce3 100644 --- a/app/controllers/api/assignments_controller.rb +++ b/app/controllers/api/assignments_controller.rb @@ -30,7 +30,7 @@ def create prepare_bulk_assignment(participant_ids, action_item, due_date).each do |assignment| assignment_sentry_helper(assignment) if assignment.save - # AssignmentMailer.with(assignment: assignment, action_item: action_item).new_assignment.deliver_now + AssignmentMailer.with(assignment: assignment, action_item: action_item).new_assignment.deliver_now created_assignments.append(assignment) else action_item.destroy diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 8994c2e4..1127e1e3 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -27,7 +27,7 @@ def dashboard @user = current_user @participant = @user.participant @paperworks = @user.participant.paperworks - @case_notes = @user.participant.case_notes#.where(visible: true), changing for testing purposes + @case_notes = @user.participant.case_notes.where(visible: true) @assignments = @participant.assignments @assignment_list = [] diff --git a/app/javascript/components/ActionItemCard/styles.js b/app/javascript/components/ActionItemCard/styles.js index f984a3d8..332d5afb 100644 --- a/app/javascript/components/ActionItemCard/styles.js +++ b/app/javascript/components/ActionItemCard/styles.js @@ -34,8 +34,6 @@ const styles = theme => ({ }, iconStyle: { color: theme.palette.common.r0, - // marginLeft: '400%', // Push the chevron button all the way to the right - // height: 30, minWidth: '13px', minHeight: '23px', }, diff --git a/app/javascript/components/CaseNoteContainer/index.js b/app/javascript/components/CaseNoteContainer/index.js index 0a434877..e10d1946 100644 --- a/app/javascript/components/CaseNoteContainer/index.js +++ b/app/javascript/components/CaseNoteContainer/index.js @@ -152,10 +152,10 @@ class CaseNoteContainer extends React.Component {
{this.renderCaseNoteCards()} diff --git a/app/javascript/components/StudioAssessmentForm/index.js b/app/javascript/components/StudioAssessmentForm/index.js index 5446209b..7748e4da 100644 --- a/app/javascript/components/StudioAssessmentForm/index.js +++ b/app/javascript/components/StudioAssessmentForm/index.js @@ -5,7 +5,6 @@ import Stepper from '@material-ui/core/Stepper'; import Step from '@material-ui/core/Step'; import StepLabel from '@material-ui/core/StepLabel'; import Question from 'components/StudioAssessmentQuestion'; -import QuestionView from 'components/StudioAssessmentQuestionView'; const useStyles = makeStyles(theme => ({ root: { @@ -53,7 +52,7 @@ export const StudioAssessmentForm = ({ const steps = getSteps(); const [formData, setFormData] = useState({ - score: 'hi', + score: '', comments: '', }); const nextStep = () => { @@ -71,35 +70,19 @@ export const StudioAssessmentForm = ({ ))}
- {type !== 'view' ? ( - - ) : ( - - )} +
); }; diff --git a/app/javascript/components/StudioAssessmentQuestionView/index.js b/app/javascript/components/StudioAssessmentQuestionView/index.js deleted file mode 100644 index 31d10c2c..00000000 --- a/app/javascript/components/StudioAssessmentQuestionView/index.js +++ /dev/null @@ -1,213 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { Formik, Form, Field } from 'formik'; -import TextField from '@material-ui/core/TextField'; -import { withStyles } from '@material-ui/core/styles'; -import { apiPost, apiPatch } from 'utils/axios'; -import { Button } from '@material-ui/core'; -// import { consoleSandbox } from '@sentry/utils'; -// import RadioButtonsGroup from './radioButtons'; -import styles from './styles'; - -const questions = [ - 'Understands the Big Picture of the Full Stack', - 'JavaScript Fundamentals', - 'Understands Version Control', - 'React Core Competencies', - 'NodeJs Core Competencies', - 'Database Core Competencies', - 'Problem Solving: Whiteboarding', -]; - -const questionContent = [ - [ - 'Describe the roles of Html,Javascript, and CSS in a webpage.', - 'What distinguishes a web application from a static webpage?', - ], - [ - 'Describe the roles of Html,Javascript, and CSS in a webpage.', - 'What distinguishes a web application from a static webpage?', - ], - [ - 'Describe the roles of Html,Javascript, and CSS in a webpage.', - 'What distinguishes a web application from a static webpage?', - ], - [ - 'Describe the roles of Html,Javascript, and CSS in a webpage.', - 'What distinguishes a web application from a static webpage?', - ], - [ - 'Describe the roles of Html,Javascript, and CSS in a webpage.', - 'What distinguishes a web application from a static webpage?', - ], - [ - 'Describe the roles of Html,Javascript, and CSS in a webpage.', - 'What distinguishes a web application from a static webpage?', - ], - [ - 'Describe the roles of Html,Javascript, and CSS in a webpage.', - 'What distinguishes a web application from a static webpage?', - ], -]; - -const rubricItems = [ - [ - 'While they may recognize technologies, the student cannot articulate roles of varying technologies, let alone be able to decide what technology to use for a particular need or how it fits into the bigger picture.', - 'The student articulates that there are different technologies with varied roles, can name the technologies involved with different roles, but struggles to decide what technology or role is involved in a particular domain. Also struggles with understanding how the technologies fit together.', - 'The student articulates the varied technologies in a web stack, their roles, the roles of the client and server, how these technologies/roles fit together and can (mostly) decided where to implement varied needs such as authorization, validation, persistence, etc.', - ], - - [ - 'Explain the difference between var, let, and const?', - 'Explain the difference between var, let, and const?', - 'Explain the difference between var, let, and const?', - ], - - [ - 'Describe the roles of Html, Javascript, and CSS in a web page.', - 'Describe the roles of Html, Javascript, and CSS in a web page.', - 'Describe the roles of Html, Javascript, and CSS in a web page.', - ], - - [ - 'Explain the difference between var, let, and const?', - 'Explain the difference between var, let, and const?', - 'Explain the difference between var, let, and const?', - ], - - [ - 'Describe the roles of Html, Javascript, and CSS in a web page.', - 'Describe the roles of Html, Javascript, and CSS in a web page.', - 'Describe the roles of Html, Javascript, and CSS in a web page.', - ], - - [ - 'Explain the difference between var, let, and const?', - 'Explain the difference between var, let, and const?', - 'Explain the difference between var, let, and const?', - ], - [ - 'Explain the difference between var, let, and const?', - 'Explain the difference between var, let, and const?', - 'Explain the difference between var, let, and const?', - ], -]; - -class QuestionView extends React.Component { - constructor(props) { - super(props); - const studioAssessment = {}; - if (this.props.studioAssessment != null) { - Object.keys(this.props.studioAssessment).forEach(k => { - studioAssessment[k] = this.props.studioAssessment[k]; - }); - } - this.state = { - direction: 'back', - studioAssessment, - }; - } - - render() { - return ( - { - this.state.direction === 'back' - ? this.props.prevStep() - : this.props.nextStep(); - }} - > -
-

- {questions[this.props.questionID]} -

-
-

- {questionContent[this.props.questionID].map(item => ( -

  • {item}
  • - ))} -

    -
    -
    - {this.state.studioAssessment[`${this.props.questionType}_score`] !== - null ? ( -
    -

    - Score:{' '} - {this.state.studioAssessment[ - `${this.props.questionType}_score` - ].toString()} -

    -

    - { - rubricItems[ - this.state.studioAssessment[ - `${this.props.questionType}_score` - ] - ] - } -

    -
    - ) : ( -
    -

    Score:

    -

    No score entered yet

    -
    - )} -
    -
    -

    Comments

    -

    - {this.state.studioAssessment[ - `${this.props.questionType}_comment` - ] !== null - ? this.state.studioAssessment[ - `${this.props.questionType}_comment` - ] - : 'No comment yet'} -

    -
    -
    -
    - - -
    -
    -
    -
    - ); - } -} - -QuestionView.propTypes = { - classes: PropTypes.object.isRequired, - studioAssessment: PropTypes.object.isRequired, - participantId: PropTypes.number.isRequired, - formData: PropTypes.object, - questionType: PropTypes.string.isRequired, - prevStep: PropTypes.func, - nextStep: PropTypes.func, - questionID: PropTypes.number, - type: PropTypes.string, -}; - -export default withStyles(styles)(QuestionView); diff --git a/app/javascript/components/StudioAssessmentQuestionView/styles.js b/app/javascript/components/StudioAssessmentQuestionView/styles.js deleted file mode 100644 index dacf3ade..00000000 --- a/app/javascript/components/StudioAssessmentQuestionView/styles.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * StudioAssessmentQuestionView Styles - * - * This contains all the styles for the StudioAssessmentQuestionView component. - */ - -const styles = theme => ({ - form: { - paddingLeft: '50px', - paddingRight: '50px', - paddingTop: '20px', - display: 'flex', - flexDirection: 'column', - justifyContent: 'center', - alignItems: 'left', - }, - questions: { - backgroundColor: theme.palette.common.lightBlue, - padding: '20px', - borderRadius: '10px', - }, - header: { - borderBottom: `5px solid ${theme.palette.primary.main}`, - }, - button: { - margin: theme.spacing(1), - width: '20%', - }, - TextField: { - width: '100%', - paddingBottom: '20px', - }, - radio: { - marginTop: '20px', - padding: '20px', - borderRadius: '10px', - backgroundColor: theme.palette.common.lightBlue, - }, - comments: { - paddingBottom: '50px', - }, - buttons: { - paddingTop: '20px', - display: 'flex', - flexDirection: 'row', - alignItems: 'right', - justifyContent: 'right', - }, -}); - -export default styles;