Skip to content
Snippets Groups Projects
Commit 2cb31368 authored by Iosif Boanca's avatar Iosif Boanca
Browse files

feat(fix after CR):

parent eb61a7a6
No related branches found
No related tags found
3 merge requests!160Update staging with master features,!150Develop,!139Hin 1054
...@@ -46,16 +46,16 @@ const options = [ ...@@ -46,16 +46,16 @@ const options = [
}, },
] ]
const optionsWhereHECanOnlyReject = { const optionsWhereHECanOnlyReject = [
reviewersInvited: 'reviewersInvited', 'reviewersInvited',
underReview: 'underReview', 'underReview',
revisionRequested: 'revisionRequested', 'revisionRequested',
} ]
const showHEOptions = (collection, hasReviewerReports, fragment) => { const showHEOptions = ({ collection, hasReviewerReports, fragment }) => {
const { status, fragments } = collection const { status, fragments } = collection
const { invitations } = fragment const { invitations } = fragment
if (findKey(optionsWhereHECanOnlyReject, sts => sts === status)) { if (optionsWhereHECanOnlyReject.includes(status)) {
return [options[1]] return [options[1]]
} else if (!hasReviewerReports && fragments.length === 1) { } else if (!hasReviewerReports && fragments.length === 1) {
return tail(options) return tail(options)
...@@ -103,11 +103,11 @@ const HERecommendation = ({ ...@@ -103,11 +103,11 @@ const HERecommendation = ({
<ValidatedField <ValidatedField
component={input => ( component={input => (
<Menu <Menu
options={showHEOptions( options={showHEOptions({
collection, collection,
hasReviewerReports, hasReviewerReports,
fragment, fragment,
)} })}
{...input} {...input}
/> />
)} )}
......
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