<?php $__env->startSection('title','Employee Entry'); ?>
<?php $__env->startPush('css'); ?>

<?php $__env->startPush('css'); ?>
<!-- page content -->
<?php $__env->startSection('content'); ?>
    <div class="right_col" role="main">
        <div class="">
            <div class="clearfix"></div>
            <?php if(Session::has('success')): ?>
                <div class="alert alert-success">
                    <?php echo e(Session::get('success')); ?>

                </div>
            <?php endif; ?>
            <?php if(Session::has('error')): ?>
                <div class="alert alert-danger">
                    <?php echo e(Session::get('error')); ?>

                </div>
            <?php endif; ?>
            <div class="row">
                <div class=" col-sm-12 ">
                    <div class="x_panel">
                        <div class="x_title">
                            <h2>Employee Entry
                                <!--<a href="<?php echo e(route('account.cpi')); ?>" class="btn btn-xs btn-primary"> Salary Payment</a>-->
                                <!--<a href="<?php echo e(route('employee.list')); ?>" class="btn btn-xs btn-primary">Employee List</a>-->
                             </h2>
                            <ul class="nav navbar-right panel_toolbox">
                                <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                </li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                                    <ul class="dropdown-menu" role="menu">
                                        <li><a href="#">Settings 1</a></li>
                                        <li><a href="#">Settings 2</a></li>
                                    </ul>
                                </li>
                                <li><a class="close-link"><i class="fa fa-close"></i></a>
                                </li>
                            </ul>
                            <div class="clearfix"></div>
                        </div>
                        <div class="">
                            <form action="<?php echo e(route('employee.store')); ?>" method="post" class="form-horizontal form-label-left" enctype="multipart/form-data">
        						<?php echo e(csrf_field()); ?>

        						<div class="form-group">
        							<label class="control-label  col-sm-3 " for="name">Full Name <span class="required">*</span>
        							</label>
        							<div class="col-sm-6 ">
        								<input type="text" id="name" class="form-control " name="name" value="<?php echo e(old('name')); ?>" placeholder="Employee Full Name">
        								<p class="error"><?php echo e($errors->first('name')); ?></p>
        							</div>
        						</div>
        						<div class="form-group">
        							<label for="phone" class="control-label  col-sm-3 ">Phone</label>
        							<div class="col-sm-6 ">
        								<input id="phone" class="form-control " type="text" name="phone" value="<?php echo e(old('phone')); ?>" placeholder="Present Phone Number">
        								<p class="error"><?php echo e($errors->first('phone')); ?></p>
        							</div>
        						</div>
        						<div class="form-group">
        							<label class="control-label  col-sm-3 ">Join Date<span class="required">*</span></label>
        							<div class=" col-sm-6 ">
        								<input id="datepicker" type="date" name="join_date" class="date-picker form-control " data-zdp_readonly_element="false" value="<?php echo e(date('d-m-Y')); ?>" placeholder="dd-mm-yyyy">
        							</div>
        						</div>
        						<div class="form-group">
        							<label class="control-label  col-sm-3 ">Salary</label>
        							<div class=" col-sm-6 ">
        								<input type="number" class="form-control " name="salary" value="<?php echo e(old('salary')); ?>" placeholder="Total Basic Salary">
        								<p class="error"><?php echo e($errors->first('salary')); ?></p>
        							</div>
        						</div>
        						<div class="form-group">
        							<label class="control-label  col-sm-3 ">Address</label>
        							<div class=" col-sm-6 ">
        								<input type="text" class="form-control " name="address" value="<?php echo e(old('address')); ?>" placeholder="Present Address">
        								<p class="error"><?php echo e($errors->first('address')); ?></p>
        							</div>
        						</div>
        						<div class="form-group">
        							<label class="control-label  col-sm-3 ">Employee Image</label>
        							<div class=" col-sm-3 ">
        								<input id="" onChange="readURL(this)" name="image" class="form-control " type="file">
        							</div>
        							<div class=" col-sm-3 ">
        								<img src="" class="img-responsive img-thumbnail" id="profile_img_tag" width="170px" hight="150px" />
        							</div>
        						</div>
        						<hr />
        						<div class="form-group">
        							<div class="col-sm-7  col-md-offset-5">
        								<a href="<?php echo e(route('employee.list')); ?>" class="btn btn-xs btn-danger">Cancel</a>
        								<button class="btn btn-xs btn-warning" type="reset">Reset</button>
        								<button type="submit" class="btn btn-xs btn-success">Save</button>
        							</div>
        						</div>
        					</form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /page content -->
<?php $__env->stopSection(); ?>

<?php $__env->startPush('js'); ?>
    <script type="text/javascript">
        $(document).ready(function() {
            
        });
        function readURL(input){
			if (input.files && input.files[0]){
				var reader = new FileReader();
				reader.onload = function (e) {
					$('#profile_img_tag').attr('src', e.target.result);
				}
				reader.readAsDataURL(input.files[0]);
			}
		}  
    </script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('backend.layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>