diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index 8eec3f73c9..71b54cc1b6 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -744,6 +744,18 @@ class AssetsController extends Controller return view('hardware/audit')->with('asset', $asset)->with('next_audit_date', $dt)->with('locations_list'); } + public function dueForAudit() + { + $this->authorize('audit', Asset::class); + return view('hardware/audit-due'); + } + + public function overdueForAudit() + { + $this->authorize('audit', Asset::class); + return view('hardware/audit-overdue'); + } + public function auditStore(AssetFileRequest $request, $id) { diff --git a/routes/web/hardware.php b/routes/web/hardware.php index 081098806a..35decdc2b5 100644 --- a/routes/web/hardware.php +++ b/routes/web/hardware.php @@ -29,6 +29,16 @@ Route::group( 'uses' => 'AssetsController@scan' ]); + Route::get('audit/due', [ + 'as' => 'assets.audit.due', + 'uses' => 'AssetsController@dueForAudit' + ]); + + Route::get('audit/overdue', [ + 'as' => 'assets.audit.overdue', + 'uses' => 'AssetsController@overdueForAudit' + ]); + Route::get('audit/{id}', [ 'as' => 'asset.audit.create', 'uses' => 'AssetsController@audit'