Added license expiration date in "view asset"

I've added the expiration date of the license associated with an asset in hardware/ID#software, it is useful to see all of them on the asset page instead of having to open the license details page. I've also fixed a space formatting issue.
This commit is contained in:
MrM 2024-01-09 18:30:51 +01:00 committed by GitHub
parent eaf6d56253
commit 9d16eacad5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -651,7 +651,7 @@
<strong>
{{ trans('admin/hardware/form.eol_date') }}
@if ($asset->purchase_date)
{!! $asset->asset_eol_date < date("Y-m-d") ? '<i class="fas fa-exclamation-triangle text-orange" aria-hidden="true"></i>' : '' !!}
{!! $asset->asset_eol_date < date("Y-m-d") ? '<i class="fas fa-exclamation-triangle text-orange" aria-hidden="true"></i>' : '' !!}
@endif
</strong>
</div>
@ -988,6 +988,7 @@
<tr>
<th class="col-md-4">{{ trans('general.name') }}</th>
<th class="col-md-4"><span class="line"></span>{{ trans('admin/licenses/form.license_key') }}</th>
<th class="col-md-4"><span class="line"></span>{{ trans('admin/licenses/form.expiration') }}</th>
<th class="col-md-1"><span class="line"></span>{{ trans('table.actions') }}</th>
</tr>
</thead>
@ -1003,6 +1004,9 @@
------------
@endcan
</td>
<td>
{{ Helper::getFormattedDateObject($seat->license->expiration_date, 'date', false) }}
</td>
<td>
<a href="{{ route('licenses.checkin', $seat->id) }}" class="btn btn-sm bg-purple" data-tooltip="true">{{ trans('general.checkin') }}</a>
</td>