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:
@@ -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
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user