@php $addTaskNotePermission = user()->permission('add_task_notes'); $editTaskNotePermission = user()->permission('edit_task_notes'); $deleteTaskNotePermission = user()->permission('delete_task_notes'); @endphp
@if ($addTaskNotePermission == 'all' || ($addTaskNotePermission == 'added' && $task->added_by == user()->id) || ($addTaskNotePermission == 'owned' && in_array(user()->id, $taskUsers)) || ($addTaskNotePermission == 'both' && (in_array(user()->id, $taskUsers) || $task->added_by == user()->id)) )
@php $userRoles = user_roles(); $isAdmin = in_array('admin', $userRoles); $isEmployee = in_array('employee', $userRoles); @endphp @if ($task->approval_send == 1 && $isEmployee && !$isAdmin && $task->project->need_approval_by_admin == 1 && $status->slug == 'waiting_approval') @include('tasks.ajax.sent-approval-modal') @else
{{ user()->name }}
@lang('app.cancel') @lang('app.submit')
@endif @endif
@forelse($task->notes as $note)
{{ $note->user->name }}

{{ $note->user->name }}

{{ $note->created_at->diffForHumans() }}

@if ($editTaskNotePermission == 'all' || ($editTaskNotePermission == 'added' && $note->added_by == user()->id) || $deleteTaskNotePermission == 'all' || ($deleteTaskNotePermission == 'added' && $note->added_by == user()->id)) @endif
{!! $note->note !!}
@empty @endforelse