From 38affea3f3a83994dd2c7109d59878e9dda2e793 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 20 Jul 2024 16:57:10 +0100 Subject: [PATCH] More updates Signed-off-by: snipe --- .../Controllers/Consumables/ConsumablesController.php | 2 ++ resources/views/accessories/view.blade.php | 2 +- resources/views/consumables/view.blade.php | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Consumables/ConsumablesController.php b/app/Http/Controllers/Consumables/ConsumablesController.php index f746b9f904..883d5849ee 100644 --- a/app/Http/Controllers/Consumables/ConsumablesController.php +++ b/app/Http/Controllers/Consumables/ConsumablesController.php @@ -216,6 +216,8 @@ class ConsumablesController extends Controller $consumable_to_close = $consumable; $consumable = clone $consumable_to_close; $consumable->id = null; + $consumable->image = null; + $consumable->user_id = null; return view('consumables/edit')->with('item', $consumable); } diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.php index 9a37059b41..e42439bd86 100644 --- a/resources/views/accessories/view.blade.php +++ b/resources/views/accessories/view.blade.php @@ -330,7 +330,7 @@ {{ trans('admin/accessories/general.edit') }} @endcan - @can('update', \App\Models\Accessory::class) + @can('create', \App\Models\Accessory::class) diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.php index 402edd707b..f6ea14042e 100644 --- a/resources/views/consumables/view.blade.php +++ b/resources/views/consumables/view.blade.php @@ -101,6 +101,14 @@ @endcan + @can('create', Consumable::class) + + + + @endcan + @can('checkout', $consumable) @if ($consumable->numRemaining() > 0)