@extends('admin.layouts.app') @section('title', __('admin.todo.title')) @section('content')
@if($items->isEmpty())
{{ __('admin.todo.no_tasks') }}
@else @foreach($items as $todo) @php $badgeClass = match(strtolower($todo->status ?? 'new')) { 'completed' => 'badge-active', 'in progress' => 'badge-pending', default => 'badge-open', }; @endphp @endforeach
{{ __('admin.todo.task_title') }} {{ __('common.table.description') }} {{ __('common.table.status') }} {{ __('common.table.due_date') }} {{ __('admin.todo.admin') }} {{ __('common.table.actions') }}
{{ $todo->title }} {{ Str::limit($todo->description ?? '', 60) ?: '-' }} {{ ucfirst($todo->status ?? 'New') }} {{ $todo->due_date?->format('d M Y') ?? '-' }} {{ $todo->admin ?? '-' }} @if(strtolower($todo->status ?? '') !== 'completed')
@csrf @method('PUT')
@endif
@csrf @method('DELETE')
@endif
{{-- Add Task Modal --}} @endsection