@extends('admin.layouts.app') @section('content')

Editar Usuario

Información personal

{{-- Mensajes --}}
{{-- De error --}} @if ($errors->any()) @foreach ($errors->all() as $error) @if(!$errors->has('stages') && !$errors->has('projects'))
  • {{ $error }}
@endif @endforeach @endif {{-- De exito --}} @if(Session::has('guardado')) @endif
{!! Form::open(array('route' => ['user.update', $user->id], 'method' => 'PATCH','enctype'=>"multipart/form-data", 'class' => 'form-horizontal')) !!} {!! Form::token() !!}
{!! Form::label('', 'Nombre:', ['class' => 'col-sm-3']) !!}
{!! Form::text('name', $user->name, ['class' => 'form-control']) !!}
{!! Form::label('', 'Apellido:', ['class' => 'col-sm-3']) !!}
{!! Form::text('surname', $user->surname, ['class' => 'form-control']) !!}
{!! Form::label('', 'Email:', ['class' => 'col-sm-3']) !!}
{!! Form::text('email', $user->email, ['class' => 'form-control']) !!}
{!! Form::label('', 'Usuario:', ['class' => 'col-sm-3']) !!}
{!! Form::text('user', $user->user, ['class' => 'form-control']) !!}
{{--
{!! Form::label('', 'Password:', ['class' => 'col-sm-3']) !!}
{!! Form::password('password', ['class' => 'form-control']) !!}
--}}
{!! Form::label('', 'Rol:', ['class' => 'col-sm-3']) !!}
@php($tildar = false) @foreach($roles as $rol) @if(in_array($rol, $user->rol)) @php($tildar = true) @else @php($tildar = false) @endif {{-- checkbox --}} {{$rol}} {{ Form::checkbox('rol[]', $rol, $tildar) }}
@endforeach {{-- {{ Form::select('rol', $roles, $user->rol, ['placeholder' => 'Seleccionar']) }} --}}
{!! Form::submit() !!}
{!! Form::close() !!}
{{-- Asignar proyectos por etapa --}} @if($user->hasRole('revisor'))

Proyectos asignados (revisor {{ $user->name .' '.$user->surname }})

{{-- De exito --}} @if(Session::has('asignacionBorrada')) @endif
Total proyectos: {{ $total_proyectos }}
Proyectos evaluados: {{ $cantidad_proyectos_evaluados }}
Proyectos pendientes: {{ $cantidad_proyectos_pendientes }}

Eliminar asignaciones seleccionadas :

@foreach($proyectosAsignados as $key => $value)
{!! Form::label('', 'Etapa ' . $value->nombreEtapa, ['class' => 'col-sm-3']) !!}
{{ $value->origin_id }}
{{ $value->tituloProyecto }}
{!! Form::checkbox('check_multiple_eliminar', $value->id) !!}
{!! Form::open(array('route' => ['removeProject', $value->id], 'method' => 'POST','enctype'=>"multipart/form-data", 'class' => 'form-horizontal')) !!} {!! Form::token() !!} {!! Form::submit('Quitar', ['class' => 'btn btn-danger btn-xs']) !!} {!! Form::close() !!}
@endforeach

Asignar proyectos (revisor {{ $user->name .' '.$user->surname }})

@if ($errors->has('stages') || $errors->has('projects'))
@endif {{-- De exito --}} @if(Session::has('asignado')) @endif
{!! Form::open(array('route' => ['saveProjects'], 'method' => 'POST','enctype'=>"multipart/form-data", 'class' => 'form-horizontal')) !!} {!! Form::token() !!} {!! Form::hidden('idRevisor', $user->id) !!}
{!! Form::label('', 'Etapa:', ['class' => 'col-sm-3']) !!}
{!! Form::label('', 'Proyecto:', ['class' => 'col-sm-3']) !!}
{!! Form::submit() !!}
{!! Form::close() !!}
@endif @endsection @section('scripts') @endsection