@php $editPermission = user()->permission('edit_notice'); $deletePermission = user()->permission('delete_notice'); @endphp

@lang('app.noticeDetails')

@if (!in_array('client', user_roles()) && (($editPermission == 'all' || ($editPermission == 'added' && $notice->added_by == user()->id) || ($editPermission == 'owned' && in_array($notice->to, user_roles())) || ($editPermission == 'both' && (in_array($notice->to, user_roles()) || $notice->added_by == user()->id))) || ($deletePermission == 'all' || ($deletePermission == 'added' && $notice->added_by == user()->id) || ($deletePermission == 'owned' && in_array($notice->to, user_roles())) || ($deletePermission == 'both' && (in_array($notice->to, user_roles()) || $notice->added_by == user()->id))))) @endif

{{$notice->to == 'employee' ? __('app.employee') : __('app.client')}}

@if ($notice->to == 'employee' && count($noticeEmployees) > 0) @foreach ($noticeEmployees as $emp) @endforeach @elseif($notice->to == 'client' && count($noticeClients) > 0) @foreach ($noticeClients as $client) @endforeach @else -- @endif

@if (!is_null($notice->attachment)) @lang('app.viewAttachment') '/> @endif @if (in_array('admin', user_roles()))

@lang('app.readBy')

@if (count($readMembers) > 0) @foreach ($readMembers as $item) @if($notice->to == 'employee') @else @endif @endforeach @else -- @endif

@endif

@lang('app.file')

@php $filesShowCount = 0; @endphp @forelse($notice->files as $file) @php $filesShowCount++; @endphp @empty @endforelse