-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Order#use_shipping
and address management to the admin dashboard
#5461
Merged
rainerdema
merged 8 commits into
solidusio:main
from
nebulab:rainerd/admin/order/address-form
Nov 8, 2023
Merged
Add Order#use_shipping
and address management to the admin dashboard
#5461
rainerdema
merged 8 commits into
solidusio:main
from
nebulab:rainerd/admin/order/address-form
Nov 8, 2023
+278
−52
Conversation
This file contains 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
052c89a
to
788a05a
Compare
b4fa09b
to
ba1f9e1
Compare
ba1f9e1
to
d2380c7
Compare
d2380c7
to
dcb4daf
Compare
de15a9d
to
f9c39e2
Compare
77b9f54
to
4a13a62
Compare
f9c39e2
to
50d922d
Compare
7a4861a
to
0dda932
Compare
50d922d
to
7c80411
Compare
elia
reviewed
Nov 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, but can't wait to merge this! 👏
admin/app/components/solidus_admin/orders/address/component.html.erb
Outdated
Show resolved
Hide resolved
admin/app/components/solidus_admin/orders/address/component.html.erb
Outdated
Show resolved
Hide resolved
admin/app/components/solidus_admin/orders/address/component.yml
Outdated
Show resolved
Hide resolved
7c80411
to
6b220de
Compare
52d356e
to
fe908f9
Compare
b86d6ff
to
f6e2e26
Compare
Add use_shipping attribute with syncing logic to `Spree::Order` model. Similar to the existing `use_billing` feature, a `use_shipping` attribute has been introduced. This addition enables the automatic assignment of the shipping address to the billing address when the `use_shipping` flag is set. The `before_validation` callbacks ensure that the addresses are synchronized, thereby streamlining the address management process in the new admin interface.
f6e2e26
to
114759f
Compare
3 tasks
elia
reviewed
Nov 8, 2023
- Introduce a new `AddressesController` to handle the creation and updating of billing and shipping addresses for orders. Includes new and update actions with strong parameter support and address type validation. - Add links for address management to customer section component.
114759f
to
a2a2b90
Compare
Leverage the existing `ui/forms/address` component to render the address forms within the admin order process.
Modify the style definitions for city and zipcode fields to ensure consistent height alignment with other fields in the form.
Enhance the address form's state field by ensuring the correct state is selected during asynchronous loading. This adjustment addresses a timing issue where Stimulus did not populate the state select promptly, leading to mismatched selections.
Modify the address form logic to accommodate countries without associated states. The state select field is now automatically disabled when a country with no states is selected. Additionally, this ensure state select field is disabled for preloaded selected country without states.
Corrected the Stimulus controller event handling to ensure dropdown <details> close on modal open/close. Previously, the `turbo:before-cache` event was not properly connected to the Stimulus controller, causing menus to remain open after a modal was triggered. The 'closeMenus' method within the controller was attempting to call 'querySelectorAll' on 'this.event', which is undefined within the Stimulus context. This update corrects the 'closeMenus' method to reference 'this.element', ensuring that it correctly targets the controller's DOM element.
a2a2b90
to
3a5daf8
Compare
elia
approved these changes
Nov 8, 2023
Order#use_shipping
and address management to the admin dashboard
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
changelog:solidus_admin
changelog:solidus_api
Changes to the solidus_api gem
changelog:solidus_core
Changes to the solidus_core gem
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
Integrate.address.form.component.for.billing.and.shipping.mov
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: