Module: Eco::API::MicroCases::People::ApplyChanges::SetCoreWithSupervisor
- Included in:
- Eco::API::MicroCases::People::ApplyChanges
- Defined in:
- lib/eco/api/microcases/people/apply_changes/set_core_with_supervisor.rb
Instance Method Summary collapse
-
#set_core_with_supervisor(entry, person, people, supers_job, options) ⇒ Object
Sets all the core details, but the supervisor.
Instance Method Details
#set_core_with_supervisor(entry, person, people, supers_job, options) ⇒ Object
Note:
supervisor_id requires a special treatment, and therefore is always excluded.
Sets all the core details, but the supervisor.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/eco/api/microcases/people/apply_changes/set_core_with_supervisor.rb', line 14 def set_core_with_supervisor(entry, person, people, supers_job, ) return if .dig(:exclude, :core) && !person.new? micro.set_core(entry, person, ) return unless entry.supervisor_id? micro.set_supervisor( person, entry.supervisor_id, people, ) do |unknown_id| # delay setting supervisor if does not exit supers_job.add(person) do |pers| micro.set_supervisor(pers, unknown_id, people, ) end end end |