@extends('app') @section('content')
@if($executive->getErrors()->count() > 0)
@if($executive->getErrors()->count() == 1) {!!$executive->getErrors()->first()!!} @else Ocurrieron errores al guardar el nuevo ejecutivo:
    @foreach($executive->getErrors()->all() as $error)
  • {!!$error!!}
  • @endforeach
@endif
@endif {!!Form::model($executive, [ 'action' => 'ExecutivesController@store', 'method' => 'POST' ])!!}
{!!Form::label('first_name', 'Nombre(s)')!!} {!!Form::text('first_name', NULL, ['class' => 'form-control','id' => 'first_name'])!!}
{!!Form::label('last_name', 'Apellido(s)')!!} {!!Form::text('last_name', NULL, ['class' => 'form-control','id' => 'last_name'])!!}
{!!Form::label('employee_number', 'Número de empleado')!!} {!!Form::text('employee_number', NULL, ['class' => 'form-control','id' => 'employee_number'])!!}
{!!Form::label('position_id', 'Puesto')!!} {!!Form::select('position_id', [NULL => 'Seleccionar un puesto'] + $positions , NULL, ['class' => 'form-control'])!!}
{!!Form::label('centro_pyme_id', 'Centro de Costo')!!} {!!Form::select('centro_pyme_id', [NULL => 'Seleccionar un centro'] + $centros, NULL, ['class' => 'form-control'])!!}
{!!Form::label('region_id', 'Región')!!} {!!Form::select('region_id', [NULL => 'Seleccionar una región'] + $regions, NULL, ['class' => 'form-control'])!!}
{!!Form::label('zone_id', 'Zona')!!} {!!Form::select('zone_id', [NULL => 'Seleccionar una zona'], NULL, ['class' => 'form-control'])!!}
{!!Form::label('branch_id', 'Sucursal')!!} {!!Form::select('branch_id', [NULL => 'Seleccionar una sucursal'], NULL, ['class' => 'form-control'])!!}
{!!Form::submit('Guardar', ['class' => 'btn btn-lg btn-default'])!!} {!!link_to_action('ExecutivesController@index','Cancelar', NULL, ['class' => 'btn btn-lg btn-primary']) !!}
{!!Form::close()!!}
@endsection @section('script') {!!Html::script('js/executives/create_edit.js')!!} @endsection