mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 09:34:10 -08:00
17 lines
916 B
PHP
17 lines
916 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 = \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
|
|
<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 |