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

fix(hindawi-app): implement CR changes

parent 046d2eea
No related branches found
No related tags found
3 merge requests!222Sprint #26,!217Sprint #26,!205fix(hindawi-app): fix contextual boxes and expanded states, fix modal close and other minor issues
......@@ -464,8 +464,6 @@ export const getInvitationsWithReviewersForFragment = (state, fragmentId) =>
}))
.value()
const HE_INVITED = 4
const PENDING_APPROVAL = 10
export const canMakeHERecommendation = (state, { collection, statuses }) => {
const validHE = isHEToManuscript(state, get(collection, 'id', ''))
if (!validHE) return false
......@@ -475,7 +473,15 @@ export const canMakeHERecommendation = (state, { collection, statuses }) => {
1,
)
if (!(statusImportance > HE_INVITED && statusImportance < PENDING_APPROVAL)) {
const heInvitedImportance = get(statuses, `heInvited.importance`)
const pendingApprovalImportance = get(statuses, `pendingApproval.importance`)
if (
!(
statusImportance > heInvitedImportance &&
statusImportance < pendingApprovalImportance
)
) {
return false
}
......
......@@ -70,7 +70,12 @@ ContextualBox.propTypes = {
/** Label of the contextual box. */
label: PropTypes.string,
/** Component or html to be rendered on the right side. */
rightChildren: PropTypes.any, // eslint-disable-line
// rightChildren: PropTypes.any,
rightChildren: PropTypes.oneOfType([
PropTypes.node,
PropTypes.func,
PropTypes.string,
]),
/** The state of the contextual box. If passed from a parent then the component
* is controlled and can be expanded/collapsed remotely.
*/
......
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