Skip to content
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

Add method to check if person requires conviction check #238

Merged
merged 2 commits into from
Aug 13, 2018

Conversation

irisfaraway
Copy link
Member

This is mostly to support DEFRA/waste-carriers-back-office#68, but also allows us to move logic for checking if a person may have a matching result out of the registration concern and into the key person model, which is a better fit.

This is mostly to support DEFRA/waste-carriers-back-office#68, but also allows us to move logic for checking if a person may have a matching result out of the registration concern and into the key person model, which is a better fit.
@irisfaraway irisfaraway merged commit 09d21f7 into master Aug 13, 2018
@irisfaraway irisfaraway deleted the feature/easier-person-checking branch August 13, 2018 11:41
irisfaraway added a commit to DEFRA/waste-carriers-back-office that referenced this pull request Aug 13, 2018
Now that DEFRA/waste-carriers-engine#238 has been merged in and this app has been updated to use the newer version of the engine, we can simplify this method.
irisfaraway added a commit to DEFRA/waste-carriers-back-office that referenced this pull request Aug 13, 2018
* Back office users can see details of a transient registration

https://eaflood.atlassian.net/browse/WC-375

Each transient registration should have a page which gives an overview of the information, current status, and what actions an agency user can take.

This just applies to transient registrations for now – we'll add registrations later.

* Set up show route for transient-registrations

This uses the reg_identifier as a param for consistency with the renewals journey.

* Display current workflow_state in readable format

Rather than just spit out the state from the DB, we can use our existing I18n text to spit out a more human-friendly string.

The order of priority is the page title attribute, then the heading, and if neither are defined then we fall back to the 'raw' workflow_state.

* Add a link to continue the renewal

This should skip straight to whichever form the renewal was on, whether this was done as a digital or assisted digital renewal.

* Display filler text if attribute isn't set

It's a bit nicer than nil.

Also add a TransientRegistrationsHelper to keep all these bittier bits of logic (including the workflow_state display method which was added earlier).

* List transient_registration details

Start displaying details of the transient_registration on the page.

These will need additional formatting. We also need to consider which fields should be displayed 'raw' from the database and which need to be translated to a more user-friendly format.

* Display renewal info in tables

Now that the template changes have been merged in, we can start formatting the information to be a bit more readable.

* Display addresses and person details

* Move template text into I18n

* Tidy up address_lines method

* Use filler text from I18n in show_value_or_filler

Also remove the test as the other tests should error anyway if this breaks.

* Display translations instead of DB value for some attributes

When the 'raw' DB value would be ugly or unclear (for example, 'carrier_broker_dealer'), display a translation using I18n instead.

* Display order information

* Display information more clearly

Made a lot of changes, including:

- removing the show_value_or_filler method in favour of just not displaying the row if attribute isn't present
- displaying more information about convictions, orders and payments
- displaying a one-line overview about the status of convictions and finance info
- displaying main people in separate tables

* Display matching convictions for main people

It's possible main people could also be flagged for a manual conviction check, so we shouldn't ignore this.

Restructuring the page to group all the people together seemed like a clearer way to display this. However we also state if there are person matches in the convictions section.

WC-376 will go into more detail about reviewing conviction data.

* Add tests for TransientRegistrationsHelper

* Display a status overview with actions

Give a quick description of the status of the form and any actions for the agency user.

Brief feedback from another team's designer was that having the actions in the sidebar was awkward, so merging them into this is hopefully an improvement.

* Simplify count of people with conviction matches

Now that DEFRA/waste-carriers-engine#238 has been merged in and this app has been updated to use the newer version of the engine, we can simplify this method.
@irisfaraway irisfaraway added the enhancement New feature or request label Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants