Its been a while

This commit is contained in:
Jason Jordan
2026-07-23 10:32:51 -04:00
parent 5a90ea6e14
commit 56009fa158
70 changed files with 686 additions and 147 deletions
+2
View File
@@ -25,10 +25,12 @@ module IdCard
def permitted_params(params)
params.require(:id_card_setup).permit(
field_exceptions_attributes: [
:id,
:exception_type,
:exception_values,
:_destroy,
field_exception_items_attributes: [
:id,
:field_name,
:field_value,
:network_logo_id,
+14 -3
View File
@@ -11,16 +11,27 @@ class Member < ApplicationRecord
validates :division, presence: true, if: -> { employer.id_card_setup.has_divisions }
# validates :coverage_class, :dental_plan_key, presence: true, if: -> { employer.id_card_setup.has_dental }
validates :mb_member_key, :pb_entity_key, uniqueness: true
validates :name, uniqueness: { scope: :employer_id }
# validates :name, uniqueness: { scope: :employer_id }
before_validation :format_dependents, if: :dependents_changed?
scope :active, -> {
where(active: true)
}
def id_card_field_exception_values
address = Vhcs::PbEntityAddress.find_by(pb_entity_key: self.pb_entity_key)
address = Vhcs::PbEntityAddress.find_by(pb_entity_key: pb_entity_key)
{
zipcode: address.zip,
state: address.state,
family_id: self.family_id
family_id: family_id
}
end
def member_key
{
pl_plan_key: pl_plan_key,
member_keys: [pb_entity_key]
}
end