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

feat(he-recommendation): minor fixes and responsiveness

parent e3ebdc7d
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!67Hin restore he rec
......@@ -14,7 +14,7 @@ const ReviewersTable = ({
onResendReviewerInvite,
onRevokeReviewerInvite,
}) =>
invitations.length > 0 && (
invitations.length > 0 ? (
<Table>
<thead>
<tr>
......@@ -82,6 +82,8 @@ const ReviewersTable = ({
))}
</tbody>
</Table>
) : (
<Text align="center">No reviewers invited yet.</Text>
)
const orderInvitations = i => {
......
......@@ -17,7 +17,7 @@ import {
ContextualBox,
ItemOverrideAlert,
withFetching,
} from '../'
} from 'pubsweet-component-faraday-ui/src'
const options = [
{ value: 'publish', label: 'Publish' },
......@@ -40,11 +40,7 @@ const parseFormValues = ({ recommendation, ...rest }) => {
}
}
const EditorialRecommendation = ({
formValues,
handleSubmit,
hasReviewerReports,
}) => (
const HERecommendation = ({ formValues, handleSubmit, hasReviewerReports }) => (
<ContextualBox highlight label="Your Editorial Recommendation" mb={2}>
<Root>
<Row justify="flex-start">
......@@ -114,7 +110,7 @@ export default compose(
).label,
})),
reduxForm({
form: 'editorialRecommendation',
form: 'HERecommendation',
onSubmit: (
values,
dispatch,
......@@ -131,7 +127,7 @@ export default compose(
})
},
}),
)(EditorialRecommendation)
)(HERecommendation)
// #region styles
const Root = styled.div`
......
......@@ -4,8 +4,7 @@ HE recommendation.
const formValues = {
recommendation: 'minor-revision',
}
;<EditorialRecommendation
;<HERecommendation
formValues={formValues}
modalKey="heRecommendation"
onRecommendationSubmit={(values, props) => {
......
......@@ -33,6 +33,7 @@ const ReviewerDetails = ({
toggle,
expanded,
canViewReviewersDetails,
...rest
}) =>
canViewReviewersDetails ? (
<ContextualBox
......@@ -43,6 +44,7 @@ const ReviewerDetails = ({
}
startExpanded
toggle={toggle}
{...rest}
>
<Tabs>
{({ selectedTab, changeTab }) => (
......
export { default as AssignHE } from './AssignHE'
export { default as ReviewerDetails } from './ReviewerDetails'
export { default as HERecommendation } from './HERecommendation'
export { default as ReviewerReportForm } from './ReviewerReportForm'
export { default as EditorialRecommendation } from './EditorialRecommendation'
......@@ -5,13 +5,13 @@ import {
Text,
paddingHelper,
ReviewerDetails,
HERecommendation,
ManuscriptHeader,
ManuscriptAssignHE,
ManuscriptMetadata,
ManuscriptDetailsTop,
ResponseToInvitation,
ManuscriptEicDecision,
EditorialRecommendation,
} from 'pubsweet-component-faraday-ui'
import ReviewerReportCard from './ReviewReportCard'
......@@ -177,7 +177,7 @@ const ManuscriptLayout = ({
)}
{get(currentUser, 'permissions.canMakeHERecommendation', false) && (
<EditorialRecommendation
<HERecommendation
formValues={get(formValues, 'editorialRecommendation', {})}
hasReviewerReports={reviewerRecommendations.length > 0}
modalKey="heRecommendation"
......@@ -193,6 +193,7 @@ const ManuscriptLayout = ({
getSignedUrl={getSignedUrl}
invitations={invitationsWithReviewers}
journal={journal}
mt={2}
onInviteReviewer={onInviteReviewer}
onResendReviewerInvite={onResendReviewerInvite}
onRevokeReviewerInvite={onRevokeReviewerInvite}
......
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