beta build

This commit is contained in:
Jason Jordan
2026-06-17 23:23:36 -04:00
parent 5f04811c16
commit 5a90ea6e14
48 changed files with 674 additions and 54 deletions
+8
View File
@@ -1,5 +1,6 @@
class Employer < ApplicationRecord
include EmployerAutomation
belongs_to :broker, optional: true
has_many :members, dependent: :destroy
accepts_nested_attributes_for :members, allow_destroy: true, reject_if: :all_blank
has_one :id_card_setup, class_name: 'IdCard::Setup', dependent: :destroy
@@ -46,6 +47,13 @@ class Employer < ApplicationRecord
}
end
def employer_member_keys_by_plan(pb_product_key)
{
pl_plan_key: self.pl_plan_key,
member_keys: self.plans.find_by(pb_product_key: pb_product_key).members.pluck(:pb_entity_key)
}
end
def name_to_logo_filename(extension)
Employer.employer_trim_name(self.name).titleize.gsub(/[^a-zA-Z]/, '').concat('Logo').concat(extension.downcase)
end