Skip to content
Snippets Groups Projects
Commit f7a5df1c authored by Iosif Boanca's avatar Iosif Boanca
Browse files

Merge branch 'HIN-991' of gitlab.coko.foundation:xpub/xpub-faraday into HIN-1100

parents 4bf33697 7aa39429
No related branches found
No related tags found
2 merge requests!136Sprint 22 features (updates),!135Hin 1111
This commit is part of merge request !135. Comments created here will be created in the context of that merge request.
......@@ -372,6 +372,9 @@ export const canMakeHERecommendation = (state, { collection, statuses }) => {
return statusImportance > 1 && statusImportance < 9 && validHE
}
export const getFragmentAuthorResponse = (state, fragmentId) =>
get(state, `fragments.${fragmentId}.responseToReviewers`, {})
// #region Editorial and reviewer recommendations
export const getFragmentRecommendations = (state, fragmentId) =>
get(state, `fragments.${fragmentId}.recommendations`, [])
......
......@@ -33,17 +33,14 @@ const AuthorReply = ({ reply, authorName, submittedOn }) => (
</Root>
)
export default withProps(
({ fragment: { authors, submitted, responseToReviewers } }) => ({
reply: responseToReviewers.content,
submittedOn: submitted,
authorName: `${get(submittingAuthor(authors), 'firstName', '')} ${get(
submittingAuthor(authors),
'lastName',
'',
)}`,
}),
)(AuthorReply)
export default withProps(({ fragment: { authors, submitted } }) => ({
submittedOn: submitted,
authorName: `${get(submittingAuthor(authors), 'firstName', '')} ${get(
submittingAuthor(authors),
'lastName',
'',
)}`,
}))(AuthorReply)
// #region styles
const Root = styled.div`
......
......@@ -2,9 +2,9 @@ import React from 'react'
import { ContextualBox, AuthorReply } from '../'
const ResponseToRevisionRequest = ({ fragment }) => (
const ResponseToRevisionRequest = ({ fragment, authorReply }) => (
<ContextualBox label="Response to Revision Request" mb={2}>
<AuthorReply fragment={fragment} />
<AuthorReply fragment={fragment} reply={authorReply} />
</ContextualBox>
)
......
......@@ -4,8 +4,9 @@ import { isEmpty, get } from 'lodash'
import {
Text,
paddingHelper,
ReviewerDetails,
AuthorReviews,
SubmitRevision,
ReviewerDetails,
HERecommendation,
ManuscriptHeader,
ManuscriptAssignHE,
......@@ -13,7 +14,7 @@ import {
ManuscriptDetailsTop,
ResponseToInvitation,
ManuscriptEicDecision,
SubmitRevision,
ResponseToRevisionRequest,
} from 'pubsweet-component-faraday-ui'
import ReviewerReportCard from './ReviewReportCard'
......@@ -54,6 +55,7 @@ const ManuscriptLayout = ({
pendingOwnRecommendation,
toggleReviewerRecommendations,
reviewerRecommendationExpanded,
authorResponseToRevisonRequest,
shouldReview,
submittedOwnRecommendation,
reviewerReports,
......@@ -126,6 +128,13 @@ const ManuscriptLayout = ({
/>
)}
{authorResponseToRevisonRequest.content && (
<ResponseToRevisionRequest
authorReply={authorResponseToRevisonRequest.content}
fragment={fragment}
/>
)}
{shouldReview && (
<ReviewerReportForm
changeForm={changeForm}
......
......@@ -47,6 +47,7 @@ import {
canViewReviewersDetails,
canViewEditorialComments,
pendingReviewerInvitation,
getFragmentAuthorResponse,
canOverrideTechnicalChecks,
authorCanViewReportsDetails,
getOwnPendingRecommendation,
......@@ -125,6 +126,10 @@ export default compose(
state,
match.params.version,
),
authorResponseToRevisonRequest: getFragmentAuthorResponse(
state,
match.params.version,
),
}),
{
changeForm,
......
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