@foreach ($pribasos as $data)
    <!-- Modal Detail -->
    <div class="modal fade" id="openModal_{{ $data->id_pribasos }}" tabindex="-1"
        aria-labelledby="openModalLabel_{{ $data->id_pribasos }}" aria-hidden="true">
        <div class="modal-dialog modal-lg modal-dialog-scrollable">
            <div class="modal-content">
                <div class="modal-header text-white" style="background-color: rgba(87, 7, 65, 1);">
                    <h5 class="modal-title" id="openModalLabel_{{ $data->id_pribasos }}">Riwayat Konseling -
                        {{ $data->siswa->nama_siswa }}</h5>
                    <button type="button" class="btn-close bg-white" data-bs-dismiss="modal" aria-label="Tutup"></button>
                </div>
                <div class="modal-body">
                    <table class="table table-bordered">
                        <thead>
                            <tr>
                                <th>Tanggal</th>
                                <th>Jenis Konseling</th>
                                <th>Permasalahan</th>
                                <th>Penyelesaian</th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach ($allPribasos[$data->id_siswa] as $entry)
                                <tr>
                                    <td>{{ $entry->tanggal }}</td>
                                    <td>{{ $entry->jenis_konseling }}</td>
                                    <td>{{ $entry->permasalahan }}</td>
                                    <td>{{ $entry->penyelesaian }}</td>
                                </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
@endforeach
