Skip to content
Snippets Groups Projects
Commit 2226ce81 authored by Audrey Hamelers's avatar Audrey Hamelers
Browse files

Merge branch 'dev_k8s-dev' into 'dev_k8s'

#1200

See merge request !386
parents ce406574 51aab290
No related branches found
No related tags found
2 merge requests!387Deploy to production,!386#1200
......@@ -133,6 +133,7 @@ const QuickView = ({ manuscript }) => {
mark={
(indexOnly && manuscript.status) ||
(manuscript.status === 'xml-triage' && 'xml-triage') ||
(manuscript.status === 'xml-corrected' && 'xml-corrected') ||
(manuscript.status === 'file-error' && 'file-error') ||
'xml-qa'
}
......@@ -142,7 +143,11 @@ const QuickView = ({ manuscript }) => {
<div>Final review</div>
<Status
current={manuscript.status}
mark={indexOnly ? 'repo-processing' : 'xml-review'}
mark={
(indexOnly && 'repo-processing') ||
(manuscript.status === 'xml-error' && 'xml-error') ||
'xml-review'
}
/>
</Col>
<Col flex={1}>
......
......@@ -36,7 +36,9 @@ const StatusDesc = [
'has file loading errors',
'needs XML QA',
'has XML errors',
'XML errors corrected',
'needs final review',
'has reviewer XML errors',
'needs citation',
'approved for Europe PMC',
'failed EBI/NCBI loading',
......@@ -135,6 +137,12 @@ class StatusEdit extends React.Component {
(lastStatus &&
lastStatus === 'file-error' &&
` File loading error state (file-error)`) ||
(lastStatus &&
lastStatus === 'xml-error' &&
` Reviewer reported error state (xml-error)`) ||
(lastStatus &&
lastStatus === 'xml-corrected' &&
` XML errors corrected state (xml-corrected)`) ||
` QA state ('submitted')`}
</span>
</FlexP>
......
......@@ -25,7 +25,9 @@ const Alert = styled.small`
const HelpdeskQueue = {
'needs submission QA': ['submitted'],
'has file errors': ['file-error'],
'has XML errors': ['xml-triage'],
'has XML QA errors': ['xml-triage'],
'XML errors corrected': ['xml-corrected'],
'has reviewer XML errors': ['xml-error'],
'needs citation': ['xml-complete'],
'failed EBI/NCBI loading': ['repo-triage'],
'problem being withdrawn': ['withdrawal-triage'],
......@@ -120,7 +122,15 @@ const QueueTable = ({ title, queue, data, alerts }) => {
}
const QueueCheck = ({ data }) => {
const myQueue = ['submitted', 'file-error', 'xml-triage', 'repo-triage']
const myQueue = [
'submitted',
'file-error',
'xml-triage',
'xml-corrected',
'xml-error',
'repo-triage',
'withdrawal-triage',
]
const needCite = data.find(r => r.type === 'xml-complete').count
const filtered = data.reduce(
(sum, row) => (myQueue.includes(row.type) ? sum + row.count : sum),
......
......@@ -138,6 +138,8 @@ const claimStates = [
'submitted',
'file-error',
'xml-triage',
'xml-corrected',
'xml-error',
'repo-triage',
'withdrawal-triage',
]
......
......@@ -49,6 +49,16 @@ const submitterState = {
color: 'normal',
url: 'submit',
},
'xml-corrected': {
status: 'Processing',
color: 'normal',
url: 'submit',
},
'xml-error': {
status: 'Processing',
color: 'normal',
url: 'submit',
},
'xml-complete': {
status: 'Approved for Europe PMC',
color: 'success',
......@@ -137,6 +147,16 @@ const reviewerState = {
color: 'normal',
url: 'submit',
},
'xml-corrected': {
status: 'Processing',
color: 'normal',
url: 'submit',
},
'xml-error': {
status: 'Correcting',
color: 'normal',
url: 'submit',
},
'xml-complete': {
status: 'Approved for Europe PMC',
color: 'success',
......@@ -225,6 +245,16 @@ const adminState = {
color: 'error',
url: 'review',
},
'xml-corrected': {
status: 'XML corrected',
color: 'error',
url: 'review',
},
'xml-error': {
status: 'XML reviewed',
color: 'error',
url: 'review',
},
'xml-complete': {
status: 'Needs citation',
color: 'warning',
......
......@@ -175,7 +175,7 @@ class Review extends React.Component {
if (['file-error', 'tagging', 'repo-triage'].includes(status)) {
this.setState({ pane: 'files', open: status === 'repo-triage' })
}
if (status === 'xml-triage') {
if (['xml-triage', 'xml-error', 'xml-corrected'].includes(status)) {
this.setState({ open: false })
}
}
......@@ -276,6 +276,36 @@ class Review extends React.Component {
this.props.history.push(`/submission/${manuscript.id}/submit`)
return null
}
let heading = ''
switch (status) {
case 'tagging':
heading = 'Tag XML and upload files'
break
case 'file-error':
heading = 'Correct file loading errors'
break
case 'xml-qa':
heading = 'QA tagging and web versions'
break
case 'xml-triage':
heading = 'Triage reported errors'
break
case 'xml-corrected':
heading = 'Check corrected errors'
break
case 'xml-review':
heading = 'Review final web versions'
break
case 'xml-error':
heading = 'Correct reviewer-reported errors'
break
case 'repo-triage':
heading = 'Fix repository loading errors'
break
default:
heading = ''
break
}
return (
<React.Fragment>
{notif && (
......@@ -296,19 +326,7 @@ class Review extends React.Component {
>
<PreviewPanelDiv style={{ maxWidth: showManuscript && '1000px' }}>
<PreviewPanelHeader>
{(status === 'file-error' && (
<H1>Correct file loading errors</H1>
)) ||
(status === 'repo-triage' && (
<H1>Fix repository loading errors</H1>
)) || (
<H1>
{(status === 'xml-triage' && 'Correct') ||
(status === 'tagging' && 'Tag') ||
'Review'}
{` final web versions`}
</H1>
)}
<H1>{heading}</H1>
</PreviewPanelHeader>
{pane !== 'files' && status !== 'tagging' && (
<Instructions>
......@@ -338,6 +356,8 @@ class Review extends React.Component {
'file-error',
'xml-qa',
'xml-triage',
'xml-corrected',
'xml-error',
'repo-triage',
].includes(status) && (
<Action
......
......@@ -31,6 +31,14 @@ class ReviewFooter extends React.Component {
const { status, teams, organization, decision } = manuscript
const submitter = teams.find(t => t.role === 'submitter').teamMembers[0]
const preprint = organization.name === 'Europe PMC Preprints'
const xStates = [
'xml-qa',
'xml-triage',
'xml-corrected',
'xml-review',
'xml-error',
]
const xErrorStates = ['xml-triage', 'xml-corrected', 'xml-error']
return (
<PreviewFooter>
<div>
......@@ -110,9 +118,7 @@ class ReviewFooter extends React.Component {
)}
</div>
)
} else if (
['xml-triage', 'xml-qa', 'xml-review'].includes(status)
) {
} else if (xStates.includes(status)) {
return (
<React.Fragment>
<div>
......@@ -121,10 +127,10 @@ class ReviewFooter extends React.Component {
onClick={() => this.setState({ approve: true })}
primary
>
Approve{status === 'xml-triage' && ' for review'}
Approve{xErrorStates.includes(status) && ' for review'}
</Button>
<Button onClick={() => this.setState({ report: true })}>
{status === 'xml-triage'
{xErrorStates.includes(status)
? 'Ask for correction'
: 'Report errors'}
</Button>
......@@ -165,7 +171,7 @@ class ReviewFooter extends React.Component {
</p>
)}
<p>
{status === 'xml-triage' &&
{xErrorStates.includes(status) &&
'Confirm files are correct and send for final review?'}
{status === 'xml-qa' &&
'Confirm QA has been completed, and approve the web versions of the manuscript?'}
......@@ -176,7 +182,7 @@ class ReviewFooter extends React.Component {
: 'final web versions of the manuscript for release to'
} Europe PMC now?`}
</p>
{status !== 'xml-triage' &&
{!['xml-triage', 'xml-error'].includes(status) &&
annotations &&
annotations.length > 0 && (
<Notification type="warning">
......@@ -215,7 +221,7 @@ class ReviewFooter extends React.Component {
)}
{report && (
<React.Fragment>
{status === 'xml-triage' ? (
{xErrorStates.includes(status) ? (
<SubmissionError
annotations={annotations}
close={() => this.setState({ report: false })}
......@@ -237,7 +243,11 @@ class ReviewFooter extends React.Component {
<Button
onClick={async () => {
this.setState({ report: false })
await setStatus('xml-triage')
await setStatus(
status === 'xml-qa'
? 'xml-triage'
: 'xml-error',
)
history.push('/')
}}
primary
......
......@@ -74,7 +74,7 @@ const ReviewFormDisplay = ({
</Content>
</React.Fragment>
)
} else if (status === 'xml-triage') {
} else if (['xml-triage', 'xml-corrected', 'xml-error'].includes(status)) {
const user = review ? review.user : null
const { givenNames, surname } = (user && user.identities[0].name) || ''
return (
......
......@@ -8,7 +8,9 @@
"file-error",
"xml-qa",
"xml-triage",
"xml-corrected",
"xml-review",
"xml-error",
"xml-complete",
"repo-ready",
"repo-triage",
......
......@@ -229,7 +229,7 @@ const triageCheck = async manuscript => {
let formState = null
const qaCheck = await Audit.qaCheck(manuscript.id, manuscript.version)
if (qaCheck) {
status = 'xml-triage'
status = 'xml-corrected'
formState = '🔎 Manuscript version has previously been through XML QA'
}
return { status, formState }
......
......@@ -60,6 +60,8 @@ const resolvers = {
'submitted',
'file-error',
'xml-triage',
'xml-corrected',
'xml-error',
'repo-triage',
'withdrawal-triage',
]
......
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