Commit 159df07c authored by d.arizona's avatar d.arizona

yap

parent ed8dbe73
...@@ -100,7 +100,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -100,7 +100,7 @@ export default class CorporateAnnualTargetMR extends Component {
let checkApprover = false let checkApprover = false
let checkLastStatus = false let checkLastStatus = false
let checkStatus = false let checkStatus = false
let checkPrevRev = false
if (this.props.isApprover) { if (this.props.isApprover) {
checkApprover = true checkApprover = true
} else { } else {
...@@ -112,9 +112,12 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -112,9 +112,12 @@ export default class CorporateAnnualTargetMR extends Component {
} else { } else {
checkLastStatus = false checkLastStatus = false
} }
// else if (this.props.prevRevision) {
// viewOnly = false if (this.props.prevRevision) {
// } checkPrevRev = true
} else {
checkPrevRev = false
}
if (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') { if (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') {
checkStatus = true checkStatus = true
...@@ -122,7 +125,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -122,7 +125,7 @@ export default class CorporateAnnualTargetMR extends Component {
checkStatus = false checkStatus = false
} }
this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus }) this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev})
} }
getParameterGroup() { getParameterGroup() {
......
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