@extends('layouts.app', ['title' => 'Calendario semanal']) @section('content') @php $subjectDetails = $subjects->mapWithKeys(function ($subject) { return [ $subject->id => [ 'title' => $subject->name, 'career' => $subject->career->code.' · '.$subject->year_number.'° año', 'teacher' => $subject->teacher?->name ?? 'Docente a confirmar', 'students' => $subject->enrollments ->sortBy('student.full_name') ->map(fn ($enrollment) => [ 'name' => $enrollment->student->full_name, 'status' => $enrollment->status, ]) ->values(), 'schedule' => $subject->scheduleSlots ->sortBy(['day_of_week', 'time_slot']) ->map(fn ($slot) => trim($slot->day_of_week.' · '.$slot->time_slot.($slot->classroom ? ' · '.$slot->classroom : ''))) ->values(), ], ]; }); @endphp

Calendario académico

Vista operativa de las materias cargadas: los días están en columnas y las horas cátedra en filas.

{{ number_format($subjectsCount, 0, ',', '.') }} materias con horario
Limpiar
Hora
@foreach ($dayOptions as $dayLabel)
{{ $dayLabel }}
@endforeach @foreach ($timeSlots as $timeSlot)
{{ $timeSlot }}
@foreach ($dayOptions as $dayKey => $dayLabel)
@forelse ($grid[$timeSlot][$dayKey] as $entry) @php $subject = $entry['subject']; $slot = $entry['slot']; @endphp @empty @endforelse
@endforeach @endforeach
@endsection