@extends('layouts.style')
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>{{ config('app.name', 'Laravel') }}</title>
    <link rel="shortcut icon" type="image/png" href="{{ asset('/images/LOGO.png') }}">
    <link rel="shortcut icon" sizes="192x192" href="{{ asset('/images/LOGO.png') }}">

    <!-- Scripts -->
    <script src="{{ asset('js/app.js') }}" defer></script>
    <script src="//code.jquery.com/jquery-1.11.1.min.js"></script>

    <script src="{{ asset('js/script.js') }}"></script>

    <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>

    <!-- Fonts -->
    <link rel="dns-prefetch" href="//fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">

    <!-- Styles -->
    <link href="{{ asset('css/app.css') }}" rel="stylesheet">

    <!-- Styles icons -->
    <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
</head>
<body>

  <div id="app">
    <nav class="navbar navbar-expand-md navbar-dark bg-dark shadow-sm">

      @if (Auth::user())
      <!-- SIDE NAVBAR -->>
      <div id="wrapper">
        <div class="overlay"></div> 
        <!-- Sidebar -->
        <nav class="navbar navbar-inverse fixed-top" id="sidebar-wrapper" role="navigation">
          <ul class="nav sidebar-nav">

            <div class="sidebar-header">
              <div class="sidebar-brand"><a href="#">DIMAT</a></div>
            </div>
            
            <li><a href="#home"><span class="fas fa-home espacio-home"></span>Home</a></li>

            @if(Auth::user()->user_tipe == 'Admin' || Auth::user()->user_tipe == 'RRHH')
            <li class="dropdown">
              <a href="#about" class="dropdown-toggle" data-toggle="dropdown"><img class="espacio-rec-hum" src="{{ asset('images/resource_human.png') }}">Recursos Humanos</a>
              <ul class="dropdown-menu animated fadeInLeft" role="menu">
                <div class="dropdown-header">Opciones de Personal</div>
                <li><a href="{{ route('Personal.index') }}"><i class="far fa-address-book espacio-items"></i>Administración de Personal</a></li>
                <li><a href="{{ route('Vacaciones.index') }}"><i class="far fa-calendar-alt espacio-items"></i>Gestionar Vacaciones</a></li>
                <li><a href="{{ route('Comunas.index') }}"><i class="far fa-city espacio-items2"></i>Comunas</a></li>
                <li><a href="{{ route('Usuarios.index') }}"><span class="fas fa-users"></span> Usuarios/Permisos</a></li>
              </ul>
            </li>
            @endif

            @if(Auth::user()->user_tipe == 'Admin' || Auth::user()->user_tipe == 'Bodeguista')
            <li class="dropdown">
              <a href="#about" class="dropdown-toggle" data-toggle="dropdown"><img class="espacio-almacen" src="{{ asset('images/packages.png') }}">Bodega</a>
              <ul class="dropdown-menu animated fadeInLeft" role="menu">
                <div class="dropdown-header">Opciones de Bodega</div>
                <li><a href="{{ route('Materiales.index') }}"><i class="far fa-clipboard-list espacio-items2"></i>Inventario</a></li>
                <li><a href="{{ route('EntradaMateriales.index') }}"> <img class="espacio-ing-mat" src="{{ asset('images/add.png') }}">Ingreso de Material</a></li>
                <li><a href="{{ route('Rebajes.index') }}"><img class="espacio-ing-mat" src="{{ asset('images/broken-wire.png') }}" alt="">Rebaje de Material</a></li>
                <li><a href="{{ route('peticion.index') }}"> <i class="fas fa-toolbox espacio-items"></i> Peticion de Material</a></li>
                <li><a href="{{ route('listaPeticiones') }}"> <i class="fas fa-stream espacio-items3"></i>Lista de Peticiones</a></li>
                <li><a href="{{ route('DetallePeticion.index') }}"><i class="fas fa-info-circle espacio-items3"></i>Detalles de Peticiones</a></li>
                
              </ul>
            </li>
                      
            <li class="dropdown">
              <a href="#works" class="dropdown-toggle" data-toggle="dropdown"><i class="fas fa-tag espacio-home"></i>Venta de Material <span class="caret"></span></a>
              <ul class="dropdown-menu animated fadeInLeft" role="menu">
                <div class="dropdown-header">Opciones de Venta</div>
                <li><a href="{{ route('venta.index') }}">&nbsp<span class="fas fa-dollar-sign espacio-items"></span>Realizar Venta</a></li>
                <li><a href="{{ route('DetalleVentas.index') }}"><span class="fas fa-info-circle espacio-items"></span>Detalle de Ventas</a></li>
                <li><a href="{{ route('listaVentas') }}"><span class="fas fa-stream espacio-items"></span>Ventas Realizadas</a></li>
              </ul>
            </li>
            @endif

            @if(Auth::user()->user_tipe == 'Admin' || Auth::user()->user_tipe == 'Jefe_Proyecto')
            <li class="dropdown">
              <a href="#works" class="dropdown-toggle" data-toggle="dropdown"> Empresas y Proyectos <span class="caret"></span></a>
              <ul class="dropdown-menu animated fadeInLeft" role="menu">
                <div class="dropdown-header">Gestion de Emp. y Proy</div>
                <li><a href="{{ route('EmpresasMatriz.index') }}">&nbsp<span class="fas fa-building espacio-items2"></span>Empresas Matriz</a></li>
                <li><a href="{{ route('EmpProyectos.index') }}">&nbsp<span class="fas fa-building espacio-items2"></span>Empresas Proyectos</a></li>
                <li><a href="{{ route('EmpresasProyectos.index') }}"><span class="fas fa-folder espacio-items2"></span>Proyectos</a></li>
                <li><a href="{{ route('ContinuacionProyectos.index') }}"><span class="fas fa-project-diagram espacio-items3"></span>Continuación de Protectos</a></li>
                <li><a href="{{ route('Proveedores.index') }}"><i class="far fa-address-card espacio-items"></i>Administración de Proveedores</a></li>
              </ul>
            </li>
            @endif
            
            <li><a href="#team"><img src="{{ asset('images/logonetv.png') }}" width="30px">&nbsp&nbsp NeTv</a></li>

            <li><a href="{{ route('informacion') }}"><i class="fas fa-info espacio-items2"></i>Informacion P</a></li>
            
          </ul>
        </nav>
        
        <!-- Page Content -->
        <div id="page-content-wrapper">
          <button type="button" class="hamburger animated fadeInLeft is-closed" data-toggle="offcanvas">
            <span class="hamb-top"></span>
            <span class="hamb-middle"></span>
            <span class="hamb-bottom"></span>
          </button>
        </div>
      </div>

      

      <!-- END SIDE NAVBAR -->>
      @endif

          <!-- NAVBAR LARAVEL -->>
            <div class="container">
                <a class="navbar-brand" href="{{ url('/home') }}">
                    <img class="img-fliud" src="{{ asset('images/LOGO.png') }}" align="right" width="100px" >
                </a>
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
                    <span class="navbar-toggler-icon"></span>
                </button>




                @if (Auth::user())

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <!-- Left Side Of Navbar -->
                    <ul class="navbar-nav mr-auto">
                      
                      <!--
                        MENU DE SECCIONES
                      <li class="dropdown">
                        <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown"> Secciones </a>
                        <ul class="dropdown-menu">

                          <li class="nav-item dropright">
                            <a class="dropdown-item dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                              Almacen
                            </a>
                            <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
                              <li><a class="dropdown-item" href="#">Inventario</a></li>
                              <li><a class="dropdown-item" href="#">Ingreso de Material</a></li>
                            </ul>
                          </li>

                          <div style="text-align: center">
                            <h6><b>Secciones</b></h6>

                          </div>
                          <div class="dropdown-divider"></div>
                          <li>
                            <a href="{{ route('Comunas.index') }}" class="dropdown-item">Comunas</a>
                          </li>

                          <div class="dropdown-divider"></div>

                          <li>
                            <a href="{{ route('ContinuacionProyectos.index') }}" class="dropdown-item">Continuacion de Proyectos</a>
                          </li>

                          <li>
                            <a href="{{ route('EmpresasMatriz.index') }}" class="dropdown-item">Empresas Matriz</a>
                          </li>

                          <li>
                            <a href="{{ route('EmpresasProyectos.index') }}" class="dropdown-item">Proyectos</a>
                          </li>

                          <div class="dropdown-divider"></div>
                          <div style="text-align: center">
                            <h6><b>Almacen</b></h6>
                          </div>
                          <div class="dropdown-divider"></div>
                          <li>
                            <a href="{{ route('Materiales.index') }}" class="dropdown-item">Inventario</a>
                          </li>

                          <li>
                            <a href="{{ route('EntradaMateriales.index') }}" class="dropdown-item">Ingreso de Material</a>
                          </li>

                          <div class="dropdown-divider"></div>

                          <li>
                            <a href="{{ route('Personal.index') }}" class="dropdown-item">Personales</a>
                          </li>

                          <li>
                            <a href="{{ route('Proveedores.index') }}" class="dropdown-item">Proveedores</a>
                          </li>

                        </ul>
                      </li>
                      -->
                      
                      <!-- MENU DE REPORTES
                      <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown">
                          <img src="{{ asset('images/pdf.png') }}" width="15px;"> Reportes 
                        </a>
                        <ul class="dropdown-menu">

                          <div style="text-align: center">
                            <h6><b>Listas de Reportes</b></h6>
                          </div>
                          <div class="dropdown-divider"></div>

                          <li>
                            <a href="" class="dropdown-item">Listado de Materiales</a>
                          </li>

                          <li>
                            <a href="" class="dropdown-item">Peticiones de Material</a>
                          </li>

                          <li>
                            <a href="" class="dropdown-item">Detalles de Peticiones</a>
                          </li>
                          
                        </ul>
                      </li>
                      -->


                      <!-- Peticion Material
                      <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown">Peticiones de Material</a>
                        <ul class="dropdown-menu">

                          
                          <div style="text-align: center">
                            <h6><b>Prestamo</b></h6>
                          </div>
                          <div class="dropdown-divider"></div>
                          <li>
                            <a class="dropdown-item" href="{{ route('peticion.index') }}">{{ __('Peticion de Material') }}</a>
                          </li>

                          <li>
                            <a class="dropdown-item" href="{{ route('listaPeticiones') }}">{{ __('Lista de Peticiones') }}</a>
                          </li>

                          <li>
                            <a class="dropdown-item" href="{{ route('DetallePeticion.index') }}">{{ __('Detalle de Peticiones') }}</a>
                          </li>

                        </ul>
                      </li> -->
                    </ul>
                @endif




                    <!-- Right Side Of Navbar -->
                    <ul class="navbar-nav ml-auto">
                        <!-- Authentication Links -->
                        @guest
                            <li class="nav-item">
                                <a class="nav-link" href="{{ route('login') }}">{{ __('Iniciar Sesión') }}</a>
                            </li>
                            
                            <!-- REGISTER
                              @if (Route::has('register'))
                                  <li class="nav-item">
                                      <a class="nav-link" href="{{ route('register') }}">{{ __('Registrarse') }}</a>
                                  </li>
                              @endif
                            -->
                        @else
                            <li class="nav-item dropdown">
                                <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
                                  {{ Auth::user()->name }}
                                </a>

                                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
                                    <a class="dropdown-item" href="{{ route('logout') }}"
                                       onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                                        {{ __('Logout') }}
                                    </a>

                                    <form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
                                        @csrf
                                    </form>
                                </div>
                            </li>
                        @endguest
                    </ul>
                </div>
            </div>
        </nav>

        <main class="py-4">
            @yield('content')
        </main>
    </div>
</body>
<br>
    <!-- Footer -->
<footer class="text-center text-lg-start text-white" style="background-color:rgb(15, 15, 15); margin-top:30%">
  <!-- Section: Social media -->
  <section
    class="d-flex justify-content-center justify-content-lg-between p-4 border-bottom">
    <!-- Left -->
    <div class="me-5 d-none d-lg-block">
      <span>Get connected with us on social networks:</span>
    </div>
    
  </section>
  <!-- Section: Social media -->

  <!-- Section: Links  -->
  <section class="">
    <div class="container text-center text-md-start mt-5">
      <!-- Grid row -->
      <div class="row mt-3">
        <!-- Grid column -->
        
        <!-- Grid column -->

        <!-- Agregar una descrip si se desea con el div -->

        <!-- Grid column -->
        <div class="col-md-2 col-lg-2 col-xl-2 mx-auto mb-4">
          <!-- Links -->
          <h6 class="text-uppercase fw-bold mb-4">
            Servicios
          </h6>
          <p>
            <a href="#!" class="text-reset">Fibra Optica</a>
          </p>
          <p>
            <a href="#!" class="text-reset">Linea</a>
          </p>
          
        </div>
        <!-- Grid column -->

        <!-- Grid column -->
        <div class="col-md-3 col-lg-2 col-xl-2 mx-auto mb-4">
          <!-- Links -->
          <h6 class="text-uppercase fw-bold mb-4">
            Otros Links
          </h6>
          <p>
            <a href="https://netv.cl/" class="text-reset">NeTV.cl</a>
          </p>
          <p>
            <a href="https://validacion.netv.cl/login.php" class="text-reset">Validaciones</a>
          </p>
        </div>
        <!-- Grid column -->

        <!-- Grid column -->
        <div class="col-md-4 col-lg-3 col-xl-3 mx-auto mb-md-0 mb-4">
          <!-- Links -->
          <h6 class="text-uppercase fw-bold mb-4">
            Contacto
          </h6>
          <p>
            <i class="fas fa-envelope me-3"></i>
            gustavo.alvaradoc@outlook.com
          </p>
          <p><i class="fas fa-phone me-3"></i> <i class="fab fa-whatsapp"></i>
            <a href="https://wa.link/e6m0tt">+52 493 118 6203</a>
          </p> 
        </div>
        <!-- Grid column -->
      </div>
      <!-- Grid row -->
    </div>
  </section>
  <!-- Section: Links  -->

  <!-- Copyright -->
  <div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.05);">
    © 2022 Copyright:
    <a class="text-reset fw-bold" href="https://www.facebook.com/gustavo.alvaradocabrera">
        Desarrollo y Diseño por Gustavo Alvarado Cabrera
    </a>
  </div>
  <!-- Copyright -->
</footer>
<!-- Footer -->
</html>
