Skip to content
Snippets Groups Projects
Commit 7a2128ea authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

Merge branch 'HIN-946-fixes' into 'develop'

Hin 946 fixes

See merge request !101
parents ca202cbc 4f94b4e0
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!101Hin 946 fixes
...@@ -55,7 +55,11 @@ const cannotViewReviewersDetails = [ ...@@ -55,7 +55,11 @@ const cannotViewReviewersDetails = [
] ]
export const canViewReviewersDetails = (state, collection = {}) => { export const canViewReviewersDetails = (state, collection = {}) => {
if (cannotViewReviewersDetails.includes(get(collection, 'status', 'draft'))) { const isHeAssigned = !!get(collection, 'handlingEditor', false)
if (
cannotViewReviewersDetails.includes(get(collection, 'status', 'draft')) ||
!isHeAssigned
) {
return false return false
} }
return canViewReports(state, collection.id) return canViewReports(state, collection.id)
...@@ -102,6 +106,7 @@ const canEICViewEditorialCommentsStatuses = [ ...@@ -102,6 +106,7 @@ const canEICViewEditorialCommentsStatuses = [
'accepted', 'accepted',
'inQA', 'inQA',
'pendingApproval', 'pendingApproval',
'reviewCompleted',
] ]
export const canEICViewEditorialComments = (state, collection = {}) => { export const canEICViewEditorialComments = (state, collection = {}) => {
const isEIC = currentUserIs(state, 'adminEiC') const isEIC = currentUserIs(state, 'adminEiC')
......
...@@ -90,6 +90,7 @@ export default compose( ...@@ -90,6 +90,7 @@ export default compose(
get( get(
recommendations.find(r => r.value === report.recommendation), recommendations.find(r => r.value === report.recommendation),
'label', 'label',
'Return to HE',
), ),
}), }),
withProps( withProps(
......
...@@ -12,7 +12,7 @@ const { ...@@ -12,7 +12,7 @@ const {
const { features = {}, recommendations } = config const { features = {}, recommendations } = config
const sendMTSPackage = async (collection, fragment) => { const sendMTSPackage = async (collection, fragment, isEQA = false) => {
const s3Config = get(config, 'pubsweet-component-aws-s3', {}) const s3Config = get(config, 'pubsweet-component-aws-s3', {})
const mtsConfig = get(config, 'mts-service', {}) const mtsConfig = get(config, 'mts-service', {})
const MTSService = require('pubsweet-component-mts-package') const MTSService = require('pubsweet-component-mts-package')
...@@ -27,7 +27,7 @@ const sendMTSPackage = async (collection, fragment) => { ...@@ -27,7 +27,7 @@ const sendMTSPackage = async (collection, fragment) => {
}, },
} }
await MTS.sendPackage({ fragment: packageFragment }) await MTS.sendPackage({ fragment: packageFragment, isEQA })
} }
const notifications = require('./notifications/notifications') const notifications = require('./notifications/notifications')
...@@ -112,7 +112,7 @@ module.exports = models => async (req, res) => { ...@@ -112,7 +112,7 @@ module.exports = models => async (req, res) => {
// the manuscript has not yet passed through the EQA process so we need to upload it to the FTP server // the manuscript has not yet passed through the EQA process so we need to upload it to the FTP server
if (isEditorInChief && recommendation === 'publish' && !hasEQA) { if (isEditorInChief && recommendation === 'publish' && !hasEQA) {
if (features.mts) { if (features.mts) {
await sendMTSPackage(collection, fragment) await sendMTSPackage(collection, fragment, true)
} }
collection.status = 'inQA' collection.status = 'inQA'
......
...@@ -23,6 +23,8 @@ const messagesLabel = { ...@@ -23,6 +23,8 @@ const messagesLabel = {
reject: 'Comments for Author', reject: 'Comments for Author',
} }
const cannotViewReviewersDetails = ['revisionRequested', 'pendingApproval']
const ManuscriptLayout = ({ const ManuscriptLayout = ({
history, history,
assignHE, assignHE,
...@@ -169,7 +171,9 @@ const ManuscriptLayout = ({ ...@@ -169,7 +171,9 @@ const ManuscriptLayout = ({
getSignedUrl={getSignedUrl} getSignedUrl={getSignedUrl}
highlight={ highlight={
reviewerReports.length === 0 && reviewerReports.length === 0 &&
get(collection, 'status', 'draft') !== 'pendingApproval' !cannotViewReviewersDetails.includes(
get(collection, 'status', 'draft'),
)
} }
invitations={invitationsWithReviewers} invitations={invitationsWithReviewers}
isFetching={isFetching.publonsFetching} isFetching={isFetching.publonsFetching}
......
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