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