diff --git a/app/components/submission-wizard/CreatePage.jsx b/app/components/submission-wizard/CreatePage.jsx index 3cde6e6420ff2ccd7819c78b4e8522c78b637af7..2f1e58fac8c31d222c43e63159313d0cd81ea309 100755 --- a/app/components/submission-wizard/CreatePage.jsx +++ b/app/components/submission-wizard/CreatePage.jsx @@ -178,7 +178,7 @@ class Created extends React.Component { const currentUser = this.context const { currentStep, status, error, checked } = this.state const { manuscript } = this.props - const { id: mId, meta, journal, files: allfiles } = manuscript + const { id: mId, meta, journal, files: allfiles, teams } = manuscript const { notes, fundingGroup: grants } = meta const files = allfiles ? allfiles.filter( @@ -195,6 +195,8 @@ class Created extends React.Component { return n }) : [] + const submitter = + teams && teams.find(team => team.role === 'submitter').teamMembers[0] return ( <SplitPage> <StepPanel> @@ -266,6 +268,7 @@ class Created extends React.Component { ? notes.find(n => n.notesType === 'selectedReviewer') : null } + submitter={submitter} /> )} <Buttons> diff --git a/app/components/submission-wizard/SelectReviewer.jsx b/app/components/submission-wizard/SelectReviewer.jsx index 5b128ecfc901ff331a1e588f5a4f5ba494dfd6c7..12636a1785a9663e9f82cb9f1840f970df9857ad 100755 --- a/app/components/submission-wizard/SelectReviewer.jsx +++ b/app/components/submission-wizard/SelectReviewer.jsx @@ -48,14 +48,21 @@ class SelectReviewer extends React.Component { emailErr: '', } componentDidMount() { - const { funding, currentUser, selectedReviewer: note } = this.props + const { + funding, + submitter, + currentUser, + selectedReviewer: note, + } = this.props const selectedReviewer = note ? JSON.parse(note.content) : null - const { name: username } = currentUser.identities[0] + const { name: username } = submitter.alias if (funding && funding.length > 0) { let options = [ { value: 'self', - label: `Me (${username.title ? `${username.title} ` : ''}${ + label: `${ + submitter.user.id === currentUser.id ? 'Me' : 'Manuscript Submitter' + } (${username.title ? `${username.title} ` : ''}${ username.givenNames } ${username.surname})`, }, diff --git a/app/components/submission-wizard/SubmitPage.jsx b/app/components/submission-wizard/SubmitPage.jsx index dce392361bdeccfd5db05171ff4186d2749c45a8..212cbaa76775e9ebce3993a72c22b586ecfc9480 100755 --- a/app/components/submission-wizard/SubmitPage.jsx +++ b/app/components/submission-wizard/SubmitPage.jsx @@ -288,6 +288,7 @@ class Submit extends React.Component { selectedReviewer={ notes ? notes.find(n => n.notesType === 'selectedReviewer') : null } + submitter={submitter} /> ), error: !reviewer && (