@php $addTaskCategoryPermission = user()->permission('add_task_category'); $addEmployeePermission = user()->permission('add_employees'); $addTaskFilePermission = user()->permission('add_task_files'); $editTaskPermission = user()->permission('edit_tasks'); $viewProjectPermission = user()->permission('view_projects'); $viewTaskCategoryPermission = user()->permission('view_task_category'); $editMilestonePermission = user()->permission('edit_project_milestones'); @endphp

@lang('modules.tasks.taskInfo')

@if ($addTaskCategoryPermission == 'all' || $addTaskCategoryPermission == 'added') @endif
due_date)) style="display: none" @endif>
@if ($addEmployeePermission == 'all' || $addEmployeePermission == 'added') @endif
@if(isset($leaveData)) @endif
{!! $task->description !!}

@lang('modules.client.clientOtherDetails')

@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
@lang('app.hrs')    @lang('app.mins')
@foreach ($allTasks as $item) @endforeach
@if ($addTaskFilePermission == 'all' || $addTaskFilePermission == 'added')
@endif
@lang('app.save') @lang('app.cancel')