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



  <!-- Your html goes here -->

    <?php 
        use Carbon\Carbon;
         setlocale(LC_TIME, 'id');
        //  dd($surat); 
        
        ?>

@extends('crudbooster::admin_template')
@section('content')

    @if($surat->status_req==5 && $surat->status_id < 5 || $surat->status_id==7)
    <?php
        $next_url = ($next_url) ?: g('next_url');
        // dd("https://docs.google.com/viewer?url=".$surat->gen_pdf);
      ?>
    <div>
        <form method='post' action='{{CRUDBooster::mainpath("tte")}}'>
            <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
            <input type="hidden" name="id" value="{{ $id }}"/>
            <input type="hidden" name="idv_id" value="{{ $idv_id }}"/>
            <!-- <div class="form-group">
    		  <label>Passphrase</label>
    		  <input autocomplete="off" type="password" name="pass" required/>
    		</div> -->
            
            <div class='form-group'>
                    <input type="button" class='btn btn-default' value="< KEMBALI" onclick="window.location.href='{{ CRUDBooster::adminPath($batal) }}'" style="margin-left:15px"/>
    				@if($surat->status_id == 5)
                        <a class='btn btn-danger'  href="https://docs.google.com/viewer?url=https://silakhi.banjarbarukota.go.id/{{ $surat->signed_pdf }}" style="margin-left:15px">PRATINJAU (Mobile)</a>
                    @else    
                        <a class='btn btn-danger'  href="https://docs.google.com/viewer?url=https://silakhi.banjarbarukota.go.id/{{ $surat->gen_pdf }}" style="margin-left:15px">PRATINJAU (Mobile)</a>
                    @endif
    				<!-- <input type="submit" class='btn btn-primary' value="TANDATANGANI" style="margin-left:15px"/> -->
    				<input type="button" class='btn btn-warning' value="DISKUSI" onclick="window.location.href='{{ CRUDBooster::adminPath('surat_idv/diskusi/'.$id) }}'" style="margin-left:15px"/>
    				<input type="button" class='btn btn-info' value="TANDATANGANI >" onclick="window.location.href='{{ g('next_url') }}'" style="margin-left:15px"/>
    		</div>
            
    	</form>
	</div>
	@else
	<div>
	    <input type="button" class='btn btn-default' value="< KEMBALI" onclick="window.location.href='{{ CRUDBooster::adminPath($batal) }}'" style="margin-left:15px"/>
	    @if($surat->status_id == 5)
            <a class='btn btn-danger'  href="https://docs.google.com/viewer?url=https://silakhi.banjarbarukota.go.id/{{ $surat->signed_pdf }}" style="margin-left:15px">PRATINJAU (Mobile)</a>
        @else    
            <a class='btn btn-danger'  href="https://docs.google.com/viewer?url=https://silakhi.banjarbarukota.go.id/{{ $surat->gen_pdf }}" style="margin-left:15px">PRATINJAU (Mobile)</a>
        @endif
	    
	</div>    
	@endif
	@if($surat->status_id == 5)
    <embed type="application/pdf" src="https://silakhi.banjarbarukota.go.id/{{ $surat->signed_pdf }}" width="100%" height="600"></embed>
    @else    
    <embed type="application/pdf" src="{{ $surat->gen_pdf }}" width="100%" height="600"></embed>
    @endif
@endsection
		

