generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EL-1699: Early eligibility banner design (#1541)
- Loading branch information
Showing
23 changed files
with
413 additions
and
43 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.panel-blue { | ||
background: govuk-colour("blue"); | ||
padding: 30px; | ||
border: none; | ||
} | ||
|
||
.white_text { | ||
color: white !important; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- if FeatureFlags.enabled?(:ee_banner, @check.session_data) && @check.early_ineligible_result? | ||
.govuk-panel.panel-blue.govuk-panel--confirmation class="govuk-!-text-align-left govuk-!-margin-bottom-9" | ||
.govuk-panel__body | ||
h2.govuk-heading-l.white_text | ||
= t("question_flow.early_result.gross_income.title", cfe_result_number: as_money_string(@check.gross_income_excess)) | ||
|
||
p.govuk-body.white_text class="govuk-!-font-weight-bold" | ||
- if @check.controlled? | ||
= t("question_flow.early_result.gross_income.controlled.para_1") | ||
- else | ||
= t("question_flow.early_result.gross_income.certificated.para_1") | ||
|
||
= link_to t("question_flow.early_result.gross_income.go_to_results"), | ||
early_result_redirect_path(assessment_code: params[:assessment_code], step: @previous_step), | ||
method: :post, | ||
class: "govuk-button govuk-button--secondary govuk-!-margin-top-2", | ||
role: "button", | ||
id: "early-result-button" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
- data = @model.summary_data(section) | ||
- status = data.status.dasherize | ||
|
||
- if @early_result_type == section.to_s | ||
- total_calc = @model.send("total_calculated_#{section}") | ||
|
||
. class="summary-box summary-box-#{@early_result_type == section.to_s ? status : "not-assessed"}" | ||
p.govuk-body-l.summary-list-subheader class="govuk-!-margin-bottom-0" = t("results.show.section_summaries.heading.#{section}") | ||
h3.govuk-heading-l class="govuk-!-margin-bottom-2 govuk-!-margin-top-0" = total_calc | ||
|
||
- if @early_result_type != section.to_s | ||
.govuk-tag | ||
= t("results.show.section_summaries.not_assessed") | ||
- elsif data.status == "ineligible" | ||
.govuk-tag.govuk-tag--custom-red | ||
= t("results.show.section_summaries.exceeds_upper_limit") | ||
- elsif data.status == "contribution_required_and_overall_contribution_required" | ||
.govuk-tag | ||
= t("results.show.section_summaries.contribution_needed") | ||
|
||
p.govuk-body class="govuk-!-margin-top-3" | ||
- upper_snippet = "_no_upper_threshold" if data.no_upper_threshold | ||
- lower_snippet = "_no_lower_threshold" if data.no_lower_threshold | ||
ruby: | ||
matter_type = if @model.domestic_abuse_applicant | ||
t("results.show.section_summaries.matter_types.domestic_abuse_applicant") | ||
elsif @model.immigration_or_asylum_type_upper_tribunal | ||
t("results.show.section_summaries.matter_types.#{@model.immigration_or_asylum_type_upper_tribunal}") | ||
else | ||
t("results.show.section_summaries.matter_types.none") | ||
end | ||
- if @early_result_type != section.to_s | ||
=> t("results.show.section_summaries.texts.not_assessed_desc") | ||
- else | ||
=> t("results.show.section_summaries.texts.#{section}.#{data.status}#{upper_snippet}#{lower_snippet}", | ||
upper_threshold: data.upper_threshold, | ||
lower_threshold: data.lower_threshold, | ||
matter_type:, | ||
capital_contribution: @model.capital_contribution, | ||
income_contribution: @model.income_contribution) | ||
- if links | ||
= link_to t("results.show.section_summaries.see_calculation"), | ||
"##{data[:section]}", | ||
class: "summary-box-link", | ||
"aria-label": t("results.show.section_summaries.see_calculation_aria_label.#{data[:section]}") |
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
Oops, something went wrong.