Deactivated partners should not appear in the dropdown when producing a new distribution.
Summary
Limit the partners in the partner dropdown when producing a new distribution to active partners.
Why
Reduction of possible errors, just makes it easier for the banks.
Details
On new distributions only, the partners in the partner dropdown should include only active partners. They can be any other status than "Deactivated". We still need to be able to access the deactivated partners when editing.
Criteria for completion
- [ ] Deactivated partners do not appear in the partner dropdown on new distributions - though they do on editing a distribution. (You might be editing a distribution from an inactive partner)
- [ ] Tests to confirm that behaviour
Hi, I'd like to take a shot at this issue if no one has started working on it yet.
Sure thing!
I've written code to modify the query for the dropdown found in the distributions/form partial and have also manually tested it by deactivating some partners and visually checking that the new view does filter out deactivated partners while the edit view keeps them in. I did have a question about writing tests for this. Where do we write rspec tests for views? and how exactly would you write one to test if the dropdown is populated correctly?
@dorner Could you field the above question? Thanks.
I was able to figure out my question about the tests and have created a pull request. Sorry about the double pull requests. I forgot to rebase first and the first pull request pulled in a bunch of other commits so I cleaned up my branch and then made a new pull request.