diff --git a/.all-contributorsrc b/.all-contributorsrc index a2cfec2f9..143ca7255 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -2662,8 +2662,17 @@ "avatar_url": "https://avatars.githubusercontent.com/u/7991086?v=4", "profile": "https://github.com/reederda", "contributions": [ - "translations", "translation", + "translation", + "code" + ] + }, + { + "login": "vickyjaura183", + "name": "vickyjaura183", + "avatar_url": "https://avatars.githubusercontent.com/u/109422491?v=4", + "profile": "https://github.com/vickyjaura183", + "contributions": [ "code" ] } diff --git a/README.md b/README.md index b83894714..466c4fee6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ![Build Status](https://app.chipperci.com/projects/0e5f8979-31eb-4ee6-9abf-050b76ab0383/status/master) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeitapp.svg?style=social)](https://twitter.com/snipeitapp) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade) -[![All Contributors](https://img.shields.io/badge/all_contributors-292-orange.svg?style=flat-square)](#contributors) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk) [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev) +[![All Contributors](https://img.shields.io/badge/all_contributors-294-orange.svg?style=flat-square)](#contributors) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk) [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev) ## Snipe-IT - Open Source Asset Management System @@ -134,7 +134,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken | [
Toreg87](https://github.com/Toreg87)
[💻](https://github.com/snipe/snipe-it/commits?author=Toreg87 "Code") | [
Matthew Nickson](https://github.com/Computroniks)
[💻](https://github.com/snipe/snipe-it/commits?author=Computroniks "Code") | [
Jethro Nederhof](https://jethron.id.au)
[💻](https://github.com/snipe/snipe-it/commits?author=jethron "Code") | [
Oskar Stenberg](https://github.com/01ste02)
[💻](https://github.com/snipe/snipe-it/commits?author=01ste02 "Code") | [
Robert-Azelis](https://github.com/Robert-Azelis)
[💻](https://github.com/snipe/snipe-it/commits?author=Robert-Azelis "Code") | [
Alexander William Smith](https://github.com/alwism)
[💻](https://github.com/snipe/snipe-it/commits?author=alwism "Code") | [
LEITWERK AG](https://www.leitwerk.de/)
[💻](https://github.com/snipe/snipe-it/commits?author=leitwerk-ag "Code") | | [
Adam](http://www.aboutcher.co.uk)
[💻](https://github.com/snipe/snipe-it/commits?author=adamboutcher "Code") | [
Ian](https://snksrv.com)
[💻](https://github.com/snipe/snipe-it/commits?author=sneak-it "Code") | [
Shao Yu-Lung (Allen)](http://blog.bestlong.idv.tw/)
[💻](https://github.com/snipe/snipe-it/commits?author=bestlong "Code") | [
Haxatron](https://github.com/Haxatron)
[💻](https://github.com/snipe/snipe-it/commits?author=Haxatron "Code") | [
PlaneNuts](https://github.com/PlaneNuts)
[💻](https://github.com/snipe/snipe-it/commits?author=PlaneNuts "Code") | [
Bradley Coudriet](http://bjcpgd.cias.rit.edu)
[💻](https://github.com/snipe/snipe-it/commits?author=exula "Code") | [
Dalton Durst](https://daltondur.st)
[💻](https://github.com/snipe/snipe-it/commits?author=UniversalSuperBox "Code") | | [
Alex Janes](https://adagiohealth.org)
[💻](https://github.com/snipe/snipe-it/commits?author=adagioajanes "Code") | [
Nuraeil](https://github.com/nuraeil)
[💻](https://github.com/snipe/snipe-it/commits?author=nuraeil "Code") | [
TenOfTens](https://github.com/TenOfTens)
[💻](https://github.com/snipe/snipe-it/commits?author=TenOfTens "Code") | [
waffle](https://ditisjens.be/)
[💻](https://github.com/snipe/snipe-it/commits?author=insert-waffle "Code") | [
Yevhenii Huzii](https://github.com/QveenSi)
[💻](https://github.com/snipe/snipe-it/commits?author=QveenSi "Code") | [
Achmad Fienan Rahardianto](https://github.com/veenone)
[💻](https://github.com/snipe/snipe-it/commits?author=veenone "Code") | [
Yevhenii Huzii](https://github.com/QveenSi)
[💻](https://github.com/snipe/snipe-it/commits?author=QveenSi "Code") | -| [
Christian Weirich](https://github.com/chrisweirich)
[💻](https://github.com/snipe/snipe-it/commits?author=chrisweirich "Code") | [
denzfarid](https://github.com/denzfarid)
| [
ntbutler-nbcs](https://github.com/ntbutler-nbcs)
[💻](https://github.com/snipe/snipe-it/commits?author=ntbutler-nbcs "Code") | [
Naveen](https://naveensrinivasan.dev)
[💻](https://github.com/snipe/snipe-it/commits?author=naveensrinivasan "Code") | [
Mike Roquemore](https://github.com/mikeroq)
[💻](https://github.com/snipe/snipe-it/commits?author=mikeroq "Code") | +| [
Christian Weirich](https://github.com/chrisweirich)
[💻](https://github.com/snipe/snipe-it/commits?author=chrisweirich "Code") | [
denzfarid](https://github.com/denzfarid)
| [
ntbutler-nbcs](https://github.com/ntbutler-nbcs)
[💻](https://github.com/snipe/snipe-it/commits?author=ntbutler-nbcs "Code") | [
Naveen](https://naveensrinivasan.dev)
[💻](https://github.com/snipe/snipe-it/commits?author=naveensrinivasan "Code") | [
Mike Roquemore](https://github.com/mikeroq)
[💻](https://github.com/snipe/snipe-it/commits?author=mikeroq "Code") | [
Daniel Reeder](https://github.com/reederda)
[🌍](#translation-reederda "Translation") [🌍](#translation-reederda "Translation") [💻](https://github.com/snipe/snipe-it/commits?author=reederda "Code") | [
vickyjaura183](https://github.com/vickyjaura183)
[💻](https://github.com/snipe/snipe-it/commits?author=vickyjaura183 "Code") | This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! diff --git a/app/Http/Controllers/Accessories/AccessoryCheckoutController.php b/app/Http/Controllers/Accessories/AccessoryCheckoutController.php index 7eb9b39a4..6144bb6f9 100644 --- a/app/Http/Controllers/Accessories/AccessoryCheckoutController.php +++ b/app/Http/Controllers/Accessories/AccessoryCheckoutController.php @@ -63,7 +63,7 @@ class AccessoryCheckoutController extends Controller $this->authorize('checkout', $accessory); if (! $user = User::find($request->input('assigned_to'))) { - return redirect()->route('checkout/accessory', $accessory->id)->with('error', trans('admin/accessories/message.checkout.user_does_not_exist')); + return redirect()->route('accessories.checkout.show', $accessory->id)->with('error', trans('admin/accessories/message.checkout.user_does_not_exist')); } // Update the accessory data diff --git a/app/Http/Controllers/Assets/BulkAssetsController.php b/app/Http/Controllers/Assets/BulkAssetsController.php index 5053fca0b..418b70473 100644 --- a/app/Http/Controllers/Assets/BulkAssetsController.php +++ b/app/Http/Controllers/Assets/BulkAssetsController.php @@ -12,6 +12,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Session; +use App\Http\Requests\AssetCheckoutRequest; class BulkAssetsController extends Controller { @@ -239,7 +240,7 @@ class BulkAssetsController extends Controller * Process Multiple Checkout Request * @return View */ - public function storeCheckout(Request $request) + public function storeCheckout(AssetCheckoutRequest $request) { $this->authorize('checkout', Asset::class); @@ -250,7 +251,7 @@ class BulkAssetsController extends Controller $target = $this->determineCheckoutTarget(); if (! is_array($request->get('selected_assets'))) { - return redirect()->route('hardware/bulkcheckout')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected')); + return redirect()->route('hardware.bulkcheckout.show')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected')); } $asset_ids = array_filter($request->get('selected_assets')); @@ -297,9 +298,9 @@ class BulkAssetsController extends Controller return redirect()->to('hardware')->with('success', trans('admin/hardware/message.checkout.success')); } // Redirect to the asset management page with error - return redirect()->to('hardware/bulk-checkout')->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($errors); + return redirect()->route('hardware.bulkcheckout.show')->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($errors); } catch (ModelNotFoundException $e) { - return redirect()->to('hardware/bulk-checkout')->with('error', $e->getErrors()); + return redirect()->route('hardware.bulkcheckout.show')->with('error', $e->getErrors()); } } } diff --git a/app/Http/Controllers/Auth/SamlController.php b/app/Http/Controllers/Auth/SamlController.php index 3d5cf75ec..b6218988e 100644 --- a/app/Http/Controllers/Auth/SamlController.php +++ b/app/Http/Controllers/Auth/SamlController.php @@ -142,6 +142,6 @@ class SamlController extends Controller return view('errors.403'); } - return redirect()->route('logout')->with(['saml_logout' => true,'saml_slo_redirect_url' => $sloUrl]); + return redirect()->route('logout.get')->with(['saml_logout' => true,'saml_slo_redirect_url' => $sloUrl]); } } diff --git a/app/Http/Controllers/Consumables/ConsumableCheckoutController.php b/app/Http/Controllers/Consumables/ConsumableCheckoutController.php index 03ca2f205..48cb6ac76 100644 --- a/app/Http/Controllers/Consumables/ConsumableCheckoutController.php +++ b/app/Http/Controllers/Consumables/ConsumableCheckoutController.php @@ -56,7 +56,7 @@ class ConsumableCheckoutController extends Controller // Check if the user exists if (is_null($user = User::find($assigned_to))) { // Redirect to the consumable management page with error - return redirect()->route('checkout/consumable', $consumable)->with('error', trans('admin/consumables/message.checkout.user_does_not_exist')); + return redirect()->route('consumables.checkout.show', $consumable)->with('error', trans('admin/consumables/message.checkout.user_does_not_exist')); } // Update the consumable data diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 74d709adc..06629c175 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -645,6 +645,12 @@ class ReportsController extends Controller if($request->filled('exclude_archived')){ $assets->notArchived(); } + if($request->input('deleted_assets') == '1'){ + $assets->withTrashed(); + } + if($request->input('deleted_assets') == '0'){ + $assets->onlyTrashed(); + } $assets->orderBy('assets.id', 'ASC')->chunk(20, function ($assets) use ($handle, $customfields, $request) { @@ -783,7 +789,7 @@ class ReportsController extends Controller if ($request->filled('warranty')) { $row[] = ($asset->warranty_months) ? $asset->warranty_months : ''; - $row[] = $asset->present()->warrantee_expires(); + $row[] = $asset->present()->warranty_expires(); } if ($request->filled('depreciation')) { diff --git a/app/Models/CustomFieldset.php b/app/Models/CustomFieldset.php index 1cf1807d8..a2698d818 100644 --- a/app/Models/CustomFieldset.php +++ b/app/Models/CustomFieldset.php @@ -87,7 +87,7 @@ class CustomFieldset extends Model } if ($field->is_unique == '1') { - $rule[] = 'unique'; + $rule[] = 'unique_undeleted'; } array_push($rule, $field->attributes['format']); diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index f334906c8..bd03f29a1 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -498,10 +498,10 @@ class AssetPresenter extends Presenter } /** - * Date the warantee expires. + * Date the warranty expires. * @return false|string */ - public function warrantee_expires() + public function warranty_expires() { if (($this->purchase_date) && ($this->warranty_months)) { $date = date_create($this->purchase_date); diff --git a/app/Presenters/DepreciationReportPresenter.php b/app/Presenters/DepreciationReportPresenter.php index 525552a64..ea8834237 100644 --- a/app/Presenters/DepreciationReportPresenter.php +++ b/app/Presenters/DepreciationReportPresenter.php @@ -371,7 +371,7 @@ class DepreciationReportPresenter extends Presenter * Date the warantee expires. * @return false|string */ - public function warrantee_expires() + public function warranty_expires() { if (($this->purchase_date) && ($this->warranty_months)) { $date = date_create($this->purchase_date); diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 43e9e4fbe..36b47c195 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -102,6 +102,7 @@ return [ 'email_domain_help' => 'This is used to generate email addresses when importing', 'error' => 'Error', 'exclude_archived' => 'Exclude Archived Assets', + 'exclude_deleted' => 'Exclude Deleted Assets', 'example' => 'Example: ', 'filastname_format' => 'First Initial Last Name (jsmith@example.com)', 'firstname_lastname_format' => 'First Name Last Name (jane.smith@example.com)', @@ -132,6 +133,7 @@ return [ 'id' => 'ID', 'image' => 'Image', 'image_delete' => 'Delete Image', + 'include_deleted' => 'Include Deleted Assets', 'image_upload' => 'Upload Image', 'filetypes_accepted_help' => 'Accepted filetype is :types. Max upload size allowed is :size.|Accepted filetypes are :types. Max upload size allowed is :size.', 'filetypes_size_help' => 'Max upload size allowed is :size.', @@ -185,6 +187,7 @@ return [ 'no' => 'No', 'notes' => 'Notes', 'order_number' => 'Order Number', + 'only_deleted' => 'Only Deleted Assets', 'page_menu' => 'Showing _MENU_ items', 'pagination_info' => 'Showing _START_ to _END_ of _TOTAL_ items', 'pending' => 'Pending', diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.php index 7132e7ede..f00bee3e6 100644 --- a/resources/views/accessories/view.blade.php +++ b/resources/views/accessories/view.blade.php @@ -24,13 +24,13 @@ @if ($accessory->assigned_to != '') @can('checkin', \App\Models\Accessory::class)
  • - {{ trans('admin/accessories/general.checkin') }} + {{ trans('admin/accessories/general.checkin') }}
  • @endcan @else @can('checkout', \App\Models\Accessory::class)
  • - {{ trans('admin/accessories/general.checkout') }} + {{ trans('admin/accessories/general.checkout') }}
  • @endcan @endif @@ -171,7 +171,7 @@ @can('checkout', \App\Models\Accessory::class)
    - numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }} + numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }}
    @endcan diff --git a/resources/views/auth/two_factor.blade.php b/resources/views/auth/two_factor.blade.php index c61b4e064..d6c9d986e 100644 --- a/resources/views/auth/two_factor.blade.php +++ b/resources/views/auth/two_factor.blade.php @@ -42,13 +42,13 @@
    - + {{ trans('general.cancel') }}
    - diff --git a/resources/views/components/checkin.blade.php b/resources/views/components/checkin.blade.php index 9b8624c24..8dca26044 100644 --- a/resources/views/components/checkin.blade.php +++ b/resources/views/components/checkin.blade.php @@ -17,7 +17,7 @@
    -
    + {{csrf_field()}}
    diff --git a/resources/views/components/view.blade.php b/resources/views/components/view.blade.php index cf1cd66bd..46ae20af0 100644 --- a/resources/views/components/view.blade.php +++ b/resources/views/components/view.blade.php @@ -21,7 +21,7 @@ @if ($component->assigned_to != '') @can('checkin', $component)
  • - + {{ trans('admin/components/general.checkin') }}
  • @@ -29,7 +29,7 @@ @else @can('checkout', $component)
  • - + {{ trans('admin/components/general.checkout') }}
  • diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.php index 958c0e1ee..78728db6b 100644 --- a/resources/views/consumables/view.blade.php +++ b/resources/views/consumables/view.blade.php @@ -126,10 +126,21 @@ @endif @can('checkout', \App\Models\Consumable::class) - - @endcan + +
    + + @if ($consumable->numRemaining() > 0) + + {{ trans('general.checkout') }} + + @else + + @endif +
    + + @endcan @if ($consumable->notes) diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index ff2d08e52..c39704289 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -28,11 +28,11 @@
    @if ($backto=='user') @else + action="{{ route('hardware.checkin.store', array('assetId'=> $asset->id)) }}" autocomplete="off"> @endif {{csrf_field()}} diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 4ebdfd7f5..bcc862990 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -22,7 +22,7 @@ @if (($asset->assigned_to != '') && ($asset->deleted_at=='')) @can('checkin', \App\Models\Asset::class)
  • - + {{ trans('admin/hardware/general.checkin') }}
  • @@ -30,7 +30,7 @@ @elseif (($asset->assigned_to == '') && ($asset->deleted_at=='')) @can('checkout', \App\Models\Asset::class)
  • - + {{ trans('admin/hardware/general.checkout') }}
  • @@ -574,7 +574,7 @@ @if ($asset->warranty_months) -
    +
    {{ trans('admin/hardware/form.warranty') }} @@ -584,10 +584,26 @@ {{ $asset->warranty_months }} {{ trans('admin/hardware/form.months') }} - ({{ trans('admin/hardware/form.expires') }} - {{ $asset->present()->warrantee_expires() }}) +
    + +
    +
    + + {{ trans('admin/hardware/form.warranty_expires') }} + {!! $asset->present()->warranty_expires() < date("Y-m-d") ? '' : '' !!} + +
    +
    + + {{ Helper::getFormattedDateObject($asset->present()->warranty_expires(), 'date', false) }} + - + {{ Carbon::parse($asset->present()->warranty_expires())->diffForHumans() }} + +
    +
    + @endif @if (($asset->model) && ($asset->depreciation)) @@ -600,8 +616,7 @@
    {{ $asset->depreciation->name }} ({{ $asset->depreciation->months }} - {{ trans('admin/hardware/form.months') }} - ) + {{ trans('admin/hardware/form.months') }})
    @@ -611,13 +626,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 +656,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 diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 2379b1f55..6d27fd184 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -316,11 +316,14 @@ {{ trans('general.viewassets') }} + @can('viewRequestable', \App\Models\Asset::class)
  • {{ trans('general.requested_assets_menu') }}
  • + @endcan +
  • @@ -354,11 +357,11 @@
  • - + {{ trans('general.logout') }} - + {{ csrf_field() }} @@ -486,7 +489,7 @@ @can('checkout', \App\Models\Asset::class) - + {{ trans('general.bulk_checkout') }}
  • diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index 3f186f1bb..b6408d7de 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -7,21 +7,6 @@ @parent @stop -{{-- Right header --}} -@section('header_right') -
    - @can('update', $license) - - - @endcan -
    -@stop - {{-- Page content --}} @section('content')
    @@ -78,8 +63,8 @@ @endcan @@ -575,4 +560,4 @@ @section('moar_scripts') @include ('partials.bootstrap-table') -@stop \ No newline at end of file +@stop diff --git a/resources/views/locations/print.blade.php b/resources/views/locations/print.blade.php index 77d84662c..5586fe5cc 100644 --- a/resources/views/locations/print.blade.php +++ b/resources/views/locations/print.blade.php @@ -58,7 +58,7 @@ @if ($manager) {{ trans('admin/locations/general.manager') }} {{ $manager->present()->fullName() }}
    @endif -{{ trans('admin/locations/general.date') }} {{ \App\Helpers\Helper::getFormattedDateObject(now(), 'datetime', false) }}

    +{{ trans('admin/locations/general.date') }} {{ \App\Helpers\Helper::getFormattedDateObject(now(), 'datetime', false) }}

    @if ($users->count() > 0) @php diff --git a/resources/views/models/view.blade.php b/resources/views/models/view.blade.php index c929aeda8..82bb6cd50 100755 --- a/resources/views/models/view.blade.php +++ b/resources/views/models/view.blade.php @@ -16,10 +16,10 @@
    @@ -316,7 +316,7 @@ @can('create', \App\Models\AssetModel::class)
    - {{ trans('admin/models/table.clone') }} + {{ trans('admin/models/table.clone') }}
    @endcan diff --git a/resources/views/notifications/markdown/report-expiring-assets.blade.php b/resources/views/notifications/markdown/report-expiring-assets.blade.php index b5a262903..4311096a6 100644 --- a/resources/views/notifications/markdown/report-expiring-assets.blade.php +++ b/resources/views/notifications/markdown/report-expiring-assets.blade.php @@ -6,8 +6,8 @@  {{ trans('mail.name') }}{{ trans('mail.Days') }}{{ trans('mail.expires') }}{{ trans('mail.supplier') }}{{ trans('mail.assigned_to') }} @foreach ($assets as $asset) @php -$expires = Helper::getFormattedDateObject($asset->present()->warrantee_expires, 'date'); -$diff = round(abs(strtotime($asset->present()->warrantee_expires) - strtotime(date('Y-m-d')))/86400); +$expires = Helper::getFormattedDateObject($asset->present()->warranty_expires, 'date'); +$diff = round(abs(strtotime($asset->present()->warranty_expires) - strtotime(date('Y-m-d')))/86400); $icon = ($diff <= ($threshold / 2)) ? '🚨' : (($diff <= $threshold) ? '⚠️' : ' '); @endphp {{ $icon }} {{ $asset->present()->name }} {{ $diff }} {{ trans('mail.Days') }} {{ $expires['formatted'] }} {{ ($asset->supplier ? e($asset->supplier->name) : '') }} {{ ($asset->assignedTo ? e($asset->assignedTo->present()->name()) : '') }} diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.php index b281595d0..fbd987817 100644 --- a/resources/views/reports/custom.blade.php +++ b/resources/views/reports/custom.blade.php @@ -352,6 +352,20 @@
    +
    +
    + +
    + diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index 8763c5718..8e7b531ec 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -113,7 +113,7 @@