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

Merge branch 'HIN-1102' into 'develop'

Hin 1102

See merge request !140
parents d211a9cd 0c56c38c
No related branches found
No related tags found
3 merge requests!160Update staging with master features,!150Develop,!140Hin 1102
...@@ -42,10 +42,10 @@ export const canInviteReviewers = (state, collection = {}) => { ...@@ -42,10 +42,10 @@ export const canInviteReviewers = (state, collection = {}) => {
return false return false
const { id: userId } = selectCurrentUser(state) const { id: userId } = selectCurrentUser(state)
const isAdmin = currentUserIs(state, 'isAdmin') const isAdminEiC = currentUserIs(state, 'adminEiC')
const { isAccepted, id: heId } = get(collection, 'handlingEditor', {}) const { isAccepted, id: heId } = get(collection, 'handlingEditor', {})
return isAccepted && (userId === heId || isAdmin) return isAccepted && (userId === heId || isAdminEiC)
} }
const cannotViewReviewersDetails = [ const cannotViewReviewersDetails = [
...@@ -71,6 +71,7 @@ const authorCanViewReportsDetailsStatuses = [ ...@@ -71,6 +71,7 @@ const authorCanViewReportsDetailsStatuses = [
'pendingApproval', 'pendingApproval',
'rejected', 'rejected',
'accepted', 'accepted',
'reviewCompleted',
'inQa', 'inQa',
] ]
...@@ -198,7 +199,12 @@ export const getHERecommendation = (state, collectionId, fragmentId) => { ...@@ -198,7 +199,12 @@ export const getHERecommendation = (state, collectionId, fragmentId) => {
) )
} }
const canMakeDecisionStatuses = ['submitted', 'pendingApproval'] const canMakeDecisionStatuses = [
'submitted',
'pendingApproval',
'underReview',
'reviewCompleted',
]
export const canMakeDecision = (state, collection = {}) => { export const canMakeDecision = (state, collection = {}) => {
const status = get(collection, 'status', 'draft') const status = get(collection, 'status', 'draft')
......
...@@ -63,7 +63,7 @@ const ManuscriptEicDecision = ({ ...@@ -63,7 +63,7 @@ const ManuscriptEicDecision = ({
<Menu <Menu
{...input} {...input}
options={ options={
get(collection, 'status', 'submitted') === 'submitted' get(collection, 'status', 'submitted') !== 'pendingApproval'
? [last(eicDecisions)] ? [last(eicDecisions)]
: eicDecisions : eicDecisions
} }
......
...@@ -146,19 +146,20 @@ const ManuscriptLayout = ({ ...@@ -146,19 +146,20 @@ const ManuscriptLayout = ({
/> />
)} )}
{get(currentUser, 'permissions.canReview', false) && ( {isLatestVersion &&
<ReviewerReportForm get(currentUser, 'permissions.canReview', false) && (
changeForm={changeForm} <ReviewerReportForm
expanded={reviewerRecommendationExpanded} changeForm={changeForm}
formValues={get(formValues, 'reviewerReport', {})} expanded={reviewerRecommendationExpanded}
modalKey="reviewer-report" formValues={get(formValues, 'reviewerReport', {})}
project={collection} modalKey="reviewer-report"
review={pendingOwnRecommendation} project={collection}
toggle={toggleReviewerRecommendations} review={pendingOwnRecommendation}
token={get(currentUser, 'token')} toggle={toggleReviewerRecommendations}
version={fragment} token={get(currentUser, 'token')}
/> version={fragment}
)} />
)}
{get(currentUser, 'isInvitedHE', false) && ( {get(currentUser, 'isInvitedHE', false) && (
<ResponseToInvitation <ResponseToInvitation
...@@ -200,6 +201,7 @@ const ManuscriptLayout = ({ ...@@ -200,6 +201,7 @@ const ManuscriptLayout = ({
getSignedUrl={getSignedUrl} getSignedUrl={getSignedUrl}
highlight={ highlight={
reviewerReports.length === 0 && reviewerReports.length === 0 &&
currentUser.handlingEditor &&
!cannotViewReviewersDetails.includes( !cannotViewReviewersDetails.includes(
get(collection, 'status', 'draft'), get(collection, 'status', 'draft'),
) )
......
...@@ -377,7 +377,10 @@ export default compose( ...@@ -377,7 +377,10 @@ export default compose(
this.props.toggleEditorialComments() this.props.toggleEditorialComments()
} }
if (get(fragment, 'responseToReviewers.content', false)) { if (
get(fragment, 'responseToReviewers.content', false) &&
!editorialRecommendations.length
) {
this.props.toggleResponseToRevisionRequest() this.props.toggleResponseToRevisionRequest()
} }
}, },
......
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