Skip to content
Snippets Groups Projects
Commit 7aa39429 authored by Tania Fecheta's avatar Tania Fecheta
Browse files

feat(responseTpRevisionRequest): render the ResponseToRevisionRequest...

feat(responseTpRevisionRequest): render the ResponseToRevisionRequest contextual box if there are an
parent 9b292abf
No related branches found
No related tags found
2 merge requests!136Sprint 22 features (updates),!135Hin 1111
...@@ -33,17 +33,14 @@ const AuthorReply = ({ reply, authorName, submittedOn }) => ( ...@@ -33,17 +33,14 @@ const AuthorReply = ({ reply, authorName, submittedOn }) => (
</Root> </Root>
) )
export default withProps( export default withProps(({ fragment: { authors, submitted } }) => ({
({ fragment: { authors, submitted, responseToReviewers } }) => ({ submittedOn: submitted,
reply: responseToReviewers.content, authorName: `${get(submittingAuthor(authors), 'firstName', '')} ${get(
submittedOn: submitted, submittingAuthor(authors),
authorName: `${get(submittingAuthor(authors), 'firstName', '')} ${get( 'lastName',
submittingAuthor(authors), '',
'lastName', )}`,
'', }))(AuthorReply)
)}`,
}),
)(AuthorReply)
// #region styles // #region styles
const Root = styled.div` const Root = styled.div`
......
...@@ -2,9 +2,9 @@ import React from 'react' ...@@ -2,9 +2,9 @@ import React from 'react'
import { ContextualBox, AuthorReply } from '../' import { ContextualBox, AuthorReply } from '../'
const ResponseToRevisionRequest = ({ fragment }) => ( const ResponseToRevisionRequest = ({ fragment, authorReply }) => (
<ContextualBox label="Response to Revision Request" mb={2}> <ContextualBox label="Response to Revision Request" mb={2}>
<AuthorReply fragment={fragment} /> <AuthorReply fragment={fragment} reply={authorReply} />
</ContextualBox> </ContextualBox>
) )
......
...@@ -4,8 +4,9 @@ import { isEmpty, get } from 'lodash' ...@@ -4,8 +4,9 @@ import { isEmpty, get } from 'lodash'
import { import {
Text, Text,
paddingHelper, paddingHelper,
ReviewerDetails,
AuthorReviews, AuthorReviews,
SubmitRevision,
ReviewerDetails,
HERecommendation, HERecommendation,
ManuscriptHeader, ManuscriptHeader,
ManuscriptAssignHE, ManuscriptAssignHE,
...@@ -13,7 +14,7 @@ import { ...@@ -13,7 +14,7 @@ import {
ManuscriptDetailsTop, ManuscriptDetailsTop,
ResponseToInvitation, ResponseToInvitation,
ManuscriptEicDecision, ManuscriptEicDecision,
SubmitRevision, ResponseToRevisionRequest,
} from 'pubsweet-component-faraday-ui' } from 'pubsweet-component-faraday-ui'
import ReviewerReportCard from './ReviewReportCard' import ReviewerReportCard from './ReviewReportCard'
...@@ -127,6 +128,13 @@ const ManuscriptLayout = ({ ...@@ -127,6 +128,13 @@ const ManuscriptLayout = ({
/> />
)} )}
{authorResponseToRevisonRequest.content && (
<ResponseToRevisionRequest
authorReply={authorResponseToRevisonRequest.content}
fragment={fragment}
/>
)}
{shouldReview && ( {shouldReview && (
<ReviewerReportForm <ReviewerReportForm
changeForm={changeForm} changeForm={changeForm}
...@@ -196,7 +204,7 @@ const ManuscriptLayout = ({ ...@@ -196,7 +204,7 @@ const ManuscriptLayout = ({
{...inviteReviewer} {...inviteReviewer}
/> />
)} )}
{console.log('fragment', fragment)}
{get(currentUser, 'permissions.canSubmitRevision', false) && ( {get(currentUser, 'permissions.canSubmitRevision', false) && (
<SubmitRevision {...submitRevision} /> <SubmitRevision {...submitRevision} />
)} )}
......
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