@php
$addTaskCommentPermission = user()->permission('add_task_comments');
$editTaskCommentPermission = user()->permission('edit_task_comments');
$deleteTaskCommentPermission = user()->permission('delete_task_comments');
@endphp
@if ($addTaskCommentPermission == 'all'
|| ($addTaskCommentPermission == 'added' && $task->added_by == user()->id)
|| ($addTaskCommentPermission == 'owned' && in_array(user()->id, $taskUsers))
|| ($addTaskCommentPermission == '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)
@include('tasks.ajax.sent-approval-modal')
@else
@endif
@endif
{{ $comment->user->name }}
{{$comment->created_at->timezone(company()->timezone)->diffForHumans()}}