@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))
)
@forelse($task->notes as $note)
{{ $note->user->name }}
{{ $note->created_at->diffForHumans() }}
@if ($editTaskNotePermission == 'all' || ($editTaskNotePermission == 'added' && $note->added_by == user()->id))
@lang('app.edit')
@endif
@if ($deleteTaskNotePermission == 'all' || ($deleteTaskNotePermission == 'added' && $note->added_by == user()->id))
@lang('app.delete')
@endif
{!! $note->note !!}
@empty
@endforelse