diff --git a/app/Filament/Resources/Shield/RoleResource.php b/app/Filament/Resources/Shield/RoleResource.php
index cd999701..67028e76 100644
--- a/app/Filament/Resources/Shield/RoleResource.php
+++ b/app/Filament/Resources/Shield/RoleResource.php
@@ -384,10 +384,10 @@ public static function getCheckboxListFormComponent(
->columnSpan(FilamentShieldPlugin::get()->getCheckboxListColumnSpan());
}
- public static function canEdit(Model $record): bool
- {
- return false;
- }
+// public static function canEdit(Model $record): bool
+// {
+// return false;
+// }
public static function canDelete(Model $record): bool
{
diff --git a/app/Livewire/Cart.php b/app/Livewire/Cart.php
index 243c260f..ad01496e 100644
--- a/app/Livewire/Cart.php
+++ b/app/Livewire/Cart.php
@@ -5,6 +5,7 @@
use App\Actions\Shop\CreateStripeCheckoutSession;
use App\Factories\CartFactory;
use Livewire\Attributes\Computed;
+use Livewire\Attributes\On;
use Livewire\Component;
class Cart extends Component
@@ -17,6 +18,7 @@ public function cart()
}
#[Computed]
+ #[On('productDeletedFromCart')]
public function items()
{
return $this->cart->items;
@@ -24,11 +26,11 @@ public function items()
public function increment($itemId)
{
- return $this->cart->items()->find($itemId)?->increment('quantity');
+ return $this->cart->items->find($itemId)?->increment('quantity');
}
public function decrement($itemId): void
{
- $item = $this->cart->items()->find($itemId);
+ $item = $this->cart->items->find($itemId);
if ($item->quantity > 1){
$item->decrement('quantity');
}
diff --git a/resources/views/livewire/cart.blade.php b/resources/views/livewire/cart.blade.php
index 3a940d92..400be820 100644
--- a/resources/views/livewire/cart.blade.php
+++ b/resources/views/livewire/cart.blade.php
@@ -6,89 +6,265 @@
@auth
Please
Please or to continue
Product | -Price | -Color | -Size | -Quantity | -Total | -- |
---|---|---|---|---|---|---|
{{ $item->product->name }} | -{{ $item->product->price }} | -{{ $item->variant->color }} | -{{ $item->variant->size }} | -- | -{{$item->subtotal}} | -- - | -
Total | -{{ $this->cart->total }} | -- |
Product | --}} +{{--Price | --}} +{{--Color | --}} +{{--Size | --}} +{{--Quantity | --}} +{{--Total | --}} +{{----}} +{{-- |
---|---|---|---|---|---|---|
{{ $item->product->name }} | --}} +{{--{{ $item->product->price }} | --}} +{{--{{ $item->variant->color }} | --}} +{{--{{ $item->variant->size }} | --}} +{{----}}
+{{-- --}}
+{{-- --}}
+{{-- {{ $item->quantity }}--}}
+{{-- --}}
+{{-- --}}
+{{-- | --}}
+{{-- {{$item->subtotal}} | --}} +{{----}} +{{-- --}} +{{-- | --}} +{{--
Total | --}} +{{--{{ $this->cart->total }} | --}} +{{----}} +{{-- |