Show only selected investments on map from publishing prices phase

If there are no selected investements show all investments on map.
This commit is contained in:
decabeza
2019-02-01 16:11:35 +01:00
parent 42c065f630
commit 5409db6c55
3 changed files with 44 additions and 4 deletions

View File

@@ -70,7 +70,7 @@ module BudgetsHelper
def current_budget_map_locations
return unless current_budget.present?
if current_budget.valuating_or_later?
if current_budget.publishing_prices_or_later? && current_budget.investments.selected.any?
investments = current_budget.investments.selected
else
investments = current_budget.investments

View File

@@ -105,8 +105,8 @@ class Budget < ActiveRecord::Base
Budget::Phase::PUBLISHED_PRICES_PHASES.include?(phase)
end
def valuating_or_later?
valuating? || publishing_prices? || balloting_or_later?
def publishing_prices_or_later?
publishing_prices? || balloting_or_later?
end
def balloting_process?