Merge pull request #14240 from snipe/feature/sc-24786

Feature/sc 24786
This commit is contained in:
snipe 2024-02-09 20:28:31 +00:00 committed by GitHub
commit 590c19dbd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 2 deletions

View file

@ -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)) {

View file

@ -218,6 +218,12 @@
@endif
@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)
@if ($user->deleted_at=='')
<div class="col-md-12" style="padding-top: 30px;">

View file

@ -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',
[