<!DOCTYPE html>
<html lang="pt">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
 
    <link rel="stylesheet" href="{{ asset('https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css') }}">
    
</head>
<body class="nav-md overflow-hiddens  " style="overflow-x: hidden;" >
       
    <style type="text/css">
    .gets {
        margin-left: 90px;
    }
    #spanauto {
        font-size: 11pt;
    }
    table, tr,td, .logomenu, .meudados{
      border:1px solid black;
    }
    th.logo {
    height: 140px;
    }
    th.meudados, th.meutr {
        height: 45px;
        border:1px solid black;
    }
     /**   
    .col-md-12 {
    width: 50%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    
    }
    table .meutr{
      height: 58px;;
    }

    .logomenu
    {
     height:45px;   
    }
    ***/
    </style>

    <div class="container">
        <div class="col-md-12">
            <br><br>
            
                <div class="col-md-12">
                    <div class="x_panel">
                        {{-- <div class="x_title">
                        <h2>Informaçoes Geral do Auto <small></small></h2>
                            <ul class="nav navbar-right panel_toolbox">
                                <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                </li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                                    <ul class="dropdown-menu" role="menu">
                                        <li><a href="#">Settings 1</a>
                                        </li>
                                        <li><a href="#">Settings 2</a>
                                        </li>
                                    </ul>
                                </li>
                                <li><a class="close-link"><i class="fa fa-close"></i></a>
                                </li>
                            </ul> 
                            <div class="clearfix"></div>
                        </div>--}}

                        @if(isset($dados))
                        @if(empty($dados))
                        <h1>Auto Desconhecido, Impossivel Abrir</h1>
                        @else
                        <div class="x_content">



                            <div class="card-body">
                                <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th class="logomenu">  
                                                <h1 class="text-center">
                                                {{-- <i class="fa fa-globe"></i>--}} Auto de {{$dados->tipoauto}} 
                                                            <br> <span id="spanauto" >({{$dados->naturezasolicitacao }})</span>
                                                {{-- <small class="pull-right">Date criação: 16/08/2016</small> --}}
                                                </h1>
                                        </th>
                                        <th class="logomenu"> 
                                            <h3 class="text-center">
                                            <img src="{{asset('img/logo.png')}}" alt="meulogo"  />
                                            {{-- <i class="fa fa-globe"></i>--}}
                                            {{-- <small class="pull-right">Date criação: 16/08/2016</small> --}}
                                            </h3>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                    <td>Nº Auto/Guia: {{$dados->numeroauto}} </td>
                                    
                                    @php $autor=\App\Models\User::find($dados->autor_id)->getPessoa; @endphp
                                    <td>Elaborado Por: {{$autor->nome}} </td>
                                    </tr>
                                    <tr>
                                        <td>Data/Hora  {{$dados->created_at}} </td>
                                        <td>Forma de Expedição:  {{$dados->formaexpedicao}} </td>
                                    
                                    </tr>
                                    <tr>
                                    @php $clienteNome=\App\Models\User::find($dados->user_id)->getFuncionarioCliente->getEmpresa->getUser->getPessoa;@endphp
                                        <td>Cliente: {{$clienteNome->nome}} </td>
                                        @if($dados->naturezasolicitacao==="fisica")
                                        <td>Hora de Saida:  {{$dados->horasaida}} </td>
                                        @else
                                        <td>obs:  {{$dados->careted_at}} </td>
                                        @endif
                                    </tr>
                                    <tr>
                                        <td>Solicitado Por: {{$solictado_por->nome}} </td>
                                        @if($dados->naturezasolicitacao==="fisica")
                                        <td>Hora de Chegada:  {{$dados->horachegada}} </td>
                                        @endif
                                    </tr>
                                    <tr>
                                        <td>Departamento/Agência: {{$dados->agenciasolicitacao}}  </td>
                                        @if($dados->tipoauto==="entrega")
                                            @if($dados->naturezasolicitacao==="fisica")
                                            <td>Local da Descarga: {{$dados->localdescarga}} </td>
                                            @endif
                                        @else
                                        <td>Recepcionado por: {{$dados->entregue_por}} </td>
                                        @endif
                                    </tr>
                                    <tr>
                                        <td>Proveniencia: {{$dados->naturezaauto}} </td>
                                        @if($dados->naturezasolicitacao==="fisica")
                                            @if(empty($dados->entregue_por) || $dados->entregue_por==null)
                                            <td class="meudados">Entregue por:</td>
                                            @else
                                            @php $entregue_por_receiv=\App\Models\User::find($dados->entregue_por)->getPessoa;@endphp 
                                            <td class="meudados"    >Entregue por: {{$entregue_por_receiv->nome}}</td>
                                            @endif
                                        @endif
                                    </tr>
                                    <tr >

                                        @if($dados->tipoauto !="fisica")
                                        <td class="meudados">Destinatário: {{$solictado_por->nome}} </td>
                                        @else
                                        <td class="meudados">Destinatário: {{$dados->agenciasolicitacao}} </td>
                                        <td class="meudados">OBS: </td>
                                        @endif
                                    </tr>
                                </tbody>
                                </table>
                            </div>


                            <section class="content invoice">   
                                <!-- Table row -->
                                <div class="row">
                                    <div class="col-xs-12 table">
                                      
                                            <table class="table table-striped">
                                                  <h2 class="text-center meuhcenter">Detalhes da Solicitação</h2>
                                                  <thead>
                                                    <tr class="meutr">
                                                    </tr>
                                                  </thead>
                                                  <tbody>
                                                    <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                    <tr>
                                                      <th scope="row"  class="meutr"></th>
                                                    </tr>
                                                    <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                  </tbody>
                                                </table>
                                    </div>

                                    <div class="col-xs-12 table">
                                        <h2 class="text-center">Nota</h2>
                                        <table class="table">
                                        
                                            <tbody>
                                            <tr>
                                                <td>{{$dados->nota}}</td>
                                            </tr>
                                            
                                            </tbody>
                                        </table>
                                    </div>
                                    <!-- /.col -->
                                </div>
                                

                                <div class="row">
                                    <div class="text-center">
                                        <br>
                                        <p>Luanda, _____________________________ de _______________________________ 2021</p>
                                    </div>
                                </div>

                            <div class="container">
                                    <div class="row">
                                        <div class="col">
                                            <br>
                                            <p>________________________________________</p>
                                            <span class="text-center gets">GESTDOC</span>
                                        </div>
                                        <div class="col">
                                            <br>
                                            <p>_______________________________________</p>
                                            <span class="text-center gets">CLIENTE</span>
                                        </div>
                                    </div>
                                </div>
                            <!-----
                                <div class="row no-print">
                                    <div class="col-xs-12">
                                        {{-- <button class="btn btn-default" onclick="window.print();"><i class="fa fa-print"></i> </button> --}}
                                        <button class="btn btn-success pull-right"  onclick="window.print();"><i class="fa fa-print"></i> Imprimrir</button>
                                        <button class="btn btn-primary pull-right" style="margin-right: 5px;"><i class="fa fa-download"></i> Generate PDF</button>
                                    </div>
                                </div>
                                    ------>
                            </section>
                            
                            
                            <br><br><br><br>
                               <div class="row">
                                    <div class="col-xs-12 table">
                                      
                                     
                                            <table class="table table-striped">
                                                  
                                                  <thead>
                                                    <tr class="meutr">
                                                    </tr>
                                                  </thead>
                                                  <tbody>
                                                    <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                    <tr>
                                                      <th scope="row"  class="meutr"></th>
                                                    </tr>
                                                    <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                     <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                     </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                     <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr> </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                     <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr> </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                     <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                      <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>  <tr>
                                                      <th scope="row" class="meutr"></th>
                                                    </tr>
                                                    
                                                  </tbody>
                                                </table>
                                    </div>

                        </div>
                        @endif
                        @endif
                    </div>
                </div>
            </div>

    </div>
  </div>

 
    </body>
    </html>