CourseWork/resources/views/grade-subject/journal.blade.php

58 lines
2.8 KiB
PHP
Raw Normal View History

2024-06-23 00:57:29 +04:00
@extends('layouts.application')
@section('content')
<div class="container col-md-8">
<div class="row justify-content-center">
@if (count($students))
<div class="card mt-4">
<div class="card-header">{{__('Журнал')}}</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">ФИО</th>
@foreach ($lessons as $lesson)
<th scope="col">{{ $lesson->lesson_date }}</th>
@endforeach
</tr>
<tr>
<th scope="col"></th>
@foreach ($lessons as $lesson)
<th scope="col">{{ $lesson->type }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($students as $student)
<tr>
<td> {{ $student->fio }}</td>
@foreach ($lessons as $lesson)
<td style="text-align: center; vertical-align: middle;">
{{ $student->lessons->find($lesson->id)->pivot->score ?? "-" }}
</td>
@endforeach
</tr>
@endforeach
{{-- <tr>--}}
{{-- <td>Средняя оценка</td>--}}
{{-- @foreach ($avgScores as $avgScore)--}}
{{-- <td style="text-align: center; vertical-align: middle;">--}}
{{-- {{ $avgScore ? $avgScore : "" }}--}}
{{-- </td>--}}
{{-- @endforeach--}}
{{-- </tr>--}}
</tbody>
</table>
</div>
</div>
</div>
{{-- <div class="mt-4">--}}
{{-- @include('journals.list', ['users' => $goods, 'studentName' => 'хорошистов'])--}}
{{-- @include('journals.list', ['users' => $perfects, 'studentName' => 'отличников'])--}}
{{-- </div>--}}
@endif
</div>
</div>
@endsection