Browse Source

feat: add current managing org to answer opts

fix-remove-attr-accessors-from-questions-in-cldc-1723
Sam Seed 2 years ago
parent
commit
17ba578f49
  1. 2
      app/models/form/lettings/questions/managing_organisation.rb

2
app/models/form/lettings/questions/managing_organisation.rb

@ -16,6 +16,8 @@ class Form::Lettings::Questions::ManagingOrganisation < ::Form::Question
return opts unless current_user
return opts unless log
opts = opts.merge({ log.managing_organisation.id => log.managing_organisation.name} )
if current_user.support?
if log.owning_organisation.holds_own_stock?
opts[log.owning_organisation.id] = "#{log.owning_organisation.name} (Owning organisation)"

Loading…
Cancel
Save