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
GL-385: Create the first two steps of the Check Moving Requirement user journey #1897
Conversation
ae3f39f
to
be5e9ec
Compare
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.
Hey there, looks good - there's some changes which I think would benefit it
- Namespacing the code (models/conrtollers/views) - even if the routes need to be at the top level, we can still keep the code a bit more organised
- I think its possible to use
resources ...
in theconfig/routes.rb
to clean that up a little - It might make sense to have a generic green lanes feature flag I think since we'll want to use the same for the results screens but if you're envisioning those just using this feature flag then that should be fine
<%= f.govuk_text_field :commodity_code, width: 'one-quarter', | ||
label: { text: 'Commodity Code'} %> | ||
|
||
<hr class="govuk-section-break govuk-section-break--m govuk-section-break--visible"> |
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.
does this need to self close? not quite sure what does and does not anymore post html5
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.
yes,
is the correct way in html5, XHTML is more restrict and it need to be close
</p> | ||
|
||
<%= f.govuk_text_field :commodity_code, width: 'one-quarter', | ||
label: { text: 'Commodity Code'} %> |
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.
indentation looks a bit off?
maxlength_enabled: true, | ||
legend: { text: 'When is the movement of goods taking place?', size: 's', tag: 'h1' }, | ||
hint: { text: "Arrangements can change over time. If you are unsure of the date of movement and want to check arrangements currently in place, enter today's date." } %> |
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.
Indentation?
.env.development
Outdated
@@ -10,6 +10,7 @@ BASIC_USERNAME=test | |||
BETA_SEARCH_HEADING_STATISTICS_THRESHOLD=3 | |||
BETA_SEARCH_FACET_FILTER_DISPLAY_PERCENTAGE_THRESHOLD=5 | |||
BETA_SEARCH_SWITCHING_ENABLED=true | |||
CHECK_MOVING_REQUIREMENTS_ENABLED=false |
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.
GREEN_LANES_ENABLED
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.
Done, also I reused/renamed the ALLOW_GREEN_LANES (added by @rasikasri )
config/routes.rb
Outdated
get '/check_moving_requirements/start', to: 'check_moving_requirements#start', as: :start_check_moving_requirements | ||
get '/check_moving_requirements/edit', to: 'check_moving_requirements#edit', as: :edit_check_moving_requirements | ||
put '/check_moving_requirements/update', to: 'check_moving_requirements#update', as: :update_check_moving_requirements | ||
get '/check_moving_requirements/result', to: 'check_moving_requirements#result', as: :result_check_moving_requirements | ||
|
||
# This solution does not work because edit action could have an empy commodity_code in the URL | ||
# resources :check_moving_requirements, only: %i[show update edit] do | ||
# get 'start', 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.
I know I'd originally suggested a singular resource but it feels like this set of screens maps better to a plural resource?
scope module: :green_lanes do
resources :check_moving_goods_requirements, only: %i[index edit update destroy]
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.
I adopted a similar solution, under the existing
namespace :green_lanes do
3f951e6
to
73af903
Compare
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.
LGTM
a1db56a
to
23bd0a6
Compare
…ature. Step1 is the /check_moving_requirements/start page Step2 is the /check_moving_requirements/edit page
Improve error messages on locales/en.yml Create new initial page /result.html.erb Added missing specs for check_moving_requirements_controller
This PR renames and reuses the existing feature flag (to follow the current convention) ALLOW_GREEN_LANE -> GREEN_LANE_ENABLED
… and check_moving_requirements/edit pages.
72c350b
to
e957d3d
Compare
e957d3d
to
0585a5d
Compare
Jira link
https://transformuk.atlassian.net/browse/GL-385
https://transformuk.atlassian.net/browse/GL-388
Create the first two steps of the Check Moving Requirement feature
What?
These pages are part of the user journey to check for the requirements for moving goods from GB to NI
Why?
Part of the GL job
Have you? (optional)
[] Reviewed view changes with stakeholders
WIP
Validated mobile responsive behaviour of view changes
WIP
Deployment risks (optional)
TODO: need to put this feature behind feature flag