display moving duration in activities list - fix #31

This commit is contained in:
Sam 2019-01-13 11:56:05 +01:00
parent aa0056a46d
commit 687af94b4a
3 changed files with 6 additions and 5 deletions

View File

@ -56,9 +56,9 @@ def get_activities(auth_user_id):
if date_to else True, if date_to else True,
Activity.distance >= int(distance_from) if distance_from else True, Activity.distance >= int(distance_from) if distance_from else True,
Activity.distance <= int(distance_to) if distance_to else True, Activity.distance <= int(distance_to) if distance_to else True,
Activity.duration >= convert_in_duration(duration_from) Activity.moving >= convert_in_duration(duration_from)
if duration_from else True, if duration_from else True,
Activity.duration <= convert_in_duration(duration_to) Activity.moving <= convert_in_duration(duration_to)
if duration_to else True, if duration_to else True,
Activity.ave_speed >= float(ave_speed_from) Activity.ave_speed >= float(ave_speed_from)
if ave_speed_from else True, if ave_speed_from else True,

View File

@ -49,7 +49,7 @@ export default class ActivitiesList extends React.PureComponent {
<td className="text-right"> <td className="text-right">
{Number(activity.distance).toFixed(2)} km {Number(activity.distance).toFixed(2)} km
</td> </td>
<td className="text-right">{activity.duration}</td> <td className="text-right">{activity.moving}</td>
<td className="text-right">{activity.ave_speed} km/h</td> <td className="text-right">{activity.ave_speed} km/h</td>
<td className="text-right">{activity.max_speed} km/h</td> <td className="text-right">{activity.max_speed} km/h</td>
</tr> </tr>

View File

@ -23,9 +23,10 @@ export default function ActivityDetails(props) {
</sup> </sup>
)} )}
{withPauses && ( {withPauses && (
<p> <span>
<br />
(pauses: {activity.pauses}, total duration: {activity.duration}) (pauses: {activity.pauses}, total duration: {activity.duration})
</p> </span>
)} )}
</p> </p>
<p> <p>