@extends('layouts.app') @section('title', 'My Dashboard') @section('page-title', 'My Dashboard') @section('content')
{{ strtoupper(substr(auth()->user()->name, 0, 1)) }}
Welcome back, {{ auth()->user()->name }}! 👋
{{ str_replace('_', ' ', auth()->user()->role) }} • {{ now()->format('l, d F Y') }}
{{ $stats['total'] }}
Total Tasks
{{ $stats['pending'] }}
Pending
{{ $stats['in_progress'] }}
In Progress
{{ $stats['completed'] }}
Completed
My Tasks Add Task
@forelse($tasks as $task)
@if($task->status === 'approved') @elseif($task->status === 'in_progress') @elseif($task->status === 'under_review') @elseif($task->status === 'rejected') @else @endif
{{ $task->title }} {{ $task->priority }} {{ str_replace('_', ' ', ucfirst($task->status)) }} @if($task->isOverdue()) OVERDUE @endif
@if($task->description)
{{ Str::limit($task->description, 80) }}
@endif
{{ $task->planned_start->format('d M') }} — {{ $task->planned_end->format('d M Y') }} @if($task->actual_start) Started: {{ $task->actual_start->format('d M Y h:i A') }} @endif
@if($task->status === 'rejected' && $task->rejection_reason)
Rejection Reason: {{ $task->rejection_reason }}
@endif
@if($task->status === 'pending')
@csrf @method('PATCH')
@elseif($task->status === 'in_progress')
@csrf @method('PATCH')
@elseif($task->status === 'rejected')
@csrf @method('PATCH')
@endif
@empty
No tasks assigned yet.
Create Your First Task
@endforelse
@endsection