Commit 949f96cc authored by nickstiffler's avatar nickstiffler Committed by Yannis Barlas

fix(editor panel): so panel breaks when main editor is not assigned

parent 9859187a
......@@ -135,6 +135,7 @@ const ScienceOfficerView = props => {
const {
editor: assignedEditor,
scienceOfficer: assignedScienceOfficer,
sectionEditor: assignedSectionEditor,
} = getManuscriptTeam(manuscript.teams)
rightSections = filteredVersions.map((version, index) => {
......@@ -154,6 +155,12 @@ const ScienceOfficerView = props => {
const reviewerCounts = getReviewerCounts(teams)
const versionReviews = transformReviews(reviews)
const editorName = assignedEditor && assignedEditor.displayName
const sectionEditorName =
assignedSectionEditor && assignedSectionEditor.displayName
const scienceOfficerName =
assignedScienceOfficer && assignedScienceOfficer.displayName
return {
key: id,
label: <Label created={created} index={index} />,
......@@ -166,13 +173,14 @@ const ScienceOfficerView = props => {
decision={decision}
decisionLetter={decisionLetter}
decisionSubmitted={!!decision}
editorName={assignedEditor.displayName}
editorName={editorName}
invitedReviewersCount={reviewerCounts.invited}
key={version.id}
rejectedReviewersCount={reviewerCounts.rejected}
reviews={versionReviews}
scienceOfficerChatMessages={scienceOfficerChatMessages}
scienceOfficerName={assignedScienceOfficer.displayName}
scienceOfficerName={scienceOfficerName}
sectionEditorNam={sectionEditorName}
sendScienceOfficerChatMessage={sendChat}
showDataType={latest}
showDecision={!!decision}
......
Markdown is supported
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