-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathStatusBar.js
More file actions
40 lines (37 loc) · 979 Bytes
/
StatusBar.js
File metadata and controls
40 lines (37 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import * as _ from 'lodash';
import styles from '@/styles/idea.module.css';
import moment from 'moment';
const StatusBar = ({ map, value }) => {
return (
<div className={`${styles['history-tl-container']}`}>
<ul className={`${styles['tl']}`}>
{Object.keys(map).map((o, oi) => {
const val = map[o];
const current_value = value.filter((v) => v.label === o)[0];
return (
<li key={oi} className={`${styles['tl-item']}`}>
<div
className={`${styles['item-title']} ${
current_value
? 'text-white'
: 'text-grey-200'
}`}>
{o}
</div>
<div
className={`text-brand-muted ${styles['item-detail']} `}>
{' '}
{current_value
? moment(current_value.date).format(
'DD-MM-yyyy'
)
: 'Pending'}
</div>
</li>
);
})}
</ul>
</div>
);
};
export default StatusBar;