Patched #11025 to develop

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2022-05-06 02:06:12 -07:00
parent 784bf4d784
commit caef98d36d
2 changed files with 183 additions and 182 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
<?php
return [
return [
'accessories' => 'Accessories',
'activated' => 'Activated',
'accessory' => 'Accessory',
@@ -26,6 +26,7 @@
'audit' => 'Audit',
'audit_report' => 'Audit Log',
'assets' => 'Assets',
'assigned_to' => 'Assigned to :name',
'avatar_delete' => 'Delete Avatar',
'avatar_upload' => 'Upload Avatar',
'back' => 'Back',
@@ -352,4 +353,4 @@
'checkout_tooltip' => 'Check this item out',
'checkin_tooltip' => 'Check this item in',
'checkout_user_tooltip' => 'Check this item out to a user',
];
];
+180 -180
View File
@@ -2,7 +2,7 @@
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Assigned to {{ $show_user->present()->fullName() }}</title>
<title>{{ trans('general.assigned_to', ['name' => $show_user->present()->fullName()]) }}</title>
<style>
body {
font-family: "Arial, Helvetica", sans-serif;
@@ -30,230 +30,230 @@
</style>
</head>
<body>
@if ($snipeSettings->logo_print_assets=='1')
@if ($snipeSettings->brand == '3')
<h2>
@if ($snipeSettings->logo!='')
<img class="print-logo" src="{{ url('/') }}/uploads/{{ $snipeSettings->logo }}">
@endif
{{ $snipeSettings->site_name }}
@if ($snipeSettings->logo!='')
<img class="print-logo" src="{{ url('/') }}/uploads/{{ $snipeSettings->logo }}">
@endif
{{ $snipeSettings->site_name }}
</h2>
@elseif ($snipeSettings->brand == '2')
@if ($snipeSettings->logo!='')
<img class="print-logo" src="{{ url('/') }}/uploads/{{ $snipeSettings->logo }}">
@endif
@else
<h2>{{ $snipeSettings->site_name }}</h2>
<h2>{{ $snipeSettings->site_name }}</h2>
@endif
@endif
<h2>Assigned to {{ $show_user->present()->fullName() }}</h4>
<h2>{{ trans('general.assigned_to', ['name' => $show_user->present()->fullName()]) }}</h4>
@if ($assets->count() > 0)
@php
$counter = 1;
@endphp
<table class="inventory">
<thead>
<tr>
<th colspan="8">{{ trans('general.assets') }}</th>
</tr>
</thead>
<thead>
@if ($assets->count() > 0)
@php
$counter = 1;
@endphp
<table class="inventory">
<thead>
<tr>
<th colspan="8">{{ trans('general.assets') }}</th>
</tr>
</thead>
<thead>
<tr>
<th style="width: 20px;"></th>
<th style="width: 20%;">{{ trans('general.asset_tag') }}</th>
<th style="width: 20%;">{{ trans('admin/hardware/table.asset_tag') }}</th>
<th style="width: 20%;">{{ trans('general.name') }}</th>
<th style="width: 10%;">{{ trans('general.category') }}</th>
<th style="width: 20%;">{{ trans('general.asset_model') }}</th>
<th style="width: 20%;">{{ trans('admin/hardware/form.model') }}</th>
<th style="width: 20%;">{{ trans('admin/hardware/form.serial') }}</th>
<th style="width: 10%;">{{ trans('general.checked_out') }}</th>
<th style="width: 10%;">{{ trans('admin/hardware/table.checkout_date') }}</th>
<th data-formatter="imageFormatter" style="width: 20%;">{{ trans('general.signature') }}</th>
</tr>
</thead>
</thead>
@foreach ($assets as $asset)
@foreach ($assets as $asset)
<tr>
<td>{{ $counter }}</td>
<td>{{ $asset->asset_tag }}</td>
<td>{{ $asset->name }}</td>
<td>{{ $asset->model->category->name }}</td>
<td>{{ $asset->model->name }}</td>
<td>{{ $asset->serial }}</td>
<td>
{{ $asset->last_checkout }}</td>
<td>
@if ($asset->assetlog->first())
<img style="width:auto;height:100px;" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->firstWhere('action_type', 'accepted')->accept_signature}}">
@endif
</td>
</tr>
@if($settings->show_assigned_assets)
@php
$assignedCounter = 1;
@endphp
@foreach ($asset->assignedAssets as $asset)
<tr>
<td>{{ $counter }}.{{ $assignedCounter }}</td>
<td>{{ $asset->asset_tag }}</td>
<td>{{ $asset->name }}</td>
<td>{{ $asset->model->category->name }}</td>
<td>{{ $asset->model->name }}</td>
<td>{{ $asset->serial }}</td>
<td>
{{ $asset->last_checkout }}</td>
<td><img style="width:auto;height:100px;" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->first()->accept_signature }}"></td>
</tr>
<tr>
<td>{{ $counter }}</td>
<td>{{ $asset->asset_tag }}</td>
<td>{{ $asset->name }}</td>
<td>{{ $asset->model->category->name }}</td>
<td>{{ $asset->model->name }}</td>
<td>{{ $asset->serial }}</td>
<td>
{{ $asset->last_checkout }}</td>
<td>
@if ($asset->assetlog->first())
<img style="width:auto;height:100px;" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->first()->accept_signature }}">
@endif
</td>
</tr>
@if($settings->show_assigned_assets)
@php
$assignedCounter++
$assignedCounter = 1;
@endphp
@endforeach
@endif
@php
$counter++
@endphp
@endforeach
</table>
@endif
@foreach ($asset->assignedAssets as $asset)
@if ($licenses->count() > 0)
<br><br>
<table class="inventory">
<thead>
<tr>
<th colspan="4">{{ trans('general.licenses') }}</th>
</tr>
</thead>
<thead>
<tr>
<td>{{ $counter }}.{{ $assignedCounter }}</td>
<td>{{ $asset->asset_tag }}</td>
<td>{{ $asset->name }}</td>
<td>{{ $asset->model->category->name }}</td>
<td>{{ $asset->model->name }}</td>
<td>{{ $asset->serial }}</td>
<td>{{ $asset->last_checkout }}</td>
<td><img style="width:auto;height:100px;" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->first()->accept_signature }}"></td>
</tr>
@php
$assignedCounter++
@endphp
@endforeach
@endif
@php
$counter++
@endphp
@endforeach
</table>
@endif
@if ($licenses->count() > 0)
<br><br>
<table class="inventory">
<thead>
<tr>
<th colspan="4">{{ trans('general.licenses') }}</th>
</tr>
</thead>
<thead>
<tr>
<th style="width: 20px;"></th>
<th style="width: 40%;">{{ trans('general.name') }}</th>
<th style="width: 50%;">{{ trans('general.license_serial') }}</th>
<th style="width: 10%;">{{ trans('general.checked_out') }}</th>
</tr>
</thead>
@php
$lcounter = 1;
@endphp
@foreach ($licenses as $license)
<tr>
<td>{{ $lcounter }}</td>
<td>{{ $license->name }}</td>
<td>
@can('viewKeys', $license)
{{ $license->serial }}
@else
<i class="fa-lock" aria-hidden="true"></i> {{ str_repeat('x', 15) }}
@endcan
</td>
<td>{{ $license->pivot->created_at }}</td>
<th style="width: 50%;">{{ trans('admin/licenses/form.license_key') }}</th>
<th style="width: 10%;">{{ trans('admin/hardware/table.checkout_date') }}</th>
</tr>
</thead>
@php
$lcounter++
$lcounter = 1;
@endphp
@endforeach
</table>
@endif
@foreach ($licenses as $license)
<tr>
<td>{{ $lcounter }}</td>
<td>{{ $license->name }}</td>
<td>
@can('viewKeys', $license)
{{ $license->serial }}
@else
<i class="fa-lock" aria-hidden="true"></i> {{ str_repeat('x', 15) }}
@endcan
</td>
<td>{{ $license->pivot->created_at }}</td>
</tr>
@php
$lcounter++
@endphp
@endforeach
</table>
@endif
@if ($accessories->count() > 0)
<br><br>
<table class="inventory">
<thead>
<tr>
<th colspan="4">{{ trans('general.accessories') }}</th>
</tr>
</thead>
<thead>
@if ($accessories->count() > 0)
<br><br>
<table class="inventory">
<thead>
<tr>
<th colspan="4">{{ trans('general.accessories') }}</th>
</tr>
</thead>
<thead>
<tr>
<th style="width: 20px;"></th>
<th style="width: 40%;">{{ trans('general.name') }}</th>
<th style="width: 50%;">{{ trans('general.category') }}</th>
<th style="width: 10%;">{{ trans('admin/hardware/table.checkout_date') }}</th>
</tr>
</thead>
@php
$acounter = 1;
@endphp
</thead>
@php
$acounter = 1;
@endphp
@foreach ($accessories as $accessory)
@if ($accessory)
<tr>
<td>{{ $acounter }}</td>
<td>{{ ($accessory->manufacturer) ? $accessory->manufacturer->name : '' }} {{ $accessory->name }} {{ $accessory->model_number }}</td>
<td>{{ $accessory->category->name }}</td>
<td>{{ $accessory->pivot->created_at }}</td>
</tr>
@php
$acounter++
@endphp
@endif
@endforeach
</table>
@endif
@foreach ($accessories as $accessory)
@if ($accessory)
<tr>
<td>{{ $acounter }}</td>
<td>{{ ($accessory->manufacturer) ? $accessory->manufacturer->name : '' }} {{ $accessory->name }} {{ $accessory->model_number }}</td>
<td>{{ $accessory->category->name }}</td>
<td>{{ $accessory->pivot->created_at }}</td>
</tr>
@php
$acounter++
@endphp
@endif
@endforeach
</table>
@endif
@if ($consumables->count() > 0)
<br><br>
<table class="inventory">
<thead>
@if ($consumables->count() > 0)
<br><br>
<table class="inventory">
<thead>
<tr>
<th colspan="4">{{ trans('general.consumables') }}</th>
</tr>
</thead>
<thead>
<tr>
<th style="width: 20px;"></th>
<th style="width: 40%;">{{ trans('general.name') }}</th>
<th style="width: 50%;">{{ trans('general.category') }}</th>
<th style="width: 10%;">{{ trans('admin/hardware/table.checkout_date') }}</th>
</tr>
</thead>
@php
$ccounter = 1;
@endphp
@foreach ($consumables as $consumable)
@if ($consumable)
<tr>
<td>{{ $ccounter }}</td>
<td>
@if ($consumable->deleted_at!='')
<td>{{ ($consumable->manufacturer) ? $consumable->manufacturer->name : '' }} {{ $consumable->name }} {{ $consumable->model_number }}</td>
@else
{{ ($consumable->manufacturer) ? $consumable->manufacturer->name : '' }} {{ $consumable->name }} {{ $consumable->model_number }}
@endif
</td>
<td>{{ ($consumable->category) ? $consumable->category->name : ' invalid/deleted category' }} </td>
<td>{{ $consumable->pivot->created_at }}</td>
</tr>
@php
$ccounter++
@endphp
@endif
@endforeach
</table>
@endif
<br>
<br>
<br>
<table>
<tr>
<th colspan="4">{{ trans('general.consumables') }}</th>
<td>{{ trans('general.signed_off_by') }}:</td>
<td>________________________________________________________</td>
<td></td>
<td>{{ trans('general.date') }}:</td>
<td>________________________________________________________</td>
</tr>
</thead>
<thead>
<tr>
<th style="width: 20px;"></th>
<th style="width: 40%;">{{ trans('general.name') }}</th>
<th style="width: 50%;">{{ trans('general.category') }}</th>
<th style="width: 10%;">{{ trans('admin/hardware/table.checkout_date') }}</th>
</tr>
</thead>
@php
$ccounter = 1;
@endphp
@foreach ($consumables as $consumable)
@if ($consumable)
<tr>
<td>{{ $ccounter }}</td>
<td>
@if ($consumable->deleted_at!='')
<td>{{ ($consumable->manufacturer) ? $consumable->manufacturer->name : '' }} {{ $consumable->name }} {{ $consumable->model_number }}</td>
@else
{{ ($consumable->manufacturer) ? $consumable->manufacturer->name : '' }} {{ $consumable->name }} {{ $consumable->model_number }}
@endif
</td>
<td>{{ ($consumable->category) ? $consumable->category->name : trans('general.invalid_category') }} </td>
<td>{{ $consumable->assetlog->first()->created_at }}</td>
</tr>
@php
$ccounter++
@endphp
@endif
@endforeach
</table>
@endif
<br>
<br>
<br>
<table>
<tr>
<td>{{ trans('general.signed_off_by') }}:</td>
<td>________________________________________________________</td>
<td></td>
<td>{{ trans('general.date') }}:</td>
<td>________________________________________________________</td>
</tr>
</table>
</body>
</html>
</html>