aboutsummaryrefslogtreecommitdiff
path: root/app/views/welcome
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/welcome')
-rw-r--r--app/views/welcome/dashboard.html.erb14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/views/welcome/dashboard.html.erb b/app/views/welcome/dashboard.html.erb
index 81264e2..8880434 100644
--- a/app/views/welcome/dashboard.html.erb
+++ b/app/views/welcome/dashboard.html.erb
@@ -1,5 +1,15 @@
<h1>Welcome <%= h current_user.name %>!</h1>
-<p>Current Agent: <%= current_user&.agencies&.first&.agent&.name %></p>
+<p>Current Agent: <%= current_agent&.name %></p>
-<p>Cool, what can we do now?</p>
+<section id="global_stats">
+ <h2>Global Count</h2>
+ <p><%#= @stats[:counts].map { |k,v| pluralize(k.to_s.singularize, v) }.to_sentence %></p>
+ <p><%= p @stats[:count] %>
+</section>
+
+<section id="current_agent_stats">
+ <h2>Current Agent: <%= current_agent %></h2>
+ <p><%#= @stats[:current_agent][:counts].map { |k,v| pluralize(k.to_s.singularize, v) }.to_sentence %></p>
+ <%= render partial: current_agent %>
+</section>