@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(); $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') }} | {{ __('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) : '-' }}
|
{{ $task->comments->count() }} | {{ (($comment = $task->comments()->latest()->first()) and $comment->user) ? $comment->user->name : "-" }} | {{ (($comment = $task->comments()->latest()->first())) ? $comment->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.') }} | ||||||||||||