diff --git a/app/assets/javascripts/plan_shopping.js.erb b/app/assets/javascripts/plan_shopping.js.erb index a319c453269..11e996dbfa6 100644 --- a/app/assets/javascripts/plan_shopping.js.erb +++ b/app/assets/javascripts/plan_shopping.js.erb @@ -64,6 +64,33 @@ function applyPlanFilterCBs(cbKlass, cbFilterKlass, planValueTag) { } } + + + +// Only load this script on the plan shopping page + if (window.location.pathname.includes('/insured/plan_shoppings')) { + + // Setup an interval to look for [data-plans-loading] presence + // If it is not present, we can assume the plans are loaded + let intervalId = setInterval(checkPlansLoadedState, 500); + var ogPlanSort; // stores original plan sort order + function checkPlansLoadedState() { + const loading = document.querySelector('[data-plans-loading]'); + if (!loading) { + clearInterval(intervalId); + initSorts(); + } else { + console.log('Plans are still loading'); + } + } + + function initSorts() { + console.log('Plans are loaded'); + ogPlanSort = $('#all-plans #ivl_plans .plan-row') + } +} + + function applyPlanFilters() { var all_selectors = [ applyPlanFilterCBs("plan-type-selection-filter", "data-plan-type", "data-plan-category"), @@ -71,7 +98,9 @@ function applyPlanFilters() { applyPlanFilterCBs("plan-metal-network-selection-filter", "data-plan-network", "data-plan-metal-network") ]; combineAllPlanSelectors(all_selectors); + $("#filter-sidebar input[type='radio']").prop("checked", false); $("strong#plans-count").text($(".plan-row:visible").length); + $("dd#plans-count").text($(".plan-row:visible").length); } var plansToCompareArray = new Array(); @@ -115,17 +144,25 @@ function maybeAddComparisonPlan(cb) { } function doPlanComparison(action_uri) { + console.log(plansToCompareArray); + console.log(uniqueValues(plansToCompareArray)); $.ajax({ type: "GET", url: action_uri, dataType: 'script', data: { - "standard_component_ids": plansToCompareArray,"hbx_enrollment_id": hbx, "active_year": active_year, "enrollment_kind": enrollment_kind, + "standard_component_ids": uniqueValues(plansToCompareArray),"hbx_enrollment_id": hbx, "active_year": active_year, "enrollment_kind": enrollment_kind, "change_plan": change_plan } }); } +function uniqueValues(array) { + let map = new Map(); + array.forEach(value => map.set(value, value)); + return [...map.values()]; +}; + function applyPlanSort(sort_by){ var plandivs = $('#all-plans #ivl_plans .plan-row'); plandivs.sort(function(a, b){ @@ -264,17 +301,28 @@ $(function() { } function resetFilters(){ + $("#filter-sidebar input[type='checkbox']").prop("checked", false); $("#filter-sidebar input[type='text'].plan-metal-premium-from-selection-filter").val(""); $("#filter-sidebar input[type='text'].plan-metal-premium-to-selection-filter").val($('#max_total_employee_cost').val()); $("#filter-sidebar input[type='text'].plan-metal-deductible-from-selection-filter").val(""); $("#filter-sidebar input[type='text'].plan-metal-deductible-to-selection-filter").val($('#max_deductible').val()); - $("#filter-sidebar select.plan-carrier-selection-filter").prop('selectedIndex', 0).selectric('refresh'); - $("#filter-sidebar select.plan-hsa-eligibility-selection-filter").prop('selectedIndex', 0).selectric('refresh'); - $("#filter-sidebar select.plan-osse-eligibility-selection-filter").prop('selectedIndex', 0).selectric('refresh'); + + $("#filter-sidebar select.plan-hsa-eligibility-selection-filter").val(""); + $("#filter-sidebar select.plan-carrier-selection-filter").val(""); + + $("#filter-sidebar input[type='radio']").prop("checked", false); + + $("#all-plans #ivl_plans").empty().append(ogPlanSort); + + if (!disableSelectric) { + $("#filter-sidebar select.plan-carrier-selection-filter").prop('selectedIndex', 0).selectric('refresh'); + $("#filter-sidebar select.plan-hsa-eligibility-selection-filter").prop('selectedIndex', 0).selectric('refresh'); + $("#filter-sidebar select.plan-osse-eligibility-selection-filter").prop('selectedIndex', 0).selectric('refresh'); + } } - $(document).on('click', '#sort_by a', function(){ + $(document).on('change', '#sort_by input', function(){ applyPlanSort($(this).data('sort-by')); }); diff --git a/app/assets/javascripts/ui-components/sidebars/plan_filters.js b/app/assets/javascripts/ui-components/sidebars/plan_filters.js index ba5635b35a7..0dd19735bc7 100644 --- a/app/assets/javascripts/ui-components/sidebars/plan_filters.js +++ b/app/assets/javascripts/ui-components/sidebars/plan_filters.js @@ -1,127 +1,126 @@ //Clear filter selections on page refresh -window.addEventListener('load', function() { +window.addEventListener('load', function () { clearAll(); -}) +}); // Stores values to be processed on function filterResults var filterParams = { - selectedMetalLevels: new Array, - selectedPlanTypes: new Array, - selectedPlanNetworks: new Array, - selectedCarrier: new String, - selectedHSA: new String, - selectedOSSE: new String, - premiumFromAmountValue: new String, - premiumToAmountValue: new String, - deductibleFromAmountValue: new String, - deductibleToAmountValue: new String -} + selectedMetalLevels: new Array(), + selectedPlanTypes: new Array(), + selectedPlanNetworks: new Array(), + selectedCarrier: new String(), + selectedHSA: new String(), + selectedOSSE: new String(), + premiumFromAmountValue: new String(), + premiumToAmountValue: new String(), + deductibleFromAmountValue: new String(), + deductibleToAmountValue: new String(), +}; function filterMetalLevel(element) { - processValues(element) + processValues(element); } function filterPlanType(element) { - processValues(element) + processValues(element); } function filterPlanNetwork(element) { - processValues(element) + processValues(element); } function filterPlanCarriers(element) { - filterParams.selectedCarrier = element.value + filterParams.selectedCarrier = element.value; } function filterHSAEligibility(element) { - filterParams.selectedHSA = element.value + filterParams.selectedHSA = element.value; } function filterOSSEEligibility(element) { - filterParams.selectedOSSE = element.value + filterParams.selectedOSSE = element.value; } function premiumFromAmount(element) { - filterParams.premiumFromAmountValue = element.value + filterParams.premiumFromAmountValue = element.value; } function premiumToAmount(element) { - filterParams.premiumToAmountValue = element.value + filterParams.premiumToAmountValue = element.value; } function deductibleFromAmount(element) { - filterParams.deductibleFromAmountValue = element.value + filterParams.deductibleFromAmountValue = element.value; } function deductibleToAmount(element) { - filterParams.deductibleToAmountValue = element.value + filterParams.deductibleToAmountValue = element.value; } // Passes values from inputs and passes to array function processValues(element) { if (element.checked) { var dataType = element.dataset.category; - if (dataType == "planMetalLevel") { - filterParams.selectedMetalLevels.push(element.dataset.planMetalLevel) + if (dataType == 'planMetalLevel') { + filterParams.selectedMetalLevels.push(element.dataset.planMetalLevel); } - if (dataType == "planType") { - filterParams.selectedPlanTypes.push(element.dataset.planType) + if (dataType == 'planType') { + filterParams.selectedPlanTypes.push(element.dataset.planType); } - if (dataType == "planNetwork") { - filterParams.selectedPlanNetworks.push(element.dataset.planNetwork) + if (dataType == 'planNetwork') { + filterParams.selectedPlanNetworks.push(element.dataset.planNetwork); } } else if (!element.checked) { var dataType = element.dataset.category; - if (dataType == "planMetalLevel") { - index = filterParams.selectedMetalLevels.indexOf(element.dataset.planMetalLevel) - removeItems(filterParams.selectedMetalLevels,index) + if (dataType == 'planMetalLevel') { + index = filterParams.selectedMetalLevels.indexOf( + element.dataset.planMetalLevel + ); + removeItems(filterParams.selectedMetalLevels, index); } - if (dataType == "planType") { - index = filterParams.selectedPlanTypes.indexOf(element.dataset.planType) - removeItems(filterParams.selectedPlanTypes,index) + if (dataType == 'planType') { + index = filterParams.selectedPlanTypes.indexOf(element.dataset.planType); + removeItems(filterParams.selectedPlanTypes, index); } - if (dataType == "planNetwork") { - index = filterParams.selectedPlanNetworks.indexOf(element.dataset.planNetwork) - removeItems(filterParams.selectedPlanNetworks,index) + if (dataType == 'planNetwork') { + index = filterParams.selectedPlanNetworks.indexOf( + element.dataset.planNetwork + ); + removeItems(filterParams.selectedPlanNetworks, index); } } } function clearAll() { // Clears all checkboxes within #filter-sidebar only - var inputs = document.querySelectorAll("#filter-sidebar .filter-input-block input"); - for(var i = 0; i < inputs.length; i++) { - inputs[i].checked = false; - inputs[i].value = ""; - } - // Load only on plan_shopping page - if (window.location.pathname.split('/')[2] == "plan_shoppings") { - // Select options -- WISH LIST GET RID OF SELECTRIC TO REMOVE JQUERY RELIANCE -- - $("#filter-sidebar select.plan-carrier-selection-filter").prop('selectedIndex', 0).selectric('refresh'); - $("#filter-sidebar select.plan-hsa-eligibility-selection-filter").prop('selectedIndex', 0).selectric('refresh'); - $("#filter-sidebar select.plan-osse-eligibility-selection-filter").prop('selectedIndex', 0).selectric('refresh'); + var inputs = document.querySelectorAll( + '#filter-sidebar .filter-input-block input' + ); + for (var i = 0; i < inputs.length; i++) { + inputs[i].checked = false; + inputs[i].value = ''; } // Clear stored values filterParams.selectedMetalLevels = []; filterParams.selectedPlanTypes = []; filterParams.selectedPlanNetworks = []; - filterParams.selectedCarrier = ""; - filterParams.selectedHSA = ""; - filterParams.selectedOSSE = ""; - filterParams.premiumFromAmountValue = ""; - filterParams.premiumToAmountValue = ""; - filterParams.deductibleFromAmountValue = ""; - filterParams.deductibleToAmountValue = ""; + filterParams.selectedCarrier = ''; + filterParams.selectedHSA = ''; + filterParams.selectedOSSE = ''; + filterParams.premiumFromAmountValue = ''; + filterParams.premiumToAmountValue = ''; + filterParams.deductibleFromAmountValue = ''; + filterParams.deductibleToAmountValue = ''; } // Gets the filtered Results function filterResults() { - filterResultsSelections(filterParams) + filterResultsSelections(filterParams); } // Removes an item from array function removeItems(arr, index) { - arr.splice(index,1) -} \ No newline at end of file + arr.splice(index, 1); +} diff --git a/app/controllers/insured/plan_shoppings_controller.rb b/app/controllers/insured/plan_shoppings_controller.rb index 67599becf2a..1548af2d96f 100644 --- a/app/controllers/insured/plan_shoppings_controller.rb +++ b/app/controllers/insured/plan_shoppings_controller.rb @@ -16,6 +16,9 @@ class Insured::PlanShoppingsController < ApplicationController before_action :validate_rating_address, only: [:show] before_action :check_enrollment_state, only: [:show, :thankyou] before_action :set_cache_headers, only: [:show, :thankyou] + before_action :enable_bs4_layout, only: [:show, :plans, :receipt] if EnrollRegistry.feature_enabled?(:bs4_consumer_flow) + + layout :resolve_layout def checkout (redirect_back(fallback_location: root_path) and return) unless agreed_to_thankyou_ivl_page_terms @@ -699,4 +702,13 @@ def validate_rating_address flash[:error] = l10n("insured.out_of_state_error_message") redirect_to family_account_path end + + def resolve_layout + return "application" unless EnrollRegistry.feature_enabled?(:bs4_consumer_flow) + "progress" + end + + def enable_bs4_layout + @bs4 = true + end end diff --git a/app/javascript/css/application.scss b/app/javascript/css/application.scss index 9add4490b1b..7db71213696 100644 --- a/app/javascript/css/application.scss +++ b/app/javascript/css/application.scss @@ -14,3 +14,4 @@ @import 'message_form'; @import 'nav'; @import 'admin_navbar'; +// @import 'print'; diff --git a/app/javascript/css/colors.scss b/app/javascript/css/colors.scss index 5d4925898e9..9b09a7d97df 100644 --- a/app/javascript/css/colors.scss +++ b/app/javascript/css/colors.scss @@ -30,6 +30,7 @@ --error-shade: hsl(0, 68%, 32%); --error-color: hsl(0, 69%, 38%); --error-tint: hsl(0, 80%, 86%); + --body-divider: hsl(214, 16%, 80%); // May be unique colors, but used by all clients --bright-green: hsl(65, 100%, 42%); diff --git a/app/javascript/css/main.scss b/app/javascript/css/main.scss index fe0adc5e73c..e56dd7fafc4 100644 --- a/app/javascript/css/main.scss +++ b/app/javascript/css/main.scss @@ -166,7 +166,15 @@ dt { dt { font-weight: 600; color: var(--text-secondary); - padding-right: 1ch; + padding-right: 2ch; +} + +dl.parent.weight-n { + dt { + font-weight: 400; + color: var(--default-font-color); + padding-right: 2ch; + } } #personal_info { @@ -468,6 +476,37 @@ a.disabled { font-weight: 600; } +.nav-stacked li { + padding: $spacer; + margin-bottom: ($spacer * .25); + width: 100%; + background: var(--grey-010); + color: var(--info-color); + a { + color: var(--info-color); + } + &.activer { + background: var(--info-color); + color: var(--grey-000); + a { + color: var(--grey-000); + } + } + &.active { + @extend .font-weight-bold; + } +} + +.filter-input-block legend.bb, .sort-area legend { + padding-bottom: ($spacer / 2); + border-bottom: 1px solid var(--body-divider); +} + +.filter-input-block legend.bb, .sort-area legend { + padding-bottom: ($spacer / 2); + border-bottom: 1px solid var(--body-divider); +} + .tab-holder { margin-bottom: 6px; } @@ -503,4 +542,4 @@ a.disabled { .msg-active { color: var(--grey-130); font-weight: 600; -} \ No newline at end of file +} diff --git a/app/javascript/css/table.scss b/app/javascript/css/table.scss index c0c1a605b56..00522fd6e35 100644 --- a/app/javascript/css/table.scss +++ b/app/javascript/css/table.scss @@ -14,7 +14,7 @@ table { line-height: 24px; font-weight: 600; - &.w-256px{ + &.w-256px { width: 256px; } } @@ -41,7 +41,8 @@ table { } } - td, th{ + td, + th { &.numeric { text-align: right; } @@ -58,3 +59,26 @@ table { margin: 1em 0; } } + +.compare-table.table { + th, td { + border-top: none; + border-bottom: none; + } + tr.left-border-all td:nth-child(1n+1) { + border-right: 1px solid var(--grey-060); + } + tr:not(.left-border-all) td:nth-child(1n+1) { + border-right: 1px solid var(--grey-030); + } + tr:not(.left-border-all) td:nth-child(2n+1) { + border-right: 1px solid var(--grey-060); + } + tr.left-border-all td:last-of-type, tr:not(.left-border-all) td:last-of-type { + border-right: none; + } + th { + background: var(--grey-010); + font-weight: 600; + } +} diff --git a/app/views/insured/fdsh_ridp_verifications/_outstanding_ridp_documents.html.erb b/app/views/insured/fdsh_ridp_verifications/_outstanding_ridp_documents.html.erb index aac6c2c0420..3cc8a3db9b7 100644 --- a/app/views/insured/fdsh_ridp_verifications/_outstanding_ridp_documents.html.erb +++ b/app/views/insured/fdsh_ridp_verifications/_outstanding_ridp_documents.html.erb @@ -75,7 +75,7 @@ <% end %> <% if pundit_allow(HbxProfile, :can_delete_identity_application_documents?) %> - <%= link_to(insured_ridp_document_path(ridp_doc, :person_id => @person.id), method: :delete, remote: true, class: "btn-error outline text-nowrap") do %> + <%= h(link_to insured_ridp_document_path(ridp_doc, :person_id => @person.id), method: :delete, remote: true, class: "btn-error outline text-nowrap" do %> <%= l10n("insured.consumer_roles.upload_ridp_documents.remove") %> <% end)%> @@ -178,7 +178,6 @@ - @@ -186,6 +185,7 @@
<%= h(link_to 'Documents FAQ', ::EnrollRegistry[:enroll_app].setting(:submit_docs_url).item, class: "btn btn-default btn-small pull-right", target: '_blank', rel: "noopener noreferrer") %> + <%= h(link_to 'Documents FAQ', ::EnrollRegistry[:enroll_app].setting(:submit_docs_url).item, class: "btn btn-default btn-small pull-right", target: '_blank', rel: "noopener noreferrer") %>
diff --git a/app/views/insured/plan_shoppings/_individual_coverage_information.html.erb b/app/views/insured/plan_shoppings/_individual_coverage_information.html.erb index 887303b9479..e811bcdf919 100644 --- a/app/views/insured/plan_shoppings/_individual_coverage_information.html.erb +++ b/app/views/insured/plan_shoppings/_individual_coverage_information.html.erb @@ -1,78 +1,152 @@ <% osse_eligible = (@enrollment.eligible_child_care_subsidy > 0) %> <% calculate = (defined? calculate) ? calculate : true %> <% family_tier_eligible = @enrollment.product&.family_based_rating? %> -
- - - - - - - - <% if osse_eligible %> - +<% if @bs4 %> +
+
<%= l10n("name") %><%= l10n("relationship") %><%= l10n("age") %><%= l10n("premium") %><%=l10n("premium_discount") %>
+ + + + + + + <% if osse_eligible %> + + <% end %> + + + + + + <% @enrollment.hbx_enrollment_members.each do |member| %> + + + + + <% unless family_tier_eligible %> + + <% else %> + + <% end %> + <% if !EnrollRegistry.feature_enabled?(:display_you_pay) %> + + + <% elsif calculate %> + <% if osse_eligible %> + + + + + <% else %> + + + <% end %> + <% else %> + <% if osse_eligible %> + + + + + <% else %> + + + <% end %> + <% end %> + <% end %> - - - - - - <% @enrollment.hbx_enrollment_members.each do |member| %> - - - - - <% unless family_tier_eligible %> - + + + + <% if osse_eligible %> + + + <% end %> + <% if calculate %> + + <% responsible_amount = @plan.total_employee_cost - @enrollment.eligible_child_care_subsidy.to_f %> <% else %> - + + <% responsible_amount = @plan.total_premium - @enrollment.applied_aptc_amount.to_f - @enrollment.eligible_child_care_subsidy.to_f %> + <% end %> + + + +
<%= l10n("name") %><%= l10n("relationship") %><%= l10n("age") %><%= l10n("premium") %><%=l10n("premium_discount") %><%= render partial:"shared/glossary", locals: {key: "aptc_amount_title_info", term: "APTC amount", question_mark: true } %><%= l10n("you_pay") %>
<%= member.person.full_name %><%= member.primary_relationship.titleize %><%= dob_in_words(member.person.age_on(TimeKeeper.date_of_record), member.person.dob) %><%= number_to_currency(@plan.premium_for(member)) %> -- <%- number_to_currency(@plan.aptc_amount(member)) %><%= number_to_currency(0.00) %><%- number_to_currency(@plan.aptc_amount(member)) %><%= number_to_currency(@plan.employee_cost_for(member)) %><%- number_to_currency(member.applied_aptc_amount.to_f) %><%= number_to_currency(0.00) %><%- number_to_currency(member.applied_aptc_amount.to_f) %><%= number_to_currency(@plan.premium_for(member) - member.applied_aptc_amount.to_f) %>
<%= l10n("APTC_amount") %> <%=l10n("info")%><%= l10n("you_pay") %>
<%= member.person.full_name %><%= member.primary_relationship %><%= dob_in_words(member.person.age_on(TimeKeeper.date_of_record), member.person.dob) %><%= number_to_currency(@plan.premium_for(member)) %>
<%= l10n("plans.plan_shopping.receipt.total").upcase %><%= number_to_currency(@plan.total_premium) %><%= number_to_currency(@enrollment.eligible_child_care_subsidy.to_f) %><%= number_to_currency(@plan.total_aptc_amount) %> -- <%= number_to_currency(@enrollment.applied_aptc_amount.to_f) %><%= number_to_currency((responsible_amount < 1 ? 0.00 : responsible_amount)) %>
+
+<% else %> +
+ + + + + + + + <% if osse_eligible %> + <% end %> - <% if !EnrollRegistry.feature_enabled?(:display_you_pay) %> - - - <% elsif calculate %> - <% if osse_eligible %> - - - - + + + + + + <% @enrollment.hbx_enrollment_members.each do |member| %> + + + + + <% unless family_tier_eligible %> + <% else %> - - + <% end %> - <% else %> - <% if osse_eligible %> - - - - + <% if !EnrollRegistry.feature_enabled?(:display_you_pay) %> + + + <% elsif calculate %> + <% if osse_eligible %> + + + + + <% else %> + + + <% end %> <% else %> - - + <% if osse_eligible %> + + + + + <% else %> + + + <% end %> <% end %> + + <% end %> + + + + <% if osse_eligible %> + + + <% end %> + <% if calculate %> + + <% responsible_amount = @plan.total_employee_cost - @enrollment.eligible_child_care_subsidy.to_f %> + <% else %> + + <% responsible_amount = @plan.total_premium - @enrollment.applied_aptc_amount.to_f - @enrollment.eligible_child_care_subsidy.to_f %> <% end %> + - <% end %> - - - - <% if osse_eligible %> - - - <% end %> - <% if calculate %> - - <% responsible_amount = @plan.total_employee_cost - @enrollment.eligible_child_care_subsidy.to_f %> - <% else %> - - <% responsible_amount = @plan.total_premium - @enrollment.applied_aptc_amount.to_f - @enrollment.eligible_child_care_subsidy.to_f %> - <% end %> - - - - - - - -
<%= l10n("name") %><%= l10n("relationship") %><%= l10n("age") %><%= l10n("premium") %><%=l10n("premium_discount") %><%- number_to_currency(@plan.aptc_amount(member)) %><%= number_to_currency(0.00) %><%= l10n("APTC_amount") %> <%=l10n("info")%><%= l10n("you_pay") %>
<%= member.person.full_name %><%= member.primary_relationship %><%= dob_in_words(member.person.age_on(TimeKeeper.date_of_record), member.person.dob) %><%= number_to_currency(@plan.premium_for(member)) %><%- number_to_currency(@plan.aptc_amount(member)) %><%= number_to_currency(@plan.employee_cost_for(member)) %> -- <%- number_to_currency(member.applied_aptc_amount.to_f) %><%= number_to_currency(0.00) %><%- number_to_currency(@plan.aptc_amount(member)) %><%= number_to_currency(0.00) %><%- number_to_currency(@plan.aptc_amount(member)) %><%= number_to_currency(@plan.employee_cost_for(member)) %><%- number_to_currency(member.applied_aptc_amount.to_f) %><%= number_to_currency(@plan.premium_for(member) - member.applied_aptc_amount.to_f) %><%- number_to_currency(member.applied_aptc_amount.to_f) %><%= number_to_currency(0.00) %><%- number_to_currency(member.applied_aptc_amount.to_f) %><%= number_to_currency(@plan.premium_for(member) - member.applied_aptc_amount.to_f) %>
<%= l10n("totals") %><%= number_to_currency(@plan.total_premium) %><%= number_to_currency(@enrollment.eligible_child_care_subsidy.to_f) %><%= number_to_currency(@plan.total_aptc_amount) %><%= number_to_currency(@enrollment.applied_aptc_amount.to_f) %><%= number_to_currency((responsible_amount < 1 ? 0.00 : responsible_amount)) %>
<%= l10n("totals") %><%= number_to_currency(@plan.total_premium) %><%= number_to_currency(@enrollment.eligible_child_care_subsidy.to_f) %><%= number_to_currency(@plan.total_aptc_amount) %><%= number_to_currency(@enrollment.applied_aptc_amount.to_f) %><%= number_to_currency((responsible_amount < 1 ? 0.00 : responsible_amount)) %>
class="text-right"><%= l10n("your_coverage_start_date") %> :<%= @enrollment.effective_on.strftime("%m/%d/%Y") %>
-

+ + class="text-right"><%= l10n("your_coverage_start_date") %> : + <%= @enrollment.effective_on.strftime("%m/%d/%Y") %> + + + +

+<% end %> diff --git a/app/views/insured/plan_shoppings/_plan_details.html.erb b/app/views/insured/plan_shoppings/_plan_details.html.erb index 5b729e42006..7642084c66d 100644 --- a/app/views/insured/plan_shoppings/_plan_details.html.erb +++ b/app/views/insured/plan_shoppings/_plan_details.html.erb @@ -1,52 +1,71 @@ <% plan_carrier = Caches::MongoidCache.lookup(BenefitSponsors::Organizations::Organization.issuer_profiles, plan.issuer_profile_id) { plan.issuer_profile } %> -
-
-
- <% if plan.try(:is_standard_plan) %> -
<%= plan.standard_plan_label %>
- <% end %> -
-
- <% if @enrolled_hbx_enrollment_plan_ids.include?(plan.id) %> -
<%= l10n("your_current_plan", year: plan.try(:active_year)).to_s.upcase %>
- <% end %> -
-
-
<%= display_carrier_logo(Maybe.new(plan), {width: 80}) %>
-
-

- <%= link_to summary_products_plans_path({:standard_component_id => plan.hios_id, hbx_enrollment_id: @hbx_enrollment.id, active_year: plan.try(:active_year), market_kind: @market_kind, coverage_kind: @coverage_kind}), {:remote => true} do %> - <% if plan.is_csr?%> - - <% end %> - <%= plan.name %> - <% end %> -
- <%= plan_carrier.legal_name %> -

+<% if @bs4 %> +
+
+
+ <% if plan.try(:is_standard_plan) %> + + <%= plan.standard_plan_label.titleize %> + + <% end %> + + <% if true %> + <%# if @enrolled_hbx_enrollment_plan_ids.include?(plan.id) %> + + <%= l10n("your_current_plan", year: plan.try(:active_year)) %> + + <% end %>
-
-
- <% if @tax_household.present? && params[:market_kind]=='individual' %> -

<%= number_to_currency(shopping_group_premium(plan.total_employee_cost, plan.total_ehb_premium, plan.total_childcare_subsidy_amount, plan.can_use_aptc?)) %>

- <% else %> -

<%= number_to_currency(plan.total_employee_cost - plan.total_childcare_subsidy_amount) %>

- <% end %> - /<%= l10n("month") %> + +
+
<%= display_carrier_logo(Maybe.new(plan), {width: 80}) %>
+
+

+ <%= link_to summary_products_plans_path({:standard_component_id => plan.hios_id, hbx_enrollment_id: @hbx_enrollment.id, active_year: plan.try(:active_year), market_kind: @market_kind, coverage_kind: @coverage_kind}), {:remote => true} do %> + <% if plan.is_csr?%> + + <% end %> + <%= plan.name %> + <% end %> +
+ <%= plan_carrier.legal_name %> +

+
+
+
+ <% if @tax_household.present? && params[:market_kind]=='individual' %> +

<%= number_to_currency(shopping_group_premium(plan.total_employee_cost, plan.total_ehb_premium, plan.total_childcare_subsidy_amount, plan.can_use_aptc?)) %>

+ <% else %> +

<%= number_to_currency(plan.total_employee_cost - plan.total_childcare_subsidy_amount) %>

+ <% end %> + /<%= l10n("month") %> +
-
-
+
-
-
+
- - - - + + + + @@ -73,25 +92,19 @@
<%= l10n("type").to_s.upcase %><%= l10n("level").to_s.upcase %><%= l10n("network").to_s.upcase %><%= l10n("deductible").to_s.upcase %><%= l10n("type") %><%= l10n("level") %><%= l10n("network") %><%= l10n("deductible") %>
-
-
-
-
- + +
+
+ + <%= l10n("compare") %>
-
-
-
- <%= render partial: "shared/plan_shoppings/sbc_link", locals: { plan: plan, custom_css: true } %> +
+ <%= render partial: "shared/plan_shoppings/sbc_link", locals: { plan: plan, custom_css: false } %>
-
-
+
<% if (@tax_household || @aptc_grants) && params[:market_kind]=='individual' && params[:coverage_kind] == 'health' %> <% if @csr_available && plan.metal_level != "silver" %> - <%= link_to l10n("select_plan"), "javascript:void(0)", class: 'btn btn-default btn-right', data: {'toggle': 'modal', 'target': "#csrEligibleReminder-#{plan.id}"} %>   + <%= link_to l10n("select_plan"), "javascript:void(0)", class: 'btn btn-default btn-right', data: {'toggle': 'modal', 'target': "#csrEligibleReminder-#{plan.id}"} %> <%= link_to(l10n("select_plan"), "javascript:void(0)", {class: 'dn btn btn-default btn-right plan-select select', data: {url: thankyou_insured_plan_shopping_path(@hbx_enrollment, plan_id: plan.id, change_plan: @change_plan, market_kind: @market_kind, coverage_kind: @coverage_kind, enrollment_kind: @enrollment_kind)}}) %> <%= render partial: "shared/csr_eligible_reminder_modal", locals: { plan: plan } %> <% else %> @@ -102,12 +115,214 @@ <% end %> <%= link_to l10n("see_details"), summary_products_plans_path({plan_id: plan.id, :standard_component_id => plan.hios_id, hbx_enrollment_id: @hbx_enrollment.id, market_kind: @market_kind, coverage_kind: @coverage_kind, enrollment_kind: @enrollment_kind, active_year: plan.try(:active_year)}), {:class => "btn btn-default", :remote => true} %>
+
+
-
- + + + + + + + + + + +<% else %> +
+
+
+ <% if plan.try(:is_standard_plan) %> +
<%= plan.standard_plan_label %>
+ <% end %> +
+
+ <% if @enrolled_hbx_enrollment_plan_ids.include?(plan.id) %> +
<%= l10n("your_current_plan", year: plan.try(:active_year)).to_s.upcase %>
+ <% end %> +
+
+
<%= display_carrier_logo(Maybe.new(plan), {width: 80}) %>
+
+

+ <%= link_to summary_products_plans_path({:standard_component_id => plan.hios_id, hbx_enrollment_id: @hbx_enrollment.id, active_year: plan.try(:active_year), market_kind: @market_kind, coverage_kind: @coverage_kind}), {:remote => true} do %> + <% if plan.is_csr?%> + + <% end %> + <%= plan.name %> + <% end %> +
+ <%= plan_carrier.legal_name %> +

+
+
+
+ <% if @tax_household.present? && params[:market_kind]=='individual' %> +

<%= number_to_currency(shopping_group_premium(plan.total_employee_cost, plan.total_ehb_premium, plan.total_childcare_subsidy_amount, plan.can_use_aptc?)) %>

+ <% else %> +

<%= number_to_currency(plan.total_employee_cost - plan.total_childcare_subsidy_amount) %>

+ <% end %> + /<%= l10n("month") %> +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + +
<%= l10n("type").to_s.upcase %><%= l10n("level").to_s.upcase %><%= l10n("network").to_s.upcase %><%= l10n("deductible").to_s.upcase %>
<%= plan.product_type ? plan.product_type.upcase : "" %> + <% plan_level = plan.metal_level.titleize %> + + <%= plan_level != 'Dental' ? plan_level : display_dental_metal_level(plan).titleize %> + + + <% if offers_nationwide_plans? %> + <%= plan.network %> + <% else %> + <% if plan.network_information.present? %> + Network Notes + + <% end %> + <% end %> + <%= deductible_display(@hbx_enrollment, plan) %>
+
+
+
+
+
+ +
+
+
+
+ <%= render partial: "shared/plan_shoppings/sbc_link", locals: { plan: plan, custom_css: true } %> +
+
+
+ <% if (@tax_household || @aptc_grants) && params[:market_kind]=='individual' && params[:coverage_kind] == 'health' %> + <% if @csr_available && plan.metal_level != "silver" %> + <%= link_to l10n("select_plan"), "javascript:void(0)", class: 'btn btn-default btn-right', data: {'toggle': 'modal', 'target': "#csrEligibleReminder-#{plan.id}"} %>   + <%= link_to(l10n("select_plan"), "javascript:void(0)", {class: 'dn btn btn-default btn-right plan-select select', data: {url: thankyou_insured_plan_shopping_path(@hbx_enrollment, plan_id: plan.id, change_plan: @change_plan, market_kind: @market_kind, coverage_kind: @coverage_kind, enrollment_kind: @enrollment_kind)}}) %> + <%= render partial: "shared/csr_eligible_reminder_modal", locals: { plan: plan } %> + <% else %> + <%= link_to(l10n("select_plan"), "javascript:void(0)", {class: 'btn btn-default btn-right plan-select select', data: {url: thankyou_insured_plan_shopping_path(@hbx_enrollment, plan_id: plan.id, change_plan: @change_plan, market_kind: @market_kind, coverage_kind: @coverage_kind, enrollment_kind: @enrollment_kind)}}) %> + <% end %> + <% else %> + <%= link_to(l10n("select_plan"), "javascript:void(0)", {class: 'btn btn-default btn-right plan-select select', data: {url: thankyou_insured_plan_shopping_path(@hbx_enrollment, plan_id: plan.id, change_plan: @change_plan, market_kind: @market_kind, coverage_kind: @coverage_kind, enrollment_kind: @enrollment_kind)}}) %> + <% end %> + <%= link_to l10n("see_details"), summary_products_plans_path({plan_id: plan.id, :standard_component_id => plan.hios_id, hbx_enrollment_id: @hbx_enrollment.id, market_kind: @market_kind, coverage_kind: @coverage_kind, enrollment_kind: @enrollment_kind, active_year: plan.try(:active_year)}), {:class => "btn btn-default", :remote => true} %> +
+
+
+
+ + +<% end %> + diff --git a/app/views/insured/plan_shoppings/receipt.en.html.erb b/app/views/insured/plan_shoppings/receipt.en.html.erb index 1a90186ff95..711740ce933 100644 --- a/app/views/insured/plan_shoppings/receipt.en.html.erb +++ b/app/views/insured/plan_shoppings/receipt.en.html.erb @@ -1,3 +1,170 @@ +<% if @bs4 %> + <%= render partial: 'shared/plan_shopping_progress', locals: { current_page: :complete, nav_options: plan_shopping_progress_hash } %> +
+

<%= l10n("plans.plan_shopping.receipt.title") %>

+

<%= l10n("plans.plan_shopping.receipt.description1", date_time: format_datetime(@enrollment.updated_at)) %>

+

<%= l10n("plans.plan_shopping.receipt.description2") %>

+ <% carrier_key = carrier_key_from_enrollment(@enrollment) %> + <% if @enrollment.employee_role.present? %> + <% else %> + <% if show_pay_now?("plan_shopping", @enrollment) && enrollment_is_ivl_or_coverall?(@enrollment) %> +

<%= l10n("plans.plan_shopping.receipt.important") %>: <%= l10n("plans.plan_shopping.receipt.pay_now_important", carrier_name: EnrollRegistry["#{carrier_key}_pay_now".to_sym]&.setting(:carriers_long_name)&.item) %>

+ <% else %> +

<%= l10n("plans.plan_shopping.receipt.important") %>: <%= l10n("plans.plan_shopping.receipt.not_pay_now_important") %>

+ <% end %> + <% end %> +
+ <% unless @enrollment.employee_role.present? %> + <%= l10n("plans.plan_shopping.receipt.how_to_pay.title") %> + <% end %> + <%= render partial: "insured/plan_shoppings/pay_now", locals: { source: "Plan Shopping", hbx_enrollment: @enrollment }%> +
+ + + +

<%= l10n("plans.plan_shopping.receipt.selected") %>

+ <% if @enrollment.employee_role.present? %> + <%= render "insured/plan_shoppings/coverage_information" %> + <% else %> +

<%= @plan.title %>

+
+
<%= l10n("benefit")%>:
+
<%= @plan.kind&.to_s&.titleize %>
+
<%= l10n("market")%>:
+
<%= show_market_name_by_enrollment @enrollment %>
+
<%= l10n("plans.plan_shopping.receipt.metal_tier") %>:
+
<%= @plan.metal_level&.titleize %>
+
<%= l10n("enrollment_member.coverage_state_date")%>:
+
<%= @enrollment.effective_on.strftime("%m/%d/%Y") %>
+
+ <%= render partial: "insured/plan_shoppings/individual_coverage_information", locals: {calculate:false} %> + <% end %> + + <% if @enrollment.is_cobra_status? %> +

<%= l10n("plans.plan_shopping.receipt.is_cobra_status") %>

+ <% end %> + +

<%= l10n("plans.plan_shopping.receipt.when_finished", action: EnrollRegistry.feature_enabled?(:back_to_account_all_shop) ? "CONTINUE" : "GO TO MY ACCOUNT") %>

+
+ <%= link_to l10n("plans.plan_shopping.receipt.print"), '#', id: 'btnPrint', class: "btn outline interaction-click-control-print-purchase-confirmation mr-2" %> + <%= h(link_to l10n("en.exceptions.go_to_my_account"), main_app.family_account_path, class: "btn secondary text-center", id: 'btn-continue') %> +
+
+<% else %> <% content_for :horizontal_status do %> <%= render :partial => 'insured/families/horizontal_status.html.erb', locals: {step: 3} %> <% end %> @@ -218,4 +385,4 @@
-
+<% end %> diff --git a/app/views/insured/plan_shoppings/receipt.html.erb b/app/views/insured/plan_shoppings/receipt.html.erb index 34b6e4d9356..cb28d93a049 100644 --- a/app/views/insured/plan_shoppings/receipt.html.erb +++ b/app/views/insured/plan_shoppings/receipt.html.erb @@ -1,3 +1,170 @@ +<% if @bs4 %> + <%= render partial: 'shared/plan_shopping_progress', locals: { current_page: :complete, nav_options: plan_shopping_progress_hash } %> +
+

<%= l10n("plans.plan_shopping.receipt.title") %>

+

<%= l10n("plans.plan_shopping.receipt.description1", date_time: format_datetime(@enrollment.updated_at)) %>

+

<%= l10n("plans.plan_shopping.receipt.description2") %>

+ <% carrier_key = carrier_key_from_enrollment(@enrollment) %> + <% if @enrollment.employee_role.present? %> + <% else %> + <% if show_pay_now?("plan_shopping", @enrollment) && enrollment_is_ivl_or_coverall?(@enrollment) %> +

<%= l10n("plans.plan_shopping.receipt.important") %>: <%= l10n("plans.plan_shopping.receipt.pay_now_important", carrier_name: EnrollRegistry["#{carrier_key}_pay_now".to_sym]&.setting(:carriers_long_name)&.item) %>

+ <% else %> +

<%= l10n("plans.plan_shopping.receipt.important") %>: <%= l10n("plans.plan_shopping.receipt.not_pay_now_important") %>

+ <% end %> + <% end %> +
+ <% unless @enrollment.employee_role.present? %> + <%= l10n("plans.plan_shopping.receipt.how_to_pay.title") %> + <% end %> + <%= render partial: "insured/plan_shoppings/pay_now", locals: { source: "Plan Shopping", hbx_enrollment: @enrollment }%> +
+ + + +

<%= l10n("plans.plan_shopping.receipt.selected") %>

+ <% if @enrollment.employee_role.present? %> + <%= render "insured/plan_shoppings/coverage_information" %> + <% else %> +

<%= @plan.title %>

+
+
<%= l10n("benefit")%>:
+
<%= @plan.kind&.to_s&.titleize %>
+
<%= l10n("market")%>:
+
<%= show_market_name_by_enrollment @enrollment %>
+
<%= l10n("plans.plan_shopping.receipt.metal_tier") %>:
+
<%= @plan.metal_level&.titleize %>
+
<%= l10n("enrollment_member.coverage_state_date")%>:
+
<%= @enrollment.effective_on.strftime("%m/%d/%Y") %>
+
+ <%= render partial: "insured/plan_shoppings/individual_coverage_information", locals: {calculate:false} %> + <% end %> + + <% if @enrollment.is_cobra_status? %> +

<%= l10n("plans.plan_shopping.receipt.is_cobra_status") %>

+ <% end %> + +

<%= l10n("plans.plan_shopping.receipt.when_finished", action: EnrollRegistry.feature_enabled?(:back_to_account_all_shop) ? "CONTINUE" : "GO TO MY ACCOUNT") %>

+
+ <%= link_to l10n("plans.plan_shopping.receipt.print"), '#', id: 'btnPrint', class: "btn outline interaction-click-control-print-purchase-confirmation mr-2" %> + <%= h(link_to l10n("en.exceptions.go_to_my_account"), main_app.family_account_path, class: "btn secondary text-center", id: 'btn-continue') %> +
+
+<% else %> <% content_for :horizontal_status do %> <%= render :partial => 'insured/families/horizontal_status.html.erb', locals: {step: 3} %> <% end %> @@ -219,3 +386,4 @@

+<% end %> diff --git a/app/views/insured/plan_shoppings/show.html.erb b/app/views/insured/plan_shoppings/show.html.erb index 2faada807f0..07b56ed5cf0 100644 --- a/app/views/insured/plan_shoppings/show.html.erb +++ b/app/views/insured/plan_shoppings/show.html.erb @@ -1,635 +1,1173 @@ -<% content_for :horizontal_status do %> - <%= render partial: 'insured/families/horizontal_status.html.erb', locals: { step: 2 } %> -<% end %> +<% if @bs4 %> + <%= render partial: 'shared/plan_shopping_progress', locals: { current_page: :choose_plan, nav_options: plan_shopping_progress_hash } %> -
- -
-
-
-
-
-

<%= l10n("insured.plan_shoppings.show.title") %>

- <% if @coverage_kind == "health" %> -

<%= l10n("insured.plan_shoppings.show.health_title.content") %>

- <% else %> -

<%= l10n("insured.plan_shoppings.show.dental_title.content") %>

- <% end %> -

- <% if @market_kind == "shop" && EnrollRegistry.feature_enabled?(:display_cost_warning_message) %> - <% if @hbx_enrollment.sponsored_benefit.single_plan_type? %> - <%= l10n("insured.plan_shoppings.final_cost_change") %> - <% end %> - <% if display_plan_cost_warning(@benefit_group) %> - <%= l10n("insured.plan_shoppings.final_cost_change") %> - <% end %> - <% end %> -

-
- <%= render "shared/plan_shoppings/more_plan_details" %> -
-

- <% if @market_kind == "individual" || @market_kind == 'coverall' %> - - <%= l10n("compare_plans").to_s.upcase %> - - <% end %> - <% if @market_kind == "shop" || @market_kind == 'fehb' %> - - <%= l10n("compare_plans").to_s.upcase %> - - <% end %> -

-
-
- <%= render partial: './ui-components/v1/filters/plan_filters' %> -
- <% if @market_kind == 'shop' || @market_kind == 'fehb' %> - - <% end %> -
- - <% if @market_kind == 'individual' || @market_kind == 'coverall' %> -
-

- <%= l10n("loading") %> -

-
- <% end %> - <% if @market_kind == 'shop' || @market_kind == 'fehb' %> -
- <%= render partial: "ui-components/v1/cards/plan_details", collection: @member_groups, as: :plan %> -
-
- <% end %> -
-
-
-
-

- -

+
+ +
+

<%= l10n("insured.plan_shoppings.show.title") %>

+

<%= @coverage_kind == "health" ? l10n("insured.plan_shoppings.show.health_title.content") : l10n("insured.plan_shoppings.show.dental_title.content")%>

+ <%= l10n("previous_step") %> + <%= render "shared/plan_shoppings/more_plan_details" %> + +
+ +
+
+ +
+ <%= render partial: './ui-components/v1/filters/plan_filters' %>
+
+ +
+ +
+

Plan Results

+ <% if true #@market_kind == "individual" || @market_kind == 'coverall' %> + + <% end %>
-
- <% if @change_plan.blank? && @market_kind == "individual" %> - <% if @enrollment_kind.blank? && is_under_open_enrollment? %> - <%= render partial: 'shared/individual_progress', locals: { step: '4' } %> - <% else %> - <%= render partial: 'shared/sep_progress', locals: { step: '5' } %> - <% end %> - <% elsif @change_plan.blank? && @market_kind == "coverall" %> - <%= render partial: 'shared/resident_progress', locals: { step: '4' } %> - <% elsif @change_plan.blank? %> - <%= render partial: 'shared/signup_progress', locals: { step: '5' } %> - <% elsif @change_plan == "change_by_qle" %> - <%= render partial: 'shared/qle_progress', locals: { step: '2', show_button: 'true' } %> - <% elsif @change_plan == "change_plan" %> - <% if (@market_kind == "individual" && !is_under_open_enrollment?) || @enrollment_kind == 'sep' %> - <%= render partial: 'shared/sep_shop_for_plans_progress', locals: { step: '2' } %> - <% else %> - <%= render partial: 'shared/shop_for_plans_progress', locals: { step: '1', show_waive: true } %> - <% end %> + +
+ <% if @market_kind == 'individual' || @market_kind == 'coverall' %> +
+

<%= l10n("loading") %>

+
+ <% end %> + + <% if @market_kind == 'shop' || @market_kind == 'fehb' %> +
<%= render partial: "ui-components/v1/cards/plan_details", collection: @member_groups, as: :plan %>
+
<% end %>
-
- -<%# Modals %> -<%= render "ui-components/v1/modals/detail_modal" %> -