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.
Summary
I am trying to refactor the store_credits flow so it's a bit smaller and more user friendly. Instead of changing the amount/memo/invalidating the store_credit separately, I can do a modal for editing, and a modal for invalidating.
I am 90% of the way there, but that remaining 10% might actually prove impossible to overcome. I might need to revert back to the old flow of editing memo separately, editing amount separately, editing validity separately. This would be unfortunate, but I am having a hard time getting validations to work as desired what with store_credit_reason_id being off-model and with memo not requiring a reason, but changes to the amount requiring a reason. It is making the update action a bit too complicated. Posting my wip in case anyone has thoughts @kennyadsl @tvdeyen If you'd prefer I just stick to the old flow, let me know and save me some time :)
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: