@php $addTaskFilePermission = user()->permission('add_task_files'); $viewTaskFilePermission = user()->permission('view_task_files'); $deleteTaskFilePermission = user()->permission('delete_task_files'); @endphp
@if ($addTaskFilePermission == 'all' || ($addTaskFilePermission == 'added' && $task->added_by == user()->id) || ($addTaskFilePermission == 'owned' && in_array(user()->id, $taskUsers)) || ($addTaskFilePermission == 'both' && (in_array(user()->id, $taskUsers) || $task->added_by == user()->id)) )
@lang('app.cancel')
@endif
@forelse($task->files as $file) @if ($file->icon == 'images') @else @endif @if ($viewTaskFilePermission == 'all' || ($viewTaskFilePermission == 'added' && $file->added_by == user()->id)) @endif @empty @endforelse