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

Bug/gcom 1291 cannot delete selected region #2128

Merged
merged 6 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/perfect-pumas-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-customer': patch
---

Fixed bug which caused region to not be set properly if user swapped countries in the checkout process.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mutation SetShippingBillingAddress(
$city: String!
$countryCode: String!
$regionId: Int
$region: String
$street: String!
$houseNumber: String!
$addition: String
Expand All @@ -26,6 +27,7 @@ mutation SetShippingBillingAddress(
postcode: $postcode
city: $city
country_code: $countryCode
region: $region
region_id: $regionId
street: [$street, $houseNumber, $addition]
telephone: $telephone
Expand Down Expand Up @@ -54,6 +56,7 @@ mutation SetShippingBillingAddress(
postcode: $postcode
city: $city
country_code: $countryCode
region: $region
region_id: $regionId
street: [$street, $houseNumber, $addition]
telephone: $telephone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export const ShippingAddressForm = React.memo<ShippingAddressFormProps>((props)
return {
...variables,
telephone: variables.telephone || '000 - 000 0000',
region: regionId ? variables.region : '',
paales marked this conversation as resolved.
Show resolved Hide resolved
regionId,
customerNote: '',
addition: variables.addition ?? '',
Expand Down
Loading