@php $component = isset($component) ? $component : 'all'; $view = isset($view) ? $view : 'table'; $attachments_title = $component == 'all' ? __('employee::global.files_notes') : ($component == 'notes' ? __('employee::global.notes') : __('employee::global.files')); $attachments = isset($attachments) ? $attachments : []; $attachments = isset($attachable) ? $attachable->attachments : $attachments; $attachableId = isset($attachableId) ? $attachableId : null; $attachableId = isset($attachable) ? $attachable->id : $attachableId; $attachableType = isset($attachableType) ? $attachableType : null; $attachableType = isset($attachable) ? get_class($attachable) : $attachableType; // $attachments_url = auth()->guard('office')->check() ? 'office.attachments' : 'attachments'; $attachments_url = 'attachments'; @endphp @foreach ($attachments->groupBy(function ($val) { return \Carbon\Carbon::parse($val->created_at)->format('Y-m-d'); }) as $key => $date_attachment)
{{ $key }}
@foreach ($date_attachment as $attachment) @if ($attachment->isNote() && ($component == 'all' || $component == 'notes')) @elseif (!$attachment->isNote() && ($component == 'all' || $component == 'files'))
{{ $attachment->created_at->format('h:i') }} @lang('time_modes.' . $attachment->created_at->format('a'))
@lang('file') @if ($attachment->isImage())
Image
@endif
@endif @endforeach @endforeach
@include('settings::components._del-attachment')