{t('reportEventTypes')}
);
};
const EventReportPage = () => {
const theme = useTheme();
const t = useTranslation();
const geofences = useSelector((state) => state.geofences.items);
const [items, setItems] = useState([]);
const formatGeofence = (value) => {
if (value > 0) {
const geofence = geofences[value];
return geofence ? geofence.name : '';
}
return null;
};
const columns = [{
headerName: t('positionFixTime'),
field: 'serverTime',
type: 'dateTime',
width: theme.dimensions.columnWidthDate,
valueFormatter: ({ value }) => formatDate(value),
}, {
headerName: t('sharedType'),
field: 'type',
type: 'string',
width: theme.dimensions.columnWidthString,
valueFormatter: ({ value }) => t(prefixString('event', value)),
}, {
headerName: t('sharedGeofence'),
field: 'geofenceId',
width: theme.dimensions.columnWidthString,
valueFormatter: ({ value }) => formatGeofence(value),
}, {
headerName: t('sharedMaintenance'),
field: 'maintenanceId',
type: 'number',
width: theme.dimensions.columnWidthString,
}];
return (