2019-05-05 19:32:52 -07:00
|
|
|
@component('mail::message')
|
|
|
|
|
|
|
|
### {{ trans_choice('mail.upcoming-audits', $assets->count(), ['count' => $assets->count(), 'threshold' => $threshold]) }}
|
|
|
|
|
|
|
|
@component('mail::table')
|
2022-08-31 04:08:09 -07:00
|
|
|
| |{{ trans('mail.name') }}|{{ trans('general.last_audit') }}|{{ trans('general.next_audit_date') }}|{{ trans('mail.Days') }}|{{ trans('mail.supplier') }} | {{ trans('mail.assigned_to') }}|{{ trans('general.notes') }}
|
|
|
|
|-|:------------- |:-------------|:---------|:---------|:---------|:---------|:---------|
|
2019-05-05 19:32:52 -07:00
|
|
|
@foreach ($assets as $asset)
|
|
|
|
@php
|
2021-09-28 19:44:55 -07:00
|
|
|
$next_audit_date = Helper::getFormattedDateObject($asset->next_audit_date, 'date', false);
|
|
|
|
$last_audit_date = Helper::getFormattedDateObject($asset->last_audit_date, 'date', false);
|
2022-06-02 16:30:26 -07:00
|
|
|
$diff = Carbon::parse(Carbon::now())->diffInDays($asset->next_audit_date, false);
|
2019-05-05 19:32:52 -07:00
|
|
|
$icon = ($diff <= 7) ? '🚨' : (($diff <= 14) ? '⚠️' : ' ');
|
|
|
|
@endphp
|
2022-08-31 04:08:09 -07:00
|
|
|
|{{ $icon }}| [{{ $asset->present()->name }}]({{ route('hardware.show', $asset->id) }}) | {{ $last_audit_date }}| {{ $next_audit_date }} | {{ $diff }} | {{ ($asset->supplier ? e($asset->supplier->name) : '') }}|{{ ($asset->assignedTo ? $asset->assignedTo->present()->name() : '') }}|{{ $asset->notes }}
|
2019-05-05 19:32:52 -07:00
|
|
|
@endforeach
|
|
|
|
@endcomponent
|
|
|
|
|
|
|
|
|
|
|
|
@endcomponent
|