diff --git a/app/views/performance/index.html.erb b/app/views/performance/index.html.erb index 51ac658..2baf46b 100644 --- a/app/views/performance/index.html.erb +++ b/app/views/performance/index.html.erb @@ -86,7 +86,7 @@ - +
@@ -97,7 +97,48 @@

Your performance scores over time

-
+ <% if @perf.any? %> +
+ <% @perf.each_with_index do |p, index| %> + <% + score_percentage = (p.score.to_f / 5.0) * 100 + score_color = case p.score + when 5 then '#1e825e' + when 4 then '#579da9' + when 3 then '#ffb703' + else '#e26666' + end + %> +
+
+
+ <%= p.date_submitted %> +
+
+ <%= p.score %> +
+
+ <%= p.reviewer_name %> +
+
+
+
+
+ <%= p.score %> / 5 - <%= p.comments %> +
+
+
+
+ <% end %> +
+ <% else %> +
+ +

No performance data to display

+
+ <% end %>
@@ -187,120 +228,18 @@