mirror of
https://github.com/snipe/snipe-it.git
synced 2026-08-18 11:15:42 +00:00
Added routes
This commit is contained in:
@ -1325,6 +1325,13 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'api-throttle:api']], fu
|
||||
'index',
|
||||
]
|
||||
)->name('api.activity.index');
|
||||
|
||||
Route::get('activity/chart',
|
||||
[
|
||||
Api\ReportsController::class,
|
||||
'activityChart',
|
||||
]
|
||||
)->name('api.reports.activity.chart');
|
||||
}); // end reports api routes
|
||||
|
||||
/**
|
||||
|
||||
@ -457,15 +457,22 @@ Route::group(['middleware' => ['auth']], function () {
|
||||
|
||||
Route::group(['prefix' => 'reports', 'middleware' => ['auth']], function () {
|
||||
|
||||
Route::get('/', [ReportsController::class, 'index'])
|
||||
->name('reports.index')
|
||||
->breadcrumbs(fn(Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index')));
|
||||
|
||||
Route::get('audit', [ReportsController::class, 'audit'])
|
||||
->name('reports.audit')
|
||||
->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index'))
|
||||
->push(trans('general.audit_report'), route('reports.audit')));
|
||||
|
||||
Route::get(
|
||||
'depreciation', [ReportsController::class, 'getDeprecationReport'])
|
||||
->name('reports/depreciation')
|
||||
->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index'))
|
||||
->push(trans('general.depreciation_report'), route('reports/depreciation')));
|
||||
|
||||
// Is this still used??
|
||||
@ -473,30 +480,38 @@ Route::group(['prefix' => 'reports', 'middleware' => ['auth']], function () {
|
||||
'export/depreciation', [ReportsController::class, 'exportDeprecationReport'])
|
||||
->name('reports/export/depreciation')
|
||||
->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index'))
|
||||
->push(trans('general.depreciation_report'), route('reports.audit')));
|
||||
|
||||
Route::get(
|
||||
'maintenances', [ReportsController::class, 'getMaintenancesReport'])
|
||||
->name('ui.reports.maintenances')
|
||||
->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index'))
|
||||
->push(trans('general.asset_maintenance_report'), route('ui.reports.maintenances')));
|
||||
|
||||
// Is this still used?
|
||||
Route::get('export/maintenances', [ReportsController::class, 'exportMaintenancesReport'])
|
||||
->name('reports/export/maintenances')
|
||||
->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index'))
|
||||
->push(trans('general.asset_maintenance_report'), route('reports/export/maintenances')));
|
||||
|
||||
Route::get('licenses', [ReportsController::class, 'getLicenseReport'])
|
||||
->name('reports/licenses')
|
||||
->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index'))
|
||||
->push(trans('general.license_report'), route('reports/licenses')));
|
||||
|
||||
// @TODO this should be a GET?
|
||||
Route::get('export/licenses', [ReportsController::class, 'exportLicenseReport'])
|
||||
->name('reports/export/licenses');
|
||||
|
||||
Route::get('accessories', [ReportsController::class, 'getAccessoryReport'])
|
||||
->name('reports/accessories');
|
||||
->name('reports/accessories')
|
||||
->breadcrumbs(fn(Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index'))
|
||||
->push(trans('general.accessory_report'), route('reports/accessories')));
|
||||
|
||||
Route::get('export/accessories', [ReportsController::class, 'exportAccessoryReport'])
|
||||
->name('reports/export/accessories');
|
||||
@ -504,6 +519,7 @@ Route::group(['prefix' => 'reports', 'middleware' => ['auth']], function () {
|
||||
Route::get('custom', [ReportsController::class, 'getCustomReport'])
|
||||
->name('reports/custom')
|
||||
->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index'))
|
||||
->push(trans('general.custom_report'), route('reports/custom')));
|
||||
|
||||
Route::post('custom', [ReportsController::class, 'postCustom'])
|
||||
@ -539,6 +555,7 @@ Route::group(['prefix' => 'reports', 'middleware' => ['auth']], function () {
|
||||
'activity', [ReportsController::class, 'getActivityReport'])
|
||||
->name('reports.activity')
|
||||
->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index'))
|
||||
->push(trans('general.activity_report'), route('reports.activity')));
|
||||
|
||||
Route::post('activity', [ReportsController::class, 'postActivityReport'])
|
||||
@ -547,6 +564,7 @@ Route::group(['prefix' => 'reports', 'middleware' => ['auth']], function () {
|
||||
Route::get('unaccepted_assets/{deleted?}', [ReportsController::class, 'getAssetAcceptanceReport'])
|
||||
->name('reports/unaccepted_assets')
|
||||
->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
|
||||
->push(trans('general.reports'), route('reports.index'))
|
||||
->push(trans('general.unaccepted_asset_report'), route('reports/unaccepted_assets')));
|
||||
|
||||
Route::post('unaccepted_assets/sent_reminder', [ReportsController::class, 'sentAssetAcceptanceReminder'])
|
||||
|
||||
Reference in New Issue
Block a user