mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Controller/API methods for due/overdue audits
We could probably skip this and just handle it via view in the routes…
This commit is contained in:
parent
52c9e8ad96
commit
ab060288fa
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue