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

@extends('crudbooster::admin_template')
@section('content')
  <!-- Your html goes here -->

    <?php //var_dump($history); ?>

        <div class='panel panel-default'>
            <div class='panel-heading'>{{ $jenis_surat->nama_surat . ' ' }}<strong> {{ $relasi->nama_pelatihan }} </strong></div>
        
                <div class='panel-body'>
                    <div >
        			  <label>Dari</label>
        			  <p>{{ $surat->nama_lgkp }}</p>
        			</div>
        			<div >
        			  <label>NIK</label>
        			  <p>{{ $surat->nik  }}</p>
        			</div>
        			<div >
        			  <label>Pada</label>
        			  <p>{{ $relasi->tanggal_mulai  }}</p>
        			</div>
                    <div class='form-group'>
        			  <label>IUMK/SIUP</label>
        			  <p>{{$pemilik->no_iumk}}</p>
        			</div>
        			<div class='form-group'>
        			  <label>NPWP</label>
        			  <p>{{$pemilik->no_npwp}}</p>
        			</div>
        			@if(sizeof($usahaku)>0)
        	        <div class='form-group'>
        			    <label>Usaha yang dimohonkan</label>
                        <table class='table table-striped table-bordered'>
                          <thead>
                              <tr>
                                <th>Nama Usaha</th>
                                <th>Bidang</th>
                                <th>Alamat</th>
                               </tr>
                          </thead>
                          <tbody>
                            @foreach($usahaku as $ush)
                              <tr>
                                <td>{{$ush->nama_usaha}}</td>
                                <td>{{$ush->bidang_usaha}}</td>
                                <td>{{$ush->alamat_usaha}}</td>
                               </tr>
                            @endforeach
                          </tbody>
                        </table>
                    </div>
                    @endif
        @include('warga.history')
    			
    		<form method='post' action='{{CRUDBooster::mainpath("verifikasi-surat")}}'>
		        <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
		        <input type="hidden" name="id" value="{{ $id }}"/>
		        <input type="hidden" name="rel_table" value="{{ $rel_table }}"/>
		        <input type="hidden" name="rel_id" value="{{ $rel_id }}"/>
		        <input type="hidden" name="jenis_surat_id" value="{{ $jenis_surat->id }}"/>
    			<div class='form-group'>
						<input type="submit" class='btn btn-primary' value="TERIMA" style="margin-left:15px"/>
						<input type="button" class='btn btn-info' value="KEMBALI" onclick="window.location.href='{{ CRUDBooster::adminPath('surat_masuk') }}'" style="margin-left:15px"/>
				</div>
			</form>
    			
    			</div>
            <div class='panel-footer'>
              
            </div>
      </div>

		

@endsection