mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
61f16f47a2
Signed-off-by: snipe <snipe@snipe.net>
17 lines
903 B
PHP
17 lines
903 B
PHP
@component('mail::message')
|
|
{{ trans_choice('mail.license_expiring_alert', $licenses->count(), ['count'=>$licenses->count(), 'threshold' => $threshold]) }}
|
|
@component('mail::table')
|
|
|
|
<table width="100%">
|
|
<tr><td> </td><td>{{ trans('mail.name') }}</td><td>{{ trans('mail.Days') }}</td><td>{{ trans('mail.expires') }}</td></tr>
|
|
@foreach ($licenses as $license)
|
|
@php
|
|
$expires = 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
|
|
<tr><td>{{ $icon }} </td><td> <a href="{{ route('licenses.show', $license->id) }}">{{ $license->name }}</a> </td><td> {{ $diff }} {{ trans('mail.Days') }} </td><td>{{ $expires['formatted'] }}</td></tr>
|
|
@endforeach
|
|
</table>
|
|
@endcomponent
|
|
@endcomponent |