@extends('admin.layouts.app')

@section('breadcrumb')
	<li class="breadcrumb-item"><a href="javascript:void(0);">Inicio</a></li>
    <li class="breadcrumb-item active" aria-current="page"><span>Usuarios</span></li>
@endsection

@section('css')
<link rel="stylesheet" type="text/css" href="{{asset('css/widgets/modules-widgets.css')}}">  
<link rel="stylesheet" type="text/css" href="{{asset('css/custom-tabs.css')}}">  
    <link rel="stylesheet" type="text/css" href="{{asset('css/datatables.css')}}">
    <link rel="stylesheet" type="text/css" href="{{asset('css/dt-global_style.css')}}">
@endsection

@section('content')
    <div class="row layout-spacing layout-top-spacing feather-icon">
    <div id="font-icon_feather" class="col-lg-12">
        <div class="statbox widget box box-shadow">
            <div class="widget-content widget-content-area bx-top-6">
                <div class="icon-section">
                    <div class="row">
                        <div class="col-xl-12">
                            <ul class="nav nav-pills mb-3 mt-3" id="pills-tab" role="tablist">
                                <li class="nav-item">
                                    <a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-home" role="tab" aria-controls="pills-home" aria-selected="true">Hoteles</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" id="pills-contact-tab" data-toggle="pill" href="#pills-contact" role="tab" aria-controls="pills-contact" aria-selected="false">Usuarios</a>
                                </li>
                            </ul>
                            <div class="tab-content" id="pills-tabContent">
                                <div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
                                    <center><h3>Usuarios Hoteles</h3></center>
                                    <div class="row">
                                        <div class="col-xl-12">
                                            <div class="table-responsive mb-4 mt-4">
                                                <table id="zero-config" class="table table-hover" style="width:100%; text-align: center;">
                                                    <thead>
                                                        <tr>
                                                            <th>#</th>
                                                            <th>Nombre</th>
                                                            <th>Correo Electrónico</th> 
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <?php $i=1; ?>
                                                        @foreach($user->where('rol_id',2) as $key)
                                                        <tr>
                                                            <td style="font-size: 20px;">{{$i++}}</td>
                                                            <td style="font-size: 20px;">{{$key->name}}</td>
                                                            <td style="font-size: 20px;">{{$key->email}}</td>
                                                        </tr>
                                                        @endforeach                                                        
                                                    </tbody>
                                                     <tfoot>
                                                        <tr>
                                                            <th>  </th>
                                                            <th>  </th>
                                                            <th>  </th>
                                                        </tr>
                                                    </tfoot>
                                                </table>
                                            </div>                           
                                        </div>
                                    </div>
                                </div>    

                                <div class="tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab2">
                                    <p class="">
                                        <center><h3>Usuarios Normales</h3></center>
                                        <div class="row">
                                        <div class="col-xl-12">
                                            <div class="table-responsive mb-4 mt-4">
                                                <table id="zero-config-2" class="table table-hover" style="width:100%; text-align: center;">
                                                    <thead>
                                                        <tr>
                                                            <th>#</th>
                                                            <th>Nombre</th>
                                                            <th>Correo Electrónico</th> 
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <?php $i=1; ?>
                                                        @foreach($user->where('rol_id',3) as $key)
                                                        <tr>
                                                            <td style="font-size: 20px;">{{$i++}}</td>
                                                            <td style="font-size: 20px;">{{$key->name}}</td>
                                                            <td style="font-size: 20px;">{{$key->email}}</td>
                                                        </tr>
                                                        @endforeach                                                        
                                                    </tbody>
                                                     <tfoot>
                                                        <tr>
                                                            <th>  </th>
                                                            <th>  </th>
                                                            <th>  </th>
                                                        </tr>
                                                    </tfoot>
                                                </table>
                                            </div>                           
                                        </div>
                                    </div>
                                    </p>
                                </div>
                            </div>                             
                        </div>
                    </div>
                </div>         
            </div>
        </div>
    </div>
</div>
@endsection

@section('script')
	<script src="{{asset('js/widgets/modules-widgets.js')}}"></script>
    <script type="text/javascript" src="{{asset('js/datatables.js')}}"></script>
    <script type="text/javascript" src="{{asset('js/table-data.js')}}"></script>
    <script type="text/javascript">
        table_data('#zero-config');
        table_data('#zero-config-2');
    </script>
@endsection