import React, { Component } from 'react'; import { Typography, Paper, createMuiTheme, MuiThemeProvider, TableCell, FormControlLabel, TextField, Input } from '@material-ui/core'; import MUIDataTable from 'mui-datatables'; import NumberFormat from 'react-number-format'; import api from '../../api'; import AddIcon from '@material-ui/icons/Add'; import { values } from 'ramda'; import PropagateLoader from "react-spinners/PropagateLoader" import Images from '../../assets/Images'; import ReactTooltip from 'react-tooltip'; var ct = require("../../library/CustomTable"); const getMuiTheme = () => createMuiTheme(ct.customTable()); const options = ct.customOptionsFixedColumn(); const style = { position: "sticky", left: 0, background: "white", zIndex: 101, }; const style2 = { position: "sticky", background: "white", zIndex: 100 }; export default class CorporateAnnualTarget extends Component { constructor(props) { super(props) this.state = { dataTable: [ // ["FINANCIAL PERSPECTIVE", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181"], // ["Control", "-", "-"], // ["Accumulated Depreciation (negative value)", "2,647,647", "2,058,898"], // ["Control", "-", "-"], // ["Gain / (Loss) on Fixed Assets", "-", "-"], // ["Control", "-", "-"] ] } this.handleValue = this.handleValue.bind(this) } componentDidMount() { this.getItemHierarki() console.log(this.props); } getItemHierarki() { this.setState({ loading: true }) let payload = { "report_id": this.props.report_id, "revision": Number(this.props.revision), "periode": this.props.periode, "company_id": this.props.company.company_id, "submission_id": this.props.submissionID } api.create().getDetailReportMB(payload).then(response => { console.log(response); if (response.data) { if (response.data.status === "success") { let dataTable = [] response.data.data.map((item, index) => { if (item.children && item.children.length > 0) { dataTable.push([ item.type_report_id, item.id, item.parent, item.formula, item.level, item.description, item.cat.weight, item.cat.uom, item.cat.kpi_type, item.cat.max_ach, item.cat.formula, item.cat.total_actual_before, item.cat.january, item.cat.february, item.cat.march, item.cat.april, item.cat.may, item.cat.june, item.cat.july, item.cat.august, item.cat.september, item.cat.october, item.cat.november, item.cat.december, item.cat.total_current_year, item.cat.total_next_year, item.cat.total_more_year, item.cat.pic ]) item.children.map(i => { if (i.children) { if (i.children.length > 0) { dataTable.push([ i.type_report_id, i.id, i.parent, i.formula, i.level, i.description, i.cat.weight, i.cat.uom, i.cat.kpi_type, i.cat.max_ach, i.cat.formula, i.cat.total_actual_before, i.cat.january, i.cat.february, i.cat.march, i.cat.april, i.cat.may, i.cat.june, i.cat.july, i.cat.august, i.cat.september, i.cat.october, i.cat.november, i.cat.december, i.cat.total_current_year, i.cat.total_next_year, i.cat.total_more_year, i.cat.pic ]) i.children.map(val => { if (val.children && val.children.length > 0) { dataTable.push([ val.type_report_id, val.id, val.parent, val.formula, val.level, val.description, val.cat.weight, val.cat.uom, val.cat.kpi_type, val.cat.max_ach, val.cat.formula, val.cat.total_actual_before, val.cat.january, val.cat.february, val.cat.march, val.cat.april, val.cat.may, val.cat.june, val.cat.july, val.cat.august, val.cat.september, val.cat.october, val.cat.november, val.cat.december, val.cat.total_current_year, val.cat.total_next_year, val.cat.total_more_year, val.cat.pic ]) val.children.map(items => { if (items.children && items.children.length > 0) { dataTable.push([ items.type_report_id, items.id, items.parent, items.formula, items.level, items.description, items.cat.weight, items.cat.uom, items.cat.kpi_type, items.cat.max_ach, items.cat.formula, items.cat.total_actual_before, items.cat.january, items.cat.february, items.cat.march, items.cat.april, items.cat.may, items.cat.june, items.cat.july, items.cat.august, items.cat.september, items.cat.october, items.cat.november, items.cat.december, items.cat.total_current_year, items.cat.total_next_year, items.cat.total_more_year, items.cat.pic ]) items.children.map(itemss => { if (itemss.children && itemss.children.length > 0) { dataTable.push([ itemss.type_report_id, itemss.id, itemss.parent, itemss.formula, itemss.level, itemss.description, itemss.cat.weight, itemss.cat.uom, itemss.cat.kpi_type, itemss.cat.max_ach, itemss.cat.formula, itemss.cat.total_actual_before, itemss.cat.january, itemss.cat.february, itemss.cat.march, itemss.cat.april, itemss.cat.may, itemss.cat.june, itemss.cat.july, itemss.cat.august, itemss.cat.september, itemss.cat.october, itemss.cat.november, itemss.cat.december, itemss.cat.total_current_year, itemss.cat.total_next_year, itemss.cat.total_more_year, itemss.cat.pic ]) itemss.children.map(item1 => { if (item1.children && item1.children.length > 0) { dataTable.push([ item1.type_report_id, item1.id, item1.parent, item1.formula, item1.level, item1.description, item1.cat.weight, item1.cat.uom, item1.cat.kpi_type, item1.cat.max_ach, item1.cat.formula, item1.cat.total_actual_before, item1.cat.january, item1.cat.february, item1.cat.march, item1.cat.april, item1.cat.may, item1.cat.june, item1.cat.july, item1.cat.august, item1.cat.september, item1.cat.october, item1.cat.november, item1.cat.december, item1.cat.total_current_year, item1.cat.total_next_year, item1.cat.total_more_year, item1.cat.pic ]) item1.children.map(item2 => { if (item2.children && item2.children.length > 0) { dataTable.push([ item2.type_report_id, item2.id, item2.parent, item2.formula, item2.level, item2.description, item2.cat.weight, item2.cat.uom, item2.cat.kpi_type, item2.cat.max_ach, item2.cat.formula, item2.cat.total_actual_before, item2.cat.january, item2.cat.february, item2.cat.march, item2.cat.april, item2.cat.may, item2.cat.june, item2.cat.july, item2.cat.august, item2.cat.september, item2.cat.october, item2.cat.november, item2.cat.december, item2.cat.total_current_year, item2.cat.total_next_year, item2.cat.total_more_year, item2.cat.pic ]) item2.children.map(item3 => { if (item3.children && item3.children.length > 0) { dataTable.push([ item3.type_report_id, item3.id, item3.parent, item3.formula, item3.level, item3.description, item3.cat.weight, item3.cat.uom, item3.cat.kpi_type, item3.cat.max_ach, item3.cat.formula, item3.cat.total_actual_before, item3.cat.january, item3.cat.february, item3.cat.march, item3.cat.april, item3.cat.may, item3.cat.june, item3.cat.july, item3.cat.august, item3.cat.september, item3.cat.october, item3.cat.november, item3.cat.december, item3.cat.total_current_year, item3.cat.total_next_year, item3.cat.total_more_year, item3.cat.pic ]) item3.children.map(item4 => { if (item4.children && item4.children.length > 0) { dataTable.push([ item4.type_report_id, item4.id, item4.parent, item4.formula, item4.level, item4.description, item4.cat.weight, item4.cat.uom, item4.cat.kpi_type, item4.cat.max_ach, item4.cat.formula, item4.cat.total_actual_before, item4.cat.january, item4.cat.february, item4.cat.march, item4.cat.april, item4.cat.may, item4.cat.june, item4.cat.july, item4.cat.august, item4.cat.september, item4.cat.october, item4.cat.november, item4.cat.december, item4.cat.total_current_year, item4.cat.total_next_year, item4.cat.total_more_year, item4.cat.pic ]) item4.children.map(item5 => { if (item5.children && item5.children.length > 0) { dataTable.push([ item5.type_report_id, item5.id, item5.parent, item5.formula, item5.level, item5.description, item5.cat.weight, item5.cat.uom, item5.cat.kpi_type, item5.cat.max_ach, item5.cat.formula, item5.cat.total_actual_before, item5.cat.january, item5.cat.february, item5.cat.march, item5.cat.april, item5.cat.may, item5.cat.june, item5.cat.july, item5.cat.august, item5.cat.september, item5.cat.october, item5.cat.november, item5.cat.december, item5.cat.total_current_year, item5.cat.total_next_year, item5.cat.total_more_year, item5.cat.pic ]) item5.children.map(item6 => { if (item6.children && item.children.length > 0) { dataTable.push([ item6.type_report_id, item6.id, item6.parent, item6.formula, item6.level, item6.description, item6.cat.weight, item6.cat.uom, item6.cat.kpi_type, item6.cat.max_ach, item6.cat.formula, item6.cat.total_actual_before, item6.cat.january, item6.cat.february, item6.cat.march, item6.cat.april, item6.cat.may, item6.cat.june, item6.cat.july, item6.cat.august, item6.cat.september, item6.cat.october, item6.cat.november, item6.cat.december, item6.cat.total_current_year, item6.cat.total_next_year, item6.cat.total_more_year, item6.cat.pic ]) } else { dataTable.push([ item6.type_report_id, item6.id, item6.parent, item6.formula, item6.level, item6.description, item6.cat.weight, item6.cat.uom, item6.cat.kpi_type, item6.cat.max_ach, item6.cat.formula, item6.cat.total_actual_before, item6.cat.january, item6.cat.february, item6.cat.march, item6.cat.april, item6.cat.may, item6.cat.june, item6.cat.july, item6.cat.august, item6.cat.september, item6.cat.october, item6.cat.november, item6.cat.december, item6.cat.total_current_year, item6.cat.total_next_year, item6.cat.total_more_year, item6.cat.pic ]) } }) } else { dataTable.push([ item5.type_report_id, item5.id, item5.parent, item5.formula, item5.level, item5.description, item5.cat.weight, item5.cat.uom, item5.cat.kpi_type, item5.cat.max_ach, item5.cat.formula, item5.cat.total_actual_before, item5.cat.january, item5.cat.february, item5.cat.march, item5.cat.april, item5.cat.may, item5.cat.june, item5.cat.july, item5.cat.august, item5.cat.september, item5.cat.october, item5.cat.november, item5.cat.december, item5.cat.total_current_year, item5.cat.total_next_year, item5.cat.total_more_year, item5.cat.pic ]) } }) } else { dataTable.push([ item4.type_report_id, item4.id, item4.parent, item4.formula, item4.level, item4.description, item4.cat.weight, item4.cat.uom, item4.cat.kpi_type, item4.cat.max_ach, item4.cat.formula, item4.cat.total_actual_before, item4.cat.january, item4.cat.february, item4.cat.march, item4.cat.april, item4.cat.may, item4.cat.june, item4.cat.july, item4.cat.august, item4.cat.september, item4.cat.october, item4.cat.november, item4.cat.december, item4.cat.total_current_year, item4.cat.total_next_year, item4.cat.total_more_year, item4.cat.pic ]) } }) } else { dataTable.push([ item3.type_report_id, item3.id, item3.parent, item3.formula, item3.level, item3.description, item3.cat.weight, item3.cat.uom, item3.cat.kpi_type, item3.cat.max_ach, item3.cat.formula, item3.cat.total_actual_before, item3.cat.january, item3.cat.february, item3.cat.march, item3.cat.april, item3.cat.may, item3.cat.june, item3.cat.july, item3.cat.august, item3.cat.september, item3.cat.october, item3.cat.november, item3.cat.december, item3.cat.total_current_year, item3.cat.total_next_year, item3.cat.total_more_year, item3.cat.pic ]) } }) } else { dataTable.push([ item2.type_report_id, item2.id, item2.parent, item2.formula, item2.level, item2.description, item2.cat.weight, item2.cat.uom, item2.cat.kpi_type, item2.cat.max_ach, item2.cat.formula, item2.cat.total_actual_before, item2.cat.january, item2.cat.february, item2.cat.march, item2.cat.april, item2.cat.may, item2.cat.june, item2.cat.july, item2.cat.august, item2.cat.september, item2.cat.october, item2.cat.november, item2.cat.december, item2.cat.total_current_year, item2.cat.total_next_year, item2.cat.total_more_year, item2.cat.pic ]) } }) } else { dataTable.push([ item1.type_report_id, item1.id, item1.parent, item1.formula, item1.level, item1.description, item1.cat.weight, item1.cat.uom, item1.cat.kpi_type, item1.cat.max_ach, item1.cat.formula, item1.cat.total_actual_before, item1.cat.january, item1.cat.february, item1.cat.march, item1.cat.april, item1.cat.may, item1.cat.june, item1.cat.july, item1.cat.august, item1.cat.september, item1.cat.october, item1.cat.november, item1.cat.december, item1.cat.total_current_year, item1.cat.total_next_year, item1.cat.total_more_year, item1.cat.pic ]) } }) } else { dataTable.push([ itemss.type_report_id, itemss.id, itemss.parent, itemss.formula, itemss.level, itemss.description, itemss.cat.weight, itemss.cat.uom, itemss.cat.kpi_type, itemss.cat.max_ach, itemss.cat.formula, itemss.cat.total_actual_before, itemss.cat.january, itemss.cat.february, itemss.cat.march, itemss.cat.april, itemss.cat.may, itemss.cat.june, itemss.cat.july, itemss.cat.august, itemss.cat.september, itemss.cat.october, itemss.cat.november, itemss.cat.december, itemss.cat.total_current_year, itemss.cat.total_next_year, itemss.cat.total_more_year, itemss.cat.pic ]) } }) } else { dataTable.push([ items.type_report_id, items.id, items.parent, items.formula, items.level, items.description, items.cat.weight, items.cat.uom, items.cat.kpi_type, items.cat.max_ach, items.cat.formula, items.cat.total_actual_before, items.cat.january, items.cat.february, items.cat.march, items.cat.april, items.cat.may, items.cat.june, items.cat.july, items.cat.august, items.cat.september, items.cat.october, items.cat.november, items.cat.december, items.cat.total_current_year, items.cat.total_next_year, items.cat.total_more_year, items.cat.pic ]) } }) } else { dataTable.push([ val.type_report_id, val.id, val.parent, val.formula, val.level, val.description, val.cat.weight, val.cat.uom, val.cat.kpi_type, val.cat.max_ach, val.cat.formula, val.cat.total_actual_before, val.cat.january, val.cat.february, val.cat.march, val.cat.april, val.cat.may, val.cat.june, val.cat.july, val.cat.august, val.cat.september, val.cat.october, val.cat.november, val.cat.december, val.cat.total_current_year, val.cat.total_next_year, val.cat.total_more_year, val.cat.pic ]) } }) } else { dataTable.push([ i.type_report_id, i.id, i.parent, i.formula, i.level, i.description, i.cat.weight, i.cat.uom, i.cat.kpi_type, i.cat.max_ach, i.cat.formula, i.cat.total_actual_before, i.cat.january, i.cat.february, i.cat.march, i.cat.april, i.cat.may, i.cat.june, i.cat.july, i.cat.august, i.cat.september, i.cat.october, i.cat.november, i.cat.december, i.cat.total_current_year, i.cat.total_next_year, i.cat.total_more_year, i.cat.pic ]) } } else { dataTable.push([ i.type_report_id, i.id, i.parent, i.formula, i.level, i.description, i.cat.weight, i.cat.uom, i.cat.kpi_type, i.cat.max_ach, i.cat.formula, i.cat.total_actual_before, i.cat.january, i.cat.february, i.cat.march, i.cat.april, i.cat.may, i.cat.june, i.cat.july, i.cat.august, i.cat.september, i.cat.october, i.cat.november, i.cat.december, i.cat.total_current_year, i.cat.total_next_year, i.cat.total_more_year, i.cat.pic ]) } }) } else { dataTable.push([ item.type_report_id, item.id, item.parent, item.formula, item.level, item.description, item.cat.weight, item.cat.uom, item.cat.kpi_type, item.cat.max_ach, item.cat.formula, item.cat.total_actual_before, item.cat.january, item.cat.february, item.cat.march, item.cat.april, item.cat.may, item.cat.june, item.cat.july, item.cat.august, item.cat.september, item.cat.october, item.cat.november, item.cat.december, item.cat.total_current_year, item.cat.total_next_year, item.cat.total_more_year, item.cat.pic ]) } }) console.log(dataTable); this.setState({ dataTable, loading: false }) } } else { this.setState({ loading: false }) } }) } handleValue(data) { let total = 0 this.state.dataTable.map((item, index) => { if (data.rowData[1] == item[2]) { total = item[data.columnIndex] == undefined ? (Number(total) + 0) : (Number(total) + Number(item[data.columnIndex])) } }) let indexParent = this.state.dataTable.findIndex((val) => val[1] == this.state.dataTable[data.rowIndex][2]) let a = this.state.dataTable[data.rowIndex][data.columnIndex] = total // console.log(indexParent); return a } handleChange(value, tableMeta) { let val = String(value).split(",").join("") let data = this.state.dataTable let indexParent = data.findIndex((val) => val[1] == data[tableMeta.rowIndex][2]) if (indexParent > 0) { // console.log(indexParent) let a = data[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) let jagain = data[indexParent][tableMeta.columnIndex] a = data[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val)) } else { data[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) } // this.forceUpdate() // console.log(this.state.dataTable) // this.setState({ // data: a, // }, () => console.log(this.state.dataTable)) } backToMasterBudget(type) { let data = [] this.state.dataTable.map(i => { data.push({ item_report_id: i[1], total_actual_before: String(i[6]), january: String(i[7]), february: String(i[8]), march: String(i[9]), april: String(i[10]), may: String(i[11]), june: String(i[12]), july: String(i[13]), august: String(i[14]), september: String(i[15]), october: String(i[16]), november: String(i[17]), december: String(i[18]), total_current_year: String(i[19]), total_next_year: String(i[20]), total_more_year: String(i[21]) }) }) let payload = { "submission_id": this.props.submissionID, "company_id": this.props.company.company_id, "periode": this.props.periode, "report_id": this.props.report_id, "status": type, "balance_sheet": data } // console.log(data); this.props.saveToMasterBudget(payload) this.props.onClickClose() } render() { let dataTable2 = this.state.dataTable const handleChange = (value, tableMeta) => { let val = String(value).split(",").join("") // let data = this.state.dataTable2 let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2]) if (indexParent > 0) { // console.log(indexParent) let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) let jagain = dataTable2[indexParent][tableMeta.columnIndex] a = dataTable2[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val)) } else { dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) } } const handleValue = (data) => { let total = 0 dataTable2.map((item, index) => { if (data.rowData[1] == item[2]) { total = item[data.columnIndex] == undefined ? (Number(total) + 0) : (Number(total) + Number(item[data.columnIndex])) } }) let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[data.rowIndex][2]) let a = dataTable2[data.rowIndex][data.columnIndex] = Number(total) // console.log(indexParent); return a } const handleFormula = (data, tableMeta) => { let arrayFormula = tableMeta.rowData[3].match(/[a-zA-Z]+|[0-9]+|[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]+(?:\.[0-9]+@|)/g) let arrayJumlah = [] arrayFormula.map((item, indexs) => { let index = dataTable2.findIndex((val) => val[1] == item) if (index > 0) { arrayJumlah.push(dataTable2[index][tableMeta.columnIndex]) } else { arrayJumlah.push(item) } // if (indexs % 2 !== 0) { // operator.push(item) // } }) let array = arrayJumlah let total = 0 let opt = "" array.map((item, index) => { if (item == "+") { opt = "tambah" } else if (item == "-") { opt = "kurang" } else if (item == "*") { opt = "kali" } else if (item == "/") { opt = "bagi" } else { if (opt == "tambah") { total = Number(total) + Number(item) } else if (opt == "kurang") { total = Number(total) - Number(item) } else if (opt == "kali") { total = Number(total) * Number(item) } else if (opt == "bagi") { total = Number(total) / Number(item) } else { total += item } } }) let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(total) return a } const columns = [{ name: "", options: { display: false } }, { name: "", options: { display: false } }, { name: "", options: { display: false } }, { name: "", options: { display: false } }, { name: "", options: { display: false } }, { name: "Key Performance Indicator", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), setCellProps: () => ({ style }), customBodyRender: (val, tableMeta) => { return (
{tableMeta.rowIndex == 0 || tableMeta.rowIndex == 1 ? {val} : tableMeta.rowIndex == 2 || tableMeta.rowIndex == 6 || tableMeta.rowIndex == 7 || tableMeta.rowIndex == 8 ? {val} : {val} }
) } } }, { name: "Weight", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), setCellProps: () => ({ style2 }), customBodyRender: (value, tableMeta, updateValue) => { return (
{tableMeta.rowData[0] === 3 ?
{ // updateValue(event.target.value) handleChange(event.target.value, tableMeta) console.log(dataTable2) }} /> } />
: tableMeta.rowData[0] === 2 ? : tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[0] === 6 ? Formula : tableMeta.rowData[0] === 5 ? Formula Summary : tableMeta.rowData[0] === 1 ? value === "" ? null : : validasi }
) } } }, { name: "UOM", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (value, tableMeta, updateValue) => { return (
{tableMeta.rowIndex === 3 || tableMeta.rowIndex === 4 || tableMeta.rowIndex === 9 ?
} onChange={event => updateValue(event.target.value)} />
: {value === "" ? "-" : value} }
) } } }, { name: "Jenis KPI", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Max Ach.", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Formula YTD", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "2020", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Jan 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Feb 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Mar 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Apr 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "May 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Jun 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Jul 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Aug 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Sep 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Oct 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Nop 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Dec 2021", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "2021 Total", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "2022 Total", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "2023 Total", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "Strategic Initiative", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } }, { name: "PIC", options: { customHeadRender: (columnMeta) => ( {columnMeta.name} ), customBodyRender: (val) => { return (
{val}
) } } } ] const loadingComponent = (
); return (
Pengajuan Budget Tahunan
{/* {this.state.loading && loadingComponent} */}
Master Budget - Corporate Annual Target
{this.props.company.company_name} Periode : {this.props.periode} in IDR mn
Cancel
Save
); } }