Commit 937d2578 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'GGMAC' into 'master'

Ggmac

See merge request !1430
parents 63e97389 3ec0fbae
......@@ -185,6 +185,7 @@ class HomePage extends Component {
console.log(this.state.company)
api.create().getListChildDashboardCAT(this.state.periodeCAT.value, this.state.monthCAT.month_id).then((res) => {
if (res.data) {
// console.log(res)
let response = res.data.data.business_unit
let data = []
response.map((item, index) => {
......@@ -212,13 +213,14 @@ class HomePage extends Component {
}
})
}
arrayChild.push({ ...items, current_value: Number(items.current_value).toFixed(2), performanceColor: perfomanceScoreColor })
arrayChild.push({ ...items, current_value: Number(items.current_value).toFixed(2), performanceColor: perfomanceScoreColor, performanceScore })
}
})
if (arrayChild.length > 0 && String(item.item_business).toLocaleLowerCase() != 'holding') {
data.push({ ...item, category: arrayChild })
}
})
// console.log(this.state.parameterPerfom)
console.log(data)
this.setState({ dataDashboardCAT: data, loading: false, loading2: false }, () => {
setTimeout(() => {
......@@ -914,7 +916,7 @@ class HomePage extends Component {
</div>}
<div style={{ display: 'flex', justifyContent: 'center', marginTop: items.total_kpi == null ? 50 : 0 }}>
<div style={{ backgroundColor: items.performanceColor, textAlign: 'center', display: 'flex', justifyContent: 'center', width: 40, height: 21 }}>
<Typography style={{ textAlign: 'center', color: '#4b4b4b' }}>{items.performance}</Typography>
<Typography style={{ textAlign: 'center', color: '#4b4b4b' }}>{items.performanceScore}</Typography>
</div>
</div>
<div style={{ display: 'flex', justifyContent: 'center' }}>
......@@ -1188,7 +1190,7 @@ class HomePage extends Component {
</div>}
<div style={{ display: 'flex', justifyContent: 'center', marginTop: items.total_kpi == null ? 50 : 0 }}>
<div style={{ backgroundColor: items.performanceColor, textAlign: 'center', display: 'flex', justifyContent: 'center', width: 40, height: 21 }}>
<Typography style={{ textAlign: 'center', color: '#4b4b4b' }}>{items.performance}</Typography>
<Typography style={{ textAlign: 'center', color: '#4b4b4b' }}>{items.performanceScore}</Typography>
</div>
</div>
{!this.state.loading3 && <div style={{ display: 'flex', justifyContent: 'center' }}>
......
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