@extends('layouts.dashboard')

@section('content')
    <section class="container all-container">
        <div class="card mb-3">
            <div class="card-header">
               <i class="fab fa-wpforms"></i> Asignar aplicacion a {{$usuario->name}}
            </div>
            <div class="card-body">
                <form url="{{ route('asignarApp',[$usuario->id]) }}" url2="{{ route('user',[$usuario->id]) }}" id="formulario-asignar-user">
                    {{ csrf_field() }}
                    <div class="form-group row">
                        <label for="inputEmail3" class="col-sm-2 col-form-label">Nombre</label>
                        <div class="col-sm-10">
                            <select class="form-control col-md-4" name="aplicacion" required>
                                @foreach($aplicaciones as $aplicaciones)
                                <option value="{{$aplicaciones->id}}">{{$aplicaciones->nombre}}</option>
                                @endforeach
                            </select>
                        </div>
                    </div>
                    <input type="hidden" name="usuario" required value="{{$usuario->id}}">
                    <div class="form-group row">
                        <div class="col-sm-10">
                            <button type="submit" class="btn btn-primary">Guardar</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </section>
    <style>        
        #mainNav.navbar-dark .navbar-collapse .navbar-sidenav>.nav-item>.userLink {color:#1c8dff;}
    </style>
	<script src="{{ asset('js/sweetalert.min.js') }}"></script>
	<link  media="all" rel="stylesheet" type="text/css" href="{{ asset('css/cliente.css') }}">
	<script  src="{{ asset('js/user.js') }}"></script>
	<link  media="all" rel="stylesheet" type="text/css" href="{{ asset('css/aplicacion.css') }}">
@endsection