Commit da6d2d37 authored by Riri Novita's avatar Riri Novita

issue oi & bs

parent 1038bf3a
......@@ -561,7 +561,8 @@ export default class BalanceSheetMR extends Component {
// console.log(JSON.stringify(payload));
console.log(this.state.dataTable)
api.create().validateSubmitReportBS(payload).then((response) => {
console.log(response)
console.log(response.data.data.result)
console.log(err);
if (response.data) {
if (response.data.status === "success") {
if (response.data.data.result && err === false) {
......@@ -1013,8 +1014,15 @@ export default class BalanceSheetMR extends Component {
<div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(val).toFixed(1)
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
:
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -1076,7 +1084,14 @@ export default class BalanceSheetMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[7]).toFixed(1)
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7]).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
......@@ -1166,7 +1181,14 @@ export default class BalanceSheetMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[8]).toFixed(1)
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
......@@ -1256,7 +1278,14 @@ export default class BalanceSheetMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[9]).toFixed(1)
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1)}
/>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
......@@ -1386,7 +1415,14 @@ export default class BalanceSheetMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[10]).toFixed(1)
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[10]).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
......@@ -1524,7 +1560,14 @@ export default class BalanceSheetMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[11]).toFixed(1)
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11]).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
(Number(handleValueFormula(tableMeta, 11)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 11)).toFixed(1) <= Number(this.state.maxValue)) ?
......@@ -1586,7 +1629,14 @@ export default class BalanceSheetMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[12]).toFixed(1)
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
(Number(handleValueFormula(tableMeta, 12)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 12)).toFixed(1) <= Number(this.state.maxValue)) ?
......@@ -1653,7 +1703,14 @@ export default class BalanceSheetMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[13]).toFixed(1)
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13]).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
(Number(handleValueFormula(tableMeta, 13)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 13)).toFixed(1) <= Number(this.state.maxValue)) ?
......@@ -1715,7 +1772,14 @@ export default class BalanceSheetMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[14]).toFixed(1)
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
(Number(handleValueFormula(tableMeta, 14)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 14)).toFixed(1) <= Number(this.state.maxValue)) ?
......@@ -1782,7 +1846,14 @@ export default class BalanceSheetMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[15]).toFixed(1)
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15]).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
(Number(handleValueFormula(tableMeta, 15)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 15)).toFixed(1) <= Number(this.state.maxValue)) ?
......@@ -1844,7 +1915,14 @@ export default class BalanceSheetMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[16]).toFixed(1)
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[16]).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
(Number(handleValueFormula(tableMeta, 16)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 16)).toFixed(1) <= Number(this.state.maxValue)) ?
......@@ -1947,7 +2025,7 @@ export default class BalanceSheetMR extends Component {
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[0] === 1 ? null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[17]).toFixed(1)
tableMeta.rowData[17]
:
<FormControlLabel
style={{ margin: 0 }}
......@@ -2040,7 +2118,7 @@ export default class BalanceSheetMR extends Component {
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[0] === 1 ? null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[18]).toFixed(1)
tableMeta.rowData[18]
:
<FormControlLabel
style={{ margin: 0 }}
......@@ -2133,7 +2211,7 @@ export default class BalanceSheetMR extends Component {
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[0] === 1 ? null :
this.state.get_for == 'view'?
Number(tableMeta.rowData[19]).toFixed(1)
tableMeta.rowData[19]
:
<FormControlLabel
style={{ margin: 0 }}
......@@ -2512,7 +2590,7 @@ export default class BalanceSheetMR extends Component {
})}
style={{
backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
......
......@@ -780,7 +780,16 @@ export default class OperatingIndicatorMR extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view' ? Number(val).toFixed(1) :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
......@@ -869,7 +878,16 @@ export default class OperatingIndicatorMR extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view' ? Number(tableMeta.rowData[8]).toFixed(1) :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1) }
/>
:
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
......@@ -923,7 +941,16 @@ export default class OperatingIndicatorMR extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view' ? Number(tableMeta.rowData[9]).toFixed(1) :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1) }
/>
:
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
......@@ -978,7 +1005,16 @@ export default class OperatingIndicatorMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
:
this.state.get_for == 'view' ? Number(tableMeta.rowData[10]).toFixed(1) :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[10]).toFixed(1) }
/>
:
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
......@@ -1101,11 +1137,20 @@ export default class OperatingIndicatorMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
:
this.state.get_for == 'view' ? Number(tableMeta.rowData[11]).toFixed(1) :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11]).toFixed(1)}
/>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
value={Number(tableMeta.rowData[11]).toFixed(1)}
control={
<NumberFormat
thousandSeparator={true}
......@@ -1126,11 +1171,20 @@ export default class OperatingIndicatorMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
:
this.state.get_for == 'view' ? Number(tableMeta.rowData[12]).toFixed(1) :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)}
/>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
value={Number(tableMeta.rowData[12]).toFixed(1)}
control={
<NumberFormat
thousandSeparator={true}
......@@ -1156,11 +1210,20 @@ export default class OperatingIndicatorMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
:
this.state.get_for == 'view' ? Number(tableMeta.rowData[13]).toFixed(1) :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13]).toFixed(1)}
/>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
value={Number(tableMeta.rowData[13]).toFixed(1)}
control={
<NumberFormat
thousandSeparator={true}
......@@ -1181,11 +1244,20 @@ export default class OperatingIndicatorMR extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null
:
this.state.get_for == 'view' ? Number(tableMeta.rowData[14]).toFixed(1) :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1)}
/>
:
<div style={{ flex: 1, width: 120 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
value={Number(tableMeta.rowData[14]).toFixed(1)}
control={
<NumberFormat
thousandSeparator={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