This commit is contained in:
snipe 2021-12-10 15:17:45 -08:00
commit 5381aa3fbd
2 changed files with 3 additions and 0 deletions

View file

@ -269,6 +269,7 @@ class AssetModelsController extends Controller
*/
public function getClone($modelId = null)
{
$this->authorize('create', AssetModel::class);
// Check if the model exists
if (is_null($model_to_clone = AssetModel::find($modelId))) {
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));

View file

@ -36,6 +36,7 @@
<tr>
<th class="col-sm-1">{{ trans('admin/companies/table.title') }}</th>
<th class="col-sm-1">{{ trans('admin/accessories/table.title') }}</th>
<th class="col-sm-1">{{ trans('general.model_no') }}</th>
<th class="col-sm-1">{{ trans('admin/accessories/general.total') }}</th>
<th class="col-sm-1">{{ trans('admin/accessories/general.remaining') }}</th>
</tr>
@ -45,6 +46,7 @@
<tr>
<td>{{ is_null($accessory->company) ? '' : $accessory->company->name }}</td>
<td>{{ $accessory->name }}</td>
<td>{{ $accessory->model_number }}</td>
<td>{{ $accessory->qty }}</td>
<td>{{ $accessory->numRemaining() }}</td>
</tr>