Skip to content

Commit

Permalink
updating 0538 pdf (#7425)
Browse files Browse the repository at this point in the history
  • Loading branch information
kathleencrawford authored Jul 14, 2021
1 parent 49cfcb9 commit 549da70
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 7 deletions.
Binary file modified lib/pdf_fill/forms/pdfs/21-0538.pdf
Binary file not shown.
22 changes: 18 additions & 4 deletions lib/pdf_fill/forms/va210538.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ class Va210538 < FormBase
question_text: 'SOCIAL SECURITY NUMBER'
}
},
'ssn2' => {
'first' => {
key: 'Social_Security_Number_FirstThreeNumbers[1]'
},
'second' => {
key: 'Social_Security_Number_SecondTwoNumbers[1]'
},
'third' => {
key: 'Social_Security_Number_LastFourNumbers[1]'
}
},
'VAFileNumber' => {
key: 'form1[0].#subform[0].VA_File_Number[0]',
limit: 9,
Expand Down Expand Up @@ -102,8 +113,8 @@ class Va210538 < FormBase
question_text: 'E-MAIL ADDRESS OF CLAIMANT'
},
'updateDiaries' => {
'update_diaries_yes' => { key: 'form1[0].#subform[0].YES_CHECKBOX1[0]' },
'update_diaries_no' => { key: 'form1[0].#subform[0].NO_CHECKBOX1[0]' }
'status_changed_yes' => { key: 'form1[0].#subform[0].YES_CHECKBOX1[0]' },
'status_changed_no' => { key: 'form1[0].#subform[0].NO_CHECKBOX1[0]' }
}
},
'signature' => {
Expand Down Expand Up @@ -139,17 +150,20 @@ def merge_veteran_helpers
# extract ssn
ssn = veteran_information['ssn']
veteran_information['ssn'] = split_ssn(ssn.delete('-')) if ssn.present?
veteran_information['ssn2'] = split_ssn(ssn.delete('-')) if ssn.present?

# extract birth date
veteran_information['dateOfBirth'] = split_date(veteran_information['dateOfBirth'])

# extract email address
extract_email

# this is confusing but if updateDiaries is set to true
# that means the status of the dependents has NOT changed
update_diaries = @form_data['dependencyVerification']['updateDiaries']
@form_data['dependencyVerification']['updateDiaries'] = {
'update_diaries_yes' => select_checkbox(update_diaries),
'update_diaries_no' => select_checkbox(!update_diaries)
'status_changed_yes' => select_checkbox(!update_diaries),
'status_changed_no' => select_checkbox(update_diaries)
}
end

Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/pdf_fill/21-0538/kitchen_sink.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dateOfBirth": "1950-10-04",
"email": "vets.gov.user+228@gmail.com"
},
"updateDiaries": false
"updateDiaries": true
}
}

Binary file modified spec/fixtures/pdf_fill/21-0538/kitchen_sink.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion spec/fixtures/pdf_fill/21-0538/overflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"dateOfBirth": "1950-10-04",
"email": "vets.gov.user+228@gmail.comvets.gov.user+228@gmail.com"
},
"updateDiaries": false
"updateDiaries": true
}
}
Binary file modified spec/fixtures/pdf_fill/21-0538/overflow.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion spec/fixtures/pdf_fill/21-0538/simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dateOfBirth": "1950-10-04",
"email": "vets.gov.user+228@gmail.com"
},
"updateDiaries": false
"updateDiaries": true
}
}

Binary file modified spec/fixtures/pdf_fill/21-0538/simple.pdf
Binary file not shown.

0 comments on commit 549da70

Please sign in to comment.