Commit 6c714161 authored by Riri Novita's avatar Riri Novita

apdet

parent a8239262
...@@ -258,7 +258,7 @@ const create = (type = "") => { ...@@ -258,7 +258,7 @@ const create = (type = "") => {
const createRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/store_ro_tax_planning', body) const createRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/store_ro_tax_planning', body)
const getRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_operating_indicator_id', body) const getRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_operating_indicator_id', body)
const getHierarkiRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_report_hierarki', body) const getHierarkiRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_report_hierarki', body)
const createRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/create_monthly_report', body) const createRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/create_rolling_outlook', body)
const getLastestUpdateROOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_latest_update', body) const getLastestUpdateROOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_latest_update', body)
......
...@@ -1481,7 +1481,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1481,7 +1481,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1612,7 +1612,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1612,7 +1612,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1743,7 +1743,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1743,7 +1743,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1874,7 +1874,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1874,7 +1874,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2005,7 +2005,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2005,7 +2005,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2136,7 +2136,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2136,7 +2136,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
......
...@@ -61,9 +61,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -61,9 +61,7 @@ export default class OperatingIndicatorRO extends Component {
} }
componentDidMount() { componentDidMount() {
// this.getDataDetail() this.getOperatingIDRolling()
this.getDataDetail()
this.getLatestUpdate()
this.handleViewOnly() this.handleViewOnly()
// // console.log(this.props); // // console.log(this.props);
} }
...@@ -168,19 +166,19 @@ export default class OperatingIndicatorRO extends Component { ...@@ -168,19 +166,19 @@ export default class OperatingIndicatorRO extends Component {
item.level, item.level,
item.description, item.description,
item.uom, item.uom,
item.rolling_outlook.january == "" ? item.rolling_outlook.january : String(item.rolling_outlook.january).indexOf(".") == -1 ? Number(item.rolling_outlook.january) : Number(item.rolling_outlook.january).toFixed(1), item.rolling_outlook.january === "" ? "0" : item.rolling_outlook.january,
item.rolling_outlook.february == "" ? item.rolling_outlook.february : String(item.rolling_outlook.february).indexOf(".") == -1 ? Number(item.rolling_outlook.february) : Number(item.rolling_outlook.february).toFixed(1), item.rolling_outlook.february === "" ? "0" : item.rolling_outlook.february,
item.rolling_outlook.march == "" ? item.rolling_outlook.march : String(item.rolling_outlook.march).indexOf(".") == -1 ? Number(item.rolling_outlook.march) : Number(item.rolling_outlook.march).toFixed(1), item.rolling_outlook.march === "" ? "0" : item.rolling_outlook.march,
item.rolling_outlook.april == "" ? item.rolling_outlook.april : String(item.rolling_outlook.april).indexOf(".") == -1 ? Number(item.rolling_outlook.april) : Number(item.rolling_outlook.april).toFixed(1), item.rolling_outlook.april === "" ? "0" : item.rolling_outlook.april,
item.rolling_outlook.may == "" ? item.rolling_outlook.may : String(item.rolling_outlook.may).indexOf(".") == -1 ? Number(item.rolling_outlook.may) : Number(item.rolling_outlook.may).toFixed(1), item.rolling_outlook.may === "" ? "0" : item.rolling_outlook.may,
item.rolling_outlook.june == "" ? item.rolling_outlook.june : String(item.rolling_outlook.june).indexOf(".") == -1 ? Number(item.rolling_outlook.june) : Number(item.rolling_outlook.june).toFixed(1), item.rolling_outlook.june === "" ? "0" : item.rolling_outlook.june,
item.rolling_outlook.july == "" ? item.rolling_outlook.july : String(item.rolling_outlook.july).indexOf(".") == -1 ? Number(item.rolling_outlook.july) : Number(item.rolling_outlook.july).toFixed(1), item.rolling_outlook.july === "" ? "0" : item.rolling_outlook.july,
item.rolling_outlook.august == "" ? item.rolling_outlook.august : String(item.rolling_outlook.august).indexOf(".") == -1 ? Number(item.rolling_outlook.august) : Number(item.rolling_outlook.august).toFixed(1), item.rolling_outlook.august === "" ? "0" : item.rolling_outlook.august,
item.rolling_outlook.september == "" ? item.rolling_outlook.september : String(item.rolling_outlook.september).indexOf(".") == -1 ? Number(item.rolling_outlook.september) : Number(item.rolling_outlook.september).toFixed(1), item.rolling_outlook.september === "" ? "0" : item.rolling_outlook.september,
item.rolling_outlook.october == "" ? item.rolling_outlook.october : String(item.rolling_outlook.october).indexOf(".") == -1 ? Number(item.rolling_outlook.october) : Number(item.rolling_outlook.october).toFixed(1), item.rolling_outlook.october === "" ? "0" : item.rolling_outlook.october,
item.rolling_outlook.november == "" ? item.rolling_outlook.november : String(item.rolling_outlook.november).indexOf(".") == -1 ? Number(item.rolling_outlook.november) : Number(item.rolling_outlook.november).toFixed(1), item.rolling_outlook.november === "" ? "0" : item.rolling_outlook.november,
item.rolling_outlook.december == "" ? item.rolling_outlook.december : String(item.rolling_outlook.december).indexOf(".") == -1 ? Number(item.rolling_outlook.december) : Number(item.rolling_outlook.december).toFixed(1), item.rolling_outlook.december === "" ? "0" : item.rolling_outlook.december,
item.rolling_outlook.total_current_year == "" ? item.rolling_outlook.total_current_year : String(item.rolling_outlook.total_current_year).indexOf(".") == -1 ? Number(item.rolling_outlook.total_current_year) : Number(item.rolling_outlook.total_current_year).toFixed(1), item.rolling_outlook.total_current_year === "" ? "0" : item.rolling_outlook.total_current_year,
item.order item.order
]) ])
} }
...@@ -201,19 +199,19 @@ export default class OperatingIndicatorRO extends Component { ...@@ -201,19 +199,19 @@ export default class OperatingIndicatorRO extends Component {
item.level, item.level,
item.description, item.description,
item.uom, item.uom,
item.rolling_outlook.january == "" ? item.rolling_outlook.january : String(item.rolling_outlook.january).indexOf(".") == -1 ? Number(item.rolling_outlook.january) : Number(item.rolling_outlook.january).toFixed(1), item.rolling_outlook.january === "" ? "0" : item.rolling_outlook.january,
item.rolling_outlook.february == "" ? item.rolling_outlook.february : String(item.rolling_outlook.february).indexOf(".") == -1 ? Number(item.rolling_outlook.february) : Number(item.rolling_outlook.february).toFixed(1), item.rolling_outlook.february === "" ? "0" : item.rolling_outlook.february,
item.rolling_outlook.march == "" ? item.rolling_outlook.march : String(item.rolling_outlook.march).indexOf(".") == -1 ? Number(item.rolling_outlook.march) : Number(item.rolling_outlook.march).toFixed(1), item.rolling_outlook.march === "" ? "0" : item.rolling_outlook.march,
item.rolling_outlook.april == "" ? item.rolling_outlook.april : String(item.rolling_outlook.april).indexOf(".") == -1 ? Number(item.rolling_outlook.april) : Number(item.rolling_outlook.april).toFixed(1), item.rolling_outlook.april === "" ? "0" : item.rolling_outlook.april,
item.rolling_outlook.may == "" ? item.rolling_outlook.may : String(item.rolling_outlook.may).indexOf(".") == -1 ? Number(item.rolling_outlook.may) : Number(item.rolling_outlook.may).toFixed(1), item.rolling_outlook.may === "" ? "0" : item.rolling_outlook.may,
item.rolling_outlook.june == "" ? item.rolling_outlook.june : String(item.rolling_outlook.june).indexOf(".") == -1 ? Number(item.rolling_outlook.june) : Number(item.rolling_outlook.june).toFixed(1), item.rolling_outlook.june === "" ? "0" : item.rolling_outlook.june,
item.rolling_outlook.july == "" ? item.rolling_outlook.july : String(item.rolling_outlook.july).indexOf(".") == -1 ? Number(item.rolling_outlook.july) : Number(item.rolling_outlook.july).toFixed(1), item.rolling_outlook.july === "" ? "0" : item.rolling_outlook.july,
item.rolling_outlook.august == "" ? item.rolling_outlook.august : String(item.rolling_outlook.august).indexOf(".") == -1 ? Number(item.rolling_outlook.august) : Number(item.rolling_outlook.august).toFixed(1), item.rolling_outlook.august === "" ? "0" : item.rolling_outlook.august,
item.rolling_outlook.september == "" ? item.rolling_outlook.september : String(item.rolling_outlook.september).indexOf(".") == -1 ? Number(item.rolling_outlook.september) : Number(item.rolling_outlook.september).toFixed(1), item.rolling_outlook.september === "" ? "0" : item.rolling_outlook.september,
item.rolling_outlook.october == "" ? item.rolling_outlook.october : String(item.rolling_outlook.october).indexOf(".") == -1 ? Number(item.rolling_outlook.october) : Number(item.rolling_outlook.october).toFixed(1), item.rolling_outlook.october === "" ? "0" : item.rolling_outlook.october,
item.rolling_outlook.november == "" ? item.rolling_outlook.november : String(item.rolling_outlook.november).indexOf(".") == -1 ? Number(item.rolling_outlook.november) : Number(item.rolling_outlook.november).toFixed(1), item.rolling_outlook.november === "" ? "0" : item.rolling_outlook.november,
item.rolling_outlook.december == "" ? item.rolling_outlook.december : String(item.rolling_outlook.december).indexOf(".") == -1 ? Number(item.rolling_outlook.december) : Number(item.rolling_outlook.december).toFixed(1), item.rolling_outlook.december === "" ? "0" : item.rolling_outlook.december,
item.rolling_outlook.total_current_year == "" ? item.rolling_outlook.total_current_year : String(item.rolling_outlook.total_current_year).indexOf(".") == -1 ? Number(item.rolling_outlook.total_current_year) : Number(item.rolling_outlook.total_current_year).toFixed(1), item.rolling_outlook.total_current_year === "" ? "0" : item.rolling_outlook.total_current_year,
item.order item.order
]) ])
if (item.children !== null) { if (item.children !== null) {
...@@ -235,38 +233,38 @@ export default class OperatingIndicatorRO extends Component { ...@@ -235,38 +233,38 @@ export default class OperatingIndicatorRO extends Component {
} }
createData(type) { createData(type) {
let payloadMB = [] let payloadRO = []
this.state.dataTable.map((item, index) => { this.state.dataTable.map((item, index) => {
payloadMB.push({ payloadRO.push({
"item_report_id": item[1], "item_report_id": item[1],
"total_actual_before": String(Number(item[7]).toFixed(1)), "january": String(Number(item[7]).toFixed(1)),
"january": String(Number(item[8]).toFixed(1)), "february": String(Number(item[8]).toFixed(1)),
"february": String(Number(item[9]).toFixed(1)), "march": String(Number(item[9]).toFixed(1)),
"march": String(Number(item[10]).toFixed(1)), "april": String(Number(item[10]).toFixed(1)),
"april": String(Number(item[11]).toFixed(1)), "may": String(Number(item[11]).toFixed(1)),
"may": String(Number(item[12]).toFixed(1)), "june": String(Number(item[12]).toFixed(1)),
"june": String(Number(item[13]).toFixed(1)), "july": String(Number(item[13]).toFixed(1)),
"july": String(Number(item[14]).toFixed(1)), "august": String(Number(item[14]).toFixed(1)),
"august": String(Number(item[15]).toFixed(1)), "september": String(Number(item[15]).toFixed(1)),
"september": String(Number(item[16]).toFixed(1)), "october": String(Number(item[16]).toFixed(1)),
"october": String(Number(item[17]).toFixed(1)), "november": String(Number(item[17]).toFixed(1)),
"november": String(Number(item[18]).toFixed(1)), "december": String(Number(item[18]).toFixed(1)),
"december": String(Number(item[19]).toFixed(1)), "total_current_year": String(Number(item[19]).toFixed(1)),
"total_current_year": String(Number(item[20]).toFixed(1)),
}) })
}) })
let payload = { let payload = {
"operating_indicator_id": this.props.data.operatingIndID, "operating_indicator_id": this.state.operatingIndIDRolling,
"report_id": this.props.data.report_id, "report_id": this.props.data.report_id,
"company_id": this.props.data.company.company_id, "company_id": this.props.data.company.company_id,
"periode": this.props.data.periode, "periode": this.props.data.periode,
"quartal": this.props.quartal,
"status": type, "status": type,
"rolling_outlook": payloadMB "rolling_outlook": payloadRO
} }
console.log(payload); console.log(payload);
// // console.log('=========================') // // console.log('=========================')
// console.log(JSON.stringify(payload)) // console.log(JSON.stringify(payload))
this.props.saveOperatingInd(payload) this.props.saveRollingOI(payload)
this.props.onClickClose() this.props.onClickClose()
} }
...@@ -653,7 +651,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -653,7 +651,7 @@ export default class OperatingIndicatorRO extends Component {
name: "Account", name: "Account",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 300 }}> <TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 300, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'left' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'left' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -733,7 +731,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -733,7 +731,7 @@ export default class OperatingIndicatorRO extends Component {
name: "UOM", name: "UOM",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'black', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'black', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -792,7 +790,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -792,7 +790,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Jan ${this.props.data.periode}`, name: `Jan ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -848,9 +846,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -848,9 +846,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -864,16 +860,15 @@ export default class OperatingIndicatorRO extends Component { ...@@ -864,16 +860,15 @@ export default class OperatingIndicatorRO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} disabled={true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -889,7 +884,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -889,7 +884,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Feb ${this.props.data.periode}`, name: `Feb ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -945,9 +940,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -945,9 +940,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -961,16 +954,15 @@ export default class OperatingIndicatorRO extends Component { ...@@ -961,16 +954,15 @@ export default class OperatingIndicatorRO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} disabled={true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -985,7 +977,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -985,7 +977,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Mar ${this.props.data.periode}`, name: `Mar ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -1041,9 +1033,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1041,9 +1033,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1057,16 +1047,15 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1057,16 +1047,15 @@ export default class OperatingIndicatorRO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} disabled={true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1081,7 +1070,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1081,7 +1070,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Apr ${this.props.data.periode}`, name: `Apr ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -1137,9 +1126,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1137,9 +1126,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1153,16 +1140,15 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1153,16 +1140,15 @@ export default class OperatingIndicatorRO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", 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" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} disabled={this.props.quartal == 'q1'? false : true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1177,7 +1163,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1177,7 +1163,7 @@ export default class OperatingIndicatorRO extends Component {
name: `May ${this.props.data.periode}`, name: `May ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -1233,9 +1219,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1233,9 +1219,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1249,16 +1233,15 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1249,16 +1233,15 @@ export default class OperatingIndicatorRO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", 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" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} disabled={this.props.quartal == 'q1'? false : true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1273,7 +1256,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1273,7 +1256,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Jun ${this.props.data.periode}`, name: `Jun ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -1329,9 +1312,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1329,9 +1312,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1345,16 +1326,15 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1345,16 +1326,15 @@ export default class OperatingIndicatorRO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", 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" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} disabled={this.props.quartal == 'q1'? false : true}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1369,7 +1349,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1369,7 +1349,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Jul ${this.props.data.periode}`, name: `Jul ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -1425,9 +1405,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1425,9 +1405,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1441,16 +1419,15 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1441,16 +1419,15 @@ export default class OperatingIndicatorRO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", 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" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} 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) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1465,7 +1442,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1465,7 +1442,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Aug ${this.props.data.periode}`, name: `Aug ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -1521,9 +1498,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1521,9 +1498,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1537,16 +1512,15 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1537,16 +1512,15 @@ export default class OperatingIndicatorRO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", 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" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} 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) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1561,7 +1535,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1561,7 +1535,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Sep ${this.props.data.periode}`, name: `Sep ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -1617,9 +1591,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1617,9 +1591,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1633,16 +1605,15 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1633,16 +1605,15 @@ export default class OperatingIndicatorRO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", 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" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} 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) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1657,7 +1628,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1657,7 +1628,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Oct ${this.props.data.periode}`, name: `Oct ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -1713,9 +1684,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1713,9 +1684,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1734,11 +1703,10 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1734,11 +1703,10 @@ export default class OperatingIndicatorRO extends Component {
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} disabled={false}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1753,7 +1721,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1753,7 +1721,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Nov ${this.props.data.periode}`, name: `Nov ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -1809,9 +1777,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1809,9 +1777,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1830,11 +1796,10 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1830,11 +1796,10 @@ export default class OperatingIndicatorRO extends Component {
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} disabled={false}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1849,7 +1814,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1849,7 +1814,7 @@ export default class OperatingIndicatorRO extends Component {
name: `Dec ${this.props.data.periode}`, name: `Dec ${this.props.data.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -1905,9 +1870,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1905,9 +1870,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1926,11 +1889,10 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1926,11 +1889,10 @@ export default class OperatingIndicatorRO extends Component {
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} disabled={false}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1942,7 +1904,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -1942,7 +1904,7 @@ export default class OperatingIndicatorRO extends Component {
} }
} }
}, { }, {
name: `31 Dec ${this.props.data.periode}\nTotal`, name: `31 Dec ${this.props.data.periode} Total`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
...@@ -2001,9 +1963,7 @@ export default class OperatingIndicatorRO extends Component { ...@@ -2001,9 +1963,7 @@ export default class OperatingIndicatorRO extends Component {
disabled={true} disabled={true}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
...@@ -2022,11 +1982,10 @@ export default class OperatingIndicatorRO extends Component { ...@@ -2022,11 +1982,10 @@ export default class OperatingIndicatorRO extends Component {
placeholder="" placeholder=""
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit} disabled={false}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}} }}
/> />
} }
......
...@@ -1343,7 +1343,7 @@ export default class ProfitLossROO extends Component { ...@@ -1343,7 +1343,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1441,7 +1441,7 @@ export default class ProfitLossROO extends Component { ...@@ -1441,7 +1441,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1539,7 +1539,7 @@ export default class ProfitLossROO extends Component { ...@@ -1539,7 +1539,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1637,7 +1637,7 @@ export default class ProfitLossROO extends Component { ...@@ -1637,7 +1637,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1735,7 +1735,7 @@ export default class ProfitLossROO extends Component { ...@@ -1735,7 +1735,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1833,7 +1833,7 @@ export default class ProfitLossROO extends Component { ...@@ -1833,7 +1833,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
......
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