Commit 363b35fc authored by Riri Novita's avatar Riri Novita

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into riri

parents 8c9b53e3 7543379c
...@@ -1031,7 +1031,7 @@ class HomePage extends Component { ...@@ -1031,7 +1031,7 @@ class HomePage extends Component {
</button> </button>
</Link> </Link>
</div> </div>
{item.is_overdue && ( {item.is_submit === false && item.is_overdue && (
<div style={{ backgroundColor: '#f65a4c', paddingRight: 5, paddingLeft: 5, borderRadius: 5, alignSelf: 'center' }}> <div style={{ backgroundColor: '#f65a4c', paddingRight: 5, paddingLeft: 5, borderRadius: 5, alignSelf: 'center' }}>
<Typography style={{ fontSize: 11, color: '#fff' }}>Overdue</Typography> <Typography style={{ fontSize: 11, color: '#fff' }}>Overdue</Typography>
</div> </div>
......
...@@ -31,15 +31,19 @@ export default class DashboardCAT extends Component { ...@@ -31,15 +31,19 @@ export default class DashboardCAT extends Component {
loading: true, loading: true,
dataDashboard: [], dataDashboard: [],
selectedKPI: [], selectedKPI: [],
listKPI: [] listKPI: [],
rawData: {}
} }
} }
componentDidMount() { componentDidMount() {
console.log(this.props)
this.props.selectIndex('CAT Dashboard') this.props.selectIndex('CAT Dashboard')
let dataStorageCAT = localStorage.getItem(Constant.DATACAT) let dataStorageCAT = localStorage.getItem(Constant.DATACAT)
console.log(dataStorageCAT)
if (dataStorageCAT != 'datacat') { if (dataStorageCAT != 'datacat') {
this.setState({selectedKPI: JSON.parse(dataStorageCAT).listKPI}) this.setState({selectedKPI: JSON.parse(dataStorageCAT).listKPI})
console.log(dataStorageCAT)
} }
if (this.props.location.state !== undefined) { if (this.props.location.state !== undefined) {
this.setState({ userType: this.props.location.state.userType, intent: 'Home', rawData: this.props.location.state.rawData }, () => { this.setState({ userType: this.props.location.state.userType, intent: 'Home', rawData: this.props.location.state.rawData }, () => {
...@@ -103,6 +107,7 @@ export default class DashboardCAT extends Component { ...@@ -103,6 +107,7 @@ export default class DashboardCAT extends Component {
if (response.data.status === 'success') { if (response.data.status === 'success') {
let data = response.data.data let data = response.data.data
let comID = this.state.rawData ? this.state.rawData.companyId : 0 let comID = this.state.rawData ? this.state.rawData.companyId : 0
// console.log(comID)
let companyData = data.map((item) => { let companyData = data.map((item) => {
return { return {
company_id: item.company_id, company_id: item.company_id,
......
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