Commit 3359e66d authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'GGMAC' into 'master'

ok sip

See merge request !1368
parents 82e86e5e 00ee7eda
......@@ -77,7 +77,7 @@ export default class OperatingIndicatorRO extends Component {
}
console.log(checkStatus);
this.setState({ viewOnly: checkCreate && checkEdit && checkStatus})
this.setState({ viewOnly: checkCreate && checkEdit && checkStatus })
}
handleGetFor(type) {
......@@ -352,7 +352,7 @@ export default class OperatingIndicatorRO extends Component {
a.click();
}
setTimeout(() => {
this.setState({loading: false})
this.setState({ loading: false })
}, 500);
}
......@@ -373,7 +373,7 @@ export default class OperatingIndicatorRO extends Component {
a.click();
}
setTimeout(() => {
this.setState({loading: false})
this.setState({ loading: false })
}, 500);
}
......@@ -802,7 +802,7 @@ export default class OperatingIndicatorRO extends Component {
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
:
this.state.get_for == 'view' ?
......@@ -827,7 +827,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)}
value={value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
/>
......@@ -846,7 +846,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)}
value={value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
......@@ -923,7 +923,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ value === "0" ? "" :Number(handleParent(tableMeta)).toFixed(1)}
value={value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
/>
......@@ -942,7 +942,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)}
value={value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
......@@ -1018,7 +1018,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)}
value={value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
/>
......@@ -1132,7 +1132,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={ this.props.quartal == 'q2' || this.props.quartal == 'q3' ? (value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)) : Number(handleFormula(tableMeta)).toFixed(1)}
value={this.props.quartal == 'q2' || this.props.quartal == 'q3' ? (value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)) : Number(handleFormula(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
......@@ -1150,12 +1150,12 @@ export default class OperatingIndicatorRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quartal == 'q1'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quartal == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q2' || this.props.quartal == 'q3' ? (value === "0" ? "" : Number(value).toFixed(1)) : Number(value).toFixed(1)}
decimalScale={1}
disabled={this.props.quartal == 'q1'? false : true}
disabled={this.props.quartal == 'q1' ? false : true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -1243,12 +1243,12 @@ export default class OperatingIndicatorRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quartal == 'q1'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quartal == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q2' || this.props.quartal == 'q3' ? (value === "0" ? "" : Number(value).toFixed(1)) : Number(value).toFixed(1)}
decimalScale={1}
disabled={this.props.quartal == 'q1'? false : true}
disabled={this.props.quartal == 'q1' ? false : true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -1336,12 +1336,12 @@ export default class OperatingIndicatorRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quartal == 'q1'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quartal == 'q1' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q2' || this.props.quartal == 'q3' ? (value === "0" ? "" : Number(value).toFixed(1)) : Number(value).toFixed(1)}
decimalScale={1}
disabled={this.props.quartal == 'q1'? false : true}
disabled={this.props.quartal == 'q1' ? false : true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -1392,7 +1392,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q3'? (value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)) : Number(handleParent(tableMeta)).toFixed(1)}
value={this.props.quartal == 'q3' ? (value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)) : Number(handleParent(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
/>
......@@ -1411,7 +1411,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q3'? (value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)) : Number(handleFormula(tableMeta)).toFixed(1)}
value={this.props.quartal == 'q3' ? (value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)) : Number(handleFormula(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
......@@ -1429,12 +1429,12 @@ export default class OperatingIndicatorRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quartal == 'q1' || this.props.quartal == 'q2'? "#5198ea" : '#555252' , fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quartal == 'q1' || this.props.quartal == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q3'? (value === "0" ? "" : Number(value).toFixed(1)) : Number(value).toFixed(1)}
value={this.props.quartal == 'q3' ? (value === "0" ? "" : Number(value).toFixed(1)) : Number(value).toFixed(1)}
decimalScale={1}
disabled={this.props.quartal == 'q1' || this.props.quartal == 'q2'? false : true}
disabled={this.props.quartal == 'q1' || this.props.quartal == 'q2' ? false : true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -1485,7 +1485,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q3'? (value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)) : Number(handleParent(tableMeta)).toFixed(1)}
value={this.props.quartal == 'q3' ? (value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)) : Number(handleParent(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
/>
......@@ -1504,7 +1504,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q3'? (value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)) : Number(handleFormula(tableMeta)).toFixed(1)}
value={this.props.quartal == 'q3' ? (value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)) : Number(handleFormula(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
......@@ -1522,12 +1522,12 @@ export default class OperatingIndicatorRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quartal == 'q1' || this.props.quartal == 'q2'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quartal == 'q1' || this.props.quartal == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q3'? (value === "0" ? "" : Number(value).toFixed(1)) : Number(value).toFixed(1)}
value={this.props.quartal == 'q3' ? (value === "0" ? "" : Number(value).toFixed(1)) : Number(value).toFixed(1)}
decimalScale={1}
disabled={this.props.quartal == 'q1' || this.props.quartal == 'q2'? false : true}
disabled={this.props.quartal == 'q1' || this.props.quartal == 'q2' ? false : true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -1578,7 +1578,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q3'? (value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)) : Number(handleParent(tableMeta)).toFixed(1)}
value={this.props.quartal == 'q3' ? (value === "0" ? "" : Number(handleParent(tableMeta)).toFixed(1)) : Number(handleParent(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
/>
......@@ -1597,7 +1597,7 @@ export default class OperatingIndicatorRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q3'? (value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)) : Number(handleFormula(tableMeta)).toFixed(1)}
value={this.props.quartal == 'q3' ? (value === "0" ? "" : Number(handleFormula(tableMeta)).toFixed(1)) : Number(handleFormula(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
......@@ -1615,12 +1615,12 @@ export default class OperatingIndicatorRO extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.quartal == 'q1' || this.props.quartal == 'q2'? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.quartal == 'q1' || this.props.quartal == 'q2' ? "#5198ea" : '#555252', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.quartal == 'q3'? (value === "0" ? "" : Number(value).toFixed(1)) : Number(value).toFixed(1)}
value={this.props.quartal == 'q3' ? (value === "0" ? "" : Number(value).toFixed(1)) : Number(value).toFixed(1)}
decimalScale={1}
disabled={this.props.quartal == 'q1' || this.props.quartal == 'q2'? false : true}
disabled={this.props.quartal == 'q1' || this.props.quartal == 'q2' ? false : true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
......@@ -2058,7 +2058,7 @@ export default class OperatingIndicatorRO extends Component {
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.setState({loading: true}, () => {
onClick={() => this.setState({ loading: true }, () => {
this.downloadTemplate()
})}
>
......@@ -2113,14 +2113,17 @@ export default class OperatingIndicatorRO extends Component {
</MuiThemeProvider>
}
</div>
<div style={{display: 'flex'}}>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : </Typography>
<div style={{marginLeft: 10, overflowY: 'scroll', height: 75, marginTop: 10}}>
{this.state.updateBy.reverse().map((item,index) => {
<div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}>
{
this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => {
return (
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10 }}>{item.latest_update}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
)
})}
}) :
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
}
</div>
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10 }}>Notes : {this.state.notesUpdate}</Typography>
......@@ -2151,7 +2154,7 @@ export default class OperatingIndicatorRO extends Component {
<button
type="button"
onClick={() => {
this.setState({loading: true}, () => {
this.setState({ loading: true }, () => {
this.handleGetFor('edit')
})
}}
......
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