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
+15 -1
View File
@@ -6,7 +6,7 @@ module Baclight
belongs_to :baclight_employer, class_name: "Baclight::Employer", foreign_key: "employer_id"
scope :active, -> {
where(active: true)
where(active: true)
}
# alias_attribute :id, :id
@@ -40,5 +40,19 @@ module Baclight
baclight_employer&.baclight_broker&.carrier_id
end
def eff_date
participation = Vhcs::PbProductParticipation.joins('INNER JOIN "PBCoveredEntities" ON "PBProductParticipation"."PBProductParticipationKey" = "PBCoveredEntities"."PBProductParticipationKey"').where('"PBCoveredEntities"."PBEntityKey" = ?', pb_entity_key).order(out_of_effect: :desc).first
eff_date = nil
if participation
in_effect = participation.in_effect
out_of_effect = participation.out_of_effect
if in_effect <= (Date.today + 90.days) && (out_of_effect - 1.day) > Date.today && out_of_effect > in_effect
eff_date = in_effect.strftime("%m/%d/%Y")
end
end
eff_date
end
end
end