diff options
Diffstat (limited to 'app/views/welcome/dashboard.html.erb')
-rw-r--r-- | app/views/welcome/dashboard.html.erb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/views/welcome/dashboard.html.erb b/app/views/welcome/dashboard.html.erb index 8880434..242fc58 100644 --- a/app/views/welcome/dashboard.html.erb +++ b/app/views/welcome/dashboard.html.erb @@ -1,6 +1,12 @@ <h1>Welcome <%= h current_user.name %>!</h1> -<p>Current Agent: <%= current_agent&.name %></p> +<h3>Mes Agents</h3> + +<p><%= form_for current_agent, url: '/my/current_agent', method: :patch do |f| %> + En cours : <%= f.submit('select') %> + <%= f.select(:id, options_for_select(current_user.agents.map { |a| [a.name, a.id] }), selected: current_agent.id) %> +<% end %></p> + <section id="global_stats"> <h2>Global Count</h2> |