diff --git a/packages/component-mail-service/src/Mail.js b/packages/component-mail-service/src/Mail.js index 7c2fe121f110c3e8ac3fdd2dca9a5a087a5c3f3b..d0cd73a98305e197cb38d923b02b51979fddcd41 100644 --- a/packages/component-mail-service/src/Mail.js +++ b/packages/component-mail-service/src/Mail.js @@ -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) => { diff --git a/packages/component-user-manager/src/helpers/Collection.js b/packages/component-user-manager/src/helpers/Collection.js index 40cf70f3bd2965e1e6d5b2bc86d3b30372391a3d..85853a987c05a85f28010d59a9579ee503969dd4 100644 --- a/packages/component-user-manager/src/helpers/Collection.js +++ b/packages/component-user-manager/src/helpers/Collection.js @@ -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, } diff --git a/packages/component-user-manager/src/routes/collectionsUsers/get.js b/packages/component-user-manager/src/routes/collectionsUsers/get.js index 7f11e412a000edc026e8b7ce336b2ec39fb46ed3..1d6b395dd79dfeaa3e5b38f8c00a4b29d6c5716b 100644 --- a/packages/component-user-manager/src/routes/collectionsUsers/get.js +++ b/packages/component-user-manager/src/routes/collectionsUsers/get.js @@ -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) diff --git a/packages/components-faraday/src/components/Dashboard/DashboardCard.js b/packages/components-faraday/src/components/Dashboard/DashboardCard.js index dc6058df1952753ac83d84766fcbecb644ce7204..d291f88149fbee610b0d3a9efadb861e9360efed 100644 --- a/packages/components-faraday/src/components/Dashboard/DashboardCard.js +++ b/packages/components-faraday/src/components/Dashboard/DashboardCard.js @@ -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')}; diff --git a/packages/xpub-faraday-server/src/AuthorBackend.js b/packages/xpub-faraday-server/src/AuthorBackend.js index 3c0fbcc1dab501f51fb9080d8612ada06746fcde..d05bb8349c8ae0e5dcc051102e710c9c2196871c 100644 --- a/packages/xpub-faraday-server/src/AuthorBackend.js +++ b/packages/xpub-faraday-server/src/AuthorBackend.js @@ -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 } } diff --git a/packages/xpub-faraday-server/src/AuthorBackend.test.js b/packages/xpub-faraday-server/src/AuthorBackend.test.js index 697e0b8237acb26da5f79904d80b2bf6e01b543b..ab4ee126dd3f531778bcfb68f9fc19ee43e2cd35 100644 --- a/packages/xpub-faraday-server/src/AuthorBackend.test.js +++ b/packages/xpub-faraday-server/src/AuthorBackend.test.js @@ -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', () => {