-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redesign for constraints page #1725
Conversation
94173ca
to
af01fc7
Compare
app/assets/stylesheets/_main.scss
Outdated
|
||
.dashed-box { | ||
padding: 30px; | ||
border: 1px dashed #B1B4B6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to use the govuk-colour function rather than the hex code:
border: 1px dashed #B1B4B6; | |
border: 1px dashed govuk-colour("mid-grey"); |
af01fc7
to
f7888a6
Compare
<% end %> | ||
<% else %> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-table__cell" colspan="4" style="border-bottom: none;"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a class for that:
<td class="govuk-table__cell" colspan="4" style="border-bottom: none;"> | |
<td class="govuk-table__cell border-bottom-none" colspan="4"> |
|
||
def update | ||
ActiveRecord::Base.transaction do | ||
@planning_application.update!(updated_address_or_boundary_geojson: true) | ||
@planning_application.constraints_checked! | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be extracted to a method on the model
def constraints_to_add | ||
@constraints_to_add ||= constraint_ids - existing_constraint_ids | ||
def set_other_constraints | ||
@other_constraints = Constraint.all_constraints(search_param).non_applicable_constraints(@planning_application.planning_application_constraints).sort_by(&:category) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a method on the Constraint
model, e.g.
@other_constraints = Constraint.other_constraints(search_param, @planning_application)
resource :constraints, only: %i[show update] | ||
resources :constraints, only: %i[index create destroy] do | ||
patch :update, on: :collection | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the change to resources
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I wanted the :id on the create and destroy method?
b27d514
to
5185340
Compare
5185340
to
8fbf84f
Compare
- Add/Remove links rather than checkboxes - Can't remove constraints identified by system - Can search for constraints
8fbf84f
to
36159f8
Compare
Description of change
Story Link
https://trello.com/c/qkrP4O3J/2796-the-source-of-the-constraints
Screenshots