@extends('panel.layouts.app') @section('page-title') {{ LaraCore::setting('html_prefix') }} {{ (LaraCore::setting('html_prefix') != '') ? '|' : '' }} {{ (@$employee) ? 'Edit Employee' : 'Add Employee' }} @stop @section('content')
@include('common.success')
{{ Form::open( [ 'method'=> (@$employee) ? 'PUT' : 'POST', 'url' => (@$employee) ? route('employees.update', ['employee' => @$employee->id ]) : route('employees.store'), 'enctype' => "multipart/form-data", 'id'=>'employee_add']) }}

{{ (@$employee) ? 'Edit Employee' : 'Add Employee' }}

{{ Form::text('name',@$employee->name,["class"=>'form-control','placeholder'=>'Name','autofocus' => 'true']) }} {{ Form::hidden('primary','primary') }} @if ($errors->has('name'))

{{ $errors->first('name') }}

@endif
{{ Form::text('email',@$employee->email,["class"=>'form-control','placeholder'=>'Email']) }} @if ($errors->has('email'))

{{ $errors->first('email') }}

@endif
{{ Form::text('phone',@$employee->phone,["class"=>'form-control','placeholder'=>'Phone']) }} @if ($errors->has('phone'))

{{ $errors->first('phone') }}

@endif

{{ Form::radio('gender', '1',(@$employee->id) ? (@$employee->gender == '1' ? true : false) : true, [ 'id' => 'male', 'class'=>'minimal', ]) }} {{ Form::radio('gender', '2', (@$employee->gender == '2' ? true : false), [ 'id' => 'female', 'class'=>'minimal', ]) }}
@if ($errors->has('gender'))

{{ $errors->first('gender') }}

@endif
{{ Form::text('address1',@$employee->address1,["class"=>'form-control','placeholder'=>'Address 1']) }} @if ($errors->has('address1'))

{{ $errors->first('address1') }}

@endif
{{ Form::text('address2',@$employee->address2,["class"=>'form-control','placeholder'=>'Address 2']) }} @if ($errors->has('address2'))

{{ $errors->first('address2') }}

@endif
{{Form::select('state', $allState, @$employee->state, ['class' => 'form-control'] ) }} @if ($errors->has('state'))

{{ $errors->first('state') }}

@endif
{{Form::select('city', $allCity, @$employee->city, ['class' => 'form-control'] ) }} @if ($errors->has('city'))

{{ $errors->first('city') }}

@endif
{{ Form::text('zipcode',@$employee->zipcode,["class"=>'form-control','placeholder'=>'Zipcode']) }} @if ($errors->has('zipcode'))

{{ $errors->first('zipcode') }}

@endif

{{ Form::text('joining_date', @$employee->joining_date == "" ? '' : date(LaraCore::setting('date_format'),strtotime(@$employee->joining_date)),['id'=>'reservation','class'=>'form-control pull-right datepicker date_input','id'=>'datepicker']) }}
@if ($errors->has('joining_date'))

{{ $errors->first('joining_date') }}

@endif
{{ Form::radio('status', '1',(@$employee->id) ? (@$employee->status == '1' ? true : false) : true, [ 'id' => 'deactive', 'class'=>'minimal', ]) }} {{ Form::radio('status', '2', (@$employee->status == '2' ? true : false), [ 'id' => 'inactive', 'class'=>'minimal', ]) }}
@if ($errors->has('status'))

{{ $errors->first('status') }}

@endif

{{Form::select('skills[]', $allSkills, @$employee->skills, ['class' => 'form-control select2 ', 'multiple'=>'multiple', 'data-placeholder'=>"Select your Skills", 'style'=>"width: 100%;"] ) }} @if ($errors->has('skills'))

{{ $errors->first('skills') }}

@endif
{{ Form::close() }}
@if (@$employee) @include('common.activity_logs',['entity' => 'employee']) @endif
{{ Form::open( [ 'method'=> (@$employee) ? 'PUT' : 'POST', 'url' => (@$employee) ? route('employees.update', ['employee' => @$employee->id ]) : route('employees.store'), 'enctype' => "multipart/form-data", 'id' => 'employee_add_other']) }}

{{ (@$employee) ? 'Edit Other Details' : 'Add Other Details' }}

@if (isset($employee->image))
@endif
{!! Form::file('image',array( 'id' => 'employee_profile_pic', 'data-src' => @$employee->image_token, @$disabled)) !!} {!! Form::hidden('employee_profile_pic_token',"",['id'=>'employee_profile_pic_token']) !!}

Only jpeg, jpg, png files are allowed.


{{ Form::checkbox('hobbies[]', 'Basketball', (@$employee->id) ? (in_array('Basketball',explode(',',@$employee->hobbies)) ? true : false) : '', ['class' => 'minimal','id'=> 'Basketball']) }} {{ Form::checkbox('hobbies[]', 'Football', (@$employee->id) ? (in_array('Football',explode(',',@$employee->hobbies)) ? true : false) : '', ['class' => 'minimal','id'=> 'Football']) }} {{ Form::checkbox('hobbies[]', 'Yoga', (@$employee->id) ? (in_array('Yoga',explode(',',@$employee->hobbies)) ? true : false) : '', ['class' => 'minimal','id'=> 'Yoga']) }}       @if ($errors->has('hobbies'))

{{ $errors->first('hobbies') }}

@endif
{{ Form::textarea('notes', @$employee->notes, ['class' => 'form-control','rows'=>'3']) }} @if ($errors->has('notes'))

{{ $errors->first('notes') }}

@endif
{{ Form::textarea('about_me', @$employee->about_me, ['class' => 'form-control textarea summernote','rows'=>'10','cols'=>'80','id'=>'']) }} @if ($errors->has('about_me'))

{{ $errors->first('about_me') }}

@endif
{{ Form::checkbox( "ready", '1', ((@$employee->id && @$employee->ready == '1') ? true : (!@$employee->id && '1' === '1') ? true : false), [ 'id' => 'Yes', 'class' => 'minimal custom_radio', ]) }} {{-- @if (@$employee->ready=="") @else @endif --}}
{!! Form::file('document[]',[ 'id' => 'document', 'multiple' => true, 'data-src' => @$employee->document_token, @$disabled] ) !!} {!! Form::hidden('doc_file_token',"",['id'=>'doc_file_token']) !!}

Allowed file types: jpeg, jpg, png, bmp, csv, txt, doc, docx, xls, xlsx, pdf

{{ Form::close() }}
@stop @section('custom-scripts') @stop