Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nj 211 separate health #5307

Merged
merged 18 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions app/assets/stylesheets/_state-file.scss
Original file line number Diff line number Diff line change
Expand Up @@ -312,19 +312,6 @@
font-size: 1.3rem;
line-height: 1.9rem;
}

&.grey-group {
margin: 0 auto;
padding: 2rem;
margin-bottom: 2rem;
background: $color-grey-light;
border: 2px solid $color-grey-medium-light;
border-radius: 6px;

.checkbox.is-selected {
background: inherit;
}
}
}

.form1099__label {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module StateFile
module Questions
class NjDependentsHealthInsuranceController < QuestionsController

before_action -> { @filing_year = Rails.configuration.statefile_current_tax_year }

def self.show?(intake)
return false unless intake.dependents.any?
intake.has_health_insurance_requirement_exception? || intake.eligibility_all_members_health_insurance_no?
end

def form_params
params
.fetch(:state_file_nj_dependents_health_insurance_form, {})
.permit([
{
dependents_attributes: [
:id,
:nj_did_not_have_health_insurance,
]
}
])
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,16 @@ class NjEligibilityHealthInsuranceController < QuestionsController

before_action -> { @filing_year = Rails.configuration.statefile_current_tax_year }

def self.show?(intake)
!intake.has_health_insurance_requirement_exception?
end

def form_params
params
.fetch(:state_file_nj_eligibility_health_insurance_form, {})
.permit([
:eligibility_all_members_health_insurance,
{
dependents_attributes: [
:id,
:nj_did_not_have_health_insurance,
]
}
])
.permit([:eligibility_all_members_health_insurance])
end

end
end
end
10 changes: 10 additions & 0 deletions app/forms/state_file/nj_dependents_health_insurance_form.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module StateFile
class NjDependentsHealthInsuranceForm < QuestionsForm
attr_accessor :dependents_attributes
delegate :dependents, to: :intake

def save
@intake.update!(dependents_attributes: dependents_attributes.to_h)
end
end
end
10 changes: 0 additions & 10 deletions app/forms/state_file/nj_eligibility_health_insurance_form.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
module StateFile
class NjEligibilityHealthInsuranceForm < QuestionsForm
set_attributes_for :intake, :eligibility_all_members_health_insurance
attr_accessor :dependents_attributes
delegate :dependents, to: :intake

validates :eligibility_all_members_health_insurance, presence: true

def save
@intake.update(attributes_for(:intake))
if @intake.eligibility_all_members_health_insurance_no?
@intake.update!(dependents_attributes: dependents_attributes.to_h)
else
attributes_array = intake.dependents.map do |dependent|
{ id: dependent.id, nj_did_not_have_health_insurance: 'no' }
end
@intake.update!(dependents_attributes: attributes_array)
end
end
end
end
1 change: 1 addition & 0 deletions app/lib/navigation/state_file_nj_question_navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class StateFileNjQuestionNavigation < Navigation::StateFileBaseQuestionNavigatio
Navigation::NavigationStep.new(StateFile::Questions::NjDisabledExemptionController),
Navigation::NavigationStep.new(StateFile::Questions::NjVeteransExemptionController),
Navigation::NavigationStep.new(StateFile::Questions::NjCollegeDependentsExemptionController),
Navigation::NavigationStep.new(StateFile::Questions::NjDependentsHealthInsuranceController),
Navigation::NavigationStep.new(StateFile::Questions::NjMedicalExpensesController),
Navigation::NavigationStep.new(StateFile::Questions::NjHouseholdRentOwnController),
Navigation::NavigationStep.new(StateFile::Questions::NjHomeownerEligibilityController),
Expand Down
7 changes: 5 additions & 2 deletions app/models/state_file_nj_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,13 @@ def eligibility_made_less_than_threshold?
nj_gross_income <= threshold
end

def has_health_insurance_requirement_exception?
self.eligibility_made_less_than_threshold? || self.eligibility_claimed_as_dependent?
end

def health_insurance_eligibility
if self.eligibility_all_members_health_insurance_no?
has_exception = self.eligibility_made_less_than_threshold? || self.eligibility_claimed_as_dependent?
has_exception ? "eligible" : "ineligible"
self.has_health_insurance_requirement_exception? ? "eligible" : "ineligible"
else
"eligible"
end
mmazanec22 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<% title = t(".title") %>

<% content_for :page_title, title %>
<% content_for :card do %>
<h1 class="h2"><%= title %></h1>

<%= form_with model: @form, url: { action: :update }, local: true, method: "put", builder: VitaMinFormBuilder do |f| %>
<div class="white-group">
<div class="form-group">
<fieldset class="form-group tight-checkboxes">
<legend class="form-question"><%= t('.label') %></legend>
<div class="input-group--block">
<%= f.fields_for :dependents do |ff| %>
<% dependent = ff.object %>
<%= ff.cfa_checkbox(
:nj_did_not_have_health_insurance,
dependent.full_name,
options: { checked_value: "yes", unchecked_value: "no" }
) %>
<% end %>
</div>
</fieldset>
</div>
</div>

<div class="reveal">
<button class="reveal__button"><%= t('.coverage_heading') %></button>
<div class="reveal__content">
<%= t('state_file.general.nj_minimal_essential_health_coverage_html') %>
</div>
</div>

<%= f.continue %>
<% end %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,29 @@

<%= form_with model: @form, url: { action: :update }, local: true, method: "put", builder: VitaMinFormBuilder do |f| %>
<div class="white-group">
<div class="form-group question-with-follow-up">
<div class="question-with-follow-up__question">
<%= f.cfa_radio_set(
:eligibility_all_members_health_insurance,
label_text: t(".label", filing_year: @filing_year),
collection: [
{ value: "yes", label: t("general.affirmative") },
{
value: "no",
label: t("general.negative"),
input_html: {
"data-follow-up": "#household-members",
"aria-controls": "household-members"
}
},
],
) %>
<div class="form-group">
<%= f.cfa_radio_set(
:eligibility_all_members_health_insurance,
label_text: t(".label", filing_year: @filing_year),
collection: [
{ value: "yes", label: t("general.affirmative") },
{
value: "no",
label: t("general.negative"),
input_html: {
"data-follow-up": "#household-members",
"aria-controls": "household-members"
}
},
],
) %>
</div>

<% if current_intake.dependents.any? %>
<div class="form-group question-with-follow-up__follow-up grey-group" id="household-members">
<fieldset class="form-group tight-checkboxes">
<legend class="form-question not-centered"><%= t('.label_follow_up') %></legend>
<div class="input-group--block">
<%= f.fields_for :dependents do |ff| %>
<% dependent = ff.object %>
<%= ff.cfa_checkbox(
:nj_did_not_have_health_insurance,
t(".dependent_label", name: dependent.full_name),
options: { checked_value: "yes", unchecked_value: "no" }
) %>
<% end %>
</div>
</fieldset>
</div>
<% end %>
</div>
</div>

<div class="reveal">
<button class="reveal__button"><%= t('.coverage_heading') %></button>
<div class="reveal__content">
<p><%= t('.coverage_description_html') %></p>
<%= t('state_file.general.nj_minimal_essential_health_coverage_html') %>
</div>
</div>

Expand Down
9 changes: 6 additions & 3 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2119,6 +2119,7 @@ en:
nc_tax_withheld: North Carolina tax withheld
nc_taxable_income: North Carolina taxable income
nc_use_tax: North Carolina use tax
nj_minimal_essential_health_coverage_html: "<p>Most people who have health insurance have minimum essential coverage. “Minimal essential coverage” just refers to how much your plan covers. If you have any of the following, you most likely have it:</p>\n<ul>\n <li>A plan through your employer</li>\n <li>A plan bought through <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://nj.gov/getcoverednj/\">GetCoveredNJ</a></li>\n <li>Medicare</li> \n <li>Medicaid (NJ FamilyCare)</li>\n</ul>\n<p><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://nj.gov/treasury/njhealthinsurancemandate/getinfo.shtml\">Here is the full list of insurance options that have minimum essential coverage.</a><p> \n<p>If you only had standalone vision and dental plans, workers' compensation coverage, and/or coverage limited to a specified disease or illness, you didn't have minimum essential coverage. In New Jersey, as of 2018, you need minimum essential coverage, or you will likely pay additional taxes.</p>\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[dust] do we have a guideline on when to use \n vs <br> in these translation strings?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[dust] those \n look to me like they were added by the ide when pasting the html block inside quotes, and don't actually have any impact on this string once it is parsed.

in terms of best practice for translated html strings, I think this example is much more readable and avoids the ide adding in \n

register_to_vote: Register to vote.
see_detailed_return: See detailed return information
standard_deduction: Standard deduction
Expand Down Expand Up @@ -3127,6 +3128,11 @@ en:
edit:
county: County
title: Select the county where you lived on December 31, %{filing_year}
nj_dependents_health_insurance:
edit:
coverage_heading: What is health insurance with minimum essential coverage?
label: 'Check all the people that did NOT have health insurance:'
title: Please tell us which dependents were missing health insurance (with minimum essential health coverage) in 2024.
nj_disabled_exemption:
edit:
instructions_html: People with disabilities are eligible for tax exemptions. <br><br> In NJ, you are considered disabled if you have a "<b>total and permanent</b> inability to engage in any substantial gainful activity because of any physical or mental impairment, including blindness." <br><br> (This is different from the federal tax definition. NJ doesn’t consider your age or your receipt of taxable disability income.)
Expand Down Expand Up @@ -3160,11 +3166,8 @@ en:
title: You may be eligible for the Earned Income Tax Credit
nj_eligibility_health_insurance:
edit:
coverage_description_html: "<p>Most people who have health insurance have minimum essential coverage. “Minimal essential coverage” just refers to how much your plan covers. If you have any of the following, you most likely have it:</p>\n<ul>\n <li>A plan through your employer</li>\n <li>A plan bought through <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://nj.gov/getcoverednj/\">GetCoveredNJ</a></li>\n <li>Medicare</li> \n <li>Medicaid (NJ FamilyCare)</li>\n</ul>\n<p><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://nj.gov/treasury/njhealthinsurancemandate/getinfo.shtml\">Here is the full list of insurance options that have minimum essential coverage.</a><p> \n<p>If you only had standalone vision and dental plans, workers' compensation coverage, and/or coverage limited to a specified disease or illness, you didn't have minimum essential coverage. In New Jersey, as of 2018, you need minimum essential coverage, or you will likely pay additional taxes.</p>\n"
coverage_heading: What is health insurance with minimum essential coverage?
dependent_label: "%{name}"
label: Did you and all members of your tax household have health insurance (with minimum essential coverage) for every month in %{filing_year}?
label_follow_up: Which dependents were missing health insurance?
tax_household_description_html: A tax household includes you, your spouse (if filing a joint return), domestic partner claimed on your return, and any individuals you claim as dependents on your NJ-1040. It also includes any individuals you can, but do not, claim as dependents on your return.
tax_household_heading: What is considered a tax household?
title: Let’s get started.
Expand Down
9 changes: 6 additions & 3 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2071,6 +2071,7 @@ es:
nc_tax_withheld: Impuesto retenido en Carolina del Norte
nc_taxable_income: Ingreso tributables en Carolina del Norte
nc_use_tax: Impuesto sobre el uso de Carolina del Norte
nj_minimal_essential_health_coverage_html: "<p>Most people who have health insurance have minimum essential coverage. “Minimal essential coverage” just refers to how much your plan covers. If you have any of the following, you most likely have it:</p>\n<ul>\n <li>A plan through your employer</li>\n <li>A plan bought through <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://nj.gov/getcoverednj/\">GetCoveredNJ</a></li>\n <li>Medicare</li> \n <li>Medicaid (NJ FamilyCare)</li>\n</ul>\n<p><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://nj.gov/treasury/njhealthinsurancemandate/getinfo.shtml\">Here is the full list of insurance options that have minimum essential coverage.</a><p> \n<p>If you only had standalone vision and dental plans, workers' compensation coverage, and/or coverage limited to a specified disease or illness, you didn't have minimum essential coverage. In New Jersey, as of 2018, you need minimum essential coverage, or you will likely pay additional taxes.</p>\n"
register_to_vote: Regístrate para votar
see_detailed_return: Ver información detallada de la declaración
standard_deduction: Deducción estándar
Expand Down Expand Up @@ -3087,6 +3088,11 @@ es:
edit:
county: Condado
title: Selecciona el condado donde viviste el 31 de diciembre de %{filing_year}
nj_dependents_health_insurance:
edit:
coverage_heading: What is health insurance with minimum essential coverage?
label: 'Check all the people that did NOT have health insurance:'
title: Please tell us which dependents were missing health insurance (with minimum essential health coverage) in 2024.
nj_disabled_exemption:
edit:
instructions_html: Las personas con discapacidad tienen derecho a exenciones de impuestos. <br><br> En Nueva Jersey, se le considera discapacitado si tiene una "incapacidad <b>total y permanente</b> para participar en cualquier actividad sustancial y lucrativa debido a cualquier impedimento físico o mental, incluida la ceguera". <br><br> (Esto es diferente de la definición de impuestos federales. Nueva Jersey no tiene en cuenta su edad ni su percepción de ingresos por discapacidad sujetos a impuestos.)
Expand Down Expand Up @@ -3120,11 +3126,8 @@ es:
title: You may be eligible for the Earned Income Tax Credit
nj_eligibility_health_insurance:
edit:
coverage_description_html: "<p>Most people who have health insurance have minimum essential coverage. “Minimal essential coverage” just refers to how much your plan covers. If you have any of the following, you most likely have it:</p>\n<ul>\n <li>A plan through your employer</li>\n <li>A plan bought through <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://nj.gov/getcoverednj/\">GetCoveredNJ</a></li>\n <li>Medicare</li> \n <li>Medicaid (NJ FamilyCare)</li>\n</ul>\n<p><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://nj.gov/treasury/njhealthinsurancemandate/getinfo.shtml\">Here is the full list of insurance options that have minimum essential coverage.</a><p> \n<p>If you only had standalone vision and dental plans, workers' compensation coverage, and/or coverage limited to a specified disease or illness, you didn't have minimum essential coverage. In New Jersey, as of 2018, you need minimum essential coverage, or you will likely pay additional taxes.</p>\n"
coverage_heading: What is health insurance with minimum essential coverage?
dependent_label: "%{name}"
label: Did you and all members of your tax household have health insurance (with minimum essential coverage) for every month in %{filing_year}?
label_follow_up: Which dependents were missing health insurance?
tax_household_description_html: A tax household includes you, your spouse (if filing a joint return), domestic partner claimed on your return, and any individuals you claim as dependents on your NJ-1040. It also includes any individuals you can, but do not, claim as dependents on your return.
tax_household_heading: What is considered a tax household?
title: Let’s get started.
Expand Down
Loading
Loading