fix(cart): hide Edit when there is nothing to configure
Drops the mount() change and its test, as suggested in review.
This commit is contained in:
1 parent
21685acdc9
commit
0b257a4761
3 files changed
+3
-23
No files matched your search
@@ -40,12 +40,14 @@
|
||||
</x-button.secondary>
|
||||
</div>
|
||||
@endif
|
||||
@if ($item->product->plans->count() > 1 || $item->product->configOptions->isNotEmpty() || !empty($item->checkout_config))
|
||||
<a href="{{ route('products.checkout', [$item->product->category, $item->product, 'edit' => $item->id]) }}"
|
||||
wire:navigate>
|
||||
<x-button.primary class="h-fit w-fit">
|
||||
{{ __('product.edit') }}
|
||||
</x-button.primary>
|
||||
</a>
|
||||
@endif
|
||||
<x-button.danger wire:click="removeProduct({{ $item->id }})" class="h-fit !w-fit">
|
||||
<x-loading target="removeProduct({{ $item->id }})" />
|
||||
<div wire:loading.remove wire:target="removeProduct({{ $item->id }})">
|
||||
|
||||
Reference in new issue
Block a user