Daily Averages for <%= formatted_date %>
-
Mood:
<%= moods.empty? ? "No Recordings" : (moods.all.map(&:rating).reduce(:+).to_f / moods.count).round(1) %>
-
Positive Emotions:
<%= positive_emotions.empty? ? "No Recordings" : (positive_emotions.all.map(&:rating).reduce(:+).to_f / positive_emotions.count).round(1) %>
-
Negative Emotions:
<%= negative_emotions.empty? ? "No Recordings" : (negative_emotions.all.map(&:rating).reduce(:+).to_f / negative_emotions.count).round(1) %>
<% if activities.empty? %>
Notice! No activities were completed during this day.
<% else %>
<%= render "think_feel_do_engine/activities/daily_summary", activities: activities %>
<% end %>
<%= link_to "Previous Day", "?date=#{local_time.advance(days: -1).strftime("%d/%m/%Y")}", class: "btn btn-default" %>
<%= link_to "Next Day", "?date=#{local_time.advance(days: 1).strftime("%d/%m/%Y")}", class: "btn btn-default pull-right" %>