[Admin] Add Update Tax Category feature#5697
Merged
tvdeyen merged 4 commits intosolidusio:mainfrom Apr 12, 2024
Merged
Conversation
This new Turbo frame will be filled with the modal for editing the tax category.
The component renders the edit form inside a modal on top of the tax categories list, inside a Turbo frame.
This completes the feature for editing an existing tax category.
Contributor
|
Hello, subscribing to this PR, when this is merged, I'll start doing the same logic for shipping category as I started implementing the creation here #5718 |
loicginoux
reviewed
Apr 12, 2024
| end | ||
|
|
||
| def edit | ||
| @tax_category = Spree::TaxCategory.find(params[:id]) |
Contributor
There was a problem hiding this comment.
PR has already been merged but as I am reading your code, I discover this line is not needed as you refactored it in find_tax_category. Will you do it or shall I remove it in my PR about adding edition for shipping categories (not related but quick fix) ?
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Recently, it was introduced in the new admin the ability to create a new tax category via a modal dialog. It's now time to allow editing an existing one.
The new feature works similarly to the one for creating a new tax category, i.e. it opens a modal dialog with the edit form. When submitting the form, if the tax category has errors then they're shown to the user, otherwise the record is updated, the modal is removed, and a success message is shown.
Screen.Recording.2024-03-13.at.14.54.05.mov
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
I have written a thorough PR description.
I have kept my commits small and atomic.
I have used clear, explanatory commit messages.
✅ I have added automated tests to cover my changes.
📸 I have attached screenshots to demo visual changes.
The following are not always needed:
📖 I have updated the README to account for my changes.
📑 I have documented new code with YARD.
🛣️ I have opened a PR to update the guides.