Skip to content

Commit

Permalink
Update view.blade.php
Browse files Browse the repository at this point in the history
display marker if date of EOL is expired and show real EOL rate as diff between purchase date and eol date
  • Loading branch information
Robert-Azelis authored Oct 22, 2023
1 parent 04a867d commit 309f30f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions resources/views/hardware/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -631,15 +631,15 @@
</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>
{{ trans('admin/hardware/form.eol_rate') }}
</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>
Expand All @@ -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">
Expand Down

0 comments on commit 309f30f

Please sign in to comment.