Commit 1a3ac253 authored by Faisal Hamdi's avatar Faisal Hamdi

Merge branch 'faisal' into 'master'

cat pq!

See merge request !1425
parents 35ccdbc7 5c6f60a4
......@@ -2906,26 +2906,30 @@ export default class SubHolding extends Component {
item.itemName,
item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(weight).toFixed(1),
item.corporate_annual_target.uom,
item.corporate_annual_target.kpiType,
item.corporate_annual_target.maxAch,
item.corporate_annual_target.formulaYtd,
item.corporate_annual_target.lastYearActualQx,
item.corporate_annual_target.thisYearPercentGrowthYoy,
item.corporate_annual_target.lastYearActualFy,
item.corporate_annual_target.thisYearbudgetQx,
item.corporate_annual_target.thisYearActualQx,
item.corporate_annual_target.thisYearPercentAch,
item.corporate_annual_target.thisYearPercentGrowthYoy,
item.corporate_annual_target.thisYearScore,
item.corporate_annual_target.thisYearScoreXWeight,
item.corporate_annual_target.thisYearBudgetYtd,
item.corporate_annual_target.thisYearActualYtd,
item.corporate_annual_target.thisYearPercentAchYtd,
item.corporate_annual_target.thisYearScoreFy,
item.corporate_annual_target.thisYearScoreXWeightFy,
item.corporate_annual_target.thisYearBudgetFy,
item.corporate_annual_target.thisYearOlFy,
percentVar,
item.corporate_annual_target.thisYearPercentAchFy,
item.corporate_annual_target.thisYearScoreFy,
item.corporate_annual_target.thisYearScoreXWeightFy,
item.orders
])
}
......@@ -2947,26 +2951,30 @@ export default class SubHolding extends Component {
item.itemName,
item.weight == '' ? Number(0).toFixed(1) : Number(Number(item.weight) * 100).toFixed(1),
item.uom,
item.typeKpi,
item.maxAch,
item.formulaYtd,
item.corporate_annual_target.lastYearActualQx,
item.corporate_annual_target.thisYearPercentGrowthYoy,
item.corporate_annual_target.lastYearActualFy,
item.corporate_annual_target.thisYearbudgetQx,
item.corporate_annual_target.thisYearActualQx,
item.corporate_annual_target.thisYearPercentAch,
item.corporate_annual_target.thisYearPercentGrowthYoy,
item.corporate_annual_target.thisYearScore,
item.corporate_annual_target.thisYearScoreXWeight,
item.corporate_annual_target.thisYearBudgetYtd,
item.corporate_annual_target.thisYearActualYtd,
item.corporate_annual_target.thisYearPercentAchYtd,
item.corporate_annual_target.thisYearScoreFy,
item.corporate_annual_target.thisYearScoreXWeightFy,
item.corporate_annual_target.thisYearBudgetFy,
item.corporate_annual_target.thisYearOlFy,
"",
item.corporate_annual_target.thisYearPercentAchFy,
item.corporate_annual_target.thisYearScoreFy,
item.corporate_annual_target.thisYearScoreXWeightFy,
item.orders
])
if (item.children !== null) {
......@@ -3899,7 +3907,7 @@ export default class SubHolding extends Component {
}
} else if (this.state.report.value === 11) {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/quarterly/export_report?report_id=17&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&quarter=${this.state.quarter}`
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/quarterly/export_report?report_id=17&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&quarter=${this.state.quarter.name}`
)
console.log(res);
res = await res.blob()
......
......@@ -24463,21 +24463,75 @@ export default class TableSubHolding extends Component {
)
}
}
}, {
name: "KPI Type",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (val, tableMeta) => {
return (
<div style={{ textAlign: 'center', width: 60 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
val
}
</div>
)
}
}
}, {
name: "Max Ach.",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 60, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (val, tableMeta) => {
return (
<div style={{ textAlign: 'center', width: 60 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
val
}
</div>
)
}
}
}, {
name: "Formula YTD",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 60, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
customBodyRender: (val, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'center', width: 60 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
val
}
</div>
)
}
}
},{
name: `${Number(this.props.periode) - 1}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#07a7d0', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div className="grid grid-2x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"Actual"} {this.props.quarter}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"% Growth YoY"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"Actual Full Year Performance"}</span>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"Actual FY"}</span>
</div>
</div>
</th>
......@@ -24486,7 +24540,7 @@ export default class TableSubHolding extends Component {
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div>
<div className="grid grid-3x content-center">
<div className="grid grid-2x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
......@@ -24509,28 +24563,6 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-2">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-3">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
......@@ -24557,43 +24589,31 @@ export default class TableSubHolding extends Component {
}
}
},{
name: `${Number(this.props.periode)}`,
name: `${Number(this.props.periode)} Quarterly`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-2x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1 grid grid-5x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", color: '#000', backgroundColor: 'rgb(200 224 229)', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Plan"} {this.props.quarter}</span>
<div className="column-1 grid grid-3x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", color: '#000', backgroundColor: 'rgb(200 224 229)' }}>
<span>{"Budget"} {this.props.quarter}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"Actual"} {this.props.quarter}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8' }}>
<span>{"% Ach"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Score"}</span>
</div>
<div className="column-5" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Score x Weight"}</span>
</div>
</div>
<div className="column-2 grid grid-5x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", color: '#000', backgroundColor: 'rgb(200 224 229)', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Plan YTD"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Actual YTD"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"% Ach"}</span>
<div className="column-2 grid grid-3x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"% Growth YoY"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8' }}>
<span>{"Score"}</span>
</div>
<div className="column-5" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8' }}>
<span>{"Score x Weight"}</span>
</div>
</div>
......@@ -24605,7 +24625,7 @@ export default class TableSubHolding extends Component {
return (
<div>
<div className="grid grid-2x content-center">
<div className="grid grid-5x content-center">
<div className="grid grid-3x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
......@@ -24670,50 +24690,8 @@ export default class TableSubHolding extends Component {
</div>
}
</div>
<div className="col-4">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-5">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
</div>
}
</div>
</div>
<div className="grid grid-5x content-center">
<div className="grid grid-3x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
......@@ -24727,6 +24705,7 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(value).toFixed(1)}
/>
......@@ -24777,48 +24756,6 @@ export default class TableSubHolding extends Component {
</div>
}
</div>
<div className="col-4">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-5">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
</div>
}
</div>
</div>
</div>
</div>
......@@ -24826,107 +24763,235 @@ export default class TableSubHolding extends Component {
}
}
}, {
name: `Master Budget ${Number(this.props.periode)}`,
name: `${Number(this.props.periode)} YTD`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: 'rgb(200 224 229)', borderRight: '1px solid #fff', borderLeft: '1px solid #fff' }}>
<Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", color: '#000', backgroundColor: 'rgb(200 224 229)' }}>
<span>{"Budget YTD"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"Actual YTD"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8' }}>
<span>{"% Ach"}</span>
</div>
</div>
</th>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
<div>
<div className="grid grid-3x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
}
/>
</div>
}
</div>
}
</div>
)
}
}
}, {
name: `OL ${Number(this.props.periode)}`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: 'rgb(200 224 229)', borderRight: '1px solid #fff', borderLeft: '1px solid #fff' }}>
<Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
<div className="col-2">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
}
/>
</div>
}
</div>
}
<div className="col-3">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={`%`}
disabled={true}
value={value}
/>
}
/>
</div>
}
</div>
</div>
</div>
)
}
}
}, {
name: `% Var`,
name: `${Number(this.props.periode)} FY`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: 'rgb(200 224 229)', borderRight: '1px solid #fff', borderLeft: '1px solid #fff' }}>
<Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-5x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", color: '#000', backgroundColor: 'rgb(200 224 229)' }}>
<span>{"Budget FY"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"OL FY"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8' }}>
<span>{"% Ach"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8' }}>
<span>{"Score"}</span>
</div>
<div className="column-5" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8' }}>
<span>{"Score x Weight"}</span>
</div>
</div>
</th>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={`%`}
disabled={true}
value={Number(value).toFixed(1)}
<div>
<div className="grid grid-5x content-center">
<div className="col-1">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
}
/>
</div>
}
</div>
}
<div className="col-2">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-3">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={`%`}
disabled={true}
value={value}
/>
}
/>
</div>
}
</div>
<div className="col-4">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
</div>
}
</div>
<div className="col-5">
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
}
/>
</div>
}
</div>
</div>
</div>
)
}
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