Skip to content
Snippets Groups Projects
Commit 6433706a authored by Anca Ursachi's avatar Anca Ursachi
Browse files

fix(manuscriptPage): EIC can see editorial comments expanded after he rejected...

fix(manuscriptPage): EIC can see editorial comments expanded after he rejected the manuscript before
parent 1e219e7c
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!103Hin 946 fixes
...@@ -574,5 +574,27 @@ export default compose( ...@@ -574,5 +574,27 @@ export default compose(
this.props.toggleEditorialComments() this.props.toggleEditorialComments()
} }
}, },
componentDidUpdate(prevProps) {
const {
editorialRecommendations: prevEditorialRecommendations,
editorInChief: prevEditorInChief,
} = prevProps
const {
currentUser: { isEIC, isHEToManuscript },
collection: { status },
editorialRecommendations: currentEditorialRecommendations,
editorInChief: currentEditorInChief,
} = this.props
if (
prevEditorInChief === currentEditorInChief &&
prevEditorialRecommendations !== currentEditorialRecommendations &&
(isEIC || isHEToManuscript) &&
status === 'rejected'
) {
prevProps.toggleEditorialComments()
}
},
}), }),
)(ManuscriptLayout) )(ManuscriptLayout)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment