Browse Source

Fix progress bar when there is no progress

pull/2/head
Wahyu Ramadhan 2 years ago
parent
commit
27268efe04
  1. 14
      src/views/Dashboard/Components/index.js

14
src/views/Dashboard/Components/index.js

@ -65,7 +65,12 @@ export const ProgressPlanningBar = ({progress}) => {
}
}
else {
return null;
return (
<div style={{backgroundColor: '#DDDDDD', color: '#FFFFFF', borderRadius: 10, marginBottom: 10}}>
<div style={{ backgroundColor: '#0000cc', width: `0%`, padding: 5, borderTopLeftRadius: 10, borderBottomLeftRadius: 10, borderTopRightRadius: 0 < 100 ? 0 : 10, borderBottomRightRadius: 0 < 100 ? 0 : 10, textAlign: 'center', fontWeight: 500, height: 30 }}></div>
<span style={{textAlign: 'center', width: '100%', float: 'left', marginTop: -25, color: '#4e4c4c', fontWeight: 500}}>Planning : 0%</span>
</div>
)
}
}
@ -88,7 +93,12 @@ export const ProgressActualBar = ({progress}) => {
}
}
else {
return null;
return (
<div style={{backgroundColor: '#DDDDDD', color: '#FFFFFF', borderRadius: 10, marginBottom: 10}}>
<div style={{ backgroundColor: '#006600', width: `0%`, padding: 5, borderTopLeftRadius: 10, borderBottomLeftRadius: 10, borderTopRightRadius: 0 < 100 ? 0 : 10, borderBottomRightRadius: 0 < 100 ? 0 : 10, textAlign: 'center', fontWeight: 500, height: 30 }}></div>
<span style={{textAlign: 'center', width: '100%', float: 'left', marginTop: -25, color: '#4e4c4c', fontWeight: 500}}>Actual : 0%</span>
</div>
)
}
}

Loading…
Cancel
Save