mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Fixed next audit date math
This commit is contained in:
parent
7497eaf302
commit
00a8a2aff3
|
@ -9,7 +9,7 @@
|
|||
@php
|
||||
$next_audit_date = \App\Helpers\Helper::getFormattedDateObject($asset->next_audit_date, 'date', false);
|
||||
$last_audit_date = \App\Helpers\Helper::getFormattedDateObject($asset->last_audit_date, 'date', false);
|
||||
$diff = Carbon::parse($last_audit_date)->diffInDays(Carbon::now());
|
||||
$diff = Carbon::parse($next_audit_date)->diffInDays(Carbon::now());
|
||||
$icon = ($diff <= 7) ? '🚨' : (($diff <= 14) ? '⚠️' : ' ');
|
||||
@endphp
|
||||
|{{ $icon }}| [{{ $asset->present()->name }}]({{ route('hardware.show', $asset->id) }}) | {{ $last_audit_date }}| {{ $next_audit_date }} | {{ $diff }} | {{ ($asset->supplier ? e($asset->supplier->name) : '') }}|{{ ($asset->assignedTo ? $asset->assignedTo->present()->name() : '') }}
|
||||
|
|
Loading…
Reference in a new issue