From 56b69045646e5c61b8b83b35cb7f440e9c498f60 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 2 Aug 2022 19:13:02 -0700 Subject: [PATCH] Added time difference Signed-off-by: snipe --- resources/views/hardware/view.blade.php | 51 ++++++++++++------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index a1452767d..d08b9e562 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -574,7 +574,7 @@ @if ($asset->warranty_months) -
+
{{ trans('admin/hardware/form.warranty') }} @@ -584,10 +584,24 @@ {{ $asset->warranty_months }} {{ trans('admin/hardware/form.months') }} - ({{ trans('admin/hardware/form.expires') }} - {{ $asset->present()->warrantee_expires() }}) +
+ +
+
+ + {{ trans('admin/hardware/form.warranty_expires') }} + +
+
+ {{ Helper::getFormattedDateObject($asset->present()->warranty_expires(), 'date', false) }} + - + {{ Carbon::parse($asset->present()->warranty_expires())->diffForHumans() }} + +
+
+ @endif @if (($asset->model) && ($asset->depreciation)) @@ -600,8 +614,7 @@
{{ $asset->depreciation->name }} ({{ $asset->depreciation->months }} - {{ trans('admin/hardware/form.months') }} - ) + {{ trans('admin/hardware/form.months') }})
@@ -611,13 +624,10 @@
- @if ($asset->time_until_depreciated()->y > 0) - {{ $asset->time_until_depreciated()->y }} - {{ trans('admin/hardware/form.years') }}, - @endif - {{ $asset->time_until_depreciated()->m }} - {{ trans('admin/hardware/form.months') }} - ({{ $asset->depreciated_date()->format('Y-m-d') }}) + {{ Helper::getFormattedDateObject($asset->depreciated_date()->format('Y-m-d'), 'date', false) }} + - + {{ Carbon::parse($asset->depreciated_date())->diffForHumans() }} +
@endif @@ -644,20 +654,9 @@
{{ Helper::getFormattedDateObject($asset->present()->eol_date(), 'date', false) }} - - - @if ($asset->present()->months_until_eol()) - - - @if ($asset->present()->months_until_eol()->y > 0) - {{ $asset->present()->months_until_eol()->y }} - {{ trans('general.years') }}, - @endif - - {{ $asset->present()->months_until_eol()->m }} - {{ trans('general.months') }} - - @endif - + - + {{ Carbon::parse($asset->present()->eol_date())->diffForHumans() }} +
@endif