From 62eaced8b3dc373dbc743f2226ca1fe0757d922f Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Mon, 4 Dec 2023 14:44:50 +0000 Subject: [PATCH] Remove indentation on some task lists This has been requested by the designer. --- app/components/task_list/component.html.erb | 16 +++++++++------- app/components/task_list/component.rb | 2 +- .../professional_standing_requests/show.html.erb | 2 +- .../qualification_requests/index.html.erb | 1 + .../reference_requests/index.html.erb | 1 + .../review_verifications/index.html.erb | 1 + 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/components/task_list/component.html.erb b/app/components/task_list/component.html.erb index 9507c59a31..a5b35fe21b 100644 --- a/app/components/task_list/component.html.erb +++ b/app/components/task_list/component.html.erb @@ -1,15 +1,17 @@
    <% sections.each do |section| %>
  1. -

    - <% if sections.count > 1 %> - <%= section[:number] %>. - <% end %> + <% if (title = section[:title]).present? %> +

    + <% if sections.count > 1 %> + <%= section[:number] %>. + <% end %> - <%= section[:title] %> -

    + <%= title %> + + <% end %> -
      +
        <% section[:items].each do |item| %>
      • <% status_id = "#{section[:number]}-#{section[:key]}-#{item[:key]}-status" %> diff --git a/app/components/task_list/component.rb b/app/components/task_list/component.rb index 7c257107a7..ac12461ce6 100644 --- a/app/components/task_list/component.rb +++ b/app/components/task_list/component.rb @@ -30,7 +30,7 @@ def sections .map do |section, index| section.merge( number: index + 1, - key: section[:title].parameterize, + key: section[:title]&.parameterize, items: section[:items].map do |item| item.merge(key: item[:name].parameterize) diff --git a/app/views/assessor_interface/professional_standing_requests/show.html.erb b/app/views/assessor_interface/professional_standing_requests/show.html.erb index e15958bf5a..dfd92d7618 100644 --- a/app/views/assessor_interface/professional_standing_requests/show.html.erb +++ b/app/views/assessor_interface/professional_standing_requests/show.html.erb @@ -10,7 +10,7 @@ <%= render(TaskList::Component.new( [ { - title: "", + indentation: false, items: [ { name: "Request LoPS verification", diff --git a/app/views/assessor_interface/qualification_requests/index.html.erb b/app/views/assessor_interface/qualification_requests/index.html.erb index 9907916180..99dfc7c9fa 100644 --- a/app/views/assessor_interface/qualification_requests/index.html.erb +++ b/app/views/assessor_interface/qualification_requests/index.html.erb @@ -11,6 +11,7 @@ [ { title: "Qualifications", + indentation: false, items: @qualification_requests.map do |qualification_request| { name: qualification_title(qualification_request.qualification), diff --git a/app/views/assessor_interface/reference_requests/index.html.erb b/app/views/assessor_interface/reference_requests/index.html.erb index 4dc6b99eb8..bb98c0c6a4 100644 --- a/app/views/assessor_interface/reference_requests/index.html.erb +++ b/app/views/assessor_interface/reference_requests/index.html.erb @@ -17,6 +17,7 @@ [ { title: "Work references", + indentation: false, items: @reference_requests.each_with_index.map do |reference_request, index| { name: work_history_name_and_duration(reference_request.work_history, most_recent: index.zero?), diff --git a/app/views/assessor_interface/review_verifications/index.html.erb b/app/views/assessor_interface/review_verifications/index.html.erb index 93d1d836d3..8c2b4c9cec 100644 --- a/app/views/assessor_interface/review_verifications/index.html.erb +++ b/app/views/assessor_interface/review_verifications/index.html.erb @@ -12,6 +12,7 @@ [ { title: "LoPS", + indentation: false, items: [ { name: region_teaching_authority_name(@application_form.region, context: :assessor).upcase_first,