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

fix(heMakeRecomandation): editorial recomandation visible before inviting reviewer

parent ea64ffb9
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!84Hin restore he rec
...@@ -4,12 +4,9 @@ const Tabs = ({ items, selectedTab, changeTab, children }) => ...@@ -4,12 +4,9 @@ const Tabs = ({ items, selectedTab, changeTab, children }) =>
children({ selectedTab, changeTab }) children({ selectedTab, changeTab })
export default compose( export default compose(
withStateHandlers( withStateHandlers(({ selectedTab = 0 }) => ({ selectedTab }), {
{ selectedTab: 0 }, changeTab: () => selectedTab => ({
{ selectedTab,
changeTab: () => selectedTab => ({ }),
selectedTab, }),
}),
},
),
)(Tabs) )(Tabs)
...@@ -21,7 +21,7 @@ import { ...@@ -21,7 +21,7 @@ import {
const ReviewerDetails = ({ const ReviewerDetails = ({
journal, journal,
reports, reports = [],
fragment, fragment,
invitations, invitations,
previewFile, previewFile,
...@@ -47,7 +47,7 @@ const ReviewerDetails = ({ ...@@ -47,7 +47,7 @@ const ReviewerDetails = ({
toggle={toggle} toggle={toggle}
{...rest} {...rest}
> >
<Tabs> <Tabs selectedTab={reports.length ? 1 : 0}>
{({ selectedTab, changeTab }) => ( {({ selectedTab, changeTab }) => (
<Fragment> <Fragment>
<TabsHeader> <TabsHeader>
......
...@@ -181,15 +181,17 @@ const ManuscriptLayout = ({ ...@@ -181,15 +181,17 @@ const ManuscriptLayout = ({
/> />
)} )}
{get(currentUser, 'permissions.canMakeHERecommendation', false) && ( {get(currentUser, 'permissions.canMakeHERecommendation', false) &&
<HERecommendation (!invitationsWithReviewers.length ||
formValues={get(formValues, 'editorialRecommendation', {})} reviewerRecommendations.length > 0) && (
hasReviewerReports={reviewerRecommendations.length > 0} <HERecommendation
highlight={reviewerRecommendations.length > 0} formValues={get(formValues, 'editorialRecommendation', {})}
modalKey="heRecommendation" hasReviewerReports={reviewerRecommendations.length > 0}
onRecommendationSubmit={onEditorialRecommendation} highlight={reviewerRecommendations.length > 0}
/> modalKey="heRecommendation"
)} onRecommendationSubmit={onEditorialRecommendation}
/>
)}
{get(currentUser, 'permissions.canMakeDecision', false) && ( {get(currentUser, 'permissions.canMakeDecision', false) && (
<ManuscriptEicDecision <ManuscriptEicDecision
......
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