Refactor methods on claims mentor training form #1086
Merged
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.
Context
These changes come off the back of a comment thread in a separate PR – see #1062 (comment)
We agreed that the changes I suggested were out of scope for that PR, so I've put them into a new one.
Now that we have a standalone 'training allowance' object, it feels unnecessary for the mentor training form to hide that object from the outside world through abstractions and wrapper methods.
Changes proposed in this pull request
mentor_training_form.max_hours_equals_maximum_claimable_hours?
Guidance to review
This PR is based upon #1062 for now, since that branch hasn't been merged in to main yet.
To review this PR, see the commits:
custom_hours_selected?
method privateLink to Trello card
Offshoot of: Refactor the claim form to use Training Allowance