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

Remove spaces from nino #338

Merged
merged 2 commits into from
Jul 7, 2023
Merged

Remove spaces from nino #338

merged 2 commits into from
Jul 7, 2023

Conversation

willmcb
Copy link
Contributor

@willmcb willmcb commented Jul 6, 2023

Description of change

Removes the NINO spaces from review so that the are easier to copy for CWs etc.

Link to relevant ticket

CRIMRE-388

Notes for reviewer

I have left the formatting methof in as it:

  1. removes some of the dot chain that the crime application has to go through to get to the nino
  2. has some logic in it to check the nil-ness of the nino for the view.

Happy to discuss removing this if you think its not needed 👍

Screenshots of changes (if applicable)

Before changes:

Screenshot 2023-07-06 at 15 30 49

After changes:

Screenshot 2023-07-06 at 15 30 12

How to manually test the feature

Look at an applications Client details section, make sure the NINO has no spaces in it.

Copy link
Member

@timpeat timpeat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

formatted_nino = applicant.nino.gsub(/\s+/, '').upcase
[2, 5, 8, 11].each { |i| formatted_nino.insert i, ' ' } if formatted_nino.length == 9
formatted_nino
applicant.nino
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we happy that Apply/the datastore removes any user-input spacing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I checked the validation in Apply and it does

@willmcb willmcb force-pushed the CRIMRE-388-remove-nino-spaces branch from 7e39c12 to bbff805 Compare July 7, 2023 12:21
@willmcb willmcb merged commit b594b23 into main Jul 7, 2023
4 checks passed
@willmcb willmcb deleted the CRIMRE-388-remove-nino-spaces branch July 7, 2023 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants