diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 8361971d5d..855bc51268 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -928,7 +928,7 @@ class AssetsController extends Controller } } - if ($request->has('status_id')) { + if ($request->filled('status_id')) { $asset->status_id = $request->input('status_id'); } @@ -978,7 +978,7 @@ class AssetsController extends Controller public function checkinByTag(Request $request, $tag = null) : JsonResponse { $this->authorize('checkin', Asset::class); - if(null == $tag && null !== ($request->input('asset_tag'))) { + if (null == $tag && null !== ($request->input('asset_tag'))) { $tag = $request->input('asset_tag'); } $asset = Asset::where('asset_tag', $tag)->first(); diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index 2430cd00fa..75646e7267 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -844,7 +844,7 @@ class AssetsController extends Controller { $this->authorize('checkin', Asset::class); - return view('hardware/quickscan-checkin'); + return view('hardware/quickscan-checkin')->with('statusLabel_list', Helper::statusLabelList()); } public function audit($id) diff --git a/composer.json b/composer.json index 5467e94e32..a72d80839a 100644 --- a/composer.json +++ b/composer.json @@ -78,7 +78,7 @@ "fakerphp/faker": "^1.16", "larastan/larastan": "^2.9", "mockery/mockery": "^1.4", - "nunomaduro/phpinsights": "^2.7", + "nunomaduro/phpinsights": "^2.11", "php-mock/php-mock-phpunit": "^2.10", "phpunit/phpunit": "^10.0", "squizlabs/php_codesniffer": "^3.5", diff --git a/composer.lock b/composer.lock index f7c46672d3..715070df0f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "35c741a2d3300848d758b187554b5b17", + "content-hash": "3819ab4ef72eb77fabe494c0e746b83b", "packages": [ { "name": "alek13/slack", diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.php index 255a1564de..444ed54089 100644 --- a/resources/lang/en-US/general.php +++ b/resources/lang/en-US/general.php @@ -279,6 +279,7 @@ return [ 'site_name' => 'Site Name', 'state' => 'State', 'status_labels' => 'Status Labels', + 'status_label' => 'Status Label', 'status' => 'Status', 'accept_eula' => 'Acceptance Agreement', 'supplier' => 'Supplier', diff --git a/resources/views/hardware/quickscan-checkin.blade.php b/resources/views/hardware/quickscan-checkin.blade.php index d71f4e9cb7..ec6ef5719f 100644 --- a/resources/views/hardware/quickscan-checkin.blade.php +++ b/resources/views/hardware/quickscan-checkin.blade.php @@ -33,14 +33,25 @@