@php $projectOptions = $projects->mapWithKeys(fn ($project) => [$project->id => $project->name])->toArray(); $clientOptions = $clients->mapWithKeys(fn ($client) => [$client->id => $client->name ?: $client->company_name ?: $client->client_code])->toArray(); $clientsForTaskProject = filled($project_id) ? $clients->where('project_id', $project_id) : $clients; $taskClientOptions = $clientsForTaskProject->mapWithKeys(fn ($client) => [$client->id => $client->name ?: $client->company_name ?: $client->client_code])->toArray(); $categoryOptions = $categories->mapWithKeys(fn ($category) => [$category->id => $category->name])->toArray(); $hasAdvancedFilters = filled($searchFilter) || filled($filter_project_id) || filled($filter_client_id) || filled($filter_employee_id) || filled($filter_category_id) || filled($filter_priority) || filled($filter_start_date) || filled($filter_due_date) || filled($filter_last_comment_from) || filled($filter_last_comment_to); @endphp
| # | {{ __('Project') }} | {{ __('Title') }} | {{ __('Unread') }} | {{ __('Due Date') }} | {{ __('Status') }} | {{ __('Priority') }} | {{ __('Employees') }} | {{ __('Workflow progress') }} | {{ __('Current step') }} | {{ __('Current administration') }} | {{ __('Comments') }} | {{ __('Last Comment By') }} | {{ __('Last Comment Time') }} | {{ __('Actions') }} | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration + ($tasks->currentPage() - 1) * $tasks->perPage() }} | {{ optional($task->project)->name }} |
@if($task->is_draft)
@else
{{ \Illuminate\Support\Str::limit($task->title, 55) }}
@endif
|
{{ $task->due_date ? \Carbon\Carbon::parse($task->due_date)->format('Y-m-d') : '-' }} |
@if($task->is_draft)
{{ __('Draft') }}
@else
{{ __($task->status) }}
@if($task->status === 'completed')
@else
@if($task->work_state === 'paused' && filled($task->pause_reason))
@endif
@if(in_array($task->work_state,['active','near_completion','paused']))
@endif
@endif
@endif
|
{{ __(ucwords(str_replace('_', ' ', $task->priority))) }} | @php $employeeNames = $task->employees->pluck('name')->join('، '); @endphp
{{ $employeeNames ? \Illuminate\Support\Str::limit($employeeNames, 45) : '-' }}
|
@php
$workflowSteps = $task->workflow?->steps ?? collect();
$currentWorkflowStep = $workflowSteps->firstWhere('status', 'in_progress')
?? $workflowSteps->firstWhere('status', 'available')
?? $workflowSteps->firstWhere('status', 'blocked')
?? $workflowSteps->firstWhere('status', 'pending')
?? $workflowSteps->last();
$currentWorkflowAdministration = $currentWorkflowStep?->administrate?->name
?? $currentWorkflowStep?->templateStep?->administrate?->name;
@endphp
@if($task->workflow)
{{ number_format((float) $task->workflow->progress, 0) }}%
@else
-
@endif
|
@if($task->workflow)
{{ $currentWorkflowStep?->title ?: $currentWorkflowStep?->templateStep?->title ?: '-' }}
@if($currentWorkflowStep){{ __($currentWorkflowStep->status) }} @endif
@else
-
@endif
|
{{ $currentWorkflowAdministration ?: '-' }} | {{ $task->comments_count }} | {{ $task->latestComment?->user?->name ?? '-' }} | {{ $task->latestComment?->created_at ?? $task->created_at }} |
@if($task->is_draft)
@else
@if($task->status !== 'completed' && $task->canBeEditedBy(auth()->user()))
id }})"
class="text-blue-600 dark:text-blue-400 hover:underline mr-2">
{{ __('Edit') }}
@endif
@can('tasks delete')
{{ __('Delete') }}
@endcan
{{ __('Task Details') }}
@php
$allowedStatuses = $this->allowedStatusesForTask($task);
@endphp
@if($task->status !== 'completed' && !empty($allowedStatuses))
|
||
| {{ __('No tasks found.') }} | |||||||||||||||
{{ __('Define reusable steps, owners, durations, visibility, and dependencies.') }}