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

{{ __('Tasks') }}

@if(auth()->user()?->hasPermission('task.create')) {{ __('Add Task') }} @endif
@include('partials.flash')
@forelse($tasks as $task) @php($assignee = trim(($task->assignee?->first_name ?? '').' '.($task->assignee?->last_name ?? ''))) @empty @endforelse
{{ __('Title') }}{{ __('Project') }}{{ __('Assignee') }}{{ __('Priority') }}{{ __('Status') }}{{ __('Due Date') }}{{ __('Progress') }}{{ __('Actions') }}
{{ $task->title }} {{ $task->project?->name ?? '-' }} {{ $assignee !== '' ? $assignee : '-' }} {{ __(ucfirst($task->priority)) }} {{ __(ucfirst(str_replace('_',' ', $task->status))) }} {{ $task->due_date ?? '-' }} {{ (int)$task->progress_percent }}% @if(auth()->user()?->hasPermission('task.update'))@endif @if(auth()->user()?->hasPermission('task.delete'))
@csrf @method('DELETE')
@endif
{{ __('No tasks found.') }}
{{ $tasks->links('pagination::bootstrap-5') }}
@endsection