@extends('plantilla')

@section('seccion')


<!-- Content Header (Page header) -->
<div class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1 class="m-0">Perfil de usuario</h1>
        </div><!-- /.col -->
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="#">Home</a></li>
            <li class="breadcrumb-item active">Dashboard v2</li>
          </ol>
        </div><!-- /.col -->
      </div><!-- /.row -->
    </div><!-- /.container-fluid -->
  </div>
  <!-- /.content-header -->

  <!-- Main content -->
  <section class="content">
    <div class="container-fluid">
        <div class="row">
          <!-- left column -->
          <div class="col-md-6">
         <!-- Horizontal Form -->
         <form action="{{ route('ActualizarPerfil') }}" method="post" enctype="multipart/form-data">
                @csrf
         <div class="card card-info">
            
            <div class="card-header">
              <h3 class="card-title">Datos de usuario</h3>
            </div>
            <!-- /.card-header -->            
              <div class="card-body">
              <div class="form-group row" id="GRPname">
                    <label for="name" class="col-sm-3 col-form-label">Nombre</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control form-control-sm" id="name" name="name"  value="{{$usuario->name}}" disabled>
                        <div class="invalid-feedback">
                            Ingrese un dato valido
                        </div>
                    </div>
                </div>   

                <div class="form-group row" id="GRPemail">
                    <label for="email " class="col-sm-3 col-form-label">Email</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control form-control-sm" id="email" name="email" value="{{$usuario->email}}" readonly>
                        <div class="invalid-feedback">
                            Ingrese un dato valido
                        </div>
                    </div>
                </div> 

                <div class="form-group row" id="GRPusua_nombreComercial">
                    <label for="usua_nombreComercial " class="col-sm-3 col-form-label">Nombre comercial</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control form-control-sm" id="usua_nombreComercial" name="usua_nombreComercial" value="{{$usuario->usua_nombreComercial}}" disabled>
                        <div class="invalid-feedback">
                            Ingrese un dato valido
                        </div>
                    </div>
                </div> 

                <div class="form-group row" id="GRProl_id">
                    <label for="rol_id" class="col-sm-3 col-form-label">Rol</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control form-control-sm" id="rol_id" name="rol_id" value="{{$usuario->rol_id}}" disabled>
                        <div class="invalid-feedback">
                            Ingrese un dato valido
                        </div>
                    </div>
                </div> 

                <div class="form-group row" id="GRPusua_foto">
                    <label for="usua_foto" class="col-sm-3 col-form-label">Foto perfil</label>
                    <div class="col-sm-9">
                    <div class="custom-file">
                      <input type="file" class="custom-file-input" id="usua_foto" name="usua_foto" accept="image/png, image/gif, image/jpeg">
                      <label class="custom-file-label" for="usua_foto">Seleccionar archivo</label>
                    </div>
                    </div>
                </div> 

              </div>
              <!-- /.card-body -->
              <div class="card-footer">
                <button name="btnActualizarPerfil" id="btnActualizarPerfil" type="submit" class="btn btn-success">Actualizar</button> 
                <a href="{{ route('ListarProyectos') }}" class="btn btn-info float-right">Volver a la lista</a>               
              </div>
              <!-- /.card-footer -->            
          </div>
          <!-- /.card -->
          </form>
        </div><!--/. end row -->
        </div><!--/. end col -->
        </div><!--/. container-fluid -->
  </section>
  <!-- /.content -->

  @endsection


  @section('librerias')
    <!-- JS PROPIAS DE LA VISTA-->
<script src="{{ asset('assets/js/myfunctions/proyecto.js') }}"></script>
<!-- bs-custom-file-input -->
<script src="{{ asset('assets/plugins/bs-custom-file-input/bs-custom-file-input.min.js') }}"></script>
<script>
$(function () {
  bsCustomFileInput.init();
});
</script>
  @endsection