@extends('layouts.dashboard')

@section('content')
  <div class="card mb-3 mt-4">
    <div class="container-fluid">
        <div class="card-header titulo-eliminar">
            <div class="title">
                <i class="fas fa-users-cog"></i> <strong>Perfil</strong>
            </div>
            <strong class="text-muted">Desarrollador</strong>
        </div>
        <div class="card-body">
            <form action="updateDesarrollador/{{Auth::user()->id}}"  class="form-inline mt-2" method="post" id="form-datos">
                {{ csrf_field() }}
                <div class="container">
                    <div class="image-profile-container">
                        <div class="card col-md-4" style="">
                            <img id="image-profile-img" class="card-img-top" src="{{Auth::user()->getPicture()}}" alt="Card image cap">
                            <div class="card-body">
                                <input id="img-file" class="image-profile-input" type="file" onchange="cargarIMG(this.files[0])" accept="image/jpeg">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group mt-2">
                    <label for="inputPassword6" class="form-label-title">Old Password:</label>
                    <input type="password" id="password" name="password" class="form-control mx-sm-3"  disabled>
                </div>
                <div class="form-group mt-2">
                    <label for="inputPassword6" class="form-label-title">New Password:</label>
                    <input type="password" id="password" name="password" class="form-control mx-sm-3" placeholder="7-20 caracters" disabled>
                </div><hr>
                <div class="buttons-container">
                    <button type="button" id="button-editar" onclick="editar()" class="btn btn-info btn-sm">Editar</button>
                    <button type="submit" class="btn btn-primary btn-sm">Guardar</button>
                </div>
            </form>
        </div>
        <div class="card-footer small text-muted">Updated yesterday at 11:59 PM</div>
    </div>
  </div>
  
  <div class="card mb-3">
        <div class="card-header">
        <i class="fas fa-ruler"></i> Aplicaciones del desarrollador
        </div>
        <div class="card-body">
            <div class="container">
                <div class="row">
                    @if ( $apps == '[]')
                        <small>Este desarrollador no tiene requerimientos</small>
                    @endif
                    @foreach($apps as $app)
                        <a href="../aplicacion/{{$app->app_id}}" class="col-md-4 list-group-item list-group-item-action flex-column align-items-start">
                            <div class="d-flex w-100 justify-content-between">
                            <h5 class="mb-1">{{$app->app_name}}</h5>
                            </div>
                        </a>
                    @endforeach
                </div>
            </div>
        </div>
    </div>
  <div class="card mb-3">
        <div class="card-header">
        <i class="fas fa-ruler"></i> Requerimientos del desarrollador
        </div>
        <div class="card-body">
            <div class="container">
                <div class="row">
                    @if ( $requerimientos_desarrollador == '[]')
                        <small>Este desarrollador no tiene requerimientos</small>
                    @endif
                    @foreach($requerimientos_desarrollador as $requerimiento)
                        <a href="../requerimiento/{{$requerimiento->requerimiento_id}}" class="col-md-4 list-group-item list-group-item-action flex-column align-items-start">
                            <div class="d-flex w-100 justify-content-between">
                            <h5 class="mb-1">{{$requerimiento->requerimiento_titulo}}</h5>
                            </div>
                            <p class="mb-1">{{$requerimiento->requerimiento_descripcion}}.</p>
                            <small class="text-muted">{{$requerimiento->updated_at}}</small>
                        </a>
                    @endforeach
                </div>
            </div>
        </div>
    </div>
	<link  media="all" rel="stylesheet" type="text/css" href="{{ asset('css/desarrollador.css') }}">
	<link  media="all" rel="stylesheet" type="text/css" href="{{ asset('css/cliente.css') }}">
	<link  media="all" rel="stylesheet" type="text/css" href="{{ asset('css/general.css') }}">
    <script  src="{{ asset('js/admin.js') }}"> </script>  
@endsection