Sha256: ca6651f88c1484b1ac64cbddad47fc1312611eb4e33fbf5ba6197cb962cbd36f

Contents?: true

Size: 672 Bytes

Versions: 19

Compression:

Stored size: 672 Bytes

Contents

class Eco::API::UseCases::DefaultCases::SetSupervisorCase < Eco::API::Common::Loaders::UseCase
  name "set-supervisor"
  type :sync

  def main(entries, people, session, options, usecase)
    micro    = session.micro
    update   = session.new_job("main", "update", :update, usecase)

    micro.with_each_present(entries, people, options, log_starter: true) do |entry, person|
      if entry.supervisor_id?
        micro.set_supervisor(person, entry.supervisor_id, people, options) do |unknown_id|
          session.logger.warn("Supervisor '#{entry.supervisor_id}' does not exist. Entry: #{entry.to_s(:identify)}")
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
eco-helpers-2.5.2 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.5.1 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.4.9 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.4.8 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.4.7 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.4.6 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.4.5 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.4.4 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.4.3 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.4.2 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.3.3 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.3.2 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.2.5 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.2.4 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.2.3 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.2.2 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.2.1 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.1.12 lib/eco/api/usecases/default_cases/set_supervisor_case.rb
eco-helpers-2.1.11 lib/eco/api/usecases/default_cases/set_supervisor_case.rb