Skip to content

Commit

Permalink
Actually use new service
Browse files Browse the repository at this point in the history
  • Loading branch information
tfink419 committed May 14, 2024
1 parent 3f68448 commit d8e6acf
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/models/saved_claim/veteran_readiness_employment_claim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def send_to_vre(user)
send_to_central_mail!(user)
end

send_vre_email_form(user)
send_to_res(user)
end

def upload_to_vbms(doc_type: '1167')
Expand Down Expand Up @@ -165,6 +165,18 @@ def send_to_central_mail!(user)
send_central_mail_confirmation_email(user)
end

def send_to_res(user)
email_addr = REGIONAL_OFFICE_EMAILS[@office_location] || '[email protected]'

log_message_to_sentry("VRE claim email: #{email_addr}, sent to cmp: #{@sent_to_cmp} #{user.present?}",
:info, { uuid: user.uuid })

VeteranReadinessEmploymentMailer.build(user.participant_id, email_addr, @sent_to_cmp).deliver_later if user.present?

service = RES::Ch31Form.new(user:, claim: self)
service.submit
end

def send_vre_email_form(user)
@office_location = check_office_location[0] if @office_location.nil?

Expand Down

0 comments on commit d8e6acf

Please sign in to comment.