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 = ({
</Row>
<Row alignItems="center" justify="flex-start" mb={1}>
<H4>Handling editor</H4>
<Text ml={1} mr={3}>
<Text ml={1} mr={3} whiteSpace="nowrap">
{get(handlingEditor, 'name', 'Unassigned')}
</Text>
{handlingEditor && (
......@@ -143,6 +143,9 @@ const MainContainer = styled.div`
[data-tooltipped] {
overflow: hidden;
}
${H4} {
white-space: nowrap;
}
${H3} {
margin-bottom: 0;
text-overflow: ellipsis;
......
......@@ -23,8 +23,7 @@ const castToBool = author => ({
const parseEditedAuthors = (editedAuthor, authors) => {
const newAuthor = castToBool(editedAuthor)
return authors.map(
const newAuthors = authors.map(
a =>
a.id === newAuthor.id
? newAuthor
......@@ -35,6 +34,19 @@ const parseEditedAuthors = (editedAuthor, authors) => {
: a.isCorresponding,
},
)
const corresponding = newAuthors.find(a => a.isCorresponding)
return corresponding
? newAuthors
: newAuthors.map(
a =>
a.isSubmitting
? {
...a,
isCorresponding: true,
}
: a,
)
}
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