Commit 6d6958d5 authored by Audrey Hamelers's avatar Audrey Hamelers
parent 51af07a6
Pipeline #13064 passed with stages
in 5 minutes and 49 seconds
......@@ -116,7 +116,12 @@ const QuickView = ({ manuscript }) => (
</Col>
<Col flex={1}>
<div>Published</div>
<Status current={manuscript.status} mark="ncbi-ready" />
<Status
current={manuscript.status}
mark={
manuscript.status === 'ncbi-triage' ? 'ncbi-triage' : 'ncbi-ready'
}
/>
</Col>
</Checklist>
</React.Fragment>
......
......@@ -54,6 +54,11 @@ const submitterState = {
color: 'success',
url: 'submit',
},
'ncbi-triage': {
status: 'Approved for Europe PMC',
color: 'success',
url: 'submit',
},
published: {
status: 'Available in Europe PMC',
color: 'success',
......@@ -122,6 +127,11 @@ const reviewerState = {
color: 'success',
url: 'submit',
},
'ncbi-triage': {
status: 'Approved for Europe PMC',
color: 'success',
url: 'submit',
},
published: {
status: 'Available in Europe PMC',
color: 'success',
......@@ -190,6 +200,11 @@ const adminState = {
color: 'success',
url: 'activity',
},
'ncbi-triage': {
status: 'NCBI errors',
color: 'error',
url: 'review',
},
published: {
status: 'Available in Europe PMC',
color: 'success',
......
......@@ -135,17 +135,15 @@ class Review extends React.Component {
}
componentDidMount() {
if (this.page && this.props.manuscript) {
if (
this.props.manuscript.files &&
!this.props.manuscript.files.find(f => f.type === 'PMC')
) {
const { files, status } = this.props.manuscript
if (files && !files.find(f => f.type === 'PMC')) {
this.setState({ showAll: true })
}
if (
['xml-triage', 'tagging'].includes(this.props.manuscript.status) &&
['xml-triage', 'tagging', 'ncbi-triage'].includes(status) &&
this.props.currentUser.admin
) {
this.setState({ pane: 'files', open: false })
this.setState({ pane: 'files', open: status === 'ncbi-triage' })
}
}
}
......@@ -228,12 +226,16 @@ class Review extends React.Component {
>
<PreviewPanelDiv style={{ maxWidth: showManuscript && '1000px' }}>
<PreviewPanelHeader>
<H1>
{(status === 'xml-triage' && 'Correct') ||
(status === 'tagging' && 'Tag') ||
'Review'}
{` final web versions`}
</H1>
{status === 'ncbi-triage' ? (
<H1>Fix NCBI loading errors</H1>
) : (
<H1>
{(status === 'xml-triage' && 'Correct') ||
(status === 'tagging' && 'Tag') ||
'Review'}
{` final web versions`}
</H1>
)}
</PreviewPanelHeader>
{pane !== 'files' && (
<Instructions>
......@@ -252,7 +254,7 @@ class Review extends React.Component {
XML files
</Action>
)}
{['xml-qa', 'xml-triage'].includes(status) && (
{['xml-qa', 'xml-triage', 'ncbi-triage'].includes(status) && (
<Action
className={pane === 'xml' ? 'current' : ''}
disabled={!xml}
......
......@@ -62,7 +62,13 @@ class ReviewFooter extends React.Component {
Send for XML QA
</Button>
)
} else if (manuscript.status === 'xml-triage') {
} else if (status === 'ncbi-triage') {
return (
<Button onClick={() => setStatus('xml-complete')} primary>
Retry send to NCBI
</Button>
)
} else if (status === 'xml-triage') {
const options = [
{
value: 'xml-qa',
......@@ -72,10 +78,6 @@ class ReviewFooter extends React.Component {
value: 'xml-review',
label: 'Author review',
},
{
value: 'xml-complete',
label: 'PMC (skip review)',
},
]
return (
<div>
......
......@@ -10,6 +10,7 @@
"xml-review",
"xml-complete",
"ncbi-ready",
"ncbi-triage",
"published",
"being-withdrawn"
]
\ No newline at end of file
......@@ -159,7 +159,7 @@ async function updateManuscriptNcbiStatus(fileName, response) {
)
if (response.status) {
manInput.formState = `Failed NCBI loading\n\n${response.formState}`
manInput.status = 'xml-triage'
manInput.status = 'ncbi-triage'
} else if (response.pmcid) {
const newPMCID = response.pmcid.startsWith('PMC')
? response.pmcid
......
......@@ -37,7 +37,7 @@ const resolvers = {
}
const statuses = external
? ['xml-qa']
: ['submitted', 'xml-qa', 'xml-triage']
: ['submitted', 'xml-qa', 'xml-triage', 'ncbi-triage']
return ManuscriptManager.findByStatus(statuses, -1, 0, user)
},
async findByStatus(_, { query, page, pageSize }, { user }) {
......
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