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

Merge branch 'shared-data-model' of gitlab.coko.foundation:xpub/xpub-epmc into shared-data-model

* 'shared-data-model' of gitlab.coko.foundation:xpub/xpub-epmc:
  make regenerate preview work
parents 53ade912 89c4bcd6
No related branches found
No related tags found
2 merge requests!96Dev,!95Shared data model
...@@ -158,7 +158,7 @@ class Review extends React.Component { ...@@ -158,7 +158,7 @@ class Review extends React.Component {
const xml = files.find(f => f.type === 'PMC') || null const xml = files.find(f => f.type === 'PMC') || null
const final = files.find(f => f.type === 'PMCfinal') || null const final = files.find(f => f.type === 'PMCfinal') || null
const tempHTML = files.find(f => f.type === 'tempHTML') || null const tempHTML = files.find(f => f.type === 'tempHTML') || null
const pdf4print = files.find(f => f.type === 'pdf4print') || null // const pdf4print = files.find(f => f.type === 'pdf4print') || null
const finalFilename = final const finalFilename = final
? final.filename ? final.filename
...@@ -172,18 +172,21 @@ class Review extends React.Component { ...@@ -172,18 +172,21 @@ class Review extends React.Component {
.slice(0, -1) .slice(0, -1)
.join('.') .join('.')
: null : null
const pdf4printFilename = pdf4print // const pdf4printFilename = pdf4print
? pdf4print.filename // ? pdf4print.filename
.split('.') // .split('.')
.slice(0, -1) // .slice(0, -1)
.join('.') // .join('.')
: null // : null
// const prod = window.location.hostname.startsWith('beta')
// const hasFinal =
// finalFilename === tempHTMLFilename &&
// (!prod || finalFilename === pdf4printFilename)
const prod = window.location.hostname.startsWith('beta') const hasFinal = finalFilename === tempHTMLFilename
const hasFinal =
finalFilename === tempHTMLFilename &&
(!prod || finalFilename === pdf4printFilename)
if (waitingForGeneration && hasFinal) { if (waitingForGeneration && hasFinal) {
this.setState({ waitingForGeneration: false }) this.setState({ waitingForGeneration: false })
} }
......
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