modules/claims_api/app/workers/claims_api/poa_form_builder_job.rb
def poa_in_organization?(power_of_attorney)
      representatives = ::Veteran::Service::Representative.where('? = ANY(poa_codes)', power_of_attorney.current_poa)
      raise 'Power of Attorney not found' if representatives.blank?
      return false if representatives.first.user_types.blank?

      representatives.first.user_types.include?('veteran_service_officer')
    end
#
# Determine if POA that submitted this request is an individual or part of an organization.
#
# @param power_of_attorney [ClaimsApi::PowerOfAttorney] Record for this poa change request
#
# @return [Boolean] True if POA is part of an organization, false if not
Determine if POA that submitted this request is an individual or part of an organization.
Determine if POA that submitted this request is an individual or part of an organization .
def poa_in_organization?(power_of_attorney)
      representatives = ::Veteran::Service::Representative.where('? = ANY(poa_codes)', power_of_attorney.current_poa)
      raise 'Power of Attorney not found' if representatives.blank?
      return false if representatives.first.user_types.blank?
      representatives.first.user_types.include?('veteran_service_officer')
    end
def poa_in_organization? ( power_of_attorney ) representatives = :: Veteran :: Service :: Representative . where ( '? = ANY(poa_codes)' , power_of_attorney . current_poa ) raise 'Power of Attorney not found' if representatives . blank? return false if representatives . first . user_types . blank? representatives . first . user_types . include? ( 'veteran_service_officer' ) end
Determine if POA that submitted this request is an individual or part of an organization.
Determine if POA that submitted this request is an individual or part of an organization .
True if POA is part of an organization, false if not
True if POA is part of an organization false if not
Boolean
power_of_attorney
Record for this poa change request
Record for this poa change request