snipe-it/routes/web/hardware.php

196 lines
5.9 KiB
PHP
Raw Normal View History

<?php
/*
|--------------------------------------------------------------------------
| Asset Routes
|--------------------------------------------------------------------------
|
| Register all the asset routes.
|
*/
Route::group(
['prefix' => 'hardware',
'middleware' => ['auth']],
function () {
Route::get( 'bulkaudit', [
'as' => 'assets.bulkaudit',
'uses' => 'Assets\AssetsController@quickScan'
]);
# Asset Maintenances
2016-12-15 15:15:11 -08:00
Route::resource('maintenances', 'AssetMaintenancesController', [
'parameters' => ['maintenance' => 'maintenance_id', 'asset' => 'asset_id']
]);
Route::get('requested', [ 'as' => 'assets.requested', 'uses' => 'Assets\AssetsController@getRequestedIndex']);
2017-11-02 03:11:09 -07:00
Route::get('scan', [
'as' => 'asset.scan',
'uses' => 'Assets\AssetsController@scan'
]);
Route::get('audit/due', [
'as' => 'assets.audit.due',
'uses' => 'Assets\AssetsController@dueForAudit'
]);
Route::get('audit/overdue', [
'as' => 'assets.audit.overdue',
'uses' => 'Assets\AssetsController@overdueForAudit'
]);
Merge branch 'develop' into v5-master-develop-integration # Conflicts: # .env.example # .travis.yml # Dockerfile # README.md # app/Console/Commands/LdapSync.php # app/Console/Kernel.php # app/Http/Controllers/AccessoriesController.php # app/Http/Controllers/Api/AccessoriesController.php # app/Http/Controllers/Api/AssetsController.php # app/Http/Controllers/Api/LocationsController.php # app/Http/Controllers/Api/SettingsController.php # app/Http/Controllers/Api/UsersController.php # app/Http/Controllers/AssetModelsController.php # app/Http/Controllers/Assets/AssetFilesController.php # app/Http/Controllers/Assets/AssetsController.php # app/Http/Controllers/CategoriesController.php # app/Http/Controllers/CompaniesController.php # app/Http/Controllers/ComponentsController.php # app/Http/Controllers/ConsumablesController.php # app/Http/Controllers/DepartmentsController.php # app/Http/Controllers/LicensesController.php # app/Http/Controllers/LocationsController.php # app/Http/Controllers/ManufacturersController.php # app/Http/Controllers/ReportsController.php # app/Http/Controllers/SettingsController.php # app/Http/Controllers/SuppliersController.php # app/Http/Controllers/UsersController.php # app/Http/Middleware/EncryptCookies.php # app/Http/Requests/AssetRequest.php # app/Http/Transformers/AssetMaintenancesTransformer.php # app/Importer/AssetImporter.php # app/Models/AssetMaintenance.php # app/Models/Location.php # app/Models/User.php # composer.json # composer.lock # config/backup.php # config/database.php # config/version.php # public/mix-manifest.json # resources/lang/en-ID/general.php # resources/lang/vi/admin/settings/general.php # resources/views/accessories/edit.blade.php # resources/views/hardware/view.blade.php # resources/views/layouts/default.blade.php # tests/api/ApiCategoriesCest.php
2019-11-18 19:49:39 -08:00
Route::get('audit/due', [
'as' => 'assets.audit.due',
'uses' => 'Assets\AssetsController@dueForAudit'
Merge branch 'develop' into v5-master-develop-integration # Conflicts: # .env.example # .travis.yml # Dockerfile # README.md # app/Console/Commands/LdapSync.php # app/Console/Kernel.php # app/Http/Controllers/AccessoriesController.php # app/Http/Controllers/Api/AccessoriesController.php # app/Http/Controllers/Api/AssetsController.php # app/Http/Controllers/Api/LocationsController.php # app/Http/Controllers/Api/SettingsController.php # app/Http/Controllers/Api/UsersController.php # app/Http/Controllers/AssetModelsController.php # app/Http/Controllers/Assets/AssetFilesController.php # app/Http/Controllers/Assets/AssetsController.php # app/Http/Controllers/CategoriesController.php # app/Http/Controllers/CompaniesController.php # app/Http/Controllers/ComponentsController.php # app/Http/Controllers/ConsumablesController.php # app/Http/Controllers/DepartmentsController.php # app/Http/Controllers/LicensesController.php # app/Http/Controllers/LocationsController.php # app/Http/Controllers/ManufacturersController.php # app/Http/Controllers/ReportsController.php # app/Http/Controllers/SettingsController.php # app/Http/Controllers/SuppliersController.php # app/Http/Controllers/UsersController.php # app/Http/Middleware/EncryptCookies.php # app/Http/Requests/AssetRequest.php # app/Http/Transformers/AssetMaintenancesTransformer.php # app/Importer/AssetImporter.php # app/Models/AssetMaintenance.php # app/Models/Location.php # app/Models/User.php # composer.json # composer.lock # config/backup.php # config/database.php # config/version.php # public/mix-manifest.json # resources/lang/en-ID/general.php # resources/lang/vi/admin/settings/general.php # resources/views/accessories/edit.blade.php # resources/views/hardware/view.blade.php # resources/views/layouts/default.blade.php # tests/api/ApiCategoriesCest.php
2019-11-18 19:49:39 -08:00
]);
Route::get('audit/overdue', [
'as' => 'assets.audit.overdue',
'uses' => 'Assets\AssetsController@overdueForAudit'
]);
Route::get('audit/due', [
'as' => 'assets.audit.due',
'uses' => 'Assets\AssetsController@dueForAudit'
]);
Route::get('audit/overdue', [
'as' => 'assets.audit.overdue',
'uses' => 'Assets\AssetsController@overdueForAudit'
]);
Route::get('audit/{id}', [
'as' => 'asset.audit.create',
'uses' => 'Assets\AssetsController@audit'
]);
Route::post('audit/{id}', [
'as' => 'asset.audit.store',
'uses' => 'Assets\AssetsController@auditStore'
]);
Route::get('history', [
'as' => 'asset.import-history',
'uses' => 'Assets\AssetsController@getImportHistory'
]);
Route::post('history', [
'as' => 'asset.process-import-history',
'uses' => 'Assets\AssetsController@postImportHistory'
]);
Route::get('bytag/{any?}',
[
'as' => 'findbytag/hardware',
'uses' => 'AssetsController@getAssetByTag'
]
)->where('any', '.*');
Route::get('byserial/{any?}',
[
'as' => 'findbyserial/hardware',
'uses' => 'AssetsController@getAssetBySerial'
]
)->where('any', '.*');
Route::get('{assetId}/clone', [
'as' => 'clone/hardware',
'uses' => 'Assets\AssetsController@getClone'
]);
Route::get('{assetId}/label', [
'as' => 'label/hardware',
'uses' => 'Assets\AssetsController@getLabel'
]);
Route::post('{assetId}/clone', 'Assets\AssetsController@postCreate');
Route::get('{assetId}/checkout', [
'as' => 'checkout/hardware',
'uses' => 'Assets\AssetCheckoutController@create'
]);
Route::post('{assetId}/checkout', [
'as' => 'checkout/hardware',
'uses' => 'Assets\AssetCheckoutController@store'
]);
Route::get('{assetId}/checkin/{backto?}', [
'as' => 'checkin/hardware',
'uses' => 'Assets\AssetCheckinController@create'
]);
Route::post('{assetId}/checkin/{backto?}', [
'as' => 'checkin/hardware',
'uses' => 'Assets\AssetCheckinController@store'
]);
Route::get('{assetId}/view', [
'as' => 'hardware.view',
'uses' => 'Assets\AssetsController@show'
]);
Route::get('{assetId}/qr_code', [ 'as' => 'qr_code/hardware', 'uses' => 'Assets\AssetsController@getQrCode' ]);
Route::get('{assetId}/barcode', [ 'as' => 'barcode/hardware', 'uses' => 'Assets\AssetsController@getBarCode' ]);
Route::get('{assetId}/restore', [
'as' => 'restore/hardware',
'uses' => 'Assets\AssetsController@getRestore'
]);
Route::post('{assetId}/upload', [
'as' => 'upload/asset',
'uses' => 'Assets\AssetFilesController@store'
]);
Route::get('{assetId}/showfile/{fileId}/{download?}', [
'as' => 'show/assetfile',
'uses' => 'Assets\AssetFilesController@show'
]);
Route::delete('{assetId}/showfile/{fileId}/delete', [
'as' => 'delete/assetfile',
'uses' => 'Assets\AssetFilesController@destroy'
]);
Route::post(
'bulkedit',
[
'as' => 'hardware/bulkedit',
'uses' => 'Assets\BulkAssetsController@edit'
]
);
Route::post(
'bulkdelete',
[
'as' => 'hardware/bulkdelete',
'uses' => 'Assets\BulkAssetsController@destroy'
]
);
Route::post(
'bulksave',
[
'as' => 'hardware/bulksave',
'uses' => 'Assets\BulkAssetsController@update'
]
);
# Bulk checkout / checkin
Route::get( 'bulkcheckout', [
'as' => 'hardware/bulkcheckout',
'uses' => 'Assets\BulkAssetsController@showCheckout'
]);
Route::post( 'bulkcheckout', [
'as' => 'hardware/bulkcheckout',
'uses' => 'Assets\BulkAssetsController@storeCheckout'
]);
});
Route::resource('hardware', 'Assets\AssetsController', [
'middleware' => ['auth'],
'parameters' => ['asset' => 'asset_id']
]);