Browse Source

don't show inactive users on assignment boxes

pull/3076/head
Samuel 4 weeks ago
parent
commit
0d2eff839d
  1. 3
      app/models/form/lettings/questions/created_by_id.rb
  2. 3
      app/models/form/sales/questions/created_by_id.rb

3
app/models/form/lettings/questions/created_by_id.rb

@ -28,7 +28,8 @@ class Form::Lettings::Questions::CreatedById < ::Form::Question
end),
].flatten
else
current_user.organisation.users.visible
# ensure data coordinators can't assign a log to an inactive user
current_user.organisation.users.visible.active_status
end.uniq.compact
users.each_with_object(ANSWER_OPTS.dup) do |user, hsh|

3
app/models/form/sales/questions/created_by_id.rb

@ -25,7 +25,8 @@ class Form::Sales::Questions::CreatedById < ::Form::Question
end),
].flatten
else
log.managing_organisation.users.visible
# ensure data coordinators can't assign a log to an inactive user
log.managing_organisation.users.visible.active_status
end.uniq.compact
users.each_with_object(ANSWER_OPTS.dup) do |user, hsh|
hsh[user.id] = present_user(user)

Loading…
Cancel
Save