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

feat(reviewer-reports): add reviewer reports for he

parent d85fdfbc
No related branches found
No related tags found
1 merge request!6Agree/Decline to work on a manuscript
......@@ -13,8 +13,13 @@ import {
import ZipFiles from './ZipFiles'
import { InviteReviewers } from '../Reviewers/'
import { selectInvitation } from '../../redux/reviewers'
import { AuthorTooltip, ReviewerDecision, HandlingEditorSection } from './'
import { parseVersion, parseJournalIssue, mapStatusToLabel } from './../utils'
import {
AuthorTooltip,
ReviewerDecision,
HandlingEditorSection,
ReviewerReports,
} from './'
const DashboardCard = ({
deleteProject,
......@@ -146,29 +151,32 @@ const DashboardCard = ({
</AuthorList>
</Top>
<Bottom>
<LeftDetails flex="5">
<LeftDetails flex={4}>
<HandlingEditorSection
currentUser={currentUser}
project={project}
/>
</LeftDetails>
{canInviteReviewers() && (
<InviteReviewers
modalKey={`invite-reviewers-${project.id}`}
project={project}
/>
<RightDetails flex={4}>
<ReviewerReports project={project} />
<InviteReviewers
modalKey={`invite-reviewers-${project.id}`}
project={project}
/>
</RightDetails>
)}
{invitation && (
<RightDetails flex={4}>
<ReviewerText>Invited to review</ReviewerText>
<ReviewerDecision
invitation={invitation}
modalKey={`reviewer-decision-${project.id}`}
project={project}
/>
</RightDetails>
)}
</Bottom>
{invitation && (
<Bottom>
<LeftDetails flex="5" />
<ReviewerDecision
invitation={invitation}
modalKey={`reviewer-decision-${project.id}`}
project={project}
/>
</Bottom>
)}
</DetailsView>
)}
</Card>
......@@ -224,6 +232,12 @@ const defaultText = css`
font-size: ${th('fontSizeBaseSmall')};
`
const ReviewerText = styled.div`
${defaultText};
margin-right: ${th('subGridUnit')};
text-transform: uppercase;
`
const AuthorList = styled.span`
${defaultText};
text-align: left;
......
import React from 'react'
import { th } from '@pubsweet/ui'
import styled, { css } from 'styled-components'
const ReviewerReports = ({ project: { invitations = [] } }) => {
const accepted = invitations.filter(i => i.isAccepted).length
return (
<ReviewerText>{`Reviewer reports (${accepted}/${
invitations.length
})`}</ReviewerText>
)
}
export default ReviewerReports
// #region styled-components
const defaultText = css`
color: ${th('colorText')};
font-family: ${th('fontReading')};
font-size: ${th('fontSizeBaseSmall')};
`
const ReviewerText = styled.div`
${defaultText};
margin-right: ${th('subGridUnit')};
text-transform: uppercase;
`
// #endregion
import DashboardPage from './DashboardPage'
export { default as AuthorTooltip } from './AuthorTooltip'
export { default as ReviewerReports } from './ReviewerReports'
export { default as ReviewerDecision } from './ReviewerDecision'
export { default as EditorInChiefActions } from './EditorInChiefActions'
export { default as HandlingEditorActions } from './HandlingEditorActions'
......
......@@ -17,7 +17,7 @@ import {
} from '../../redux/reviewers'
const InviteReviewers = ({ showInviteModal }) => (
<AssignButton onClick={showInviteModal}>Invite reviewers</AssignButton>
<AssignButton onClick={showInviteModal}>Invite</AssignButton>
)
const InviteReviewersModal = compose(
......
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