diff --git a/fittrackee_api/migrations/versions/096dd0b43beb_.py b/fittrackee_api/migrations/versions/096dd0b43beb_.py index 3932f03c..4f580518 100644 --- a/fittrackee_api/migrations/versions/096dd0b43beb_.py +++ b/fittrackee_api/migrations/versions/096dd0b43beb_.py @@ -1,4 +1,4 @@ -"""empty message +"""Add 'notes' column to 'Activity' table Revision ID: 096dd0b43beb Revises: 71093ac9ca44 diff --git a/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityNotes.jsx b/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityNotes.jsx new file mode 100644 index 00000000..dcd629dc --- /dev/null +++ b/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityNotes.jsx @@ -0,0 +1,15 @@ +import React from 'react' + +export default function ActivityNotes(props) { + const { notes } = props + return ( +
+
+ Notes +
+ {notes ? notes : 'No notes'} +
+
+
+ ) +} diff --git a/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityWeather.jsx b/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityWeather.jsx index 170b38db..8e3bbe55 100644 --- a/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityWeather.jsx +++ b/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityWeather.jsx @@ -43,10 +43,10 @@ export default function ActivityWeather(props) { /> - {activity.weather_start.temperature}°C + {Number(activity.weather_start.temperature).toFixed(1)}°C - {activity.weather_end.temperature}°C + {Number(activity.weather_end.temperature).toFixed(1)}°C @@ -58,10 +58,10 @@ export default function ActivityWeather(props) { /> - {activity.weather_start.humidity * 100}% + {Number(activity.weather_start.humidity * 100).toFixed(1)}% - {activity.weather_end.humidity * 100}% + {Number(activity.weather_end.humidity * 100).toFixed(1)}% @@ -73,10 +73,10 @@ export default function ActivityWeather(props) { /> - {activity.weather_start.wind}m/s + {Number(activity.weather_start.wind).toFixed(1)}m/s - {activity.weather_end.wind}m/s + {Number(activity.weather_end.wind).toFixed(1)}m/s diff --git a/fittrackee_client/src/components/Activity/ActivityDisplay/index.jsx b/fittrackee_client/src/components/Activity/ActivityDisplay/index.jsx index eb8f1c97..fc10f852 100644 --- a/fittrackee_client/src/components/Activity/ActivityDisplay/index.jsx +++ b/fittrackee_client/src/components/Activity/ActivityDisplay/index.jsx @@ -6,6 +6,7 @@ import ActivityCardHeader from './ActivityCardHeader' import ActivityCharts from './ActivityCharts' import ActivityDetails from './ActivityDetails' import ActivityMap from './ActivityMap' +import ActivityNotes from './ActivityNotes' import CustomModal from './../../Others/CustomModal' import { getOrUpdateData } from '../../../actions' import { deleteActivity } from '../../../actions/activities' @@ -106,6 +107,7 @@ class ActivityDisplay extends React.Component { )} + )} diff --git a/fittrackee_client/src/components/Activity/ActivityForms/FormWithGpx.jsx b/fittrackee_client/src/components/Activity/ActivityForms/FormWithGpx.jsx index a30b3327..0eeeea3a 100644 --- a/fittrackee_client/src/components/Activity/ActivityForms/FormWithGpx.jsx +++ b/fittrackee_client/src/components/Activity/ActivityForms/FormWithGpx.jsx @@ -64,6 +64,18 @@ function FormWithGpx (props) { )} +
+