Class: EmployeePhoneStatus::QueueCoverageImpact
- Inherits:
-
Object
- Object
- EmployeePhoneStatus::QueueCoverageImpact
- Includes:
- Service
- Defined in:
- app/services/employee_phone_status/queue_coverage_impact.rb
Overview
Finds phone queues that a proposed employee presence would leave without an
active member.
The result is advisory: the controller uses it to request confirmation before
applying the existing presence change. PhoneQueue remains the authority for
roster membership; this service combines that roster with local presence and
the latest per-queue PBX login state.
Defined Under Namespace
Classes: Result
Constant Summary collapse
- COVERAGE_EXEMPT_QUEUE_EXTENSIONS =
Queue extensions whose staffing does not require a presence-change warning.
[621].freeze
Instance Method Summary collapse
-
#call ⇒ Result
Calculates the queues that need an explicit user warning.
Methods included from Service
#attributes_used, #build_result, call, #logger
Methods included from Service::Initializer
Instance Method Details
#call ⇒ Result
Calculates the queues that need an explicit user warning.
33 34 35 36 37 |
# File 'app/services/employee_phone_status/queue_coverage_impact.rb', line 33 def call return Result.new if employee_phone_status.should_be_in_queue?(presence:, sub_presence:) Result.new(uncovered_queues: candidate_queues.select { |queue| uncovered_by_change?(queue) }) end |