From 39364732b30729cbcbfda584f04c06c576353dac Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:03:35 +0000 Subject: [PATCH] Add a red link to show questions that still must be answered (after bulk upload) --- .../check_answers_summary_list_card_component.rb | 2 +- app/frontend/styles/_red-link.scss | 13 +++++++++++++ app/frontend/styles/application.scss | 1 + app/helpers/check_answers_helper.rb | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 app/frontend/styles/_red-link.scss diff --git a/app/components/check_answers_summary_list_card_component.rb b/app/components/check_answers_summary_list_card_component.rb index 29afc8c82..493f190c3 100644 --- a/app/components/check_answers_summary_list_card_component.rb +++ b/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 diff --git a/app/frontend/styles/_red-link.scss b/app/frontend/styles/_red-link.scss new file mode 100644 index 000000000..b57d4ed51 --- /dev/null +++ b/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); +} diff --git a/app/frontend/styles/application.scss b/app/frontend/styles/application.scss index 3e75107bd..77430885f 100644 --- a/app/frontend/styles/application.scss +++ b/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 { diff --git a/app/helpers/check_answers_helper.rb b/app/helpers/check_answers_helper.rb index 389107e1c..defc86222 100644 --- a/app/helpers/check_answers_helper.rb +++ b/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