From 313f85a359d44b46b87f1e67e2b9cb2ed65e8378 Mon Sep 17 00:00:00 2001 From: Edward Kerry Date: Thu, 24 Sep 2020 12:38:40 +0100 Subject: [PATCH] Remove internal notes from specialist document presenter Certain Specilialist Documents can have internal notes that should not be presented on the frontend. --- app/presenters/specialist_document_presenter.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/presenters/specialist_document_presenter.rb b/app/presenters/specialist_document_presenter.rb index 8f3a752c7..6dc1a5d22 100644 --- a/app/presenters/specialist_document_presenter.rb +++ b/app/presenters/specialist_document_presenter.rb @@ -127,6 +127,7 @@ def sorted_facets_with_values facets .select { |f| facet_values[f["key"]] && facet_values[f["key"]].present? } .reject { |f| f["key"] == first_published_at_facet_key } + .reject { |f| f["key"] == internal_notes_facet_key } .sort_by { |f| f["type"] } end @@ -181,6 +182,10 @@ def first_published_at_facet_key "first_published_at" end + def internal_notes_facet_key + "internal_notes" + end + # first_published_at does not have reliable data # at time of writing dates could be after public_updated_at # details.first_public_at is not provided