@extends($admin)

@section('title')
 {{ $title }}
@endsection

@push('css')
    <link rel="stylesheet" type="text/css" href="{{ asset('assets/css/datatables.css') }}">
@endpush

@section('content')
    @component('components.breadcrumb')
        @slot('breadcrumb_title')
        <h3>Halaman Detail</h3>
        @endslot
        <li class="breadcrumb-item">Detail</li>
        <li class="breadcrumb-item active">Data</li>
    @endcomponent

    <div class="container-fluid pt-4">
                        
        <div class="row justify-content-center">
            <div class="col-lg-10 col-sm-12">
                <div class="card border-top border-0 border-4 border-info">
                    <div class="card-header p-3">
                        <div class="row">
                            <div class="col-lg-6">
                                <h5 class="card-title">{{ $page }}</h5>
                            </div>
                            <div class="col-lg-6">
                                <a href="{{ url($url) }}" class="btn btn-sm btn-primary float-end">kembali</a>
                            </div>
                        </div>
                    </div>
                    <div class="card-body">
                        <table id="datatable" class="table text-center">
                            <tbody>
                                <tr>
                                    <td class="text-sm-end"><b>Nama Siswa</b></td>
                                    <td>:</td>
                                    <td class="text-sm-start"><b>{{ $daftar_pt->siswa->nama }}</b></td>
                                </tr>
                                <tr>
                                    <td class="text-sm-end"><b>Kelas</b></td>
                                    <td>:</td>
                                    <td class="text-sm-start"><b>{{ $daftar_pt->kelaskode->kelas->nama.' '.$daftar_pt->kelaskode->kelas->jurusan->nama.' '.$daftar_pt->kelaskode->nama }}</b></td>
                                </tr>
                                <tr>
                                    <td class="text-sm-end"><b>NISN</b></td>
                                    <td>:</td>
                                    <td class="text-sm-start"><b>{{ $daftar_pt->siswa->nisn }}</b></td>
                                </tr>
                                <tr>
                                    <td class="text-sm-end"><b>No Surat</b></td>
                                    <td>:</td>
                                    <td class="text-sm-start"><b>{{ $daftar_pt->nomor }}</b></td>
                                </tr>
                                <tr>
                                    <td class="text-sm-end"><b>Tempat Surat</b></td>
                                    <td>:</td>
                                    <td class="text-sm-start"><b>{{ $daftar_pt->surat_tempat }}</b></td>
                                </tr>
                                <tr>
                                    <td class="text-sm-end"><b>Tanggal Surat</b></td>
                                    <td>:</td>
                                    <td class="text-sm-start"><b>{{ $daftar_pt->surat_waktu }}</b></td>
                                </tr>
                                <tr>
                                    <td class="text-sm-end"><b>Keterangan</b></td>
                                    <td>:</td>
                                    <td class="text-sm-start"><b>{{ $daftar_pt->isian_keterangan }}</b></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="card-footer">
                        <div >
                            <form action="{{ url($url) }}/delete/{{ $daftar_pt->kode_unik }}" method="POST"> @csrf @method('delete')
                                <input type="submit" value="delete" class="btn btn-sm btn-primary float-end" onclick="return confirm('Apakah anda yakin mau hapus ?')">
                            </form>
                            <a href="{{ url("$url/" . $daftar_pt->kode_unik, []) }}/download" class="btn btn-sm btn-primary float-end">unduh</a>
                            <a href="{{ url("$url/" . $daftar_pt->kode_unik, []) }}/edit" class="btn btn-sm btn-primary float-end">edit</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    @push('scripts')
    @endpush

@endsection