@extends('usuarios.funcionarios.digitalizacao.dashboard.master')
@section('conteudo')

<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<link href="{{asset('js/digitalizacao_plugins/css/plugins/dataTables/datatables.min.css')}}" rel="stylesheet">

<link href="{{asset('js/digitalizacao_plugins/css/bootstrap.min.css')}}" rel="stylesheet">
<link href="{{asset('js/digitalizacao_plugins/font-awesome/css/font-awesome.css')}}" rel="stylesheet">

<link href="{{asset('js/digitalizacao_plugins/css/plugins/jsTree/style.min.css')}}" rel="stylesheet">

<style>
.panel-body {
    max-width: 100%;
    width: 1000px;
}
.quadrado{
        max-width: 100%;
            width: 300px;
            border: 2px solid red;
            height: 200px;
            margin-left: 101px;
}
</style>


<script src="{{asset('js/jquery.dataTables.min.js') }}"></script>
<link href="{{url('css/alertaTemporario.css')}}" rel="stylesheet" />
<link href="{{asset('js/digitalizacao_plugins/css/bootstrap.min.css')}}" rel="stylesheet">
<link href="{{asset('js/jquery.css/plugins/dataTables/datatables.min.css')}}" rel="stylesheet">

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <br>
        <ol class="breadcrumb">
            <li class="breadcrumb-item">
                <a href="{{ route('us.digit.confdigi.index') }}">home</a>
            </li>
            <li class="breadcrumb-item">
                <a>Pesquisa Cascata2</a>
            </li>
            <li class="breadcrumb-item active">
                <strong>geral</strong>
            </li>
        </ol>
    </div> 


    <div class="row">
        <div class="col-lg-12">
            

                    <div role="tabpanel" id="tab-5" class="tab-pane">
                        <div class="panel-body">

                            <div class="row">
                                
                                 @php $clientes=\App\Models\Cliente::all(); @endphp
            
                                        <div class="col-sm-6">
                                            <div class="form-group">
                                                <label class="col-form-label" for="status">Cliente</label>
                                                <select data-placeholder="Choose a Country..." class="select2_group form-control" id="clie" tabindex="2">
                                    
                                                    @forelse ($clientes as $dado)
                                                    @php $clientes_dados=\App\Models\Cliente::find($dado->id)->getUser->getPessoa; @endphp
                                                    <option value="{{$dado->id}}">{{$clientes_dados->nome}}</option>
                                                    @empty
                                                    <option value="0">Vazio</option>
                                                    @endforelse
                                                </select>
                                            </div>
                                        </div>
                              
                               
                                        <div class="col-sm-6">
                                            <div class="form-group">
                                                <h4 class="col-form-label"></h4><br>
                                                <div class="input-group meubtn">
                                                    <button type="submit" class="btn btn-danger meubtn"><i class="fa fa-search"></i> Pesquisar</button>
                                                </div>
                                            </div>
                                        </div>
                            </div>

                                <div class="row">
                                    <div class="col-lg-6">
                                        <div class="ibox ">
                                            <div class="ibox-content">
                            
                                                <div id="jstree1">
                                                    <ul>
                                                        <li class="jstree-open">Banco Millennium
                                                            <ul>
                                                                <li>SÉRIE DOCUMENTAL
                                                                    <ul>
                                                                        <li data-jstree='"type":"css"}'>Abertura de Conta
                                                                            <ul>
                                                                                <li data-jstree='"type":"html"}'>Geral</li>
                                                                                <li data-jstree='"type":"html"}'>Agencia
                                                                                    <ul>
                                                                                        <li data-jstree='"type":"html"}'>Particulares</li>
                                                                                        <li data-jstree='"type":"html"}'>Empresas</li>
                                                                                    </ul>
                                                                                </li>
                                                                            </ul>
                                                                        </li>
                                                                        <li data-jstree='"type":"css"}'>Diário
                                                                            <ul>
                                                                                <li data-jstree='"type":"html"}'>Geral</li>
                                                                                <li data-jstree='"type":"html"}'>Agencia
                                                                                    <ul>
                                                                                        <li data-jstree='"type":"html"}'>Particulares</li>
                                                                                        <li data-jstree='"type":"html"}'>Empresas</li>
                                                                                    </ul>
                                                                                </li>
                                                                            </ul>
                                                                        </li>


                                                                    </ul>
                                                                </li>
                                                            </li>
                                                        </ul>
                                                                
                                                </div>
                            
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6">
                                        <div class="ibox ">
                                            <div class="ibox-title">
                                                <h5 class="text-center">Previsualizar</h5>
                                            </div>
                                                <div class="quadrado"></div>
                            
                                        </div>
                                    </div>
                                </div>
                            


                            <div class=" meuformpreparacao">
                                <div class="table-responsive">
                                                                    <nav class="col-lg-12 table-responsive">
                                                                        <br> <br>
                                                                        <table class="table table-striped table-bordered table-hover dataTables-example" >
                                                                            <thead>
                                                                            <tr>
                                                                                <th>#</th>
                                                                                <th>Cliente</th>
                                                                                <th>Número da Etiqueta</th>
                                                                                <th>Tipo Documento</th>
                                                                                <th>Número da Caixa</th>
                                                                                <th>Data carregada</th>
                                                                                <th>Abrir</th>
                                                                            </tr>
                                                                            </thead>
                                                                            <tbody>
                
                
                                                                                @php
                                                                                $i=1; @endphp
                                                                                
                                                                                <tr> 
                                                                                    <td></td>
                                                                                    
                                                                                    <td></td>
                                                                                    <td></td>
                                                                                    <td></td>
                                                                                    <td></td>
                                                                                    <td></td>
                                                                                <td>
                                                        
                                                        
                                                                                    @php 
                                                                                    //use Illuminate\Support\Facades\Crypt;
                                                                                    
                                                                                    try {
                                                                                        
                                                                                    $decrypted =Crypt::encryptString(2);
                                                                                    
                                                                                    } catch (DecryptException $e) {
                                                                                        $decrypted=0;
                                                                                    }
                                                                                @endphp
                                                        
                                                                                    <form action="{{ route('us.digit.confdigi.pesquisa.cliente.classe.pesq') }}" method="post">
                                                                                        @csrf
                                                                                    
                                                                                        <input value="{{$decrypted}}" name="solicitacao_id" hidden/>
                                                                                        <button type="submit" class="btn btn-sm btn-outline-primary btnSelecionarReserva"> <i class="fa fa-eye "></i> ver</button>
                                                                                        
                                                                                    </form>
                                                                                </td>
                                                                                
                                                        
                                                                                </tr>
                                                        
                
                                                                            </tbody>
                                                                            <tfoot>
                                                                            <tr>
                                                                                <th>#</th>
                                                                                <th>Cliente</th>
                                                                                <th>Número da Etiqueta</th>
                                                                                <th>Tipo Documento</th>
                                                                                <th>Número da Caixa</th>
                                                                                <th>Data carregada</th>
                                                                                <th>Abrir</th>
                                                                            </tr>
                                                                            </tfoot>
                                                                    </table>
                                                                    </nav>
                                                        </div>
                            </div>
                
                
                            
                        </div>
                    </div>  

        </div>


    </div>
</div>

<br><br>



 <!-- Mainly scripts -->
 <script src="{{asset('js/digitalizacao_plugins/js/jquery-3.1.1.min.js')}}"></script>


 <script src="{{asset('js/digitalizacao_plugins/js/plugins/dataTables/datatables.min.js')}}"></script>
 <script src="{{asset('js/digitalizacao_plugins/js/plugins/dataTables/dataTables.bootstrap4.min.js')}}"></script>
 
 <!-- Custom and plugin javascript -->
 <script src="{{asset('js/digitalizacao_plugins/js/inspinia.js')}}"></script>
 <script src="{{asset('js/digitalizacao_plugins/js/plugins/pace/pace.min.js')}}"></script>
 
 <script src="{{asset('js/digitalizacao_plugins/js/bootstrap.js')}}"></script>
 <!-- Page-Level Scripts -->


 <script src="{{asset('js/digitalizacao_plugins/js/plugins/jsTree/jstree.min.js')}}"></script>

<style>
    .jstree-open > .jstree-anchor > .fa-folder:before {
        content: "\f07c";
    }

    .jstree-default .jstree-icon.none {
        width: 0;
    }
</style>

<script>
    $(document).ready(function(){

        $('#jstree1').jstree({
            'core' : {
                'check_callback' : true
            },
            'plugins' : [ 'types', 'dnd' ],
            'types' : {
                'default' : {
                    'icon' : 'fa fa-folder'
                },
                'html' : {
                    'icon' : 'fa fa-file-code-o'
                },
                'svg' : {
                    'icon' : 'fa fa-file-picture-o'
                },
                'css' : {
                    'icon' : 'fa fa-file-code-o'
                },
                'img' : {
                    'icon' : 'fa fa-file-image-o'
                },
                'js' : {
                    'icon' : 'fa fa-file-text-o'
                }

            }
        });

        // $('#using_json').jstree({
        //     'core' : {
        //     'data' : [
        //         'Empty Folder',
        //         {
        //             'text': 'Resources',
        //             'state': {
        //                 'opened': true
        //             },
        //             'children': [
        //                 {
        //                     'text': 'css',
        //                     'children': [
        //                         {
        //                             'text': 'animate.css', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'bootstrap.css', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'main.css', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'style.css', 'icon': 'none'
        //                         }
        //                     ],
        //                     'state': {
        //                         'opened': true
        //                     }
        //                 },
        //                 {
        //                     'text': 'js',
        //                     'children': [
        //                         {
        //                             'text': 'bootstrap.js', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'inspinia.min.js', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'jquery.min.js', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'jsTree.min.js', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'custom.min.js', 'icon': 'none'
        //                         }
        //                     ],
        //                     'state': {
        //                         'opened': true
        //                     }
        //                 },
        //                 {
        //                     'text': 'html',
        //                     'children': [
        //                         {
        //                             'text': 'layout.html', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'navigation.html', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'navbar.html', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'footer.html', 'icon': 'none'
        //                         },
        //                         {
        //                             'text': 'sidebar.html', 'icon': 'none'
        //                         }
        //                     ],
        //                     'state': {
        //                         'opened': true
        //                     }
        //                 }
        //             ]
        //         },
        //         'Fonts',
        //         'Images',
        //         'Scripts',
        //         'Templates',
        //     ]
        // } });

    });
</script>

 <script>
     $(document).ready(function(){
         $('.dataTables-example').DataTable({
             pageLength: 25,
             responsive: true,
             dom: '<"html5buttons"B>lTfgitp',
             buttons: [
                 { extend: 'copy'},
                 {extend: 'csv'},
                 {extend: 'excel', title: 'ExampleFile'},
                 {extend: 'pdf', title: 'ExampleFile'},
 
                 {extend: 'print',
                  customize: function (win){
                         $(win.document.body).addClass('white-bg');
                         $(win.document.body).css('font-size', '10px');
 
                         $(win.document.body).find('table')
                                 .addClass('compact')
                                 .css('font-size', 'inherit');
                 }
                 }
             ]
 
         });
 
     });
 
 </script>
 
 

@endsection