Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 1 addition & 1 deletion resources/views/cart/coupon.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<x-rapidez-ct::coupon-field />
<template v-if="cart.applied_coupons?.length" v-for="coupon in cart.applied_coupons" v-cloak>
<graphql-mutation
:query="'mutation ($cart_id: String!) { removeCouponFromCart(input: { cart_id: $cart_id }) { cart { ' + config.queries.cart + ' } } }'"
:query="'mutation ($cart_id: String!) { removeCouponFromCart(input: { cart_id: $cart_id }) { ...cart } } ' + config.fragments.cart"
:variables="{ cart_id: mask }"
:callback="updateCart"
:error-callback="checkResponseForExpiredCart"
Expand Down
4 changes: 2 additions & 2 deletions resources/views/cart/partials/product/remove-button.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<graphql-mutation
:query="'mutation ($cart_id: String!, $cart_item_id: Int) { removeItemFromCart(input: { cart_id: $cart_id, cart_item_id: $cart_item_id }) { cart { ' + config.queries.cart + ' } } }'"
:query="'mutation ($cart_id: String!, $cart_item_id: Int) { removeItemFromCart(input: { cart_id: $cart_id, cart_item_id: $cart_item_id }) { ...cart } } ' + config.fragments.cart"
:variables="{ cart_id: mask, cart_item_id: item.id }"
:notify="{ message: item.product.name+' '+config.translations.cart.remove }"
:callback="updateCart"
Expand All @@ -9,4 +9,4 @@
<button v-on:click="mutate" class="text-ct-inactive mt-1 text-xs hover:underline" :dusk="'item-delete-' + index">
@lang('Remove')
</button>
</graphql-mutation>
</graphql-mutation>
6 changes: 3 additions & 3 deletions resources/views/checkout/partials/address-cards.blade.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<div class="grid gap-5 md:grid-cols-2">
<template v-if="cart.billing_address?.same_as_shipping">
<x-rapidez-ct::card.address v-bind:address="cart.shipping_addresses[0]" shipping billing check>
<x-rapidez-ct::card.address v-bind:address="cart.shipping_addresses[0]" shipping billing check="cart.shipping_addresses[0]">
<x-rapidez-ct::button.link v-on:click.prevent="toggleEdit">
@lang('Edit')
</x-rapidez-ct::button.link>
</x-rapidez-ct::card.address>
@include('rapidez-ct::checkout.partials.buttons.new-address')
</template>
<template v-else>
<x-rapidez-ct::card.address v-bind:address="cart.shipping_addresses[0]" shipping check class="h-full">
<x-rapidez-ct::card.address v-bind:address="cart.shipping_addresses[0]" shipping check="cart.shipping_addresses[0]" class="h-full">
<x-rapidez-ct::button.link v-on:click.prevent="toggleEdit">
@lang('Edit')
</x-rapidez-ct::button.link>
Expand All @@ -20,7 +20,7 @@
<input type="checkbox" oninvalid="this.setCustomValidity('{{ __('Please select an address') }}')" required class="absolute w-full h-full inset-0 opacity-0 pointer-events-none">
</x-slot>
</x-rapidez-ct::card.address>
<x-rapidez-ct::card.address v-bind:address="cart.billing_address" billing check class="h-full">
<x-rapidez-ct::card.address v-bind:address="cart.billing_address" billing check="cart.billing_address" class="h-full">
<x-rapidez-ct::button.link v-on:click.prevent="toggleEdit">
@lang('Edit')
</x-rapidez-ct::button.link>
Expand Down
2 changes: 0 additions & 2 deletions resources/views/checkout/partials/sections/address.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
country_code: cart.shipping_addresses[0]?.country.code || window.address_defaults.country_code
}"
group="shipping"
:before-request="(query, variables, options) => [variables.customer_address_id ? config.queries.setExistingShippingAddressesOnCart : query, variables, options]"
:callback="updateCart"
:error-callback="checkResponseForExpiredCart"
:watch="false"
Expand All @@ -34,7 +33,6 @@
same_as_shipping: !cart.is_virtual && (cart?.billing_address?.same_as_shipping ?? true),
country_code: cart.billing_address?.country.code || window.address_defaults.country_code
}))"
:before-request="(query, variables, options) => [variables.customer_address_id ? config.queries.setExistingBillingAddressOnCart : query, variables, options]"
:callback="updateCart"
:error-callback="checkResponseForExpiredCart"
:watch="false"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/coupon-field.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<graphql-mutation
:query="'mutation ($cart_id: String!, $coupon_code: String!) { applyCouponToCart(input: { cart_id: $cart_id, coupon_code: $coupon_code }) { cart { ' + config.queries.cart + ' } } }'"
:query="'mutation ($cart_id: String!, $coupon_code: String!) { applyCouponToCart(input: { cart_id: $cart_id, coupon_code: $coupon_code }) { ...cart } } ' + config.fragments.cart"
:variables="{ cart_id: mask, coupon_code: '' }"
:notify="{ message: config.translations.cart.coupon.applied }"
:clear="true"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/input/quantity.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<graphql-mutation
:query="'mutation ($cart_id: String!, $cart_item_id: Int, $quantity: Float) { updateCartItems(input: { cart_id: $cart_id, cart_items: [{ cart_item_id: $cart_item_id, quantity: $quantity }] }) { cart { ' + config.queries.cart + ' } } }'"
:query="'mutation ($cart_id: String!, $cart_item_id: Int, $quantity: Float) { updateCartItems(input: { cart_id: $cart_id, cart_items: [{ cart_item_id: $cart_item_id, quantity: $quantity }] }) { cart { ...cart } } } ' + config.fragments.cart"
:variables="{ cart_id: mask, cart_item_id: item.id, quantity: item.quantity }"
:callback="updateCart"
:error-callback="checkResponseForExpiredCart"
Expand Down
Loading