Skip to main content
Sign in
Snippets Groups Projects
Commit 450183c5 authored by snipe's avatar snipe
Browse files

Merge branch 'develop' of https://github.com/snipe/snipe-it into develop

parents 7b4cc504 e44a2512
No related branches found
No related tags found
No related merge requests found
<?php
namespace App\Http\Controllers\Api;
use App\Events\CheckoutableCheckedIn;
use Illuminate\Support\Facades\Gate;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
......@@ -782,6 +783,8 @@ class AssetsController extends Controller
if ($asset->save()) {
$asset->logCheckin($target, e($request->input('note')));
event(new CheckoutableCheckedIn($asset, $target, Auth::user(), $request->input('note')));
return response()->json(Helper::formatStandardApiResponse('success', ['asset'=> e($asset->asset_tag)], trans('admin/hardware/message.checkin.success')));
}
......
......
......@@ -167,10 +167,7 @@ class StatuslabelsController extends Controller
{
$this->authorize('view', Statuslabel::class);
$statuslabels = Statuslabel::with('assets')
->groupBy('id')
->withCount('assets as assets_count')
->get();
$statuslabels = Statuslabel::withCount('assets')->get();
$labels=[];
$points=[];
......
......
......@@ -54,7 +54,7 @@ then
cp -ax /var/www/html/vendor/laravel/passport/database/migrations/* /var/www/html/database/migrations/
fi
if [ $SESSION_DRIVER = "database" ]
if [ "$SESSION_DRIVER" = "database" ]
then
cp -ax /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Console/stubs/database.stub /var/www/html/database/migrations/2021_05_06_0000_create_sessions_table.php
fi
......
......
......@@ -87,7 +87,7 @@
{{ $asset->last_checkout }}</td>
<td>
@if ($asset->assetlog->first())
<img height="20%" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->first()->accept_signature }}">
<img style="width:auto;height:100px;" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->first()->accept_signature }}">
@endif
</td>
</tr>
......@@ -106,7 +106,7 @@
<td>{{ $asset->serial }}</td>
<td>
{{ $asset->last_checkout }}</td>
<td><img height="20%" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->first()->accept_signature }}"></img></td>
<td><img style="width:auto;height:100px;" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->first()->accept_signature }}"></td>
</tr>
@php
$assignedCounter++
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment