@if($viewMode === 'table')
| Tarjeta | Lista | Tipo | Prioridad | Inicio | Fecha límite |
@forelse($tasks as $task)| {{ $task->title }} | {{ $task->status }} | {{ ucfirst($task->type) }} | {{ ucfirst($task->priority) }} | {{ $task->start_date ?: '—' }} | {{ $task->due_date ?: 'Sin fecha' }} |
@empty| No hay tarjetas en esta vista. |
@endforelse
@elseif($viewMode === 'dashboard')
Tarjetas{{ $tasks->count() }}Listas{{ $lists->count() }}Con fecha límite{{ $tasks->whereNotNull('due_date')->count() }}Sin programar{{ $tasks->filter(fn($task)=>!$task->start_date && !$task->due_date)->count() }}
@foreach(['Lista'=>'status','Tipo'=>'type','Prioridad'=>'priority'] as $label=>$field)
Tarjetas por {{ strtolower($label) }}
@forelse($tasks->groupBy($field) as $name=>$group){{ ucfirst($name) }}{{ $group->count() }}
@emptyAñade tarjetas para ver el resumen.
@endforelse@endforeach
@else
{{ $month->locale('es')->translatedFormat('F Y') }}
Hoy
@if($viewMode === 'calendar')
@foreach(['Lun','Mar','Mié','Jue','Vie','Sáb','Dom'] as $day)
{{ $day }}
@endforeach
@php
$first = $month->copy()->startOfWeek();
@endphp
@for($i=0;$i<42;$i++)
@php
$date=$first->copy()->addDays($i);
@endphp
@foreach($tasks->filter(fn($t)=>($t->due_date ?: $t->start_date)===$date->toDateString()) as $task)
{{ $task->title }}@endforeach
@endfor
Las tarjetas aparecen en su fecha límite o, si no tienen, en su fecha de inicio.
@else
Tarjeta@for($day=1;$day<=$month->daysInMonth;$day++){{ $day }}@endfor
@forelse($tasks->filter(fn($t)=>($t->start_date||$t->due_date) && ($t->start_date ?: $t->due_date) <= $month->copy()->endOfMonth()->toDateString() && ($t->due_date ?: $t->start_date) >= $month->toDateString()) as $task)
@php
$start=max($task->start_date ?: $task->due_date,$month->toDateString());
$end=min($task->due_date ?: $task->start_date,$month->copy()->endOfMonth()->toDateString());
$left=(int)substr($start,8,2); $right=(int)substr($end,8,2);
@endphp
@empty
No hay tarjetas programadas para este mes.
@endforelse
@endif
@endif