@php $editTaskPermission = user()->permission('edit_tasks'); $sendReminderPermission = user()->permission('send_reminder'); $changeStatusPermission = user()->permission('change_status'); $viewProjectPermission = user()->permission('view_projects'); @endphp

{{ $task->heading }}

@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 && $task->project->project_admin == user()->id) ) {{-- approval_send --}} @php $userRoles = user_roles(); $isAdmin = in_array('admin', $userRoles); $isEmployee = in_array('employee', $userRoles); @endphp @if($task->project && $task->project->need_approval_by_admin == 1 && ($isEmployee && $task->project->project_admin != user()->id) && !$isAdmin && $task->boardColumn->slug != 'completed') @lang('modules.tasks.sendForApproval') @else @if ($task->boardColumn->slug != 'completed') @lang('modules.tasks.markComplete') @else @lang('modules.tasks.markIncomplete') @endif @endif @endif @if ($task->boardColumn->slug != 'completed' && !is_null($task->is_task_user) && in_array('timelogs', user_modules())) @if (is_null($task->userActiveTimer)) @if($task->approval_send == 0) @lang('modules.timeLogs.startTimer') @endif @else {{ $task->userActiveTimer->timer }} @if (is_null($task->userActiveTimer->activeBreak)) @lang('modules.timeLogs.pauseTimer') @lang('modules.timeLogs.stopTimer') @else @lang('modules.timeLogs.resumeTimer') @endif @endif @endif
@if (($taskSettings->project == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles()))

@lang('app.project')

@if ($task->project_id) @if ($task->project->status == 'in progress') @elseif ($task->project->status == 'on hold') @elseif ($task->project->status == 'not started') @elseif ($task->project->status == 'canceled') @elseif ($task->project->status == 'finished') @endif @if ($viewProjectPermission == 'all' || ($viewProjectPermission == 'added' && $task->project->added_by == user()->id) || ($viewProjectPermission == 'owned' && user()->id == $task->project->client_id && in_array('client', user_roles())) || ($viewProjectPermission == 'both' && (user()->id == $task->project->client_id || user()->id == $task->added_by)) ) {{ $task->project->project_name }} @else {{ $task->project->project_name }} @endif @else -- @endif

@endif @if (($taskSettings->priority == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles()) )

@lang('modules.tasks.priority')

@if ($task->priority == 'high') @elseif ($task->priority == 'medium') @else @endif @lang('app.'.$task->priority)

@endif @if (($taskSettings->assigned_to == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles()))

@lang('modules.tasks.assignTo')

@if (count($task->users) > 0) @if (count($task->users) > 1) @foreach ($task->users as $item) @endforeach @else @foreach ($task->users as $item) @endforeach @endif @else -- @endif
@endif

@lang('modules.taskShortCode')

{{ ($task->task_short_code) ? : '--' }}

@if (($taskSettings->assigned_by == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @if ($task->created_by)

@lang('modules.tasks.assignBy')

{{--

--}} {{--

--}}
@endif @endif @if (($taskSettings->label == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles()))

@lang('app.label')

@forelse ($task->labels as $key => $label) description) data-toggle="popover" data-placement="top" data-content="{!! $label->description !!}" data-html="true" data-trigger="hover" @endif >{!! $label->label_name !!} @empty -- @endforelse

@endif @if (in_array('gitlab', user_modules()) && isset($gitlabIssue)) @endif @if (($taskSettings->task_category == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @endif @if (($taskSettings->description == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @endif {{-- Custom fields data --}} @if (($taskSettings->custom_fields == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @endif
@if ((($taskSettings->files == 'yes' || $taskSettings->sub_task == 'yes' || $taskSettings->comments == 'yes'|| $taskSettings->time_logs == 'yes'|| $taskSettings->notes == 'yes' || $taskSettings->history == 'yes') && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles()))
@if (($taskSettings->files == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @lang('app.file') @endif @if (($taskSettings->sub_task == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @lang('modules.tasks.subTask') @endif @if (($taskSettings->comments == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @if ($viewTaskCommentPermission != 'none') @lang('modules.tasks.comment') @endif @endif @if ((($taskSettings->time_logs == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) && in_array('timelogs', user_modules())) @lang('app.menu.timeLogs') @if ($task->active_timer_all_count > 0) @endif @endif @if (($taskSettings->notes == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @if ($viewTaskNotePermission != 'none') @lang('app.notes') @endif @endif @if (($taskSettings->history == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @lang('modules.tasks.history') @endif
@endif
@if (($taskSettings->status == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles()))

{{ $task->boardColumn->column_name }}

@endif @if (($taskSettings->make_private == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @if ($task->is_private || $pin)
@if ($task->is_private) @lang('app.private')  @endif @if ($pin) @lang('app.pinned') @endif
@endif @endif

{{ __('modules.expensesRecurring.created_at') }}

{{ $task->created_at->timezone(company()->timezone)->format(company()->date_format . ' ' . company()->time_format) }}

@if (($taskSettings->start_date == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles()))

{{ __('app.startDate') }}

@if(!is_null($task->start_date)) {{ $task->start_date->translatedFormat(company()->date_format) }} @else -- @endif

@endif @if (($taskSettings->due_date == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles()))

{{ __('app.dueDate') }}

@if(!is_null($task->due_date)) {{ $task->due_date->translatedFormat(company()->date_format) }} @else -- @endif

@endif @if (($taskSettings->time_estimate == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) @if ($task->estimate_hours > 0 || $task->estimate_minutes > 0)

{{ __('modules.tasks.setTimeEstimate') }}

{{ $task->estimate_hours }} @lang('app.hrs') {{ $task->estimate_minutes }} @lang('app.mins')

@endif @endif @php $activeTimerMinutes = 0; $activeBreakMinutes = 0; @endphp @if ($task->activeTimerAll) @foreach ($task->activeTimerAll as $item) @php $activeTimerMinutes = $activeTimerMinutes + (($item->activeBreak) ? $item->activeBreak->start_time->diffInMinutes($item->start_time) : now()->diffInMinutes($item->start_time)); $activeBreakMinutes = $activeBreakMinutes + $item->breaks->sum('total_minutes'); @endphp @endforeach @endif @php $totalMinutes = $task->timeLogged->sum('total_minutes') + $activeTimerMinutes - $breakMinutes - $activeBreakMinutes; $timeLog = \Carbon\CarbonInterval::formatHuman($totalMinutes); @endphp @if ((($taskSettings->hours_logged == 'yes' && in_array('client', user_roles())) || in_array('admin', user_roles()) || in_array('employee', user_roles())) && in_array('timelogs', user_modules()))

{{ __('modules.employees.hoursLogged') }}

{{ $timeLog }}

@endif