diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index e4a6e792af..111f0df6cf 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -521,7 +521,7 @@ class AssetsController extends Controller public function getBarCode($assetId = null) { $settings = Setting::getSettings(); - $asset = Asset::find($assetId); + $asset = Asset::withTrashed()->find($assetId); $barcode_file = public_path().'/uploads/barcodes/'.str_slug($settings->alt_barcode).'-'.str_slug($asset->asset_tag).'.png'; if (isset($asset->id, $asset->asset_tag)) { diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index c28a9079cf..8bee71384d 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -218,6 +218,12 @@ @endif @endcan + @can('update', $user) +
+ Transfer Items +
+ @endcan + @can('delete', $user) @if ($user->deleted_at=='')
diff --git a/routes/web/users.php b/routes/web/users.php index 95de200638..370fbc8b88 100644 --- a/routes/web/users.php +++ b/routes/web/users.php @@ -43,11 +43,27 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () { Route::post( '{userId}/clone', [ - Users\UsersController::class, + Users\UsersController::class, 'postCreate' ] )->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( '{userId}/restore', [