+
+ <% if @homepage_presenter.in_crossover_period? %>
+
+
<%= @homepage_presenter.subheading_for_last_year %>
+
+ <% if @homepage_presenter.organisation_logs_sales? %>
+ <%= render partial: "home/data_box_two_by_two", locals: {
+ top_left_data_box: @homepage_presenter.last_year_in_progress_lettings_data,
+ bottom_left_data_box: @homepage_presenter.last_year_completed_lettings_data,
+ top_right_data_box: @homepage_presenter.last_year_in_progress_sales_data,
+ bottom_right_data_box: @homepage_presenter.last_year_completed_sales_data,
+ } %>
<% else %>
-
- <%= render partial: "home/data_box", locals: { type: "misc" } %>
-
+ <%= render partial: "home/data_box_row_of_two", locals: {
+ left_data_box: @homepage_presenter.last_year_in_progress_lettings_data,
+ right_data_box: @homepage_presenter.last_year_completed_lettings_data,
+ } %>
<% end %>
+
+ <% end %>
+
+
+
<%= @homepage_presenter.subheading_for_current_year %>
+
+ <% if @homepage_presenter.organisation_logs_sales? %>
+ <%= render partial: "home/data_box_two_by_two", locals: {
+ top_left_data_box: @homepage_presenter.current_year_in_progress_lettings_data,
+ bottom_left_data_box: @homepage_presenter.current_year_completed_lettings_data,
+ top_right_data_box: @homepage_presenter.current_year_in_progress_sales_data,
+ bottom_right_data_box: @homepage_presenter.current_year_completed_sales_data,
+ } %>
+ <% else %>
+ <%= render partial: "home/data_box_row_of_two", locals: {
+ left_data_box: @homepage_presenter.current_year_in_progress_lettings_data,
+ right_data_box: @homepage_presenter.current_year_completed_lettings_data,
+ } %>
+ <% end %>
+
+
+
+ <% if !@homepage_presenter.in_crossover_period? %>
+
+
<%= @homepage_presenter.subheading_for_last_year %>
+
+ <%= render partial: "home/data_box_row_of_two", locals: {
+ left_data_box: @homepage_presenter.last_year_completed_lettings_data,
+ right_data_box: @homepage_presenter.last_year_completed_sales_data,
+ } %>
+
+
+ <% end %>
+
+
+
+ <%= render partial: "home/blue_box_link", locals: { text: "View all lettings", path: clear_filters_path(filter_type: "lettings_logs") } %>
+
+ <% if @homepage_presenter.organisation_logs_sales? %>
+
+ <%= render partial: "home/blue_box_link", locals: { text: "View all sales", path: clear_filters_path(filter_type: "sales_logs") } %>
+
<% end %>
-