-
Notifications
You must be signed in to change notification settings - Fork 13
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
[FYST-1900] Make MD retirement subtraction card consistent with other states' #5691
Merged
arinchoi03
merged 13 commits into
main
from
FYST-1900-refactor-md-retirement-subtractions-card-on-final-review-to-be-consistent-with-az-md-nc
Mar 7, 2025
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3e5641f
Make ID/MD/NC/AZ retirement income subtraction controller more simila…
arinchoi03 5689a0f
Use present? check instead of length.positive?
arinchoi03 20bad82
Update eligible_1099r method in base intake - for all states, eligibl…
arinchoi03 24427ec
Save eligible_1099rs in instance variable to avoid repeated querying
arinchoi03 93ad0ec
Show only eligible 1099Rs on the review page
arinchoi03 ff0bb70
Merge remote-tracking branch 'origin' into FYST-1868-nc-only-ask-abou…
arinchoi03 e7e20db
Make nc retirement subtractions html consistent
arinchoi03 80e9476
Add specs to guard against ineligible 1099r during review
arinchoi03 9b4a030
Use section instead of div
arinchoi03 566d63d
Move MD retirement subtraction followups into partial like the other …
arinchoi03 a544708
Fix up references to yaml keys
arinchoi03 291a977
Merge remote-tracking branch 'origin' into FYST-1900-refactor-md-reti…
arinchoi03 4e2514b
Merge remote-tracking branch 'origin' into FYST-1900-refactor-md-reti…
arinchoi03 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
61 changes: 31 additions & 30 deletions
61
...views/state_file/questions/shared/_az_retirement_income_deductions_review_header.html.erb
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 |
---|---|---|
@@ -1,33 +1,34 @@ | ||
<div class="white-group" id="retirement-income-subtractions"> | ||
<div class="spacing-below-25"> | ||
<h2 class="text--body text--bold spacing-below-5"><%=t(".title") %></h2> | ||
<p><%=t(".subtitle") %></p> | ||
</div> | ||
<% if current_intake.eligible_1099rs.length.positive? %> | ||
<section class="white-group" id="retirement-income-subtractions"> | ||
<div class="spacing-below-25"> | ||
<h2 class="text--body text--bold spacing-below-5"><%=t(".title") %></h2> | ||
<p><%=t(".subtitle") %></p> | ||
</div> | ||
|
||
<div class="spacing-below-5"> | ||
<ul class="list--bulleted"> | ||
<% current_intake.eligible_1099rs.each_with_index do |state_file1099_r, index| %> | ||
<p class="text--bold spacing-below-5"> | ||
<%= state_file1099_r.payer_name %> | ||
</p> | ||
<li style="margin-left: 1rem;"> | ||
<% case state_file1099_r&.state_specific_followup&.income_source %> | ||
<% when "uniformed_services" %> | ||
<%= t(".uniformed_services") %> | ||
<% when "pension_plan" %> | ||
<%= t(".government_pension") %> | ||
<% else %> | ||
<%= t(".none_apply") %> | ||
<% end %> | ||
</li> | ||
<div class="spacing-below-5"> | ||
<ul class="list--bulleted"> | ||
<% current_intake.eligible_1099rs.each_with_index do |state_file1099_r, index| %> | ||
<p class="text--bold spacing-below-5"> | ||
<%= state_file1099_r.payer_name %> | ||
</p> | ||
<li style="margin-left: 1rem;"> | ||
<% case state_file1099_r&.state_specific_followup&.income_source %> | ||
<% when "uniformed_services" %> | ||
<%= t(".uniformed_services") %> | ||
<% when "pension_plan" %> | ||
<%= t(".government_pension") %> | ||
<% else %> | ||
<%= t(".none_apply") %> | ||
<% end %> | ||
</li> | ||
|
||
<%= link_to StateFile::Questions::AzRetirementIncomeSubtractionController.to_path_helper(return_to_review: "y", index: index), class: "button--small" do %> | ||
<%= t("general.edit") %> | ||
<span class="sr-only"><%= t("general.edit") %></span> | ||
<%= link_to StateFile::Questions::AzRetirementIncomeSubtractionController.to_path_helper(return_to_review: "y", index: index), class: "button--small" do %> | ||
<%= t("general.edit") %> | ||
<span class="sr-only"><%= t("general.edit") %></span> | ||
<% end %> | ||
<br /> | ||
<% end %> | ||
<br /> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
</ul> | ||
</div> | ||
</section> | ||
<% 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
39 changes: 39 additions & 0 deletions
39
app/views/state_file/questions/shared/_md_retirement_income_deductions_review_header.erb
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,39 @@ | ||
<% if current_intake.eligible_1099rs.length.positive? %> | ||
<section id="retirement-income-source" class="white-group"> | ||
<div class="spacing-below-5"> | ||
<h2 class="text--body text--bold spacing-below-15"><%=t(".retirement_income_deductions") %></h2> | ||
|
||
<% current_intake.eligible_1099rs.each_with_index do |state_file1099_r, index| %> | ||
<% followup = state_file1099_r.state_specific_followup %> | ||
<% unless followup.nil? %> | ||
<div id="<%= "retirement-income-source-#{index}" %>" class="spacing-above-15 spacing-below-15"> | ||
<p class="spacing-below-0 text--small"><b><%= state_file1099_r.payer_name %></b></p> | ||
<div> | ||
<ul class="list--bulleted spacing-above-0" style="padding-left: 3rem;"> | ||
<% if followup.income_source_pension_annuity_endowment? %> | ||
<li class="spacing-below-10"><%= t(".pension_annuity_endowment") %></li> | ||
<% end %> | ||
<% if followup.income_source_other? %> | ||
<li class="spacing-below-10"><%= t(".other") %></li> | ||
<% end %> | ||
<% if followup.service_type_military? %> | ||
<li class="spacing-below-10"><%= t(".military") %></li> | ||
<% end %> | ||
<% if followup.service_type_public_safety? %> | ||
<li class="spacing-below-10"><%= t(".public_safety") %></li> | ||
<% end %> | ||
<% if followup.service_type_none? %> | ||
<li class="spacing-below-10"><%= t(".none") %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<%= link_to StateFile::Questions::MdRetirementIncomeSubtractionController.to_path_helper(return_to_review: "y", index: index), class: "button--small" do %> | ||
<%= t("general.review_and_edit") %> | ||
<span class="sr-only"><%= t(".retirement_income_deductions") %></span> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
</section> | ||
<% end %> |
50 changes: 50 additions & 0 deletions
50
app/views/state_file/questions/shared/_nc_retirement_income_deductions_review_header.erb
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,50 @@ | ||
<% if current_intake.eligible_1099rs.length.positive? %> | ||
<section id="retirement-income-source" class="white-group"> | ||
<div class="spacing-below-5"> | ||
<h2 class="text--body text--bold spacing-below-5"><%=t(".retirement_income_deductions") %></h2> | ||
<p class="text--small"><%= t(".retirement_income_deductions_explanation") %></p> | ||
|
||
<% current_intake.eligible_1099rs.each_with_index do |state_file1099_r, index| %> | ||
<% followup = state_file1099_r.state_specific_followup %> | ||
<% unless followup.nil? %> | ||
<div id="<%= "retirement-income-source-#{index}" %>" class="spacing-above-15 spacing-below-15"> | ||
<div> | ||
<p class="spacing-below-0 text--small"><b><%= state_file1099_r.payer_name %></b></p> | ||
<ul class="list--bulleted spacing-above-0"> | ||
<% if followup.income_source_bailey_settlement? %> | ||
<li><%= t(".retirement_income_source_bailey_settlement") %></li> | ||
<% if followup.bailey_settlement_at_least_five_years_yes? %> | ||
<li><%= t(".bailey_settlement_at_least_five_years") %></li> | ||
<% end %> | ||
<% if followup.bailey_settlement_from_retirement_plan_yes? %> | ||
<li><%= t(".bailey_settlement_from_retirement_plan") %></li> | ||
<% end %> | ||
<% if !followup.bailey_settlement_from_retirement_plan_yes? && !followup.bailey_settlement_at_least_five_years_yes? %> | ||
<li><%= t(".none_apply") %></li> | ||
<% end %> | ||
<% elsif followup.income_source_uniformed_services? %> | ||
<li><%= t(".retirement_income_source_uniformed_services") %></li> | ||
<% if followup.uniformed_services_retired_yes? %> | ||
<li><%= t(".uniformed_twenty_years_medical_retired") %></li> | ||
<% end %> | ||
<% if followup.uniformed_services_qualifying_plan_yes? %> | ||
<li><%= t(".uniformed_survivor_benefit_plan") %></li> | ||
<% end %> | ||
<% if !followup.uniformed_services_retired_yes? && !followup.uniformed_services_qualifying_plan_yes? %> | ||
<li><%= t(".none_apply") %></li> | ||
<% end %> | ||
<% else %> | ||
<li><%= t(".none_apply") %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<%= link_to StateFile::Questions::NcRetirementIncomeSubtractionController.to_path_helper(return_to_review: "y", index: index), class: "button--small" do %> | ||
<%= t("general.review_and_edit") %> | ||
<span class="sr-only"><%= t(".retirement_income_source_review_and_edit", index: index + 1) %></span> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
</section> | ||
<% end %> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that we're changing to
eligible_1099rs
instead ofstate_file1099_rs
here -- could have problems navigating back to a specific 1099R unless we have the same indices as we are using in the subtraction controllersThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in fact, we do have a problem. I used frank rollover & tried to navigate to the 2nd retirement deduction shown -- it takes me to oops page (on demo; fixed on this PR)