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

#1200

parent fc53a14d
No related branches found
No related tags found
1 merge request!387Deploy to production
...@@ -97,7 +97,11 @@ const ReviewFormDisplay = ({ ...@@ -97,7 +97,11 @@ const ReviewFormDisplay = ({
)} )}
{annotations && <ListErrors annotations={annotations} />} {annotations && <ListErrors annotations={annotations} />}
{(deleted.length > 0 || taggerErrors) && ( {(deleted.length > 0 || taggerErrors) && (
<ReviewHistory reviews={deleted} taggerErrors={taggerErrors} /> <ReviewHistory
reviews={deleted}
status={status}
taggerErrors={taggerErrors}
/>
)} )}
<p> <p>
{`You can fix any errors and approve for review, or click 'Ask for correction' to ${ {`You can fix any errors and approve for review, or click 'Ask for correction' to ${
......
...@@ -104,10 +104,17 @@ class ReviewHistory extends React.Component { ...@@ -104,10 +104,17 @@ class ReviewHistory extends React.Component {
show: this.props.reviews.map(r => false), show: this.props.reviews.map(r => false),
} }
render() { render() {
const { reviews = [], taggerErrors } = this.props const { reviews = [], status, taggerErrors } = this.props
const { showList, show } = this.state const { showList, show } = this.state
const tagErrorList = () => (
<React.Fragment>
<H5>Most recent tagger errors</H5>
<HTMLString element={TableStyle} string={taggerErrors} />
</React.Fragment>
)
return ( return (
<History> <History>
{taggerErrors && status === 'xml-corrected' && tagErrorList}
<Drop onClick={() => this.setState({ showList: !showList })}> <Drop onClick={() => this.setState({ showList: !showList })}>
Previous error reports Previous error reports
<Icon color="currentColor" size={2.5}> <Icon color="currentColor" size={2.5}>
...@@ -116,12 +123,7 @@ class ReviewHistory extends React.Component { ...@@ -116,12 +123,7 @@ class ReviewHistory extends React.Component {
</Drop> </Drop>
{showList && ( {showList && (
<React.Fragment> <React.Fragment>
{taggerErrors && ( {taggerErrors && status !== 'xml-corrected' && tagErrorList}
<React.Fragment>
<H5>Most recent tagger errors</H5>
<HTMLString element={TableStyle} string={taggerErrors} />
</React.Fragment>
)}
{reviews.map((review, i) => { {reviews.map((review, i) => {
const { created, user, annotations } = review const { created, user, annotations } = review
const { givenNames, surname } = user.identities[0].name const { givenNames, surname } = user.identities[0].name
......
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