mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 08:04:09 -08:00
9daeeeb851
* Improved expiring licenses notification * Improved expiring assets notification * Nicee low inventory notification * Refactored stupid language strings * Oops * Use settings variable
23 lines
850 B
PHP
23 lines
850 B
PHP
@component('mail::message')
|
|
|
|
{{ trans_choice('mail.license_expiring_alert', $licenses->count(), ['count'=>$licenses->count(), 'threshold' => $threshold]) }}
|
|
|
|
@component('mail::table')
|
|
| |{{ trans('mail.name') }} |{{ trans('mail.expires') }} |{{ trans('mail.Days') }}
|
|
| |:------------- |:-------------|:-------------|
|
|
@foreach ($licenses as $license)
|
|
@php
|
|
$expires = \App\Helpers\Helper::getFormattedDateObject($license->expiration_date, 'date');
|
|
$diff = round(abs(strtotime($license->expiration_date->format('Y-m-d')) - strtotime(date('Y-m-d')))/86400);
|
|
|
|
$icon = ($diff <= ($threshold / 2)) ? '🚨' : (($diff <= $threshold) ? '⚠️' : ' ');
|
|
|
|
|
|
@endphp
|
|
|{{ $icon }}| [{{ $license->name }}]({{ route('licenses.show', $license->id) }}) | {{ $expires['formatted'] }} | {{ $diff }} {{ trans('mail.Days') }}
|
|
@endforeach
|
|
@endcomponent
|
|
|
|
|
|
@endcomponent
|