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

Merge branch 'dev' into 'master'

Dev

See merge request xpub/xpub-epmc!103
parents a6c3b177 b95cd80f
No related branches found
No related tags found
1 merge request!103Dev
......@@ -7,6 +7,7 @@
"presets": ["env", "react", "stage-2"]
},
"test": {
"presets": ["env"]
}
}
}
\ No newline at end of file
......@@ -97,10 +97,13 @@ const RightSection = styled.div`
}
@media screen and (min-width: 901px) {
&.hidden {
display: none !important;
display: flex !important;
}
}
@media screen and (max-width: 900px) {
&.hidden {
display: none !important;
}
flex-direction: column;
width: 100%;
height: auto;
......
......@@ -204,16 +204,18 @@ class PubMedSearch extends React.Component {
async onSelected(result, journal) {
const inPMC = result.articleids.find(id => id.idtype === 'pmc')
if (inPMC) {
this.setState({ loading: true })
const obj = {
inPMC: result.title,
pmcid: inPMC.value,
loading: false,
}
const epmcURL = `https://www.ebi.ac.uk/europepmc/webservices/rest/search?query=SRC:MED%20EXT_ID:${
result.uid
}&resulttype=lite&format=json`
const response = await fetch(epmcURL)
const json = await response.json()
const epmc = json.resultList.result[0].inEPMC
const epmc = json.resultList.result[0] && json.resultList.result[0].inEPMC
if (epmc === 'Y') {
obj.inEPMC = true
}
......
......@@ -163,7 +163,6 @@ const MyManuscripts = ({ currentUser, errors, history }) => {
? data.findByStatus
: data
// continue here...style later!!!
const toggles = togglesRequired && (
<React.Fragment>
<ToggleBar>
......
module.exports = {
transport: {
host: 'smtp.ebi.ac.uk',
host: 'outgoing.ebi.ac.uk',
port: 25,
},
}
......@@ -14,11 +14,14 @@ module.exports.getManifestFilename = function getManifestFilename(tmpPath) {
return new Promise((resolve, reject) => {
fs.readdir(tmpPath, (err, items) => {
if (err) reject(err)
let manifestExists = false
for (let i = 0; i < items.length; i += 1) {
if (items[i].indexOf('manifest') > -1) {
resolve(items[i])
} else reject(new Error('There is no manifest file.'))
manifestExists = true
}
}
if (!manifestExists) reject(new Error('There is no manifest file.'))
})
})
}
......
......@@ -15,9 +15,7 @@ module.exports.untar = function untar(source, dest) {
}
fs.readdir(dest, (err, items) => {
if (err) reject(err)
// resolve(`${dest}/${items[0]}`)
// this works in beta:
resolve(`${dest}`)
resolve(`${dest}/${items[0]}`)
})
},
)
......
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