mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-30 07:59:50 -08:00
9daeeeb851
* Improved expiring licenses notification * Improved expiring assets notification * Nicee low inventory notification * Refactored stupid language strings * Oops * Use settings variable
21 lines
1 KiB
PHP
21 lines
1 KiB
PHP
@component('mail::message')
|
|
|
|
{{ trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count'=>$assets->count(), 'threshold' => $threshold]) }}
|
|
|
|
@component('mail::table')
|
|
| |{{ trans('mail.name') }} |{{ trans('mail.expires') }} |{{ trans('mail.Days') }}|{{ trans('mail.supplier') }} | {{ trans('mail.assigned_to') }}
|
|
| |:------------- |:-------------|:---------|:---------|:---------|:---------|
|
|
@foreach ($assets as $asset)
|
|
@php
|
|
$expires = \App\Helpers\Helper::getFormattedDateObject($asset->present()->warrantee_expires, 'date');
|
|
$diff = round(abs(strtotime($asset->present()->warrantee_expires) - strtotime(date('Y-m-d')))/86400);
|
|
$icon = ($diff <= ($threshold / 2)) ? '🚨' : (($diff <= $threshold) ? '⚠️' : ' ');
|
|
|
|
@endphp
|
|
|{{ $icon }}| [{{ $asset->present()->name }}]({{ route('hardware.show', $asset->id) }}) | {{ $expires['formatted'] }} | {{ $diff }} {{ trans('mail.Days') }} | {{ ($asset->supplier ? e($asset->supplier->name) : '') }}|{{ ($asset->assignedTo ? e($asset->assignedTo->present()->name()) : '') }}
|
|
@endforeach
|
|
@endcomponent
|
|
|
|
|
|
@endcomponent
|