Client: add notes to activities - fix 10

+ minor fix on weather
This commit is contained in:
Sam
2018-06-13 18:52:39 +02:00
parent 47fc2ab830
commit 066a05c57f
7 changed files with 59 additions and 8 deletions

View File

@ -0,0 +1,15 @@
import React from 'react'
export default function ActivityNotes(props) {
const { notes } = props
return (
<div className="card">
<div className="card-body">
Notes
<div className="activity-notes">
{notes ? notes : 'No notes'}
</div>
</div>
</div>
)
}

View File

@ -43,10 +43,10 @@ export default function ActivityWeather(props) {
/>
</td>
<td>
{activity.weather_start.temperature}°C
{Number(activity.weather_start.temperature).toFixed(1)}°C
</td>
<td>
{activity.weather_end.temperature}°C
{Number(activity.weather_end.temperature).toFixed(1)}°C
</td>
</tr>
<tr>
@ -58,10 +58,10 @@ export default function ActivityWeather(props) {
/>
</td>
<td>
{activity.weather_start.humidity * 100}%
{Number(activity.weather_start.humidity * 100).toFixed(1)}%
</td>
<td>
{activity.weather_end.humidity * 100}%
{Number(activity.weather_end.humidity * 100).toFixed(1)}%
</td>
</tr>
<tr>
@ -73,10 +73,10 @@ export default function ActivityWeather(props) {
/>
</td>
<td>
{activity.weather_start.wind}m/s
{Number(activity.weather_start.wind).toFixed(1)}m/s
</td>
<td>
{activity.weather_end.wind}m/s
{Number(activity.weather_end.wind).toFixed(1)}m/s
</td>
</tr>
</tbody>

View File

@ -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 {
</div>
</div>
)}
<ActivityNotes notes={activity.notes} />
</div>
)}
</div>