123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- @extends('layouts.app')
-
- @section('title', $professor->full_name . ' | Gerencia Docente')
-
- @section('content')
- <div class="mdc-layout-grid__inner">
- <h1 class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop">{{ $professor->full_name }}</h1>
- </div>
- <br>
- <div class="mdc-layout-grid__inner">
- <h5 class="mdc-layout-grid__cell">
- Email: {{ $professor->email ?? 'n/a' }}
- </h5>
- </div>
- <hr>
- <div class="mdc-layout-grid__inner">
- <h2 class="mdc-layout-grid__cell">Semestres</h2>
- </div>
- <div class="mdc-layout-grid__inner">
- <div class="mdc-layout-grid__cell--span-12">
- @foreach ($semesters as $semester)
- @php
- $semester_sections = $sections->get($semester->code);
- $semester_loads = $loads->get($semester->code);
- @endphp
- @if ($semester_sections || ($semester_loads && (is_numeric($semester_loads->pivot->admin_load) || is_numeric($semester_loads->pivot->investigative_load || is_numeric($semester_loads->pivot->other)))))
- <div class="mdc-layout-grid__inner">
- <div class="mdc-layout-grid__cell">
- <h4 class="mdc-typography--heading4">{{ $semester->alpha }}</h4>
- </div>
- </div>
- <div class="mdc-layout-grid__inner">
- <div class="mdc-data-table mdc-layout-grid__cell--span-12 prof-sections-table">
- <div class="mdc-data-table">
- <table class="mdc-data-table__table">
- <thead class="thead-light">
- <tr class="mdc-data-table__header-row">
- <th scope="col" class="mdc-data-table__header-cell">Curso</th>
- <th scope="col" class="mdc-data-table__header-cell">Sección</th>
- <th scope="col" class="mdc-data-table__header-cell">Lugar</th>
- <th scope="col" class="mdc-data-table__header-cell">Horas</th>
- <th scope="col" class="mdc-data-table__header-cell">Evaluación</th>
- <th scope="col" class="mdc-data-table__header-cell"># de Estudiantes</th>
- <th scope="col" class="mdc-data-table__header-cell">Créditos</th>
- </tr>
- </thead>
- <tbody class="mdc-data-table__content">
- @php
- $academic_load = $professor->getAcademicLoad($semester);
- @endphp
- @if ($semester_sections)
- @foreach ($semester_sections as $section)
- <tr class="mdc-data-table__row">
- <td class="mdc-data-table__cell">
- <a href="/course/{{ $section->course->id }}">{{ $section->course->code }}</a>
- </td>
- <td class="mdc-data-table__cell">{{ $section->code }}</td>
- <td class="mdc-data-table__cell">
- @if ($section->schedules)
- @foreach ($section->schedules as $schedule)
- {{ $schedule->location }}
- @if (!$loop->last)
- <br>
- @endif
- @endforeach
- @else
- n/a
- @endif
- </td>
- <td class="mdc-data-table__cell">
- @if ($section->schedules)
- @foreach ($section->schedules as $schedule)
- {{ $schedule->hours }}
- @if (!$loop->last)
- <br>
- @endif
- @endforeach
- @else
- n/a
- @endif
- </td>
- <td class="mdc-data-table__cell">{{ $section->eval ?? 'n/a' }}</td>
- <td class="mdc-data-table__cell">{{ $section->student_count ?? 'n/a' }}</td>
- <td class="mdc-data-table__cell">{{ $section->credits ?? 'n/a' }}</td>
- </tr>
- @endforeach
- <tr class="mdc-data-table__row">
- <th scope="row" class="mdc-data-table__cell" colspan="6">Carga Academica</th>
- <td class="mdc-data-table__cell">{{ $academic_load }}</td>
- </tr>
- @endif
- @if (Auth::check() || $semester_loads && is_numeric($semester_loads->pivot->admin_load))
- <tr class="mdc-data-table__row">
- <th class="mdc-data-table__cell" scope="row" @auth colspan="5" @else colspan="6" @endauth>Carga Administrativa</th>
- @auth
- <td class="mdc-data-table__cell">
- <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-professor-loads" data-semester-code="{{ $semester->code }}">edit</button>
- </td>
- @endauth
- <td class="mdc-data-table__cell">{{ $semester_loads ? $semester_loads->pivot->admin_load : 'n/a' }}</td>
- </tr>
- @endif
- @if (Auth::check() || $semester_loads && is_numeric($semester_loads->pivot->investigative_load))
- <tr class="mdc-data-table__row">
- <th class="mdc-data-table__cell" scope="row" @auth colspan="5" @else colspan="6" @endauth>Carga Investigativa</th>
- @auth
- <td class="mdc-data-table__cell">
- <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-professor-loads" data-semester-code="{{ $semester->code }}">edit</button>
- </td>
- @endauth
- <td class="mdc-data-table__cell">{{ $semester_loads ? $semester_loads->pivot->investigative_load : 'n/a' }}</td>
- </tr>
- @endif
- @if (Auth::check() || $semester_loads && is_numeric($semester_loads->pivot->other))
- <tr class="mdc-data-table__row">
- <th class="mdc-data-table__cell" scope="row" @auth colspan="5" @else colspan="6" @endauth>Otras Cargas</th>
- @auth
- <td class="mdc-data-table__cell">
- <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-professor-loads" data-semester-code="{{ $semester->code }}">edit</button>
- </td>
- @endauth
- <td class="mdc-data-table__cell">{{ $semester_loads ? $semester_loads->pivot->other : 'n/a' }}</td>
- </tr>
- @endif
- @if ($semester_sections || $semester_loads)
- <tr class="mdc-data-table__row">
- <th class="mdc-data-table__cell" scope="row" colspan="6">Carga Total</th>
- <td class="mdc-data-table__cell">{{ $academic_load + ($semester_loads->pivot->admin_load ?? 0) + ($semester_loads->pivot->investigative_load ?? 0) + ($semester_loads->pivot->other ?? 0) }}</td>
- </tr>
- @endif
-
- </tbody>
- </table>
- </div>
- </div>
- </div>
- @if (!$loop->last)
- <br>
- @endif
- @endif
- @endforeach
- </div>
- </div>
- @endsection
-
- @section('modals')
- @include('modal.professor.edit')
- @include('modal.professor.loads')
- @endsection
-
- @section('scripts')
- <script type="text/javascript" src="/js/prof.js"></script>
- @endsection
|