@@ -2,24 +2,43 @@ import { parseISO } from 'date-fns';
22import PropTypes from 'prop-types' ;
33
44import { useDateTimeFormatter } from '../../utils/useDateTimeFormatter.js' ;
5+ import { Col , Row } from 'react-bootstrap' ;
6+ import { useTranslation } from 'react-i18next' ;
57
68const ActionLogEntry = ( {
79 entry,
810} ) => {
11+ const { t } = useTranslation ( ) ;
12+
913 const {
1014 formatDefault,
1115 formatDistanceToNow,
1216 } = useDateTimeFormatter ( ) ;
1317
1418 const dateTime = parseISO ( entry . createdAt ) ;
1519
16- return ( < tr >
17- < td > { formatDefault ( dateTime ) } ({ formatDistanceToNow ( dateTime ) } )</ td >
18- < td > { entry . deviceId } </ td >
19- < td > { entry . action } </ td >
20- < td > { entry . User . name } ({ entry . User . username } )</ td >
21- < td > { entry . Application . name } </ td >
22- </ tr > ) ;
20+ return ( < Row className = "row-cols-1 row-cols-lg-5 border-top pt-1 mb-1" >
21+ < Col >
22+ < strong className = "d-lg-none" > { t ( 'views.action_log.columns.date_time' ) } : </ strong >
23+ { formatDefault ( dateTime ) } ({ formatDistanceToNow ( dateTime ) } )
24+ </ Col >
25+ < Col >
26+ < strong className = "d-lg-none" > { t ( 'views.action_log.columns.device' ) } : </ strong >
27+ { entry . deviceId }
28+ </ Col >
29+ < Col >
30+ < strong className = "d-lg-none" > { t ( 'views.action_log.columns.action' ) } : </ strong >
31+ { entry . action }
32+ </ Col >
33+ < Col >
34+ < strong className = "d-lg-none" > { t ( 'views.action_log.columns.user' ) } : </ strong >
35+ { entry . User . name } ({ entry . User . username } )
36+ </ Col >
37+ < Col >
38+ < strong className = "d-lg-none" > { t ( 'views.action_log.columns.application' ) } : </ strong >
39+ { entry . Application . name }
40+ </ Col >
41+ </ Row > ) ;
2342} ;
2443
2544ActionLogEntry . propTypes = {
0 commit comments