-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed breakpoints and checkout fixes (#125)
- Loading branch information
1 parent
05430c2
commit 1597a1d
Showing
19 changed files
with
83 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,52 @@ | ||
<div class="grid gap-5 lg:grid-cols-2"> | ||
<graphql-mutation | ||
:query="config.queries.setExistingShippingAddressesOnCart" | ||
:variables="{ | ||
cart_id: mask, | ||
customer_address_id: cart.shipping_addresses[0]?.customer_address_id, | ||
}" | ||
:callback="updateCart" | ||
:error-callback="checkResponseForExpiredCart" | ||
mutate-event="setShippingAddressesOnCart" | ||
v-slot="setShippingAddress" | ||
> | ||
<graphql-mutation | ||
:query="config.queries.setExistingShippingAddressesOnCart" | ||
:query="config.queries.setExistingBillingAddressOnCart" | ||
:variables="{ | ||
cart_id: mask, | ||
customer_address_id: cart.shipping_addresses[0]?.customer_address_id, | ||
customer_address_id: cart.billing_address?.customer_address_id, | ||
}" | ||
:callback="updateCart" | ||
:error-callback="checkResponseForExpiredCart" | ||
mutate-event="setShippingAddressesOnCart" | ||
v-slot="setShippingAddress" | ||
mutate-event="setBillingAddressOnCart" | ||
v-slot="setBillingAddress" | ||
> | ||
<div> | ||
<graphql-mutation | ||
:query="config.queries.setExistingBillingAddressOnCart" | ||
:variables="{ | ||
cart_id: mask, | ||
customer_address_id: cart.billing_address?.customer_address_id, | ||
}" | ||
:callback="updateCart" | ||
:error-callback="checkResponseForExpiredCart" | ||
mutate-event="setBillingAddressOnCart" | ||
v-slot="setBillingAddress" | ||
> | ||
<div> | ||
<template v-for="userAddress in $root.user.addresses"> | ||
<x-rapidez-ct::card.address | ||
v-bind:key="userAddress.id" | ||
v-bind:address="userAddress" | ||
v-bind:billing="setBillingAddress.variables.customer_address_id === userAddress.id" | ||
v-bind:shipping="setShippingAddress.variables.customer_address_id === userAddress.id" | ||
v-bind:check="setBillingAddress.variables.customer_address_id === userAddress.id || setShippingAddress.variables.customer_address_id === userAddress.id" | ||
class="w-full sm:min-w-[350px]" | ||
<div class="grid gap-5 lg:grid-cols-2"> | ||
<template v-for="userAddress in $root.user.addresses"> | ||
<x-rapidez-ct::card.address | ||
v-bind:key="userAddress.id" | ||
v-bind:address="userAddress" | ||
v-bind:billing="setBillingAddress.variables.customer_address_id === userAddress.id" | ||
v-bind:shipping="setShippingAddress.variables.customer_address_id === userAddress.id" | ||
v-bind:check="setBillingAddress.variables.customer_address_id === userAddress.id || setShippingAddress.variables.customer_address_id === userAddress.id" | ||
class="w-full sm:min-w-[350px]" | ||
> | ||
<x-rapidez-ct::button.link | ||
v-if="!cart.is_virtual && setShippingAddress.variables.customer_address_id !== userAddress.id" | ||
v-on:click.prevent="() => window.app.$set(setShippingAddress.variables, 'customer_address_id', userAddress.id) && setShippingAddress.mutate()" | ||
v-bind:class="{'blur pointer-events-none': setShippingAddress.mutating}" | ||
> | ||
<x-rapidez-ct::button.link | ||
v-if="!cart.is_virtual && setShippingAddress.variables.customer_address_id !== userAddress.id" | ||
v-on:click.prevent="() => window.app.$set(setShippingAddress.variables, 'customer_address_id', userAddress.id) && setShippingAddress.mutate()" | ||
v-bind:class="{'blur pointer-events-none': setShippingAddress.mutating}" | ||
> | ||
@lang('Select as shipping') | ||
</x-rapidez-ct::button.link> | ||
@lang('Select as shipping') | ||
</x-rapidez-ct::button.link> | ||
|
||
<x-rapidez-ct::button.link | ||
v-if="setBillingAddress.variables.customer_address_id !== userAddress.id" | ||
v-on:click.prevent="() => window.app.$set(setBillingAddress.variables, 'customer_address_id', userAddress.id) && setBillingAddress.mutate()" | ||
v-bind:class="{'blur pointer-events-none': setBillingAddress.mutating}" | ||
> | ||
@lang('Select as billing') | ||
</x-rapidez-ct::button.link> | ||
</x-rapidez-ct::card.address> | ||
</template> | ||
</div> | ||
</graphql-mutation> | ||
<x-rapidez-ct::button.link | ||
v-if="setBillingAddress.variables.customer_address_id !== userAddress.id" | ||
v-on:click.prevent="() => window.app.$set(setBillingAddress.variables, 'customer_address_id', userAddress.id) && setBillingAddress.mutate()" | ||
v-bind:class="{'blur pointer-events-none': setBillingAddress.mutating}" | ||
> | ||
@lang('Select as billing') | ||
</x-rapidez-ct::button.link> | ||
</x-rapidez-ct::card.address> | ||
</template> | ||
</div> | ||
</graphql-mutation> | ||
</div> | ||
</graphql-mutation> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
resources/views/checkout/partials/buttons/new-address.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<button v-on:click.prevent="toggleEdit" class="flex flex-col items-center justify-center gap-y-2 font-medium bg-ct-disabled rounded max-sm:hidden"> | ||
<button v-on:click.prevent="toggleEdit" class="flex flex-col items-center justify-center gap-y-2 font-medium bg-ct-disabled rounded max-md:hidden"> | ||
<span>+</span> | ||
<span>@lang('Add new address')</span> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<login v-slot="{ email, password, go, loginInputChange, emailAvailable, logout }"> | ||
<x-rapidez-ct::card.inactive> | ||
<div class="grid gap-4 sm:gap-5 md:grid-cols-2 md:items-end"> | ||
<template v-if="!loggedIn"> | ||
@include('rapidez-ct::checkout.partials.sections.login.logged-out') | ||
</template> | ||
<template v-else> | ||
<template v-if="!loggedIn"> | ||
@include('rapidez-ct::checkout.partials.sections.login.logged-out') | ||
</template> | ||
<template v-else> | ||
<div class="grid gap-4 sm:gap-5 md:grid-cols-2 md:items-end"> | ||
@include('rapidez-ct::checkout.partials.sections.login.logged-in') | ||
</template> | ||
</div> | ||
</div> | ||
</template> | ||
</x-rapidez-ct::card.inactive> | ||
</login> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<div {{ $attributes->class('mt-10 space-y-5 md:mt-[52px] md:w-[370px]') }}> | ||
<div {{ $attributes->class('mt-10 space-y-5 lg:mt-[52px] lg:w-[340px] xl:w-[370px]') }}> | ||
{{ $slot }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div {{ $attributes->class('flex flex-col mx-auto max-w-4xl w-full') }}> | ||
{{ $slot }} | ||
<div class="mt-5 grid content-center items-start gap-8 sm:grid-cols-2"> | ||
<div class="mt-5 grid content-center items-start gap-8 lg:grid-cols-2"> | ||
{{ $columns }} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
@props(['tag' => ($isAnchor = $attributes->filter(null)->hasAny('href', ':href', 'v-bind:href')) ? 'a' : 'p']) | ||
<x-tag is="{{ $tag }}" {{ $attributes->class('font-medium relative group') }}> | ||
@if ($isAnchor) | ||
<x-heroicon-o-arrow-left class="lg:absolute max-lg:mb-5 left-0 top-1/2 h-4 lg:-translate-x-full lg:-translate-y-1/2 lg:pr-6 text-ct-inactive group-hover:text-ct-primary transition" /> | ||
<x-heroicon-o-arrow-left class="xl:absolute max-xl:mb-5 left-0 top-1/2 h-4 xl:-translate-x-full xl:-translate-y-1/2 xl:pr-6 text-ct-inactive group-hover:text-ct-primary transition" /> | ||
@endif | ||
{{ $slot }} | ||
</x-tag> |