Skip to content
Snippets Groups Projects
Commit 8c4b1172 authored by OanaMacsi's avatar OanaMacsi
Browse files

fix(index(component-faraday-selectors)): EIC and Admin can't make decision...

fix(index(component-faraday-selectors)): EIC and Admin can't make decision when status is rejected/a
parent 8354785a
No related branches found
No related tags found
3 merge requests!222Sprint #26,!217Sprint #26,!202fix(index(component-faraday-selectors)): EIC and Admin can't make decision when…
...@@ -272,9 +272,11 @@ export const getHERecommendation = (state, collectionId, fragmentId) => { ...@@ -272,9 +272,11 @@ export const getHERecommendation = (state, collectionId, fragmentId) => {
) )
} }
const cannotEICandAdminMakeDecision = ['accepted', 'rejected', 'deleted']
export const canMakeDecision = (state, collection = {}) => { export const canMakeDecision = (state, collection = {}) => {
const status = get(collection, 'status', 'draft')
const isEIC = currentUserIs(state, 'adminEiC') const isEIC = currentUserIs(state, 'adminEiC')
return isEIC return isEIC && !cannotEICandAdminMakeDecision.includes(status)
} }
const collectionReviewerReports = state => const collectionReviewerReports = state =>
......
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