Skip to content
Snippets Groups Projects

Dev

Merged lit_git requested to merge dev into master
1 file
+ 2
3
Compare changes
  • Side-by-side
  • Inline
@@ -73,19 +73,6 @@ class Created extends React.Component {
newReviewer: null,
}
}
componentDidUpdate(prevProps, prevState) {
const { newReviewer } = prevState
const { notes } = prevProps.manuscript.meta
const reviewerNote = notes
? notes.find(n => n.notesType === 'selectedReviewer')
: null
if (reviewerNote && reviewerNote.content === JSON.stringify(newReviewer)) {
const { id } = this.props.manuscript
this.props.setStatus('READY', () => {
this.props.history.push(`/submission/${id}/submit`)
})
}
}
static contextType = UserContext
getCurrentStep = () => {
const { meta, files } = this.props.manuscript
@@ -186,6 +173,11 @@ class Created extends React.Component {
newState.showSearch = false
} else if (this.state.currentStep < 3) {
newState.currentStep = this.state.currentStep + 1
} else {
const { id } = this.props.manuscript
this.props.setStatus('READY', () => {
this.props.history.push(`/submission/${id}/submit`)
})
}
this.setState(newState)
window.scrollY = 0
@@ -310,9 +302,8 @@ class Created extends React.Component {
content: JSON.stringify(newReviewer),
})
}
} else {
this.goNext()
}
this.goNext()
}}
primary={!this.state.showSearch}
title={
@@ -359,10 +350,9 @@ class Created extends React.Component {
</InfoPanel>
{cancel && (
<SubmissionCancel
cancel={() =>
this.props.deleteMan(() => this.props.history.push('/'))
}
callback={() => this.props.history.push('/')}
close={() => this.setState({ cancel: false })}
manuscriptId={manuscript.id}
/>
)}
</SplitPage>