@php $projectOptions = $projects->mapWithKeys(fn ($project) => [$project->id => $project->name])->toArray(); $clientOptions = $clients->mapWithKeys(fn ($client) => [$client->id => $client->name])->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); @endphp
@if($status != 'need_action')

{{ __('Tasks') }}

@can('task categories create') @endcan @can('export excel') @endcan @can('export pdf') @endcan {{ __('Tasks board') }}
@endif @if (session()->has('message'))
{{ session('message') }}
@endif
{{-- أزرار النطاق (مهامي / جميع المهام) --}}
{{-- نطاق زمني: اليوم / الأسبوع / الشهر --}}
{{-- زر لمسح المدى الزمني (رجوع للوضع العادي) --}} {{-- Today --}} {{-- This Week --}} {{-- This Month --}}
{{-- أزرار سريعة للحالات --}}
{{-- All الكل --}} {{-- غير مكتملة (الافتراضي) --}} {{-- To Do --}} {{-- In Progress --}} {{-- Completed --}} {{-- Overdue (متأخرة) --}} {{-- @dump([$filter_status,$filter_overdue,$filter_incomplete])--}}
@if($showEmployeeList)
{{ __('All Employees') }}
{{ __('No results') }}
@endif
@forelse($tasks as $task) @empty @endforelse
# {{ __('Project') }} {{ __('Title') }} {{ __('Due Date') }} {{ __('Status') }} {{ __('Priority') }} {{ __('Employees') }} {{ __('Comments') }} {{ __('Last Comment By') }} {{ __('Last Comment Time') }} {{ __('Actions') }}
{{ $loop->iteration + ($tasks->currentPage() - 1) * $tasks->perPage() }} {{ optional($task->project)->name }} {{ $task->title }} {{ $task->due_date ? \Carbon\Carbon::parse($task->due_date)->format('Y-m-d') : '-' }}
{{ __($task->status) }}
@if($task->status === 'done') @else @if(in_array($task->work_state,['active','near_completion','paused'])) @endif @endif
{{ __(ucwords(str_replace('_', ' ', $task->priority))) }} {{ $task->employees->pluck('name')->join(', ') }} {{ $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 }} @can('tasks edit') @if(!in_array($task->status, ['done', 'completed'])) {{ __('Edit') }} @endif @endcan @can('tasks delete') {{ __('Delete') }} @endcan {{ __('Task Details') }} @if(!in_array($task->status, ['done', 'completed']))
@endif
{{ __('No tasks found.') }}
{{ $tasks->links() }}

@error('title') {{ $message }} @enderror
@error('category_id') {{ $message }} @enderror
@if($showProjectsList)
@error('project_id') {{ $message }} @enderror
@endif @if($showClientsList)
@error('client_id') {{ $message }} @enderror
@endif
@if(!auth()->user()->hasRole('Employee') and $showEmployeeList)
@endif
@if(!auth()->user()->hasRole('Employee'))
{{ __('Choose Employee') }}
{{--
--}} {{-- {{ __('Clear search') }}--}} {{--
--}}
{{ __('No results') }}
@error('assigned_users') {{ $message }} @enderror
@endif
@error('attachments.*') {{ $message }} @enderror
@foreach($existing_attachments as $file) @endforeach
{{-- تكرار المهمة --}}

{{ __('days') }}

{{ __('weeks') }}

{{ __('months') }}

{{-- weekly --}}
@php $days = [ 1 => __('Mon'), 2 => __('Tue'), 3 => __('Wed'), 4 => __('Thu'), 5 => __('Fri'), 6 => __('Sat'), 7 => __('Sun'), ]; @endphp @foreach($days as $num => $name) @endforeach
@error('weekly_days') {{ $message }} @enderror
{{-- monthly --}}
@error('monthly_day') {{ $message }} @enderror

{{ __('Example: 25 => every month on 25th') }}

{{-- specific dates (اختياري) --}}
@foreach(($specific_dates ?? []) as $idx => $d)
@endforeach

{{ __('Choose how the task behaves when it repeats') }}