Skip to content

Commit

Permalink
fix: edit-quote save changes (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
goldenmaya authored Jul 6, 2023
1 parent 1365ddb commit 15cff5e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions client-app/pages/account/edit-quote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{{ $t("pages.account.quote_details.shipping_address") }}
</h4>

<div :class="['mt-2.5 grow divide-y rounded border p-5', { 'cursor-not-allowed bg-gray-50': fetching }]">
<div :class="['mt-2.5 rounded border p-5', { 'cursor-not-allowed bg-[--color-neutral-50]': fetching }]">
<VcAddressSelection
:placeholder="$t('shared.checkout.shipping_details_section.links.select_address')"
:address="shippingAddress"
Expand All @@ -60,7 +60,9 @@
{{ $t("pages.account.quote_details.billing_address") }}
</h4>

<div class="mt-2.5 space-y-1.5 rounded border p-5">
<div
:class="['mt-2.5 space-y-1.5 rounded border p-5', { 'cursor-not-allowed bg-[--color-neutral-50]': fetching }]"
>
<VcCheckbox
:model-value="billingAddressEqualsShipping"
:disabled="fetching"
Expand Down Expand Up @@ -314,9 +316,12 @@ async function saveChanges(): Promise<void> {
});
if (quote.value!.addresses?.length && !isEqual(quote.value!.addresses, originalQuote.value!.addresses)) {
if (billingAddressEqualsShipping.value) {
setBillingAddressEqualsShippingAddress();
}
await updateAddresses(quote.value!.id, quote.value!.addresses);
setBillingAddressEqualsShippingAddress();
setBillingAddressEqualsShipping();
}
Expand Down

0 comments on commit 15cff5e

Please sign in to comment.