Skip to content

Commit 3b6ae9b

Browse files
Add advice to preapp report
1 parent 22f03da commit 3b6ae9b

File tree

2 files changed

+163
-2
lines changed

2 files changed

+163
-2
lines changed

Diff for: app/assets/stylesheets/_main.scss

+15-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ body {
471471

472472
.comment-component {
473473
border-left: 10px solid $govuk-link-colour;
474-
background-color: #F2F9FF;
474+
background-color: #f2f9ff;
475475
}
476476

477477
.govuk-details--borderless {
@@ -595,3 +595,17 @@ body {
595595
position: relative;
596596
}
597597
}
598+
599+
.govuk-list--divided {
600+
li + li {
601+
border-top: 1px solid govuk-colour("mid-grey");
602+
padding-top: 1rem;
603+
}
604+
}
605+
606+
.govuk-table--borderless {
607+
.govuk-table__header,
608+
.govuk-table__cell {
609+
border-bottom: none;
610+
}
611+
}

Diff for: engines/bops_reports/app/views/bops_reports/planning_applications/show.html.erb

+148-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
["Site constraints", "#site-constraints"],
3737
["Site history", "#site-history"],
3838
["Site and surroundings", "#site-and-surroundings"],
39-
["Your pre-application details", "#pre-application-details"],
39+
["Considerations and advice", "#considerations-advice"],
40+
["Policies and guidance", "#policies-guidance"],
41+
["Requirements", "#requirements"],
4042
["Next steps", "#next-steps"],
4143
["Disclaimer", "#disclaimer"]
4244
]}
@@ -262,9 +264,154 @@
262264
No site description set.
263265
</p>
264266
<% end %>
267+
</section>
268+
269+
<hr class="govuk-section-break govuk-section-break--l govuk-section-break--visible">
270+
271+
<section id="considerations-advice">
272+
<div class="flex-between govuk-!-margin-bottom-2">
273+
<h2 class="govuk-heading-m">Planning considerations and advice</h2>
274+
<%= govuk_link_to "Edit", main_app.edit_planning_application_assessment_considerations_path(
275+
@planning_application,
276+
return_to: "report"
277+
) %>
278+
</div>
279+
280+
<p class="govuk-body"> This section includes the case officer's assessment of your proposal against relevant policy and guidance. The elements of the proposal are grouped by how acceptable they are:</p>
281+
282+
<%= govuk_table(html_attributes: {class: "govuk-table--borderless"}) do |table| %>
283+
<% table.with_body do |body|
284+
body.with_row do |row|
285+
row.with_cell(text: "‘Supported’", header: true)
286+
row.with_cell(text: "means that the current proposal is likely to be supported")
287+
end
288+
body.with_row do |row|
289+
row.with_cell(text: "‘Needs changes’", header: true)
290+
row.with_cell(text: "means that an element of the proposal is likely to be supported subject to suggested changes")
291+
end
292+
body.with_row do |row|
293+
row.with_cell(text: "‘Does not comply’", header: true)
294+
row.with_cell(text: "means that an element of the proposal will not be acceptable and permission is likely to be refused")
295+
end
296+
end %>
297+
<% end %>
298+
299+
<%= govuk_table do |table| %>
300+
<% table.with_head do |head|
301+
head.with_row do |row|
302+
row.with_cell(text: "Consideration")
303+
row.with_cell(text: "Element of proposal")
304+
row.with_cell(text: "Status")
305+
end
306+
end %>
307+
<% table.with_body do |body|
308+
@planning_application.consideration_set.considerations.each do |consideration|
309+
body.with_row do |row|
310+
row.with_cell(text: consideration.policy_area)
311+
row.with_cell(text: consideration.proposal)
312+
row.with_cell(text: render(StatusTags::BaseComponent.new(status: consideration.summary_tag)))
313+
end
314+
end
315+
end %>
316+
<% end %>
317+
318+
<% @planning_application.consideration_set.considerations.group_by(&:policy_area).each do |policy_area, considerations| %>
319+
<%= govuk_summary_card(title: policy_area) do %>
320+
<% considerations.each do |consideration| %>
321+
<div class="flex-between">
322+
<strong class="govuk-heading-s"><%= consideration.proposal %></strong>
323+
<%= govuk_link_to "Edit", main_app.edit_planning_application_assessment_considerations_path(
324+
@planning_application,
325+
return_to: "report"
326+
) %>
327+
</div>
328+
329+
<%= render StatusTags::BaseComponent.new(status: consideration.summary_tag) %><br>
330+
331+
<div class="govuk-body govuk-!-margin-top-4"><strong>Relevant policies</strong><br>
332+
<ul class="govuk-list">
333+
<% consideration.policy_references.each do |reference| %>
334+
<li class="govuk-body">
335+
<% if reference.url.present? %>
336+
<%= govuk_link_to reference.code_and_description, reference.url %>
337+
<% else %>
338+
<%= reference.code_and_description %>
339+
<% end %>
340+
</li>
341+
<% end %>
342+
</ul>
343+
</div>
344+
345+
<p class="govuk-body">
346+
<%= render(FormattedContentComponent.new(text: consideration.assessment)) %>
347+
</p>
348+
<p class="govuk-body">
349+
<%= render(FormattedContentComponent.new(text: consideration.conclusion)) %>
350+
</p>
351+
<% end %>
352+
<% end %>
353+
<% end %>
354+
265355
<hr class="govuk-section-break govuk-section-break--l govuk-section-break--visible">
356+
357+
<section>
358+
<div class="flex-between">
359+
<h2 class="govuk-heading-m">Summary</h2>
360+
<%= govuk_link_to "Edit", main_app.edit_planning_application_assessment_assessment_detail_path(@planning_application, @planning_application.summary_of_advice, category: :summary_of_advice, return_to: "report") %>
361+
</div>
362+
363+
<p class="govuk-body">This is the case officer's summary of the conclusions and advice.</p>
364+
<p class="govuk-body grey-border-box">
365+
<%= @planning_application.summary_of_advice.entry %>
366+
</p>
367+
</section>
266368
</section>
267369

370+
<hr class="govuk-section-break govuk-section-break--l govuk-section-break--visible">
371+
372+
<section id="policies-guidance">
373+
<h2 class="govuk-heading-m">List of relevant policies and guidance</h2>
374+
<p class="govuk-body">You can view all relevant planning policy and guidance at <%= govuk_link_to "TODO", "#" %>.</p>
375+
376+
<% @planning_application.consideration_set.considerations.group_by(&:policy_area).each do |policy_area, considerations| %>
377+
<% references = considerations.map(&:policy_references).flatten %>
378+
<p class="govuk-body"><strong><%= policy_area.humanize %></strong></p>
379+
<ul class="govuk-list">
380+
<% references.each do |reference| %>
381+
<li><%= govuk_link_to reference.description, reference.url %></li>
382+
<% end %>
383+
</ul>
384+
<% end %>
385+
</section>
386+
387+
<hr class="govuk-section-break govuk-section-break--l govuk-section-break--visible">
388+
389+
<section id="requirements">
390+
<div class="flex-between">
391+
<h2 class="govuk-heading-m">Requirements</h2>
392+
<%= govuk_link_to "Edit", main_app.planning_application_assessment_requirements_path(@planning_application, return_to: "report") %>
393+
</div>
394+
395+
<p class="govuk-body">Should you wish to submit an application, the following requirements are needed:</p>
396+
<% @planning_application.requirements.group_by(&:category).each do |category, requirements| %>
397+
<%= govuk_summary_card(title: category.humanize) do %>
398+
<ul class="govuk-list govuk-list--divided">
399+
<% requirements.each do |requirement| %>
400+
<li>
401+
<p class="govuk-body"><%= govuk_link_to requirement.description, requirement.url %></p>
402+
<% if requirement.guidelines.present? %>
403+
<p class="govuk-body govuk-hint"><%= requirement.guidelines %></p>
404+
<% end %>
405+
</li>
406+
<% end %>
407+
</ul>
408+
<% end %>
409+
<% end %>
410+
<!-- TODO pdf link -->
411+
</section>
412+
413+
<hr class="govuk-section-break govuk-section-break--l govuk-section-break--visible">
414+
268415
<section id="next-steps">
269416
<h3 class="govuk-heading-s"><%= t(".next_steps_heading") %></h3>
270417

0 commit comments

Comments
 (0)