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 { ...@@ -185,6 +185,7 @@ class HomePage extends Component {
console.log(this.state.company) console.log(this.state.company)
api.create().getListChildDashboardCAT(this.state.periodeCAT.value, this.state.monthCAT.month_id).then((res) => { api.create().getListChildDashboardCAT(this.state.periodeCAT.value, this.state.monthCAT.month_id).then((res) => {
if (res.data) { if (res.data) {
// console.log(res)
let response = res.data.data.business_unit let response = res.data.data.business_unit
let data = [] let data = []
response.map((item, index) => { response.map((item, index) => {
...@@ -212,13 +213,14 @@ class HomePage extends Component { ...@@ -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') { if (arrayChild.length > 0 && String(item.item_business).toLocaleLowerCase() != 'holding') {
data.push({ ...item, category: arrayChild }) data.push({ ...item, category: arrayChild })
} }
}) })
// console.log(this.state.parameterPerfom)
console.log(data) console.log(data)
this.setState({ dataDashboardCAT: data, loading: false, loading2: false }, () => { this.setState({ dataDashboardCAT: data, loading: false, loading2: false }, () => {
setTimeout(() => { setTimeout(() => {
...@@ -914,7 +916,7 @@ class HomePage extends Component { ...@@ -914,7 +916,7 @@ class HomePage extends Component {
</div>} </div>}
<div style={{ display: 'flex', justifyContent: 'center', marginTop: items.total_kpi == null ? 50 : 0 }}> <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 }}> <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> </div>
<div style={{ display: 'flex', justifyContent: 'center' }}> <div style={{ display: 'flex', justifyContent: 'center' }}>
...@@ -1188,7 +1190,7 @@ class HomePage extends Component { ...@@ -1188,7 +1190,7 @@ class HomePage extends Component {
</div>} </div>}
<div style={{ display: 'flex', justifyContent: 'center', marginTop: items.total_kpi == null ? 50 : 0 }}> <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 }}> <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> </div>
{!this.state.loading3 && <div style={{ display: 'flex', justifyContent: 'center' }}> {!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