Nav apraksta

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. @extends('layouts.app')
  2. @section('title', $professor->full_name . ' | Gerencia Docente')
  3. @section('content')
  4. <div class="mdc-layout-grid__inner">
  5. <h1 class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop">{{ $professor->full_name }}</h1>
  6. </div>
  7. <br>
  8. <div class="mdc-layout-grid__inner">
  9. <h5 class="mdc-layout-grid__cell">
  10. Email: {{ $professor->email ?? 'n/a' }}
  11. </h5>
  12. </div>
  13. <hr>
  14. <div class="mdc-layout-grid__inner">
  15. <h2 class="mdc-layout-grid__cell">Semestres</h2>
  16. </div>
  17. <div class="mdc-layout-grid__inner">
  18. <div class="mdc-layout-grid__cell--span-12">
  19. @foreach ($semesters as $semester)
  20. @php
  21. $semester_sections = $sections->get($semester->code);
  22. $semester_loads = $loads->get($semester->code);
  23. @endphp
  24. @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)))))
  25. <div class="mdc-layout-grid__inner">
  26. <div class="mdc-layout-grid__cell">
  27. <h4 class="mdc-typography--heading4">{{ $semester->alpha }}</h4>
  28. </div>
  29. </div>
  30. <div class="mdc-layout-grid__inner">
  31. <div class="mdc-data-table mdc-layout-grid__cell--span-12 prof-sections-table">
  32. <div class="mdc-data-table">
  33. <table class="mdc-data-table__table">
  34. <thead class="thead-light">
  35. <tr class="mdc-data-table__header-row">
  36. <th scope="col" class="mdc-data-table__header-cell">Curso</th>
  37. <th scope="col" class="mdc-data-table__header-cell">Sección</th>
  38. <th scope="col" class="mdc-data-table__header-cell">Lugar</th>
  39. <th scope="col" class="mdc-data-table__header-cell">Horas</th>
  40. <th scope="col" class="mdc-data-table__header-cell">Evaluación</th>
  41. <th scope="col" class="mdc-data-table__header-cell"># de Estudiantes</th>
  42. <th scope="col" class="mdc-data-table__header-cell">Créditos</th>
  43. </tr>
  44. </thead>
  45. <tbody class="mdc-data-table__content">
  46. @php
  47. $academic_load = $professor->getAcademicLoad($semester);
  48. @endphp
  49. @if ($semester_sections)
  50. @foreach ($semester_sections as $section)
  51. <tr class="mdc-data-table__row">
  52. <td class="mdc-data-table__cell">
  53. <a href="/course/{{ $section->course->id }}">{{ $section->course->code }}</a>
  54. </td>
  55. <td class="mdc-data-table__cell">{{ $section->code }}</td>
  56. <td class="mdc-data-table__cell">
  57. @if ($section->schedules)
  58. @foreach ($section->schedules as $schedule)
  59. {{ $schedule->location }}
  60. @if (!$loop->last)
  61. <br>
  62. @endif
  63. @endforeach
  64. @else
  65. n/a
  66. @endif
  67. </td>
  68. <td class="mdc-data-table__cell">
  69. @if ($section->schedules)
  70. @foreach ($section->schedules as $schedule)
  71. {{ $schedule->hours }}
  72. @if (!$loop->last)
  73. <br>
  74. @endif
  75. @endforeach
  76. @else
  77. n/a
  78. @endif
  79. </td>
  80. <td class="mdc-data-table__cell">{{ $section->eval ?? 'n/a' }}</td>
  81. <td class="mdc-data-table__cell">{{ $section->student_count ?? 'n/a' }}</td>
  82. <td class="mdc-data-table__cell">{{ $section->credits ?? 'n/a' }}</td>
  83. </tr>
  84. @endforeach
  85. <tr class="mdc-data-table__row">
  86. <th scope="row" class="mdc-data-table__cell" colspan="6">Carga Academica</th>
  87. <td class="mdc-data-table__cell">{{ $academic_load }}</td>
  88. </tr>
  89. @endif
  90. @if (Auth::check() || $semester_loads && is_numeric($semester_loads->pivot->admin_load))
  91. <tr class="mdc-data-table__row">
  92. <th class="mdc-data-table__cell" scope="row" @auth colspan="5" @else colspan="6" @endauth>Carga Administrativa</th>
  93. @auth
  94. <td class="mdc-data-table__cell">
  95. <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-professor-loads" data-semester-code="{{ $semester->code }}">edit</button>
  96. </td>
  97. @endauth
  98. <td class="mdc-data-table__cell">{{ $semester_loads ? $semester_loads->pivot->admin_load : 'n/a' }}</td>
  99. </tr>
  100. @endif
  101. @if (Auth::check() || $semester_loads && is_numeric($semester_loads->pivot->investigative_load))
  102. <tr class="mdc-data-table__row">
  103. <th class="mdc-data-table__cell" scope="row" @auth colspan="5" @else colspan="6" @endauth>Carga Investigativa</th>
  104. @auth
  105. <td class="mdc-data-table__cell">
  106. <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-professor-loads" data-semester-code="{{ $semester->code }}">edit</button>
  107. </td>
  108. @endauth
  109. <td class="mdc-data-table__cell">{{ $semester_loads ? $semester_loads->pivot->investigative_load : 'n/a' }}</td>
  110. </tr>
  111. @endif
  112. @if (Auth::check() || $semester_loads && is_numeric($semester_loads->pivot->other))
  113. <tr class="mdc-data-table__row">
  114. <th class="mdc-data-table__cell" scope="row" @auth colspan="5" @else colspan="6" @endauth>Otras Cargas</th>
  115. @auth
  116. <td class="mdc-data-table__cell">
  117. <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-professor-loads" data-semester-code="{{ $semester->code }}">edit</button>
  118. </td>
  119. @endauth
  120. <td class="mdc-data-table__cell">{{ $semester_loads ? $semester_loads->pivot->other : 'n/a' }}</td>
  121. </tr>
  122. @endif
  123. @if ($semester_sections || $semester_loads)
  124. <tr class="mdc-data-table__row">
  125. <th class="mdc-data-table__cell" scope="row" colspan="6">Carga Total</th>
  126. <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>
  127. </tr>
  128. @endif
  129. </tbody>
  130. </table>
  131. </div>
  132. </div>
  133. </div>
  134. @if (!$loop->last)
  135. <br>
  136. @endif
  137. @endif
  138. @endforeach
  139. </div>
  140. </div>
  141. @endsection
  142. @section('modals')
  143. @include('modal.professor.edit')
  144. @include('modal.professor.loads')
  145. @endsection
  146. @section('scripts')
  147. <script type="text/javascript" src="/js/prof.js"></script>
  148. @endsection