2018-07-18 19:15:45 -07:00
|
|
|
@component('mail::message')
|
2020-11-12 14:10:45 -08:00
|
|
|
{{ trans_choice('mail.license_expiring_alert', $licenses->count(), ['count'=>$licenses->count(), 'threshold' => $threshold]) }}
|
2018-07-18 19:15:45 -07:00
|
|
|
@component('mail::table')
|
2020-11-12 14:10:45 -08:00
|
|
|
|
|
|
|
<table width="100%">
|
|
|
|
<tr><td> </td><td>{{ trans('mail.name') }}</td><td>{{ trans('mail.Days') }}</td><td>{{ trans('mail.expires') }}</td></tr>
|
2018-07-18 19:15:45 -07:00
|
|
|
@foreach ($licenses as $license)
|
|
|
|
@php
|
2021-09-28 19:44:55 -07:00
|
|
|
$expires = Helper::getFormattedDateObject($license->expiration_date, 'date');
|
2018-07-18 19:15:45 -07:00
|
|
|
$diff = round(abs(strtotime($license->expiration_date->format('Y-m-d')) - strtotime(date('Y-m-d')))/86400);
|
|
|
|
$icon = ($diff <= ($threshold / 2)) ? '🚨' : (($diff <= $threshold) ? '⚠️' : ' ');
|
|
|
|
@endphp
|
2020-11-30 20:46:45 -08:00
|
|
|
<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>
|
2018-07-18 19:15:45 -07:00
|
|
|
@endforeach
|
2020-11-12 14:10:45 -08:00
|
|
|
</table>
|
2018-07-18 19:15:45 -07:00
|
|
|
@endcomponent
|
2020-11-12 14:10:45 -08:00
|
|
|
@endcomponent
|