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

fix(manuscript-card): fix reviewer reports breakdown on manuscript card

parent 24357a60
No related branches found
No related tags found
2 merge requests!58Sprint #20 - Goal - Reviewers submit report,!50HIN-854: Invite + resend/revoke reviewer invitations
...@@ -3,8 +3,10 @@ import { H4 } from '@pubsweet/ui' ...@@ -3,8 +3,10 @@ import { H4 } from '@pubsweet/ui'
import styled from 'styled-components' import styled from 'styled-components'
import { th } from '@pubsweet/ui-toolkit' import { th } from '@pubsweet/ui-toolkit'
const Label = ({ children, required = false }) => ( import { marginHelper } from './'
<Root>
const Label = ({ children, required = false, ...rest }) => (
<Root {...rest}>
<H4>{children}</H4> <H4>{children}</H4>
{required && <Required>*</Required>} {required && <Required>*</Required>}
</Root> </Root>
...@@ -22,6 +24,8 @@ const Root = styled.div` ...@@ -22,6 +24,8 @@ const Root = styled.div`
align-items: center; align-items: center;
display: flex; display: flex;
${marginHelper};
${H4} { ${H4} {
margin: 0; margin: 0;
} }
......
import React from 'react' import React, { Fragment } from 'react'
import { get } from 'lodash' import { get } from 'lodash'
import styled from 'styled-components' import styled from 'styled-components'
import { th } from '@pubsweet/ui-toolkit' import { th } from '@pubsweet/ui-toolkit'
...@@ -11,6 +11,7 @@ import { ...@@ -11,6 +11,7 @@ import {
Text, Text,
Row, Row,
Item, Item,
Label,
IconButton, IconButton,
ActionLink, ActionLink,
TextTooltip, TextTooltip,
...@@ -76,7 +77,10 @@ const ManuscriptCard = ({ ...@@ -76,7 +77,10 @@ const ManuscriptCard = ({
{get(handlingEditor, 'name', 'Unassigned')} {get(handlingEditor, 'name', 'Unassigned')}
</Text> </Text>
{handlingEditor && ( {handlingEditor && (
<ReviewerBreakdown fragment={fragment} label="Reviewer Reports" /> <Fragment>
<Label mr={1}>Reviewers Reports</Label>
<ReviewerBreakdown fragment={fragment} label="Reviewer Reports" />
</Fragment>
)} )}
{canDelete && ( {canDelete && (
<Item justify="flex-end" onClick={e => e.stopPropagation()}> <Item justify="flex-end" onClick={e => e.stopPropagation()}>
......
...@@ -35,7 +35,7 @@ export default compose( ...@@ -35,7 +35,7 @@ export default compose(
submitted: 0, submitted: 0,
}) })
return reviewerInvitations.length ? ( return reviewerInvitations.length ? (
<Row justify="flex-end" {...rest}> <Row fitContent justify="flex-end" {...rest}>
<Text customId mr={1 / 2}> <Text customId mr={1 / 2}>
{reviewerInvitations.length} {reviewerInvitations.length}
</Text> </Text>
......
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