@extends('layouts.app')

@section('content')
<div class="container-fluid">
    <div class="row">
    

            <div class="panel panel-default">
                <div class="panel-heading" style="padding-bottom: 40px;">PREVIEW

                <div class="col-xs-3 pull-right">  
                  <a href="/ssearch"><input type="button" value="Search another Record" class=" btn btn-lg btn-success"></a>
                </div>
                    </div>

                <div class="panel-body" style="padding-top: 20px;padding-bottom: 100px;">

    @foreach($find as $files)
       <div class="alert alert-success text-center">
         <a href="/storage/{{$files->filename}}"><li>CLICK TO DOWNLOAD THE FILE FOR THIS RECORD</li></a>              
      </div>
    @endforeach

              <h3>  Record result for <b>{{$id}}</b>. </h3>

                    <div class="col-xs-12" style="padding-top: 100px;padding-bottom: 100px;">
                            <div class="col-xs-12" style="border-bottom: 1px solid #ccc;">
                                <div class="col-xs-2" style="border-right:1px solid #ccc;">
                                    NAME OF SUSPECT
                                </div>
                                <div class="col-xs-1" style="border-right:1px solid #ccc;">
                                    NUMBERS OF SUSPECT
                                </div>
                                <div class="col-xs-3" style="border-right:1px solid #ccc;">
                                    COMMODITY NAME
                                </div>
                                <div class="col-xs-3" style="border-right:1px solid #ccc;">
                                    QUANTITY
                                </div>
                                <div class="col-xs-1" style="border-right:1px solid #ccc;">
                                    DATE RECORDED BY SYSTEM
                                </div>
                                <div class="col-xs-1" style="border-right:1px solid #ccc;">
                                    DATESET BY ADMIN
                                </div>
                                
                                <div class="col-xs-1" style="border-right:1px solid #ccc;">
                                    A/C
                                </div>
                                
                            </div>
                        
                        @foreach($preview as $a)
                            <div class="col-xs-12" style="border-bottom: 1px solid #ccc;">
                                <div class="col-xs-2">
                                {{$a->suspectname}}
                                </div>
                                <div class="col-xs-1">
                                    {{$a->suspectno}}
                                </div>
                                <div class="col-xs-3">
                                    {{$a->commodityname}}
                                </div>
                                <div class="col-xs-3">
                                    {{$a->quantity}}
                                </div>
                                <div class="col-xs-1">
                                    {{$a->created_at}}
                                </div>
                               
                                <div class="col-xs-1">
                                    {{$a->dateinput}}
                                </div>
                                <div class="col-xs-1">
                                    {{$a->areacommand}}
                                </div>
                                
                            </div>
                        @endforeach

                    </div>
                  
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
