<%= "Welcome back, #{@current_user.name}" %>

<%= heading_for_user_role(@current_user) %>

<% if @current_user.support? || (@current_user.data_coordinator? && @current_user.sales_logs.present?) %>
<%= render partial: "home/data_box", locals: { type: "lettings" } %>
<%= render partial: "home/data_box", locals: { type: "sales" } %>
<%= render partial: "home/data_box", locals: { type: "schemes" } %>
<% else %>
<%= render partial: "home/data_box", locals: { type: "lettings" } %>
<% if @current_user.data_coordinator? %>
<%= render partial: "home/data_box", locals: { type: "schemes" } %>
<% elsif @current_user.sales_logs.present? %>
<%= render partial: "home/data_box", locals: { type: "sales" } %>
<% else %>
<%= render partial: "home/data_box", locals: { type: "misc" } %>
<% end %> <% end %>