Skip to content

Commit

Permalink
fix(feedback)! : bug tidak tampil feedbacknya di sekolah dan guru
Browse files Browse the repository at this point in the history
  • Loading branch information
ArdianS18 committed Nov 26, 2024
1 parent ea61565 commit b262a7d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,8 @@
</tr>
</thead>
<tbody>
@php
$firstTeacherSubject = $teacherSubject->first();
$items = $firstTeacherSubject
? App\Models\LessonSchedule::where('teacher_subject_id', $firstTeacherSubject->id)->get()
: null;
@endphp

@if ($items)
@foreach ($items as $data)
@if ($teacherSubject)
@forelse ($teacherSubject as $data)
@if ($data && isset($feedbacks[$data->id]))
@forelse ($feedbacks[$data->id] as $feedback)
<tr>
Expand Down Expand Up @@ -58,34 +51,21 @@ class="rounded-circle me-2 user-profile"
<td colspan="5" class="text-center align-middle">Tidak ada tanggapan dari siswa</td>
</tr>
@endforelse
@else
<tr>
<td colspan="7" class="text-center align-middle">
<div
class="d-flex flex-column justify-content-center align-items-center">
<img src="{{ asset('admin_assets/dist/images/empty/no-data.png') }}"
alt="" width="300px">
<p class="fs-5 text-dark text-center mt-2">
Tidak ada tanggapan dari siswa
</p>
</div>
</td>
</tr>
@endif
@endforeach
@else
<tr>
<td colspan="7" class="text-center align-middle">
<div
class="d-flex flex-column justify-content-center align-items-center">
<img src="{{ asset('admin_assets/dist/images/empty/no-data.png') }}"
alt="" width="300px">
<p class="fs-5 text-dark text-center mt-2">
Tidak ada tanggapan dari siswa
</p>
</div>
</td>
</tr>
@empty
<tr>
<td colspan="7" class="text-center align-middle">
<div
class="d-flex flex-column justify-content-center align-items-center">
<img src="{{ asset('admin_assets/dist/images/empty/no-data.png') }}"
alt="" width="300px">
<p class="fs-5 text-dark text-center mt-2">
Tidak ada tanggapan dari siswa
</p>
</div>
</td>
</tr>
@endforelse
@endif
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,8 @@
</tr>
</thead>
<tbody>
@php
$firstTeacherSubject = $teacherSubject->first();
$items = $firstTeacherSubject
? App\Models\LessonSchedule::where('teacher_subject_id', $firstTeacherSubject->id)->get()
: null;
@endphp

@if ($items)
@foreach ($items as $data)
@if ($teacherSubject)
@forelse ($teacherSubject as $data)
@if ($data && isset($feedbacks[$data->id]))
@forelse ($feedbacks[$data->id] as $feedback)
<tr>
Expand Down Expand Up @@ -58,23 +51,22 @@ class="rounded-circle me-2 user-profile"
<td colspan="5" class="text-center align-middle">Tidak ada tanggapan dari siswa</td>
</tr>
@endforelse
@else
<tr>
<td colspan="7" class="text-center align-middle">
<div
class="d-flex flex-column justify-content-center align-items-center">
<img src="{{ asset('admin_assets/dist/images/empty/no-data.png') }}"
alt="" width="300px">
<p class="fs-5 text-dark text-center mt-2">
Tidak ada tanggapan dari siswa
</p>
</div>
</td>
</tr>
@endif
@endforeach
@empty
<tr>
<td colspan="7" class="text-center align-middle">
<div
class="d-flex flex-column justify-content-center align-items-center">
<img src="{{ asset('admin_assets/dist/images/empty/no-data.png') }}"
alt="" width="300px">
<p class="fs-5 text-dark text-center mt-2">
Tidak ada tanggapan dari siswa
</p>
</div>
</td>
</tr>
@endforelse
@endif

</tbody>
</table>

Expand Down

0 comments on commit b262a7d

Please sign in to comment.