CAPT 2121/expand topup functionality #3527
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow topups for all policies
Probably easiest to review each commit separately, or at least the bug fix on
the payroll run.
Now we need to check the number of topups for each policy we make a few extra
trips to the db when showing the payroll run. I investigated caching the line
items and performing the policy filtering in Ruby which saves ~200ms but makes
the code harder to follow. Opted against including this in the pr as the page
loads in about 500ms, but something to bear in mind if we want a bit of extra
performance.