-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7609 from ministryofjustice/ap-5427/cya-update-me…
…rits-report AP-5427: CYA updates for merits report
- Loading branch information
Showing
21 changed files
with
350 additions
and
199 deletions.
There are no files selected for viewing
14 changes: 0 additions & 14 deletions
14
app/components/reports/merits/delegated_functions_component.html.erb
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
app/components/reports/merits/delegated_functions_component.rb
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
app/views/providers/merits_reports/_applied_previously.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<%= govuk_summary_card(title: t(".heading"), | ||
heading_level: 3, | ||
html_attributes: { id: "app-check-your-answers__applied_previously__card" }) do |card| | ||
card.with_summary_list(actions: false, html_attributes: { id: "app-check-your-answers__applied_previously__summary" }) do |summary_list| | ||
summary_list.with_row(html_attributes: { id: "app-check-your-answers__applied_previously" }) do |row| | ||
row.with_key(text: t(".has_applied_before"), classes: "govuk-!-width-one-half") | ||
row.with_value(text: yes_no(legal_aid_application.applicant.applied_previously)) | ||
end | ||
summary_list.with_row(html_attributes: { id: "app-check-your-answers__previous_reference" }) do |row| | ||
row.with_key(text: t(".previous_application_reference"), classes: "govuk-!-width-one-half") | ||
row.with_value(text: legal_aid_application.applicant.previous_reference.presence || "-") | ||
end | ||
end | ||
end %> |
37 changes: 37 additions & 0 deletions
37
app/views/providers/merits_reports/_delegated_functions.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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<% proceedings.each do |proceeding| %> | ||
<% if proceeding.used_delegated_functions? %> | ||
|
||
<%= govuk_summary_card(title: proceeding.meaning, | ||
heading_level: 3, | ||
html_attributes: { id: "app-check-your-answers__delegated_functions__#{proceeding.name}" }) do |card| | ||
card.with_summary_list(actions: false, html_attributes: { id: "app-check-your-answers__delegated_functions__#{proceeding.name}__summary" }) do |summary_list| | ||
summary_list.with_row(html_attributes: { id: "app-check-your-answers__used_delegated_functions_reported_on__#{proceeding.name}" }) do |row| | ||
row.with_key(text: t(".reported_on"), classes: "govuk-!-width-one-half") | ||
row.with_value(text: proceeding.used_delegated_functions_reported_on) | ||
end | ||
|
||
summary_list.with_row(html_attributes: { id: "app-check-your-answers__used_delegated_functions_on__#{proceeding.name}" }) do |row| | ||
row.with_key(text: t(".used_on"), classes: "govuk-!-width-one-half") | ||
row.with_value(text: proceeding.used_delegated_functions_on) | ||
end | ||
|
||
summary_list.with_row(html_attributes: { id: "app-check-your-answers__delegated_functions_days_to_report__#{proceeding.name}" }) do |row| | ||
row.with_key(text: t(".days_to_report"), classes: "govuk-!-width-one-half") | ||
row.with_value(text: distance_of_time_in_words(proceeding.used_delegated_functions_reported_on, proceeding.used_delegated_functions_on)) | ||
end | ||
end | ||
end %> | ||
|
||
<% else %> | ||
|
||
<%= govuk_summary_card(title: proceeding.meaning, | ||
heading_level: 3, | ||
html_attributes: { id: "app-check-your-answers__delegated_functions__#{proceeding.name}" }) do |card| | ||
card.with_summary_list(actions: false, html_attributes: { id: "app-check-your-answers__delegated_functions" }) do |summary_list| | ||
summary_list.with_row(html_attributes: { id: "app-check-your-answers__used_delegated_functions_on__#{proceeding.name}" }) do |row| | ||
row.with_value(text: t(".not_used"), classes: "govuk-!-width-full") | ||
end | ||
end | ||
end %> | ||
<% end %> | ||
<% end %> |
12 changes: 12 additions & 0 deletions
12
app/views/providers/merits_reports/_proceeding_details.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<%= govuk_summary_card(title: t(".heading"), | ||
heading_level: 3, | ||
html_attributes: { id: "app-check-your-answers__proceeding_details__card" }) do |card| | ||
card.with_summary_list(actions: false, html_attributes: { id: "app-check-your-answers__proceeding_details__summary" }) do |summary_list| | ||
legal_aid_application.proceedings_by_name.each_with_index do |proceeding, i| | ||
summary_list.with_row(classes: "app-check-your-answers__#{proceeding.name}__row") do |row| | ||
row.with_key(text: "#{t('.proceeding')} #{i + 1}", classes: "govuk-!-width-one-half") | ||
row.with_value { proceeding.meaning } | ||
end | ||
end | ||
end | ||
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
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,18 +1,22 @@ | ||
<%= govuk_summary_list(card: { title: t(".heading") }, actions: false) do |summary_list| %> | ||
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__emergency_cost_override" }) do |row| %> | ||
<%= row.with_key(text: t(".request_higher_limit"), classes: "govuk-!-width-one-half") %> | ||
<%= row.with_value { yes_no(@legal_aid_application.emergency_cost_override) } %> | ||
<% end %> | ||
<%= govuk_summary_card(title: t(".heading"), | ||
heading_level: 3, | ||
html_attributes: { id: "app-check-your-answers__emergency_cost_override__card" }) do |card| | ||
card.with_summary_list(actions: !read_only, html_attributes: { id: "app-check-your-answers__emergency_cost_override__summary" }) do |summary_list| | ||
summary_list.with_row(html_attributes: { id: "app-check-your-answers__emergency_cost_override" }) do |row| | ||
row.with_key(text: t(".request_higher_limit"), classes: "govuk-!-width-one-half") | ||
row.with_value { yes_no(@legal_aid_application.emergency_cost_override) } | ||
end | ||
|
||
<% if @legal_aid_application.emergency_cost_override %> | ||
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__emergency_cost_requested" }) do |row| %> | ||
<%= row.with_key(text: t(".new_cost_limit"), classes: "govuk-!-width-one-half") %> | ||
<%= row.with_value { gds_number_to_currency(@legal_aid_application.emergency_cost_requested, precision: 2) } %> | ||
<% end %> | ||
if @legal_aid_application.emergency_cost_override | ||
summary_list.with_row(html_attributes: { id: "app-check-your-answers__emergency_cost_requested" }) do |row| | ||
row.with_key(text: t(".new_cost_limit"), classes: "govuk-!-width-one-half") | ||
row.with_value { gds_number_to_currency(@legal_aid_application.emergency_cost_requested, precision: 2) } | ||
end | ||
|
||
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__emergency_cost_reasons" }) do |row| %> | ||
<%= row.with_key(text: t(".new_limit_reasons"), classes: "govuk-!-width-one-half") %> | ||
<%= row.with_value { @legal_aid_application.emergency_cost_reasons } %> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
summary_list.with_row(html_attributes: { id: "app-check-your-answers__emergency_cost_reasons" }) do |row| | ||
row.with_key(text: t(".new_limit_reasons"), classes: "govuk-!-width-one-half") | ||
row.with_value { @legal_aid_application.emergency_cost_reasons } | ||
end | ||
end | ||
end | ||
end %> |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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.