mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge branch 'develop' of https://github.com/snipe/snipe-it into develop
This commit is contained in:
commit
450183c55c
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace App\Http\Controllers\Api;
|
namespace App\Http\Controllers\Api;
|
||||||
|
|
||||||
|
use App\Events\CheckoutableCheckedIn;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use App\Helpers\Helper;
|
use App\Helpers\Helper;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
@ -782,6 +783,8 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
if ($asset->save()) {
|
if ($asset->save()) {
|
||||||
$asset->logCheckin($target, e($request->input('note')));
|
$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')));
|
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);
|
$this->authorize('view', Statuslabel::class);
|
||||||
|
|
||||||
$statuslabels = Statuslabel::with('assets')
|
$statuslabels = Statuslabel::withCount('assets')->get();
|
||||||
->groupBy('id')
|
|
||||||
->withCount('assets as assets_count')
|
|
||||||
->get();
|
|
||||||
|
|
||||||
$labels=[];
|
$labels=[];
|
||||||
$points=[];
|
$points=[];
|
||||||
|
|
|
@ -54,7 +54,7 @@ then
|
||||||
cp -ax /var/www/html/vendor/laravel/passport/database/migrations/* /var/www/html/database/migrations/
|
cp -ax /var/www/html/vendor/laravel/passport/database/migrations/* /var/www/html/database/migrations/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $SESSION_DRIVER = "database" ]
|
if [ "$SESSION_DRIVER" = "database" ]
|
||||||
then
|
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
|
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
|
fi
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
{{ $asset->last_checkout }}</td>
|
{{ $asset->last_checkout }}</td>
|
||||||
<td>
|
<td>
|
||||||
@if ($asset->assetlog->first())
|
@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
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
<td>{{ $asset->serial }}</td>
|
<td>{{ $asset->serial }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ $asset->last_checkout }}</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>
|
</tr>
|
||||||
@php
|
@php
|
||||||
$assignedCounter++
|
$assignedCounter++
|
||||||
|
|
Loading…
Reference in a new issue