Skip to content

Commit

Permalink
Merge pull request #2128 from graphcommerce-org/bug/GCOM-1291-cannot-…
Browse files Browse the repository at this point in the history
…delete-selected-region

Bug/gcom 1291 cannot delete selected region
  • Loading branch information
paales authored Jan 4, 2024
2 parents ba6b27b + 32880d9 commit 65902f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
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 : '',
regionId,
customerNote: '',
addition: variables.addition ?? '',
Expand Down

1 comment on commit 65902f6

@vercel
Copy link

@vercel vercel bot commented on 65902f6 Jan 4, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

graphcommerce-hygraph-dynamic-rows-ui – ./packages/hygraph-dynamic-rows-ui

graphcommerce-hygraph-dynamic-rows-ui-git-canary-graphcommerce.vercel.app
graphcommerce-hygraph-dynamic-rows-ui.vercel.app
graphcommerce-hygraph-dynamic-rows-ui-graphcommerce.vercel.app

Please sign in to comment.