Commit b3983277 authored by Riri Novita's avatar Riri Novita

issue montly pl prod

parent 8ba4745b
......@@ -81,9 +81,8 @@ export default class OperatingIndicatorMR extends Component {
handleViewOnly() {
let checkCreate = this.props.permission.create
let checkEdit = this.props.permission.edit
let checkIsSubmit = this.props.isSubmit
this.setState({viewOnly: checkCreate && checkEdit && checkIsSubmit})
this.setState({viewOnly: checkCreate && checkEdit})
}
handleGetFor(type) {
......@@ -1102,7 +1101,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
decimalScale={1}
fixedDecimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit || this.state.get_for == 'view'}
disabled={!this.props.permission.create || !this.props.permission.edit || this.state.get_for == 'view'}
value={Number(tableMeta.rowData[10]).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
......@@ -1649,7 +1648,7 @@ export default class OperatingIndicatorMR extends Component {
</div>
<div style={{ width: '50%' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
{this.state.get_for == 'edit' && (this.props.permission.create || this.props.permission.edit) && this.props.isSubmit && <a data-tip={'Download Template'} data-for="template">
{this.state.get_for == 'edit' && (this.props.permission.create || this.props.permission.edit) && <a data-tip={'Download Template'} data-for="template">
<button
style={{
backgroundColor: 'transparent',
......@@ -1663,7 +1662,7 @@ export default class OperatingIndicatorMR extends Component {
</button>
</a>}
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
{this.state.get_for == 'edit' && (this.props.permission.create || this.props.permission.edit) && this.props.isSubmit && <a data-tip={'Upload'} data-for="upload">
{this.state.get_for == 'edit' && (this.props.permission.create || this.props.permission.edit) && <a data-tip={'Upload'} data-for="upload">
<button
style={{
backgroundColor: 'transparent',
......@@ -1733,8 +1732,8 @@ export default class OperatingIndicatorMR extends Component {
</div>
</button>
</div>
{!this.state.emptyData && (this.props.permission.create || this.props.permission.edit) && this.props.isSubmit && <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 2 }}>
{this.state.get_for == 'view' && <button
{!this.state.emptyData && (this.props.permission.create || this.props.permission.edit) && <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 2 }}>
{this.state.get_for == 'view' && this.state.viewOnly && <button
type="button"
onClick={() => {
this.setState({loading: true}, () => {
......
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