Production Build Working
CI / scan_ruby (push) Failing after 37s
CI / lint (push) Failing after 39s

This commit is contained in:
Jason Jordan
2026-09-16 12:41:44 -04:00
parent 9853d58469
commit 1c80e642f5
51 changed files with 648 additions and 440 deletions
@@ -0,0 +1,29 @@
module EmployersService
class Coverage
def initialize(employer)
@employer = employer
end
def call
employer_plans = Baclight::IdCardPlan.where(pl_plan_key: @employer.pl_plan_key).to_a
employer_members = @employer.baclight_members.active.order(:name).to_a
employer_members.map! do |member|
eff_date = member.eff_date
if eff_date
plan_title = employer_plans.select { |plan| plan.id == member.id_card_plan_id }&.first&.title
{
name: member.name,
pb_entity_key: member.pb_entity_key,
plan_title: plan_title,
effective_date: eff_date,
dependents: JSON.parse(member.dependents)
}
else
nil
end
end
employer_members.compact
end
end
end