@foreach ($days as $dayKey => $dayName)
@php
// Filter trashed routines for the specific day
$trashedRoutinesForDay = $trashed_routine->where('class_day', $dayKey);
@endphp
@if ($trashedRoutinesForDay->isNotEmpty())
{{ $dayName }} |
@foreach ($routine_periods as $period)
@php
// Get the trashed routine data for the specific day and period
$periodData = $trashedRoutinesForDay->where('routine_period_id', $period->id)->first();
@endphp
@if ($periodData)
@php
$startTime = \Carbon\Carbon::parse($periodData->start_time)->format('h:i A');
$endTime = \Carbon\Carbon::parse($periodData->end_time)->format('h:i A');
@endphp
{{ $periodData->rel_to_routineTypeId->routine_type }}
{{ optional($periodData->rel_to_subject)->subject ?? 'No Subject Available' }}
{{ $startTime }} - {{ $endTime }}
Class Room: {{ $periodData->rel_to_classRoom->class_room_name }}
@else
N/A
@endif
|
@endforeach
@if($action_hide==false || $action_hide == 'false')
|
@endif
@endif
@endforeach