Skip to content
Snippets Groups Projects
Commit cc45128e authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

fix(eic-decision): hide invite and decision buttons when manuscript is rejected

parent bd7171be
No related branches found
No related tags found
1 merge request!10Sprint #12
......@@ -29,6 +29,9 @@ export const currentUserIs = ({ currentUser: { user } }, role) => {
}
export const canInviteReviewers = ({ currentUser: { user } }, project) => {
const status = get(project, 'status')
if (!status || status === 'rejected') return false
const handlingEditor = get(project, 'handlingEditor')
const isAdmin = get(user, 'admin')
const isEic = get(user, 'editorInChief')
......@@ -54,7 +57,10 @@ export const getHERecommendation = (state, collectionId, fragmentId) => {
}
export const canMakeDecision = (state, collection) => {
const isEIC = currentUserIs(state, 'adminEiC')
const status = get(collection, 'status')
if (!status || status === 'rejected') return false
const isEIC = currentUserIs(state, 'adminEiC')
return isEIC && status
}
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