<!-- First, extends to the CRUDBooster Layout -->
<?php
setlocale(LC_ALL, 'IND');
?>

@extends('crudbooster::admin_template')
@section('content')
  <!-- Your html goes here -->
  <div class='panel panel-default'>
    <div class='panel-heading'>{{ $row->nama_surat }}</div>

    <div class='panel-body'> 
    <?php //dd($my_notasi); ?>
            
			
			
			<div class='form-group'>
			  <label>Nama</label>
			  <p>{{$row->nama_lgkp}}</p>
			</div>
			 <div class='form-group'>
			  <label>NIK</label>
			  <p>{{$row->nik}}</p>
			</div>
			<div class='form-group'>
			  <label>Tempat/Tanggal Lahir</label>
			  <p>{{$row->tmpt_lhr}} /  {{ strftime( "%d %B %Y", strtotime($row->tgl_lhr)) }}</p>
			</div>
			<div class='form-group'>
			  <label>Alamat</label>
			  <p>{{$row->alamat}} , RT : {{$row->rt}} , RW :  {{$row->rw}} , KELURAHAN {{$row->kelurahan}} , KECAMATAN {{$row->kecamatan}}</p>
			</div>
			<div class='form-group'>
			  <label>Jenis Kelamin</label>
			   @if($row->jk == 'L')
				<p>Laki-laki</p>
			   @elseif($row->jk == 'P')
				<p>Perempuan</p>
			   @endif
			</div>
			<!-- <div class='form-group'>
			  <label>Warga Negara</label>
			  <p>{{$row->wn}}</p>
			</div> -->
			<div class='form-group'>
			  <label>Agama</label>
			  <p>{{$row->agama}}</p>
			</div>
			<div class='form-group'>
			  <label>Status Perkawinan</label>
			  <p>{{$row->status_kawin}}</p>
			</div>
			<!-- <div class='form-group'>
			  <label>Golongan Darah</label>
			  <p>{{$row->gol_darah}}</p>
			</div> -->
			<div class='form-group'>
			  <label>Pekerjaan</label>
			  <p>{{$row->pekerjaan}}</p>
			</div>
			<div class='form-group'>
			  <label>Nomor Telepon</label>
			  <p>{{$row->no_telp}}</p>
			</div>
			
			
			<form action="{{ CRUDBooster::mainpath('cetak-surat/'.$row->id) }}">

				<!-- @foreach($unggahan as $idx =>  $unggah)
				<div class='form-group'>
					<label>Nomor {{ $unggah->deskripsi }}</label>
				    <p>{{$unggah->file}}</p>
					@if($row == 2)
						<div>
							<label class="radio-inline"><input type="radio" name="verifikasi-{{ $unggah->id }}" value="1" >Sesuai</label>
							<label class="radio-inline"><input type="radio" name="verifikasi-{{ $unggah->id }}" value="2" checked>Tidak Sesuai</label>
						</div>
					@elseif($row == 1)
						<div>
							<label class="radio-inline"><input type="radio" name="verifikasi-{{ $unggah->id }}" value="1" checked>Sesuai</label>
							<label class="radio-inline"><input type="radio" name="verifikasi-{{ $unggah->id }}" value="2" >Tidak Sesuai</label>
						</div>
					@else
						<div>
							<label class="radio-inline"><input type="radio" name="verifikasi-{{ $unggah->id }}" value="1" >Sesuai</label>
							<label class="radio-inline"><input type="radio" name="verifikasi-{{ $unggah->id }}" value="2" >Tidak Sesuai</label>
						</div>
					@endif
			
				</div>
				@endforeach -->
			<!-- <form action="{{ CRUDBooster::mainpath('cek/'.$row->id) }}"> -->
				<div class='form-group'>
				  <label>Keperluan</label>
				  <p>{{$row->keperluan}}</p>
				</div>
			
				<div class='form-group'>
					<label>Nomor Surat Keterangan RT</label>
				    <p>{{$row->no_sk_rt}}</p>
					<label>Tanggal Surat Keterangan RT</label>
				    <p>{{strftime( "%d %B %Y", strtotime($row->tgl_sk_rt))}}</p>
					@if($tgl_pernyataan)
					<label>Tanggal Surat Pernyataan YBS</label>
				    <p>{{strftime( "%d %B %Y", strtotime($row->tgl_pernyataan))}}</p>
					@endif
					
					@if($penghasilan)
					<label>Penghasilan rata-rata perbulan</label>
				    <p>{{strftime( "%d %B %Y", strtotime($row->tgl_pernyataan))}}</p>
					@endif
			
				</div>
				<div class='form-group'>
					<label >Beri Nomor</label>
					<div class="row">					
						<div class="col-sm-1">
							<p>{{$layanan->kode_depan}}/</p>
						</div>
						<div class="col-sm-1">
							<input class="form-control" type="text" name="nomor_surat" value={{$layanan->no_terakhir+1}}>
						</div>
						<div class="col-sm-1">
							<p>/{{$layanan->kode_belakang}}</p>
						</div>
					</div>
				</div>
				
				@if($row->status_id == 5 and $row->status_by_priv == CRUDBooster::myPrivilegeId())
						<div>
							<label class="radio-inline"><input type="radio" name="verifikasi" value="1" checked>Sesuai</label>
							<label class="radio-inline"><input type="radio" name="verifikasi" value="2" >Tidak Sesuai</label>
						</div>
					@else
						<div>
							<label class="radio-inline"><input type="radio" name="verifikasi" value="1" >Sesuai</label>
							<label class="radio-inline"><input type="radio" name="verifikasi" value="2" checked>Tidak Sesuai</label>
						</div>
				@endif
				
				<br>
				
				<input  type="text" title="Count" class="form-control notfocus" name="add-cnt" id="add-cnt" value="{{ $idx }}" style="display:none">
				<div class='form-group'>
					<label>Masa Berlaku sampai
							<span class="text-danger" title="This field is required">*</span>
					</label>

					<div class="input-group">
						<span class="input-group-addon open-datetimepicker"><a><i class="fa fa-calendar "></i></a></span>
						<input  type="text" data-provide="datepicker" title="Masa Berlaku" required="true" class="form-control notfocus input_date" name="expired_at" id="expired_at" value="{{ $row->expired_at }}">
					</div>
				
					</div>
				</div>
				
				<div class='form-group'>
						<input type="submit" class='btn btn-primary' value="CETAK SURAT" style="margin-left:15px"/>
						<input type="button" class='btn btn-primary' value="KEMBALI" onclick="window.location.href='{{ $kembali }}'" style="margin-left:15px"/>
				</div>
			</form>
			
			
			
      <!-- <form method='post' action='{{CRUDBooster::mainpath('edit-save/'.$row->id)}}'>
		<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
		
				 <div>
					@if($verifikasi_surat)
						<label class="radio-inline"><input type="radio" name="verifikasi" value="verifikasi" checked>Verifikasi</label>
						<label class="radio-inline"><input type="radio" name="verifikasi" value="tolak">Tolak</label>
					@else
						<label class="radio-inline"><input type="radio" name="verifikasi" value="verifikasi" >Verifikasi</label>
						<label class="radio-inline"><input type="radio" name="verifikasi" value="tolak" checked>Tolak</label>
					@endif
				</div>
 <br>
	   <input type='submit' class='btn btn-primary' value='Simpan'/> -->
       
		<!-- <div class='form-group'>
			<label>Upload scan/foto surat pengantar</label>
			<input type="file" id="file_pengantar_rt" title="File Pengantar RT" class="form-control" name="file_pengantar_rt">
		</div> -->
		
 
	
         
        <!-- etc .... -->
        
      </form>
    </div>
    <div class='panel-footer'>
      <p id='url_server'>{{CRUDBooster::getSetting('domain')}}</p>
    </div>
  </div>
@endsection