mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-13 06:47:46 -08:00
Merge pull request #14241 from snipe/revert-14240-feature/sc-24786
Revert "Fixed barcodes crashing if asset was deleted"
This commit is contained in:
commit
2c996a8508
|
@ -521,7 +521,7 @@ class AssetsController extends Controller
|
||||||
public function getBarCode($assetId = null)
|
public function getBarCode($assetId = null)
|
||||||
{
|
{
|
||||||
$settings = Setting::getSettings();
|
$settings = Setting::getSettings();
|
||||||
$asset = Asset::withTrashed()->find($assetId);
|
$asset = Asset::find($assetId);
|
||||||
$barcode_file = public_path().'/uploads/barcodes/'.str_slug($settings->alt_barcode).'-'.str_slug($asset->asset_tag).'.png';
|
$barcode_file = public_path().'/uploads/barcodes/'.str_slug($settings->alt_barcode).'-'.str_slug($asset->asset_tag).'.png';
|
||||||
|
|
||||||
if (isset($asset->id, $asset->asset_tag)) {
|
if (isset($asset->id, $asset->asset_tag)) {
|
||||||
|
|
|
@ -218,12 +218,6 @@
|
||||||
@endif
|
@endif
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@can('update', $user)
|
|
||||||
<div class="col-md-12" style="padding-top: 5px;">
|
|
||||||
<a href="{{ route('users.transfer', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">Transfer Items</a>
|
|
||||||
</div>
|
|
||||||
@endcan
|
|
||||||
|
|
||||||
@can('delete', $user)
|
@can('delete', $user)
|
||||||
@if ($user->deleted_at=='')
|
@if ($user->deleted_at=='')
|
||||||
<div class="col-md-12" style="padding-top: 30px;">
|
<div class="col-md-12" style="padding-top: 30px;">
|
||||||
|
|
|
@ -43,27 +43,11 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
|
||||||
Route::post(
|
Route::post(
|
||||||
'{userId}/clone',
|
'{userId}/clone',
|
||||||
[
|
[
|
||||||
Users\UsersController::class,
|
Users\UsersController::class,
|
||||||
'postCreate'
|
'postCreate'
|
||||||
]
|
]
|
||||||
)->name('users.clone.store');
|
)->name('users.clone.store');
|
||||||
|
|
||||||
Route::get(
|
|
||||||
'{userId}/transfer',
|
|
||||||
[
|
|
||||||
Users\UsersController::class,
|
|
||||||
'getTransfer'
|
|
||||||
]
|
|
||||||
)->name('users.transfer.show');
|
|
||||||
|
|
||||||
Route::post(
|
|
||||||
'{userId}/transfer',
|
|
||||||
[
|
|
||||||
Users\UsersController::class,
|
|
||||||
'postTransfer'
|
|
||||||
]
|
|
||||||
)->name('users.transfer.store');
|
|
||||||
|
|
||||||
Route::post(
|
Route::post(
|
||||||
'{userId}/restore',
|
'{userId}/restore',
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in a new issue