@if (user()->permission('task_labels') == 'all')
@endif
@php
$showDropdown = (($editTaskPermission == 'all'
|| ($editTaskPermission == 'owned' && in_array(user()->id, $taskUsers))
|| ($editTaskPermission == 'added' && $task->added_by == user()->id)
|| ($task->project && ($task->project->project_admin == user()->id))
|| ($editTaskPermission == 'both' && (in_array(user()->id, $taskUsers) || $task->added_by == user()->id))
|| ($editTaskPermission == 'owned' && (in_array('client', user_roles()) && $task->project && ($task->project->client_id == user()->id)))
|| ($editTaskPermission == 'both' && (in_array('client', user_roles()) && ($task->project && ($task->project->client_id == user()->id)) || $task->added_by == user()->id))
) &&(
$editMilestonePermission == 'all'
|| ($editMilestonePermission == 'added' && $task->added_by == user()->id)
|| ($editMilestonePermission == 'owned' && in_array(user()->id, $taskUsers))
|| ($editMilestonePermission == 'owned' && (in_array('client', user_roles()) && $task->project && ($task->project->client_id == user()->id)))
));
$selectedMilestone = '--';
if ($task->project && count($task->project->incompleteMilestones) > 0) {
foreach ($task->project->incompleteMilestones as $milestone) {
if ($milestone->id == $task->milestone_id) {
$selectedMilestone = $milestone->milestone_title;
break;
}
}
}
@endphp
@if($showDropdown)
@if ($task->project && count($task->project->completedMilestones) > 0)
@foreach ($task->project->completedMilestones as $milestone)
@if($milestone->id == $task->milestone_id)
@endif
@endforeach
@endif
@if ($task->project && count($task->project->incompleteMilestones) > 0)
@foreach ($task->project->incompleteMilestones as $milestone)
@endforeach
@endif
@else
@endif
@if ($changeStatusPermission == 'all'
|| ($changeStatusPermission == 'added' && $task->added_by == user()->id)
|| ($changeStatusPermission == 'owned' && in_array(user()->id, $taskUsers))
|| ($changeStatusPermission == 'both' && (in_array(user()->id, $taskUsers) || $task->added_by == user()->id || $task->project->project_admin == user()->id))
)
@if ($task->board_column_id === $waitingApprovalTaskBoardColumn->id)
@foreach ($taskboardColumns as $item)
@if($item->id == $waitingApprovalTaskBoardColumn->id)
@endif
@endforeach
@else
@foreach ($taskboardColumns as $item)
@php
if ($item->slug == 'completed' || $item->slug == 'incomplete') {
if ($item->slug == 'completed') {
$icon = "".__('app.' . $item->slug);
}
elseif($item->slug == 'incomplete'){
$icon = "".__('app.' . $item->slug);
}
}
else {
if ($item->slug == 'to_do') {
$icon = "".$item->column_name;
}
elseif($item->slug == 'doing'){
$icon = "".$item->column_name;
}
else {
$icon = "". $item->column_name;
}
}
@endphp
@if ($item->id !== $waitingApprovalTaskBoardColumn->id)
@endif
@endforeach
@endif
@endif