Fixed typo and spacing
This commit is contained in:
@@ -417,6 +417,7 @@ class AccessoriesController extends Controller
|
||||
{
|
||||
$this->authorize('history', $accessory);
|
||||
$history = $accessory->getHistory($request);
|
||||
|
||||
return response()->json((new ActionlogsTransformer)->transformActionlogs($history, $history->count()), 200, ['Content-Type' => 'application/json;charset=utf8'], JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,6 +373,7 @@ class ConsumablesController extends Controller
|
||||
{
|
||||
$this->authorize('history', $consumable);
|
||||
$history = $consumable->getHistory($request);
|
||||
|
||||
return response()->json((new ActionlogsTransformer)->transformActionlogs($history, $history->count()), 200, ['Content-Type' => 'application/json;charset=utf8'], JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class MaintenancesController extends Controller
|
||||
$this->authorize('view', Asset::class);
|
||||
|
||||
$maintenances = Maintenance::select('maintenances.*')
|
||||
->with('asset', 'asset.model', 'asset.location', 'asset.defaultLoc', 'supplier', 'asset.company', 'asset.assetstatus', 'adminuser', 'asset.assignedTo',);
|
||||
->with('asset', 'asset.model', 'asset.location', 'asset.defaultLoc', 'supplier', 'asset.company', 'asset.assetstatus', 'adminuser', 'asset.assignedTo');
|
||||
|
||||
if ($request->filled('search')) {
|
||||
$maintenances = $maintenances->TextSearch($request->input('search'));
|
||||
@@ -130,7 +130,7 @@ class MaintenancesController extends Controller
|
||||
if (request()->input('format') == 'flat') {
|
||||
return (new MaintenancesTransformer)->transformMaintenancesFlat($maintenances, $total);
|
||||
}
|
||||
|
||||
|
||||
return (new MaintenancesTransformer)->transformMaintenances($maintenances, $total);
|
||||
|
||||
}
|
||||
@@ -259,6 +259,7 @@ class MaintenancesController extends Controller
|
||||
$asset = $maintenance->asset;
|
||||
$this->authorize('history', $asset);
|
||||
$history = $maintenance->getHistory($request);
|
||||
|
||||
return response()->json((new ActionlogsTransformer)->transformActionlogs($history, $history->count()), 200, ['Content-Type' => 'application/json;charset=utf8'], JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,6 @@ class AuthServiceProvider extends ServiceProvider
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Define the demo mode gate so we have an easy way to use @can and Gate::allows()
|
||||
|
||||
@@ -150,7 +150,6 @@ class UserFactory extends Factory
|
||||
return $this->appendPermission(['consumables.view' => '1']);
|
||||
}
|
||||
|
||||
|
||||
public function createAssets()
|
||||
{
|
||||
return $this->appendPermission(['assets.create' => '1']);
|
||||
|
||||
@@ -19,7 +19,5 @@
|
||||
api_url="{{ $route }}"
|
||||
export_filename="export-history-{{ date('Y-m-d') }}"
|
||||
/>
|
||||
@else
|
||||
Nope
|
||||
@endcan
|
||||
<!-- end assets tab pane -->
|
||||
@@ -229,7 +229,6 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'api-throttle:api']], fu
|
||||
]
|
||||
)->name('api.components.history');
|
||||
|
||||
|
||||
Route::get('selectlist',
|
||||
[
|
||||
Api\ComponentsController::class,
|
||||
@@ -601,7 +600,6 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'api-throttle:api']], fu
|
||||
/**
|
||||
* Asset maintenances API routes
|
||||
*/
|
||||
|
||||
Route::get('/maintenances/{maintenance}/history',
|
||||
[
|
||||
Api\MaintenancesController::class,
|
||||
|
||||
@@ -4,10 +4,10 @@ namespace Tests\Feature\History\Api;
|
||||
|
||||
use App\Models\Accessory;
|
||||
use App\Models\Asset;
|
||||
use App\Models\Component;
|
||||
use App\Models\Consumable;
|
||||
use App\Models\License;
|
||||
use App\Models\Location;
|
||||
use App\Models\Component;
|
||||
use App\Models\Maintenance;
|
||||
use App\Models\User;
|
||||
use Tests\TestCase;
|
||||
|
||||
Reference in New Issue
Block a user