diff --git a/packages/component-faraday-selectors/src/index.js b/packages/component-faraday-selectors/src/index.js index a6f10f0e7108ef224c7184766e65bb1a6e114ac0..29dcce108720f0e9fe0387b6380ee3bd9f8fd12f 100644 --- a/packages/component-faraday-selectors/src/index.js +++ b/packages/component-faraday-selectors/src/index.js @@ -81,12 +81,6 @@ export const canAuthorViewEditorialComments = ( ) } -const hideEditorNameStatuses = 'revisionRequested' -export const hideEditorName = (collection = {}) => { - const status = get(collection, 'status', 'draft') - return hideEditorNameStatuses.includes(status) -} - const canHeViewEditorialCommentsStatuses = [ 'revisionRequested', 'rejected', diff --git a/packages/component-faraday-ui/src/EditorialReportCard.js b/packages/component-faraday-ui/src/EditorialReportCard.js index 8d0c31657ee0cf9bf9a494b61a2079c05227d2f0..a89ca77499af8c0d0a6b6ceff3b6b5af97c617d5 100644 --- a/packages/component-faraday-ui/src/EditorialReportCard.js +++ b/packages/component-faraday-ui/src/EditorialReportCard.js @@ -15,7 +15,6 @@ const EditorialReportCard = ({ publicReport, privateReport, recommendation, - hideEditorName, editorName, editorRole, report: { createdOn, reviewer }, @@ -34,7 +33,7 @@ const EditorialReportCard = ({ <Item justify="flex-end"> {reviewer && ( <Fragment> - <Text mr={1 / 2}>{hideEditorName ? '' : editorName}</Text> + <Text mr={1 / 2}>{editorName}</Text> <Tag mr={2}>{editorRole}</Tag> </Fragment> )} diff --git a/packages/component-faraday-ui/src/EditorialReportCard.md b/packages/component-faraday-ui/src/EditorialReportCard.md index d663f8d9a2f4bf15c625000cfa6afbd076e3bdeb..4d62d34b58bddfeacd5aa3f9fa5a6b8760e6b62f 100644 --- a/packages/component-faraday-ui/src/EditorialReportCard.md +++ b/packages/component-faraday-ui/src/EditorialReportCard.md @@ -47,14 +47,12 @@ const journal = { }, ], } -const hideEditorName = true -;<EditorialReportCard - report={report} - journal={journal} - publicLabel="Message For Author" - privateLabel="Message For Editorial Team" - hideEditorName={hideEditorName} - /> +;<EditorialReportCard + report={report} + journal={journal} + publicLabel="Message For Author" + privateLabel="Message For Editorial Team" +/> ``` Card with message for the editorial team @@ -104,13 +102,12 @@ const journal = { }, ], } -;<EditorialReportCard - report={report} - journal={journal} - publicLabel="Message For Author" - privateLabel="Message For Editorial Team" - hideEditorName={hideEditorName} - /> +;<EditorialReportCard + report={report} + journal={journal} + publicLabel="Message For Author" + privateLabel="Message For Editorial Team" +/> ``` Card with message for the editorial team and for the author @@ -144,7 +141,6 @@ const report = { editorInChief: false, handlingEditor: true, }, - } const journal = { recommendations: [ @@ -166,12 +162,10 @@ const journal = { }, ], } - -;<EditorialReportCard - report={report} - journal={journal} - publicLabel="Message For Author" - privateLabel="Message For Editorial Team" - hideEditorName={hideEditorName} - /> +;<EditorialReportCard + report={report} + journal={journal} + publicLabel="Message For Author" + privateLabel="Message For Editorial Team" +/> ``` diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js index 2a47ec298c52c5b9617475236e868cc4695556b0..cc79766601a6e3bf1461efb6c0c1eaa294624d95 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js @@ -97,7 +97,6 @@ export default compose( inviteHE, isFetching, heInvitation, - hideEditorName, resendInvitation, revokeInvitation, pendingInvitation = {}, @@ -126,9 +125,6 @@ export default compose( /> ) } - if (hideEditorName) { - return <Text ml={1}>Assigned</Text> - } if (heInvitation) { return <Text ml={1}>{handlingEditor.name}</Text> } diff --git a/packages/component-manuscript/src/components/EditorialCommentCard.js b/packages/component-manuscript/src/components/EditorialCommentCard.js index 490601d8704582f23efff5cb77cb14779f730885..366200e4fba723bc2c2a7431b4d19b39ea0501b9 100644 --- a/packages/component-manuscript/src/components/EditorialCommentCard.js +++ b/packages/component-manuscript/src/components/EditorialCommentCard.js @@ -6,15 +6,7 @@ import { withFileDownload, } from 'pubsweet-component-faraday-ui' -// const EditorialCommentCard = ({ journal, reports = [], hideEditorName }) => ( -// <ContextualBox label="Editorial Comments" mb={2}> -const EditorialCommentCard = ({ - journal, - reports = [], - toggle, - expanded, - hideEditorName, -}) => ( +const EditorialCommentCard = ({ journal, reports = [], toggle, expanded }) => ( <ContextualBox expanded={expanded} label="Editorial Comments" @@ -24,7 +16,6 @@ const EditorialCommentCard = ({ > {reports.map(report => ( <EditorialReportCard - hideEditorName={hideEditorName} journal={journal} key={report.id} privateLabel="Message For Editorial Team" diff --git a/packages/component-manuscript/src/components/ManuscriptLayout.js b/packages/component-manuscript/src/components/ManuscriptLayout.js index 587a37394e3318f4c03eca8f95818f42ec4e84fd..ff41d40a2edd9265df38ea953e96dbdc7885e0d7 100644 --- a/packages/component-manuscript/src/components/ManuscriptLayout.js +++ b/packages/component-manuscript/src/components/ManuscriptLayout.js @@ -31,7 +31,6 @@ const ManuscriptLayout = ({ getSignedUrl, editorInChief, handlingEditors, - hideEditorName, createRecommendation, editorialRecommendations, journal = {}, @@ -84,8 +83,6 @@ const ManuscriptLayout = ({ currentUser={currentUser} editorInChief={editorInChief} fragment={fragment} - handlingEditors={handlingEditors} - hideEditorName={hideEditorName} inviteHE={toggleAssignHE} isFetching={isFetching.editorsFetching} journal={journal} @@ -102,7 +99,6 @@ const ManuscriptLayout = ({ {get(currentUser, 'permissions.canViewEditorialComments', true) && ( <EditorialCommentCard expanded={heRecommendationExpanded} - hideEditorName={hideEditorName} journal={journal} reports={editorialRecommendations} toggle={toggleHeRecommendation} diff --git a/packages/component-manuscript/src/components/ManuscriptPage.js b/packages/component-manuscript/src/components/ManuscriptPage.js index ceb047359beadaef8756d693b445c16359bf4530..3d1ce6f0603c78fd873ae0ee51c5459d88c63f9c 100644 --- a/packages/component-manuscript/src/components/ManuscriptPage.js +++ b/packages/component-manuscript/src/components/ManuscriptPage.js @@ -57,7 +57,6 @@ import { canAuthorViewEditorialComments, getFragmentReviewerRecommendations, getInvitationsWithReviewersForFragment, - hideEditorName, } from 'pubsweet-component-faraday-selectors' import { RemoteOpener, @@ -188,7 +187,6 @@ export default compose( ), }, }, - hideEditorName: hideEditorName(collection), isFetching: { editorsFetching: selectFetching(state), publonsFetching: isFetching,