Skip to content

Commit

Permalink
Show consultee comments on planning application
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamineskola committed Nov 8, 2023
1 parent 6cc5a7a commit 17a91dc
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion app/views/planning_applications/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<hr>
<% end %>

<h2 class="govuk-heading-m govuk-!-margin-top-8">Comments</h2>
<h2 class="govuk-heading-m govuk-!-margin-top-8">Neighbour Comments</h2>
<% if @planning_application["published_comments"].present? %>
<hr>
<ul class="govuk-list">
Expand All @@ -67,3 +67,27 @@
<% else %>
<p class="govuk-body">No comments have been made on this application yet.</p>
<% end %>

<h2 class="govuk-heading-m govuk-!-margin-top-8">Consultee Comments</h2>
<% if @planning_application["consultee_comments"].present? %>
<hr>
<ul class="govuk-list">
<% @planning_application["consultee_comments"].each do |comment| %>
<li>
<span class="govuk-tag <%= "govuk-tag--#{tag_colour(comment["summary_tag"])}" %>">
<%= comment["summary_tag"] %>
</span>
<br>
<p>
<strong>Date received:</strong> <%= comment["received_at"].to_date.strftime("%d/%m/%y") %>
</p>
<p>
<%= simple_format(comment["comment"]) %>
</p>
</li>
<hr>
<% end %>
</ul>
<% else %>
<p class="govuk-body">No comments have been made on this application yet.</p>
<% end %>

0 comments on commit 17a91dc

Please sign in to comment.