Commit a603a761 authored by Riri Novita's avatar Riri Novita

oi apdet

parent 4510c225
......@@ -79,32 +79,11 @@ export default class OperatingIndicatorMR extends Component {
}
handleViewOnly() {
let checkApprover = false
let checkLastStatus = false
let checkStatus = false
let checkCreate = this.props.permission.create
let checkEdit = this.props.permission.edit
let checkIsSubmit = this.props.isSubmit
if (this.props.isApprover) {
checkApprover = true
} else {
checkApprover = false
}
if (this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') {
checkLastStatus = true
} else {
checkLastStatus = false
}
// else if (this.props.prevRevision) {
// viewOnly = false
// }
if (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') {
checkStatus = true
} else {
checkStatus = false
}
this.setState({viewOnly: !checkApprover && checkLastStatus && checkStatus})
this.setState({viewOnly: checkCreate && checkEdit && checkIsSubmit})
}
handleGetFor(type) {
......@@ -1503,7 +1482,7 @@ export default class OperatingIndicatorMR extends Component {
}
}}
onBlur={(event) => {
handleText(event.target.value, tableMeta, 0)
handleText(event.target.value, tableMeta, 1)
}}
/>
:
......@@ -1532,7 +1511,7 @@ export default class OperatingIndicatorMR extends Component {
}
}}
onBlur={(event) => {
handleText(event.target.value, tableMeta, 0)
handleText(event.target.value, tableMeta, 1)
}}
/>
</LightTooltipError>
......@@ -1552,7 +1531,7 @@ export default class OperatingIndicatorMR extends Component {
}
}}
onBlur={(event) => {
handleText(event.target.value, tableMeta, 0)
handleText(event.target.value, tableMeta, 1)
}}
/>
}
......@@ -1675,13 +1654,16 @@ export default class OperatingIndicatorMR extends Component {
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{this.state.loading && loadingComponent}
{!this.state.loading &&
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
columns={columns}
options={options}
/>
</MuiThemeProvider>
}
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10 }}>Notes : {this.state.notesUpdate}</Typography>
......
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