-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Submit VA Form 21-0538 to Central Mail (#7049)
* send 21-0538 to central mail * updating json schema changes * updating pdf * updating specs * updating pdf * updating specs * linting * updating specs * testing * updating pdf specs * updating specs * updating specs * testing * adding fields needed for central mail * updating specs * updating specs * linting * linting * kicking github * adding spec * updating specs
- Loading branch information
1 parent
90311b7
commit e9d168d
Showing
12 changed files
with
273 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# frozen_string_literal: true | ||
|
||
class SavedClaim::DependencyVerificationClaim < CentralMailClaim | ||
include SentryLogging | ||
FORM = '21-0538' | ||
|
||
def regional_office | ||
[] | ||
end | ||
|
||
def send_to_central_mail! | ||
form_copy = parsed_form | ||
|
||
form_copy['veteranSocialSecurityNumber'] = parsed_form.dig('dependencyVerification', 'veteranInformation', 'ssn') | ||
form_copy['veteranFullName'] = parsed_form.dig('dependencyVerification', 'veteranInformation', 'fullName') | ||
form_copy['veteranAddress'] = '' | ||
|
||
update(form: form_copy.to_json) | ||
|
||
log_message_to_sentry(guid, :warn, { attachment_id: guid }, { team: 'vfs-ebenefits' }) | ||
process_attachments! | ||
end | ||
|
||
def add_claimant_info(user) | ||
updated_form = parsed_form | ||
|
||
updated_form.merge!( | ||
{ | ||
'dependencyVerification' => { | ||
'updateDiaries' => true, | ||
'veteranInformation' => { | ||
'fullName' => { | ||
'first' => user.first_name, | ||
'middleInitial' => user.middle_name, | ||
'last' => user.last_name | ||
}, | ||
'ssn' => user.ssn, | ||
'dateOfBirth' => user.birth_date, | ||
'email' => user.email | ||
} | ||
} | ||
} | ||
).except!('update_diaries') | ||
|
||
update(form: updated_form.to_json) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.