@php
// false means checkbox is clickable
$user_id = user()->id;
$assigned_to = $subtask->assigned_to;
$added_by = $subtask->added_by;
$checkBoxDisablePermission =
($editSubTaskPermission === 'both' && ($assigned_to === $user_id || $added_by === $user_id)) ||
($editSubTaskPermission === 'owned' && $assigned_to === $user_id) ||
$editSubTaskPermission === 'all' ||
($editSubTaskPermission === 'added' && $added_by === $user_id)
? false : true;
@endphp
@if ($subtask->assigned_to)
@endif
{!! $subtask->status == 'complete' ? '' . $subtask->title . '' : '' . $subtask->title . '' !!}
{!! $subtask->due_date ? '
'.__('modules.invoices.due') . ': ' . $subtask->due_date->translatedFormat(company()->date_format) . '' : '' !!}
@if ($viewSubTaskPermission == 'all' || ($viewSubTaskPermission == 'added' && $subtask->added_by == user()->id))
@lang('app.view')
@endif
@if ($editSubTaskPermission == 'all' || ($editSubTaskPermission == 'added' && $subtask->added_by == user()->id) || ($editSubTaskPermission == 'owned' && $subtask->assigned_to == user()->id) || ($editSubTaskPermission == 'both' && ($subtask->assigned_to == user()->id || $subtask->added_by == user()->id)))
@lang('app.edit')
@endif
@if ($deleteSubTaskPermission == 'all' || ($deleteSubTaskPermission == 'added' && $subtask->added_by == user()->id) || ($deleteSubTaskPermission == 'owned' && $subtask->assigned_to == user()->id) || ($deleteSubTaskPermission == 'both' && ($subtask->assigned_to == user()->id || $subtask->added_by == user()->id)))
@lang('app.delete')
@endif
@if (count($subtask->files) > 0)
@foreach ($subtask->files as $file)
@endforeach
@endif