Skip to content
Snippets Groups Projects
Commit 901eb711 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

Merge branch 'hin-964' into 'develop'

feat(authors): add default corresponding author

See merge request !52
parents 2e90c74c ea2a7787
No related branches found
No related tags found
2 merge requests!58Sprint #20 - Goal - Reviewers submit report,!52feat(authors): add default corresponding author
...@@ -73,7 +73,7 @@ const ManuscriptCard = ({ ...@@ -73,7 +73,7 @@ const ManuscriptCard = ({
</Row> </Row>
<Row alignItems="center" justify="flex-start" mb={1}> <Row alignItems="center" justify="flex-start" mb={1}>
<H4>Handling editor</H4> <H4>Handling editor</H4>
<Text ml={1} mr={3}> <Text ml={1} mr={3} whiteSpace="nowrap">
{get(handlingEditor, 'name', 'Unassigned')} {get(handlingEditor, 'name', 'Unassigned')}
</Text> </Text>
{handlingEditor && ( {handlingEditor && (
...@@ -143,6 +143,9 @@ const MainContainer = styled.div` ...@@ -143,6 +143,9 @@ const MainContainer = styled.div`
[data-tooltipped] { [data-tooltipped] {
overflow: hidden; overflow: hidden;
} }
${H4} {
white-space: nowrap;
}
${H3} { ${H3} {
margin-bottom: 0; margin-bottom: 0;
text-overflow: ellipsis; text-overflow: ellipsis;
......
...@@ -23,8 +23,7 @@ const castToBool = author => ({ ...@@ -23,8 +23,7 @@ const castToBool = author => ({
const parseEditedAuthors = (editedAuthor, authors) => { const parseEditedAuthors = (editedAuthor, authors) => {
const newAuthor = castToBool(editedAuthor) const newAuthor = castToBool(editedAuthor)
const newAuthors = authors.map(
return authors.map(
a => a =>
a.id === newAuthor.id a.id === newAuthor.id
? newAuthor ? newAuthor
...@@ -35,6 +34,19 @@ const parseEditedAuthors = (editedAuthor, authors) => { ...@@ -35,6 +34,19 @@ const parseEditedAuthors = (editedAuthor, authors) => {
: a.isCorresponding, : a.isCorresponding,
}, },
) )
const corresponding = newAuthors.find(a => a.isCorresponding)
return corresponding
? newAuthors
: newAuthors.map(
a =>
a.isSubmitting
? {
...a,
isCorresponding: true,
}
: a,
)
} }
const WizardAuthors = ({ const WizardAuthors = ({
......
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