@extends('layouts.front.masterapp')

@section('content')
<div class="content-wrapper container"> 
    <div class="page-heading">
    <div class="page-title">
            <div class="row">
                <div class="col-12 col-md-6 order-md-1 order-last">
                    <h3>Dokumen Pelengkap</h3>
                   
                </div>
                <div class="col-12 col-md-6 order-md-2 order-first">
                    <nav aria-label="breadcrumb" class="breadcrumb-header float-start float-lg-end">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="{{ route('lowongan.index') }}">Formasi</a></li>
                            <li class="breadcrumb-item"><a href="{{ route('biodata.index') }}">Data Diri</a></li>
                            <li class="breadcrumb-item"><a href="{{ route('pendidikan.index') }}">Pendidikan</a></li>
                            <li class="breadcrumb-item active" aria-current="page">Dokumen Pelengkap</li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>

        <!-- // Basic multiple Column Form section start -->
    <section id="multiple-column-form">
        <div class="row match-height">
            <div class="col-12">
                <div class="card">
                   
                    <div class="card-content">
                        <div class="card-body">
                        <span class="text-danger">Semua file .pdf dan ukuran Maks. 500 kb</span><br><br>
                        
                        @if (empty($Pendaftaran->sms_id))
                                <div class="alert alert-danger">
                                    Silahkan mengisi RIWAYAT PENDIDIKAN terlebih dahulu.
                                </div>
                        @endif
                        @if(Session::has('sukses'))
                          <div class="alert alert-success">{{ Session::get('sukses') }}</div>
                         @endif
                       
                       
                        <form action="{{route('dokumenpelengkap.update',Auth::user()->id )}}"  method="POST" enctype="multipart/form-data" class="form">
                       
                        @csrf @method('PATCH')
                      
                         <div class="row">
                        
                            <div class="col-md-6 col-12">
                                <div class="form-group">
                                    <label for="email-id-column">Surat Lamaran * <a href="https://statik.unesa.ac.id/profileunesa_konten_statik/uploads/rekrutmen/template_dokumen/Template_Lamaran.pdf" target="_blank"><span class="badge bg-primary">Contoh File Surat Lamaran</span></a></label>
                                    <br>
                                    
                                    <input type="file" class="form-control"
                                        name="surat_lamaran"  accept="application/pdf" 
                                        @if (empty($DokumenTambahan->surat_lamaran)) required @endif>
                                </div> 
                                @if (!empty($DokumenTambahan->surat_lamaran))
                                    <a href="https://statik.unesa.ac.id/profileunesa_konten_statik/uploads/rekrutmen/surat_lamaran/{!!$DokumenTambahan->surat_lamaran!!}" target="_blank"><span class="badge bg-info">Surat Lamaran</span></a>        
                                 @endif
                            
                            </div>

                            <!-- <div class="col-md-6 col-12">
                                <div class="form-group">
                                    <label for="email-id-column">SKCK (ASLI) *</label>
                                    <input type="file" class="form-control"
                                        name="skck"  accept="application/pdf"
                                        @if (empty($DokumenTambahan->skck)) required @endif>
                                </div>
                                @if (!empty($DokumenTambahan->skck))
                                    <a href="https://statik.unesa.ac.id/profileunesa_konten_statik/uploads/rekrutmen/skck/{!!$DokumenTambahan->skck!!}" target="_blank"><span class="badge bg-info">SKCK</span></a>        
                                @endif
                               
                            </div> -->

                            <div class="col-md-6 col-12">
                                <div class="form-group">
                                <label for="email-id-column">Surat Pernyataan * <a href="https://statik.unesa.ac.id/profileunesa_konten_statik/uploads/rekrutmen/template_dokumen/Template_Surat_Pernyataan.pdf" target="_blank"><span class="badge bg-primary">Contoh File Surat Pernyataan</span></a></label>
                                    <input type="file" class="form-control"
                                        name="surat_bebas_kontrak"  accept="application/pdf"
                                        @if (empty($DokumenTambahan->surat_bebas_kontrak)) required @endif>
                                </div>
                                @if (!empty($DokumenTambahan->surat_bebas_kontrak))
                                    <a href="https://statik.unesa.ac.id/profileunesa_konten_statik/uploads/rekrutmen/surat_bebas_kontrak/{!!$DokumenTambahan->surat_bebas_kontrak!!}" target="_blank"><span class="badge bg-info">Surat Bebas Kontrak</span></a>        
                                @endif
                               
                            </div>

                            <div class="col-md-6 col-12">
                                <div class="form-group">
                                <label for="email-id-column">Riwayat Hidup * </label>
                                    <input type="file" class="form-control"
                                        name="riwayat_hidup"  accept="application/pdf"
                                        @if (empty($DokumenTambahan->riwayat_hidup)) required @endif>
                                </div>
                                @if (!empty($DokumenTambahan->riwayat_hidup))
                                    <a href="https://statik.unesa.ac.id/profileunesa_konten_statik/uploads/rekrutmen/riwayat_hidup/{!!$DokumenTambahan->riwayat_hidup!!}" target="_blank"><span class="badge bg-info">Riwayat Hidup</span></a>        
                                @endif
                               
                            </div>

                            <!-- <div class="col-md-6 col-12">
                                <div class="form-group">
                                    <label for="email-id-column">Surat Kesediaan Melanjutkan Pendidikan Doktor</label>
                                    <input type="file" class="form-control"
                                        name="surat_kesediaan_melanjutkan_pendidikan_doktor"  accept="application/pdf">
                                </div>
                                @if (!empty($DokumenTambahan->surat_kesediaan_melanjutkan_pendidikan_doktor))
                                    <a href="https://statik.unesa.ac.id/profileunesa_konten_statik/uploads/rekrutmen/surat_kesediaan_melanjutkan_pendidikan_doktor/{!!$DokumenTambahan->surat_kesediaan_melanjutkan_pendidikan_doktor!!}" target="_blank"><span class="badge bg-info">Surat Kesediaan Melanjutkan Pendidikan Doktor</span></a>        
                                @endif
                               
                            </div> -->
<!-- 
                            <div class="col-md-6 col-12">
                                <div class="form-group">
                                    <label for="email-id-column">Publikasi</label>
                                    <input type="file" class="form-control"
                                        name="publikasi"  accept="application/pdf">
                                </div>
                                @if (!empty($DokumenTambahan->publikasi))
                                    <a href="https://statik.unesa.ac.id/profileunesa_konten_statik/uploads/rekrutmen/publikasi/{!!$DokumenTambahan->publikasi!!}" target="_blank"><span class="badge bg-info">Publikasi</span></a>        
                                @endif
                               
                            </div> -->

                          
                                    <div class="col-12 d-flex justify-content-end">
                                      @if(!empty($Pendaftaran->sms_id) && empty($Pendaftaran->konfirmasi_at))
                                            <button type="submit" class="btn btn-primary me-1 mb-1">Submit</button>
                                        @endif
                                        @if (!empty($DokumenTambahan))
                                            <a class="btn btn-success me-1 mb-1" href="{{ route('konfirmasi.index') }}">  
                                            Lanjut  <i class="bi bi bi-arrow-right"></i>
                                            </a>
                                        @endif
                                    </div>
                           
</div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    
   
    </div>
</div>
<script>
       function isNumberKey(evt)
       {
          var charCode = (evt.which) ? evt.which : evt.keyCode;
          if (charCode != 46 && charCode > 31 
            && (charCode < 48 || charCode > 57))
             return false;

          return true;
       }
</script>
@endsection
