Skip to content

Commit

Permalink
Remove internal notes from specialist document presenter
Browse files Browse the repository at this point in the history
Certain Specilialist Documents can have internal notes that
should not be presented on the frontend.
  • Loading branch information
edwardkerry committed Sep 24, 2020
1 parent 897c841 commit 313f85a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/presenters/specialist_document_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 313f85a

Please sign in to comment.