[Admin][Users] Add new admin store credits edit_memo flow #6033
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
This PR is for issue: #5824
The store credits flow is in the process of being significantly refactored so this is only part of the edit flow. My original plan was to use one modal for the edit_amount and edit_memo flow, but since amount has really specific validations and constraints, and it requires that a
StoreCreditReason
be given for each change, it made sense to build it as a separate flow. Memo, by contrast, has basically no constraints and it can be as long as the database can hold, and even empty if desired. It also doesn't require a reason for changes. The conditional logic was getting really spaghetti in the controller action so it made sense to go back to the old solidus_backend flow of having two separate edit flows. Now with the fancy new admin UI. Again, no designs so I did my best.Screenshots
Screen.Recording.2024-12-12.at.10.39.33.AM.mov
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: