Class: EducationForm::Forms::VA5490
- Inherits:
-
Base
- Object
- Base
- EducationForm::Forms::VA5490
show all
- Defined in:
- app/sidekiq/education_form/forms/va_5490.rb
Constant Summary
collapse
- PREVIOUS_BENEFITS =
rubocop:disable Layout/LineLength
{
'disability' => 'DISABILITY COMPENSATION OR PENSION',
'dic' => "DEPENDENTS' INDEMNITY COMPENSATION",
'chapter31' => 'VOCATIONAL REHABILITATION BENEFITS (Chapter 31)',
'chapter35' => "VETERANS EDUCATION ASSISTANCE BASED ON SOMEONE ELSE'S SERVICE: CHAPTER 35 - SURVIVORS' AND DEPENDENTS' EDUCATIONAL ASSISTANCE PROGRAM (DEA)",
'chapter33' => "VETERANS EDUCATION ASSISTANCE BASED ON SOMEONE ELSE'S SERVICE: CHAPTER 33 - POST-9/11 GI BILL MARINE GUNNERY SERGEANT DAVID FRY SCHOLARSHIP",
'transferOfEntitlement' => "VETERANS EDUCATION ASSISTANCE BASED ON SOMEONE ELSE'S SERVICE: TRANSFERRED ENTITLEMENT"
}.freeze
- HIGH_SCHOOL_STATUS =
rubocop:enable Layout/LineLength
{
'graduated' => 'Graduated from high school',
'discontinued' => 'Discontinued high school',
'graduationExpected' => 'Expect to graduate from high school',
'ged' => 'Awarded GED',
'neverAttended' => 'Never attended high school'
}.freeze
Constants inherited
from Base
Base::TEMPLATE_PATH
Instance Attribute Summary
Attributes inherited from Base
#form, #record, #text
Instance Method Summary
collapse
Methods inherited from Base
#benefit_type, build, #direct_deposit_type, #disclosure_for, #employment_history, #format, #full_address, #full_address_with_street3, #full_name, #get_template, #header, #header_form_type, #hours_and_type, #initialize, #parse_with_template, #parse_with_template_path, #school_name, #school_name_and_addr, #ssn_gender_dob, #to_date, #value_or_na, #yesno, #yesno_or_blank
Instance Method Details
#applicant_name ⇒ Object
24
25
26
|
# File 'app/sidekiq/education_form/forms/va_5490.rb', line 24
def applicant_name
@applicant.relativeFullName
end
|
#applicant_ssn ⇒ Object
28
29
30
|
# File 'app/sidekiq/education_form/forms/va_5490.rb', line 28
def applicant_ssn
@applicant.relativeSocialSecurityNumber
end
|
#high_school_status ⇒ Object
36
37
38
39
40
41
|
# File 'app/sidekiq/education_form/forms/va_5490.rb', line 36
def high_school_status
status = @applicant.highSchool&.status
return if status.nil?
HIGH_SCHOOL_STATUS[status]
end
|
#previous_benefits ⇒ Object
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# File 'app/sidekiq/education_form/forms/va_5490.rb', line 47
def previous_benefits
previous_benefits = @form.previousBenefits
return if previous_benefits.blank?
previous_benefits_arr = previous_benefits.to_h.map do |key, value|
PREVIOUS_BENEFITS[key.to_s] if value == true
end.compact
if previous_benefits.ownServiceBenefits.present?
own_service_benefits_txt = 'VETERANS EDUCATION ASSISTANCE BASED ON YOUR OWN SERVICE SPECIFY BENEFIT(S): '
own_service_benefits_txt += previous_benefits.ownServiceBenefits
previous_benefits_arr << own_service_benefits_txt
end
if previous_benefits.other.present?
previous_benefits_arr << "OTHER; Specify benefit(s): #{previous_benefits.other}"
end
previous_benefits_arr.join("\n")
end
|
#previously_applied_for_benefits? ⇒ Boolean
43
44
45
|
# File 'app/sidekiq/education_form/forms/va_5490.rb', line 43
def previously_applied_for_benefits?
previous_benefits.present?
end
|
#school ⇒ Object
32
33
34
|
# File 'app/sidekiq/education_form/forms/va_5490.rb', line 32
def school
@applicant.educationProgram
end
|
#veteran_date_of_death_label ⇒ Object
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# File 'app/sidekiq/education_form/forms/va_5490.rb', line 69
def veteran_date_of_death_label
return 'Date of death or MIA/POW:' if @applicant.benefit != 'chapter33' || @applicant..nil?
case @applicant.
when 'diedOnDuty'
label = 'Died while serving on active duty or duty other than active duty:'
when 'diedFromDisabilityOrOnReserve'
label = 'Died from a service-connected disability while a member of the Selected Reserve:'
when 'powOrMia'
label = 'Listed as MIA or POW:'
end
label
end
|