{{ __('Home') }}

{{-- Saludo --}}

{{ __('Hello, :name', ['name' => $user?->first_name ?? auth()->user()->name]) }}

{{ __('A quick summary of your items.') }}

{{-- ───────────── Mis proyectos ───────────── --}}

{{ __('My Projects') }} {{ $projectsCount }}

{{ __('View all') }}
@forelse($projects as $project) @php $pct = round($project->phases->avg('progress_percent') ?? 0); @endphp
{{ $project->name }}
{{ $pct }}%
@empty

{{ __('You have no assigned projects.') }}

@endforelse
{{-- ───────────── Mis tareas ───────────── --}}

{{ __('My Tasks') }} {{ $myTasksCount }}

@forelse($myTasks as $task)
{{ $task->title }}
{{ $task->issue?->project?->name ?? '—' }}
@if($task->due_date) {{ $task->due_date->format('d/m/Y') }} @endif
@empty @if($myTasksFromTasks->isNotEmpty()) @foreach($myTasksFromTasks as $task)
{{ $task->title }}
{{ $task->project?->name ?? '—' }}
@if($task->due_date) {{ $task->due_date->format('d/m/Y') }} @endif
@endforeach @else

{{ __('You have no pending tasks. 🎉') }}

@endif @endforelse
{{-- ───────────── Mis incidencias ───────────── --}}

{{ __('Assigned Issues') }} {{ $myIssuesCount }}

@forelse($myIssues as $issue) @php $sLabel = ['open'=>__('Open'),'in_review'=>__('In Review')][$issue->status] ?? $issue->status; @endphp  
{{ $issue->title }}
{{ $issue->project?->name ?? '—' }}
{{ $sLabel }}
@empty

{{ __('You have no assigned issues.') }}

@endforelse
{{-- ───────────── Notificaciones ───────────── --}}

{{ __('Notifications') }} @if($unreadCount){{ $unreadCount }}@endif

@forelse($notifications as $note) @php $d = $note->data; $url = (isset($d['project_id'], $d['issue_id'])) ? route('projects.issues.show', [$d['project_id'], $d['issue_id']]) : null; @endphp
{{ $d['message'] ?? __('Notification') }}
{{ $note->created_at->diffForHumans() }}
@empty

{{ __('No notifications.') }}

@endforelse