@extends('layouts.backend') @section('title', 'Task Details') @section('content')

Task: {{ $task->title }}

@if(auth()->user()?->hasPermission('task.update')){{ __('Edit') }}@endif {{ __('Back') }}
@include('partials.flash')
{{ __('Task Summary') }}

{{ __('Project:') }} {{ $task->project?->name ?? '-' }}

{{ __('Assignee:') }} {{ trim(($task->assignee?->first_name ?? '').' '.($task->assignee?->last_name ?? '')) ?: '-' }}

{{ __('Priority:') }} {{ __(ucfirst($task->priority)) }}

{{ __('Status:') }} {{ __(ucfirst(str_replace('_', ' ', $task->status))) }}

{{ __('Progress:') }} {{ (int) $task->progress_percent }}%

{{ __('Dates:') }} {{ $task->start_date ?? '-' }} to {{ $task->due_date ?? '-' }}

{{ __('Description:') }}
{{ $task->description ?: '-' }}

@if(auth()->user()?->hasPermission('task.update'))
{{ __('Update Status') }}
@csrf @method('PATCH')
@endif
{{ __('Comments') }}
@forelse($task->comments as $comment) @php($name = trim(($comment->employee?->first_name ?? '').' '.($comment->employee?->last_name ?? '')))
{{ $name !== '' ? $name : 'User' }} - {{ $comment->created_at?->format('Y-m-d H:i') }}
{{ $comment->comment }}
@empty
{{ __('No comments yet.') }}
@endforelse
@if(auth()->user()?->hasPermission('task.comment'))
@csrf
@endif
@endsection