More updates

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-20 16:57:10 +01:00
parent cea31c5b11
commit 38affea3f3
3 changed files with 11 additions and 1 deletions

View file

@ -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);
}

View file

@ -330,7 +330,7 @@
<a href="{{ route('accessories.edit', $accessory->id) }}" style="margin-right:5px; width:100%" class="btn btn-primary btn-sm">{{ trans('admin/accessories/general.edit') }}</a>
</div>
@endcan
@can('update', \App\Models\Accessory::class)
@can('create', \App\Models\Accessory::class)
<div class="text-center" style="padding-top:5px;">
<a href="{{ route('clone/accessories', $accessory->id) }}" style="margin-right:5px; width:100%" class="btn btn-primary btn-sm">{{ trans('admin/accessories/general.clone') }}</a>
</div>

View file

@ -101,6 +101,14 @@
</div>
@endcan
@can('create', Consumable::class)
<div class="col-md-12">
<a href="{{ route('consumables.clone.create', $consumable->id) }}" style="margin-bottom:5px;" class="btn btn-sm btn-block btn-primary hidden-print">{{ trans('button.var.clone', ['item_type' => trans('general.consumable')]) }}</a>
</div>
@endcan
@can('checkout', $consumable)
@if ($consumable->numRemaining() > 0)
<div class="col-md-12">