@extends('layouts.master')
@section('content')
<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-header">
                <h4 class="card-title">Daftar Reviewer</h4>
            </div>
            <div class="card-body">
                <div class="card-text">
                    <div class="row">
                        <div class="col-md-8">
                            {{-- @livewire('admin.masters.registrasi.add-registrasi-component') --}}
                        </div>
                        <div class="col-md-4 text-right">
                            {{-- <div class="row">
                                <label class="col-sm-3 col-form-label"></label>
                                <label class="col-sm-3 col-form-label">Cari : </label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control align-right" placeholder="Search" wire:model="keyword">
                                </div>
                            </div> --}}
                        </div>
                    </div>
                </div>
            </div>

            <div class="table-responsive mb-4">
                <table id="zero-config" class="table table-hover" style="width:100%">
                    <thead>
                        <tr>
                            <th>Id. Pengajuan</th>
                            <th style="text-align: left">File SK</th> 
                            <th style="text-align: left">Nama/NIP</th>
                            <th style="text-align: left">Judul</th>
                            <th style="text-align: left">Tahun</th>
                            <th style="text-align: left">Klasifikasi</th>
                            <th style="text-align: left">File EC</th>
                            <th style="text-align: left">Kategori</th> 
                        </tr>
                    </thead>
                    <tbody>
                        @foreach($penelaah as $item)
                        @php
                            $pengajuan = DB::table('tr_pengajuan')->where('id',$item->id_pengajuan)->first();
                        @endphp
                            <tr>
                                <td>{{ $pengajuan->id_pengajuan }}</td>
                                <td style="text-align: left">SURAT</td>
                                <td style="text-align: left">{{ $item->nama }}<br>
                                    <strong>{{ $item->nip }}</strong></td>
                                <td style="text-align: left">{{ $pengajuan->judul }}</td>
                                <td style="text-align: left">{{ $pengajuan->tahun }}</td>
                                <td style="text-align: left">{{ $pengajuan->klasifikasi }}</td>
                                <td style="text-align: left">
                                @if(!empty($pengajuan->file_ec)) 
                                    <strong><a href="https://sipeka.unesa.ac.id/sipeka/file/{!!$pengajuan->file_ec!!}" target="_blank">File EC</a></strong>
                                @endif
                                </td>
                                @php
                                    $kategori = DB::table('ms_kategori')->where('id',$pengajuan->id_kategori)->first();
                                @endphp
                                <td style="text-align: left">{{ $kategori->nama_kategori }}</td>
                            </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
@push('js')
@endpush
@stop
