Browse Source

Add a red link to show questions that still must be answered (after bulk upload)

pull/2836/head
Manny Dinssa 1 month ago
parent
commit
39364732b3
  1. 2
      app/components/check_answers_summary_list_card_component.rb
  2. 13
      app/frontend/styles/_red-link.scss
  3. 1
      app/frontend/styles/application.scss
  4. 2
      app/helpers/check_answers_helper.rb

2
app/components/check_answers_summary_list_card_component.rb

@ -48,7 +48,7 @@ private
def unanswered_value(question)
if log.creation_method_bulk_upload? && log.bulk_upload.present? && !log.optional_fields.include?(question.id)
govuk_link_to question.check_answer_prompt, correct_validation_action_href(question, log, nil, @correcting_hard_validation), class: "govuk-link govuk-link--no-visited-state app-!-colour-red"
govuk_link_to question.check_answer_prompt, correct_validation_action_href(question, log, nil, @correcting_hard_validation), class: "app-red-link app-red-link---no-visited-state"
else
govuk_link_to question.check_answer_prompt, correct_validation_action_href(question, log, nil, @correcting_hard_validation), class: "govuk-link govuk-link--no-visited-state"
end

13
app/frontend/styles/_red-link.scss

@ -0,0 +1,13 @@
.app-red-link {
@include govuk-typography-common;
@include govuk-link-decoration;
@include govuk-link-style-text;
}
.app-red-link:link, .app-red-link---no-visited-state:visited {
color: govuk-colour("red");
}
.app-red-link:hover {
color: govuk-shade(govuk-colour("red"), 20);
}

1
app/frontend/styles/application.scss

@ -48,6 +48,7 @@ $govuk-breakpoints: (
@import "search";
@import "sub-navigation";
@import "unread-notification";
@import "red-link";
// App utilities
.app-\!-colour-muted {

2
app/helpers/check_answers_helper.rb

@ -62,7 +62,7 @@ private
def unanswered_value(log:, question:)
if log.creation_method_bulk_upload? && log.bulk_upload.present? && !log.optional_fields.include?(question.id)
govuk_link_to question.check_answer_prompt, unanswered_action_href(question, log), class: "govuk-link govuk-link--no-visited-state app-!-colour-red"
govuk_link_to question.check_answer_prompt, unanswered_action_href(question, log), class: "app-red-link app-red-link---no-visited-state"
else
govuk_link_to question.check_answer_prompt, unanswered_action_href(question, log), class: "govuk-link govuk-link--no-visited-state"
end

Loading…
Cancel
Save