@extends('layouts.app') @section('page_title', 'Tasks') @section('content')
Back
@if($task->project)

{{ $task->project->name }}

@endif

{{ $task->title }}

@if($task->description)

{{ $task->description }}

@endif

Details

Status

@if($task->status === 'pending') Pending @elseif($task->status === 'in_progress') In Progress @elseif($task->status === 'completed') Completed @else Cancelled @endif

Priority

@if($task->priority === 'high') High @elseif($task->priority === 'medium') Medium @else Low @endif

Created

{{ $task->created_at->format('M d, Y') }}

@if($task->due_date)

Due Date

{{ $task->due_date->format('M d, Y') }}

@if($task->due_date->isPast() && !$task->isCompleted()) — Overdue @endif
@endif

Time Tracker

Total Time Spent

{{ $task->time_spent > 0 ? sprintf('%dh %dm', intval($task->time_spent), intval(($task->time_spent - intval($task->time_spent)) * 60)) : '0h 0m' }}
@if($task->is_tracking)

Currently tracking...

@endif
@if(!$task->is_tracking) @else @endif

Minimum 15 minutes (0.25h)

Change Status

@foreach(['pending' => 'Pending', 'in_progress' => 'In Progress', 'completed' => 'Completed', 'cancelled' => 'Cancelled'] as $status => $label) @endforeach
Edit Task
@csrf @method('DELETE')

Quick Info

@if($task->project) @endif

ID

#{{ $task->id }}

Time

{{ $task->created_at->diffForHumans() }}

@endsection