Update view.blade.php

display marker if date of EOL is expired and show real EOL rate as diff between purchase date and eol date
This commit is contained in:
Robert-Azelis 2023-10-22 18:38:59 +02:00 committed by GitHub
parent 04a867d12b
commit 309f30f630
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -631,7 +631,7 @@
</div>
@endif
@if (($asset->model) && ($asset->model->eol))
@if (($asset->asset_eol_date) && ($asset->purchase_date))
<div class="row">
<div class="col-md-2">
<strong>
@ -639,7 +639,7 @@
</strong>
</div>
<div class="col-md-6">
{{ $asset->model->eol }}
{{ Carbon::parse($asset->asset_eol_date)->diffInMonths($asset->purchase_date) }}
{{ trans('admin/hardware/form.months') }}
</div>
@ -650,6 +650,9 @@
<div class="col-md-2">
<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>' : '' !!}
@endif
</strong>
</div>
<div class="col-md-6">