Skip to content
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

[Admin] Add Select address dropdown feature to billing and shipping forms #5507

Merged

Conversation

rainerdema
Copy link
Contributor

@rainerdema rainerdema commented Nov 8, 2023

Summary

Screenshot 2023-11-08 at 20 34 02

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

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.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@rainerdema rainerdema self-assigned this Nov 8, 2023
@github-actions github-actions bot added changelog:solidus_api Changes to the solidus_api gem changelog:solidus_core Changes to the solidus_core gem changelog:solidus_admin labels Nov 8, 2023
@rainerdema rainerdema force-pushed the rainerd/admin/order/select-address-feature branch from 41adfce to 84d2337 Compare November 8, 2023 19:33
@github-actions github-actions bot removed changelog:solidus_api Changes to the solidus_api gem changelog:solidus_core Changes to the solidus_core gem labels Nov 8, 2023
@rainerdema rainerdema force-pushed the rainerd/admin/order/select-address-feature branch 2 times, most recently from 56fe8ee to db5b0fd Compare November 14, 2023 14:02
@rainerdema rainerdema marked this pull request as ready for review November 14, 2023 14:08
@rainerdema rainerdema requested a review from a team as a code owner November 14, 2023 14:08
@rainerdema rainerdema force-pushed the rainerd/admin/order/select-address-feature branch from db5b0fd to a918989 Compare November 14, 2023 14:09
@rainerdema rainerdema requested a review from elia November 14, 2023 14:09
Copy link
Member

@elia elia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some optional suggestions 🙌

@rainerdema rainerdema force-pushed the rainerd/admin/order/select-address-feature branch from a918989 to 6bea277 Compare November 15, 2023 12:33
@rainerdema rainerdema requested a review from elia November 15, 2023 12:34
@rainerdema rainerdema force-pushed the rainerd/admin/order/select-address-feature branch 2 times, most recently from 3efd79f to f4867db Compare November 15, 2023 13:07
Updated `ui/forms/field` to support string form names and objects,
in addition to form objects.
Added `extract_form_details` method for handling argument extraction
and validation.
Revisited the address handling in the controller by removing
the `new` action and consolidating its functionality into the
`show` action.
The show action now manages rendering of addresses by checking for:
  1. an existing `address_id` parameter
  2. using the order's address
  3. or building a new, non-persistent address.
@rainerdema rainerdema force-pushed the rainerd/admin/order/select-address-feature branch from f4867db to dcacc85 Compare November 15, 2023 16:11
Implemented the functionality for the 'Select Address' feature.
This addition includes dynamic handling of address selection, enabling users
to pick from a list of existing associated addresses.
@rainerdema rainerdema force-pushed the rainerd/admin/order/select-address-feature branch from dcacc85 to 4e053bf Compare November 15, 2023 16:17
Fixed an issue where `new_record?` was called on a non-existent address
associated with an order object, leading to an "undefined method" error.
The problem was identified as the loss of a newly built address after a 
page refresh, caused by the address selection process retrieving the
address without assigning it to the order.
@rainerdema rainerdema force-pushed the rainerd/admin/order/select-address-feature branch from b372321 to c0b9942 Compare November 15, 2023 16:50
Copy link
Member

@elia elia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@rainerdema rainerdema merged commit 56d2024 into solidusio:main Nov 16, 2023
8 checks passed
@rainerdema rainerdema deleted the rainerd/admin/order/select-address-feature branch November 16, 2023 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants