Commit 27a5c44f authored by faisalhamdi's avatar faisalhamdi

cat mr

parent 6c2cfeb8
......@@ -1190,7 +1190,9 @@ export default class MonthlyReport extends Component {
periode={this.state.periode.periode}
monthlyReportId={this.state.monthlyReportId}
month={this.state.month}
saveToMonthlyReport={this.saveToMonthlyReport.bind(this)}
onClickClose={() => this.setState({ visibleCAT: false, visibleMonthlyReport: true })}
isApprover={this.state.isApprover}
/>
)}
{this.state.visibleLOCF && (
......
......@@ -7,6 +7,8 @@ import api from '../../api';
import { titleCase } from '../../library/Utils';
import Tooltip from '@material-ui/core/Tooltip';
import NumberFormat from 'react-number-format';
import Constant from '../../library/Constant';
import { Alert, Autocomplete } from '@material-ui/lab';
const LightTooltip = withStyles((theme) => ({
tooltip: {
......@@ -51,15 +53,18 @@ export default class CorporateAnnualTargetMR extends Component {
super(props)
this.state = {
dataTables: [],
loading: true
loading: true,
kpiTypeList: [],
}
}
componentDidMount() {
this.getItemHierarki()
this.getLatestUpdate()
this.getKPIType()
}
getItemHierarki() {
getLatestUpdate() {
let payload = {
"report_id": this.props.report_id,
"revision": Number(this.props.revision),
......@@ -68,39 +73,49 @@ export default class CorporateAnnualTargetMR extends Component {
"monthly_report_id": this.props.monthlyReportId,
"months": this.props.month.month_id
}
api.create().getLastestUpdateMR(payload).then(response => {
if (response.data) {
if (response.data.status === "success") {
this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
getItemHierarki() {
let payload = {
"report_id": this.props.report_id,
"revision": Number(this.props.revision),
"periode": "2021",
"company_id": this.props.company.company_id,
"monthly_report_id": this.props.monthlyReportId,
"months": this.props.month.month_id
}
api.create().getHierarkiMontlyReportCAT(payload).then(response => {
let dataTable = []
let dataCustomerPrs = []
let dataInternalBsn = []
console.log(payload);
console.log(response);
if (response.data) {
let res = response.data.data
const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
if (indexIDzz === -1) {
// let parentTrue = item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || item.parent_name == 'CUSTOMER PERSPECTIVE'
// if (item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE') {
// if (item.type_report_id !== 4) {
// dataInternalBsn.push({
// id: item.id,
// name: item.description,
// check: false
// })
// }
// }
// if (item.parent_name == 'CUSTOMER PERSPECTIVE') {
// if (item.type_report_id !== 4) {
// dataCustomerPrs.push({
// id: item.id,
// name: item.description,
// check: false
// })
// }
// }
dataTable.push([
item.type_report_id,
item.id,
......@@ -108,16 +123,17 @@ export default class CorporateAnnualTargetMR extends Component {
item.formula,
item.level,
item.description,
item.corporate_annual_target.weight === null ? "0" : item.corporate_annual_target.weight === "" ? "0" : item.corporate_annual_target.weight,
item.corporate_annual_target.jenis_kpi === null ? "0" : item.corporate_annual_target.jenis_kpi === "" ? "0" : item.corporate_annual_target.jenis_kpi,
item.corporate_annual_target.max_ach === null ? "0" : item.corporate_annual_target.max_ach === "" ? "0" : item.corporate_annual_target.max_ach,
item.corporate_annual_target.formula_ytd === null ? "0" : item.corporate_annual_target.formula_ytd === "" ? "0" : item.corporate_annual_target.formula_ytd,
item.corporate_annual_target.actual_monthly === null ? "0" : item.corporate_annual_target.actual_monthly === "" ? "0" : item.corporate_annual_target.actual_monthly,
item.corporate_annual_target.target_monthly === null ? "0" : item.corporate_annual_target.target_monthly === "" ? "0" : item.corporate_annual_target.target_monthly,
item.corporate_annual_target.achivement_monthly === null ? "0" : item.corporate_annual_target.achivement_monthly === "" ? "0" : item.corporate_annual_target.achivement_monthly,
item.corporate_annual_target.score === null ? "0" : item.corporate_annual_target.score === "" ? "0" : item.corporate_annual_target.score,
item.corporate_annual_target.score_x_weight === null ? "0" : item.corporate_annual_target.score_x_weight === "" ? "0" : item.corporate_annual_target.score_x_weight,
item.corporate_annual_target.notes === null ? "0" : item.corporate_annual_target.notes === "" ? "0" : item.corporate_annual_target.notes,
item.corporate_annual_target.weight === null ? "0" : item.corporate_annual_target.weight === "" ? "" : item.corporate_annual_target.weight,
item.corporate_annual_target.oum === null ? "0" : item.corporate_annual_target.oum === "" ? "6" : item.corporate_annual_target.uom,
item.corporate_annual_target.jenis_kpi === null ? "0" : item.corporate_annual_target.jenis_kpi === "" ? "7" : item.corporate_annual_target.jenis_kpi,
item.corporate_annual_target.max_ach === null ? "0" : item.corporate_annual_target.max_ach === "" ? "8" : item.corporate_annual_target.max_ach,
item.corporate_annual_target.formula_ytd === null ? "0" : item.corporate_annual_target.formula_ytd === "" ? "9" : item.corporate_annual_target.formula_ytd,
item.corporate_annual_target.actual_monthly === null ? "0" : item.corporate_annual_target.actual_monthly === "" ? "10" : item.corporate_annual_target.actual_monthly,
item.corporate_annual_target.target_monthly === null ? "0" : item.corporate_annual_target.target_monthly === "" ? "11" : item.corporate_annual_target.target_monthly,
item.corporate_annual_target.achivement_monthly === null ? "0" : item.corporate_annual_target.achivement_monthly === "" ? "12" : item.corporate_annual_target.achivement_monthly,
item.corporate_annual_target.score === null ? "0" : item.corporate_annual_target.score === "" ? "13" : item.corporate_annual_target.score,
item.corporate_annual_target.score_x_weight === null ? "0" : item.corporate_annual_target.score_x_weight === "" ? "14" : item.corporate_annual_target.score_x_weight,
item.corporate_annual_target.notes === null ? "0" : item.corporate_annual_target.notes === "" ? "15" : item.corporate_annual_target.notes,
])
}
if (item.children !== null) {
......@@ -134,17 +150,19 @@ export default class CorporateAnnualTargetMR extends Component {
item.id,
item.parent,
item.formula,
item.level,
item.description,
item.corporate_annual_target.weight === null ? "0" : item.corporate_annual_target.weight === "" ? "0" : item.corporate_annual_target.weight,
item.corporate_annual_target.jenis_kpi === null ? "0" : item.corporate_annual_target.jenis_kpi === "" ? "0" : item.corporate_annual_target.jenis_kpi,
item.corporate_annual_target.max_ach === null ? "0" : item.corporate_annual_target.max_ach === "" ? "0" : item.corporate_annual_target.max_ach,
item.corporate_annual_target.formula_ytd === null ? "0" : item.corporate_annual_target.formula_ytd === "" ? "0" : item.corporate_annual_target.formula_ytd,
item.corporate_annual_target.actual_monthly === null ? "0" : item.corporate_annual_target.actual_monthly === "" ? "0" : item.corporate_annual_target.actual_monthly,
item.corporate_annual_target.target_monthly === null ? "0" : item.corporate_annual_target.target_monthly === "" ? "0" : item.corporate_annual_target.target_monthly,
item.corporate_annual_target.achivement_monthly === null ? "0" : item.corporate_annual_target.achivement_monthly === "" ? "0" : item.corporate_annual_target.achivement_monthly,
item.corporate_annual_target.score === null ? "0" : item.corporate_annual_target.score === "" ? "0" : item.corporate_annual_target.score,
item.corporate_annual_target.score_x_weight === null ? "0" : item.corporate_annual_target.score_x_weight === "" ? "0" : item.corporate_annual_target.score_x_weight,
item.corporate_annual_target.notes === null ? "0" : item.corporate_annual_target.notes === "" ? "0" : item.corporate_annual_target.notes,
item.corporate_annual_target.weight === null ? "0" : item.corporate_annual_target.weight === "" ? "" : item.corporate_annual_target.weight,
item.corporate_annual_target.oum === null ? "0" : item.corporate_annual_target.oum === "" ? "6" : item.corporate_annual_target.uom,
item.corporate_annual_target.jenis_kpi === null ? "0" : item.corporate_annual_target.jenis_kpi === "" ? "7" : item.corporate_annual_target.jenis_kpi,
item.corporate_annual_target.max_ach === null ? "0" : item.corporate_annual_target.max_ach === "" ? "8" : item.corporate_annual_target.max_ach,
item.corporate_annual_target.formula_ytd === null ? "0" : item.corporate_annual_target.formula_ytd === "" ? "9" : item.corporate_annual_target.formula_ytd,
item.corporate_annual_target.actual_monthly === null ? "0" : item.corporate_annual_target.actual_monthly === "" ? "10" : item.corporate_annual_target.actual_monthly,
item.corporate_annual_target.target_monthly === null ? "0" : item.corporate_annual_target.target_monthly === "" ? "11" : item.corporate_annual_target.target_monthly,
item.corporate_annual_target.achivement_monthly === null ? "0" : item.corporate_annual_target.achivement_monthly === "" ? "12" : item.corporate_annual_target.achivement_monthly,
item.corporate_annual_target.score === null ? "0" : item.corporate_annual_target.score === "" ? "13" : item.corporate_annual_target.score,
item.corporate_annual_target.score_x_weight === null ? "0" : item.corporate_annual_target.score_x_weight === "" ? "14" : item.corporate_annual_target.score_x_weight,
item.corporate_annual_target.notes === null ? "0" : item.corporate_annual_target.notes === "" ? "15" : item.corporate_annual_target.notes,
])
if (item.children !== null) {
if (item.children.length > 0) {
......@@ -162,6 +180,51 @@ export default class CorporateAnnualTargetMR extends Component {
})
}
getKPIType() {
let body = {
group: 'CAT',
company_id: this.props.company.company_id,
type: 'KPI_TYPE'
}
api.create().getAllSettingByType(body).then(response => {
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
let data = response.data.data
// // // console.log(data)
let inputKPI = []
data.map((item) => {
inputKPI.push({
value: item.value
})
})
let defaultProps = {
options: inputKPI,
getOptionLabel: (option) => titleCase(option.value),
};
// // // console.log(defaultProps)
this.setState({ kpiTypeList: defaultProps })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
}
})
}
render() {
let dataTable2 = this.state.dataTable
let dataDelete = this.state.dataDelete
......@@ -202,17 +265,20 @@ export default class CorporateAnnualTargetMR extends Component {
dataTable2[tableMeta.rowIndex][25] = (valz == 'SUM' ? total : (valz == 'AVG' ? (total / 12) : lastValz))
}
}
const handleValueDropdown = (value, type, tableMeta) => {
let data = type == 'KPI'? this.state.kpiTypeList.options : (type == 'MAX'? this.state.maxAchList.options : this.state.formulaYtdList.options)
// console.log(value,type, tableMeta);
let data = type == 'KPI' ? this.state.kpiTypeList.options : (type == 'MAX' ? this.state.maxAchList.options : this.state.formulaYtdList.options)
console.log(data);
let index = 0
if (value == null) {
index = -1
} else {
index = data.findIndex((val) => val.value == value.value)
}
// // console.log(value)
// // console.log(data)
// // console.log(index)
console.log(value)
console.log(data)
console.log(index)
if (index == -1) {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = null
return null
......@@ -396,12 +462,12 @@ export default class CorporateAnnualTargetMR extends Component {
display: false
}
},
// {
// name: "",
// options: {
// display: false
// }
// },
{
name: "",
options: {
display: false
}
},
{
name: "Key Performance Indicator",
options: {
......@@ -413,66 +479,62 @@ export default class CorporateAnnualTargetMR extends Component {
setCellProps: () => ({ style }),
customBodyRender: (val, tableMeta) => {
return (
// handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta) && (tableMeta.rowData[1] == "" || String(this.props.status).toLocaleLowerCase() == 'draft' || String(this.props.status).toLocaleLowerCase() == 'submitted' || String(this.props.status).toLocaleLowerCase() == 'revision')?
// <div style={{ textAlign: 'left', paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// {!this.state.loading && <FormControlLabel
// style={{ margin: 0 }}
// control={
// <Input
// disableUnderline={true}
// style={{ color: tableMeta.rowData[1] == "" ? "#5198ea" : "black", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// defaultValue={val}
// // disabled={!handleAction(tableMeta.rowData[2])}
// onBlur={(event) => {
// // // console.log(event.target.value)
// handleChangeText(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />}
// </div>
// :
// <div style={{ width: 300 }}>
// {tableMeta.rowData[30] ?
// tableMeta.rowData[30].length > 0 ?
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <LightTooltip title={"Report Items Not Registered"} arrow>
// <span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </LightTooltip>
// </div>
// :
// tableMeta.rowData[4] == 0 ?
// <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
// :
// tableMeta.rowData[1] == null ?
// <div style={{ paddingLeft: 20 }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
// :
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
// :
// tableMeta.rowData[4] == 0 ?
// <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
// :
// tableMeta.rowData[1] == null ?
// <div style={{ paddingLeft: 20 }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
// :
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
// }
// </div>
<div style={{ width: 300 }}>
{val}
</div>
handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta) && (tableMeta.rowData[1] == "" || String(this.props.status).toLocaleLowerCase() == 'draft' || String(this.props.status).toLocaleLowerCase() == 'submitted' || String(this.props.status).toLocaleLowerCase() == 'revision')?
<div style={{ textAlign: 'left', paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
{!this.state.loading && <FormControlLabel
style={{ margin: 0 }}
control={
<Input
disableUnderline={true}
style={{ color: tableMeta.rowData[1] == "" ? "#5198ea" : "black", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
type="text"
placeholder=""
defaultValue={val}
// disabled={!handleAction(tableMeta.rowData[2])}
onBlur={(event) => {
// // console.log(event.target.value)
handleChangeText(event.target.value, tableMeta)
// console.log(dataTable2)
}}
/>
}
/>}
</div>
:
<div style={{ width: 300 }}>
{tableMeta.rowData[30] ?
tableMeta.rowData[30].length > 0 ?
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<LightTooltip title={"Report Items Not Registered"} arrow>
<span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</LightTooltip>
</div>
:
tableMeta.rowData[4] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
:
tableMeta.rowData[1] == null ?
<div style={{ paddingLeft: 20 }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div>
:
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div>
:
tableMeta.rowData[4] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
:
tableMeta.rowData[1] == null ?
<div style={{ paddingLeft: 20 }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div>
:
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div>
}
</div>
)
}
}
......@@ -490,31 +552,31 @@ export default class CorporateAnnualTargetMR extends Component {
<div style={{ textAlign: 'center' }}>
{tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 1 ?
value
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
suffix="%"
style={{ color: "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 60, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={value}
disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
maxLength={4}
onBlur={(event) => {
// updateValue(some)
handleChangePercentage(event.target.value, tableMeta)
}}
/>
}
/>
</div>
// tableMeta.rowData[0] === 1 ?
value
// :
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// suffix="%"
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 60, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={value}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// maxLength={4}
// onBlur={(event) => {
// // updateValue(some)
// handleChangePercentage(event.target.value, tableMeta)
// }}
// />
// }
// />
// </div>
}
</div>
)
......@@ -591,7 +653,7 @@ export default class CorporateAnnualTargetMR extends Component {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ width: 96 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<Autocomplete
{...this.state.kpiTypeList}
......@@ -599,7 +661,8 @@ export default class CorporateAnnualTargetMR extends Component {
onChange={(event, newInputValue) => handleChangeDropdown(newInputValue, tableMeta)}
debug
disableClearable
disabled={!handleAction(tableMeta.rowData[2], tableMeta.rowData[0])}
// disabled={!handleAction(tableMeta.rowData[2], tableMeta.rowData[0])}
disabled={false}
value={handleValueDropdown(val, 'KPI', tableMeta)}
style={{ padding: 0, margin: 0 }}
renderInput={(params) =>
......@@ -608,11 +671,8 @@ export default class CorporateAnnualTargetMR extends Component {
</div>
}
/>
} */}
<div style={{ textAlign: 'center', width: 90 }}>
{val}
</div>
// val
}
</div>
)
}
......@@ -628,7 +688,7 @@ export default class CorporateAnnualTargetMR extends Component {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ textAlign: 'center', width: 60 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<Autocomplete
{...this.state.maxAchList}
......@@ -636,7 +696,7 @@ export default class CorporateAnnualTargetMR extends Component {
onChange={(event, newInputValue) => handleChangeDropdown(newInputValue, tableMeta)}
debug
disableClearable
value={handleValueDropdown(val, 'MAX', tableMeta)}
// value={handleValueDropdown(val, 'MAX', tableMeta)}
style={{ padding: 0, margin: 0 }}
disabled={!handleAction(tableMeta.rowData[2], tableMeta.rowData[0])}
renderInput={(params) =>
......@@ -646,8 +706,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
// value={this.state.parent}
/>
} */}
{val}
}
</div>
)
}
......@@ -663,7 +722,7 @@ export default class CorporateAnnualTargetMR extends Component {
customBodyRender: (val, tableMeta, updateValue) => {
return (
<div style={{ width: 60 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<Autocomplete
{...this.state.formulaYtdList}
......@@ -675,7 +734,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
debug
disableClearable
value={handleValueDropdown(val, 'FORMULA', tableMeta)}
// value={handleValueDropdown(val, 'FORMULA', tableMeta)}
disabled={!handleAction(tableMeta.rowData[2], tableMeta.rowData[0])}
style={{ padding: 0, margin: 0 }}
renderInput={(params) =>
......@@ -685,8 +744,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
// value={this.state.parent}
/>
} */}
{val}
}
</div>
)
}
......@@ -743,7 +801,7 @@ export default class CorporateAnnualTargetMR extends Component {
customBodyRender: (value, tableMeta) => {
return (
<div style={{ width: 75 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<FormControlLabel
style={{ margin: 0 }}
......@@ -765,8 +823,7 @@ export default class CorporateAnnualTargetMR extends Component {
/>
}
/>
} */}
{value}
}
</div>
)
}
......@@ -782,7 +839,7 @@ export default class CorporateAnnualTargetMR extends Component {
customBodyRender: (value, tableMeta) => {
return (
<div style={{ width: 75 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<FormControlLabel
style={{ margin: 0 }}
......@@ -804,8 +861,7 @@ export default class CorporateAnnualTargetMR extends Component {
/>
}
/>
} */}
{value}
}
</div>
)
}
......@@ -821,7 +877,7 @@ export default class CorporateAnnualTargetMR extends Component {
customBodyRender: (value, tableMeta) => {
return (
<div style={{ width: 70 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<FormControlLabel
style={{ margin: 0 }}
......@@ -843,8 +899,7 @@ export default class CorporateAnnualTargetMR extends Component {
/>
}
/>
} */}
{value}
}
</div>
)
}
......@@ -860,7 +915,7 @@ export default class CorporateAnnualTargetMR extends Component {
customBodyRender: (value, tableMeta) => {
return (
<div style={{ width: 75 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<FormControlLabel
style={{ margin: 0 }}
......@@ -882,8 +937,7 @@ export default class CorporateAnnualTargetMR extends Component {
/>
}
/>
} */}
{value}
}
</div>
)
}
......@@ -929,10 +983,6 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
]
let data = [
["Revenue", "0%", "Rp Bio", "HIG", "unlimited", "SUM", "input", "result", "result", "result", "result", "Lorem ipsum" ],
// ["Total Assets", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22" ]
]
return (
<div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}>
......
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