Commit 255ab018 authored by nickstiffler's avatar nickstiffler Committed by Yannis Barlas
Browse files

feat(dashboard): add editorial resubmission status

parent 7b9125dc
......@@ -153,6 +153,10 @@ const Dashboard = props => {
label: 'Proofs Submitted',
value: 'proofs submitted',
},
{
label: 'Editorial Re-submission',
value: 'editorial re-submission',
},
]
const headerActions = [
......
......@@ -54,6 +54,10 @@ const getCurrentStatus = manuscript => {
if (versionCount > 1) {
const beforeLastVersion = versions[versions.length - 2]
if (!lastVersion.submitted && beforeLastVersion.decision === 'revise') {
const hasSubmittedReview = !!beforeLastVersion.reviews.find(
r => r.status.submitted,
)
if (!hasSubmittedReview) return 'editorial re-submission'
return 'under revision'
}
if (lastVersion.submitted && beforeLastVersion.decision === 'revise') {
......
......@@ -9,8 +9,9 @@ const StatusLabel = styled.span`
color: ${({ label }) => {
if (label === 'accepted to proofs') return th('colorSuccess')
if (label === 'rejected') return th('colorError')
if (label === 'under revision') return th('colorWarning')
if (label === 'declined') return th('colorError')
if (label === 'under revision') return th('colorWarning')
if (label === 'editorial re-submission') return th('colorWarning')
return th('colorPrimary')
}};
......
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