Skip to content
Snippets Groups Projects
Commit cdefd7a6 authored by Sebastian's avatar Sebastian
Browse files

Merge branch 'develop' of gitlab.coko.foundation:xpub/xpub-faraday into develop

parents 620afea5 4e170cc7
No related branches found
No related tags found
1 merge request!6Agree/Decline to work on a manuscript
......@@ -5,6 +5,7 @@ const Email = require('@pubsweet/component-send-email')
const config = require('config')
const resetPasswordPath = config.get('invite-reviewer.url')
const resetPath = config.get('invite-reset-password.url')
module.exports = {
setupInviteEmail: async (user, emailType, inviteUrl) => {
......
......@@ -13,6 +13,11 @@ module.exports = {
collection.authors = collection.authors || []
const author = {
userId: user.id,
firstName: user.firstName || '',
lastName: user.lastName || '',
email: user.email,
title: user.title || '',
affiliation: user.affiliation || '',
isSubmitting,
isCorresponding,
}
......
......@@ -2,7 +2,7 @@ const helpers = require('../../helpers/helpers')
const teamHelper = require('../../helpers/Team')
module.exports = models => async (req, res) => {
// TO DO: add authsom
// TO DO: add authsome
const { collectionId } = req.params
try {
const collection = await models.Collection.find(collectionId)
......
......@@ -108,14 +108,14 @@ const DashboardCard = ({
<DetailsView>
<Top>
<AuthorList>
{version.authors.map(
{project.authors.map(
(
{
affiliation,
firstName,
lastName,
middleName,
email,
userId,
isSubmitting,
isCorresponding,
},
......@@ -124,16 +124,15 @@ const DashboardCard = ({
) => (
<AuthorTooltip
affiliation={affiliation}
authorName={`${firstName} ${lastName}`}
authorName={`${firstName || ''} ${lastName || ''}`}
currentUser={currentUser}
email={email}
isCorresponding={isCorresponding}
isSubmitting={isSubmitting}
key={email}
key={userId}
>
<Author>
<AuthorName>
{firstName} {middleName} {lastName}
</AuthorName>
<AuthorName>{`${firstName} ${lastName}`}</AuthorName>
{isSubmitting && <AuthorStatus>SA</AuthorStatus>}
{isCorresponding && <AuthorStatus>CA</AuthorStatus>}
{arr.length - 1 === index ? '' : ','}
......@@ -224,6 +223,7 @@ const AuthorList = styled.span`
const AuthorName = styled.span`
text-decoration: underline;
padding-left: 2px;
cursor: default;
`
const Author = styled.div`
padding-right: ${th('subGridUnit')};
......
......@@ -40,7 +40,7 @@ const AuthorBackend = app => {
if (submittingAuthors.length > 0) {
res
.status(400)
.json({ error: 'There can only be one sumbitting author' })
.json({ error: 'There can only be one submitting author' })
return
}
}
......
......@@ -130,7 +130,7 @@ describe('Author Backend API', () => {
.post(createAuthorUrl)
.set('Authorization', 'Bearer 123')
.send(testFixtures.authors.newSubmittingAuthor)
.expect(400, '{"error":"There can only be one sumbitting author"}')
.expect(400, '{"error":"There can only be one submitting author"}')
})
it('should return success when saving a new author', () => {
......
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