<?php $__env->startSection('title','Update Employee | '); ?>
<?php $__env->startSection('content'); ?>
<!-- Content Header (Page header) -->
<div class="content-header">
    <div class="container-fluid">
        <div class="row mb-2">
            <div class="col-sm-6">
                <h1 class="m-0">Update Employee</h1>
            </div><!-- /.col -->
            <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                    <li class="breadcrumb-item"><a href="#">Home</a></li>
                    <li class="breadcrumb-item active">Employee</li>
                </ol>
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
    <div class="container-fluid">

        <div class="card card-default">
            <div class="card-header">
                <h3 class="card-title">Update Employee Details</h3>
                <div class="card-tools">
                    <button type="button" class="btn btn-tool" data-card-widget="collapse">
                        <i class="fas fa-minus"></i>
                    </button>
                </div>
            </div>
            <!-- /.card-header -->
            <div class="card-body">
                <?php if(session('success')): ?>
                    <div class="alert alert-success alert-dismissible fade show" role="alert">
                        <strong><?php echo e(session('success')); ?></strong>
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                <?php endif; ?>
                <?php if(session('error')): ?>
                    <div class="alert alert-danger alert-dismissible fade show" role="alert">
                        <strong><?php echo e(session('error')); ?></strong>
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                <?php endif; ?>
                <form action="<?php echo e(route('update.employee')); ?>" method="post" autocomplete="off">
                    <?php echo csrf_field(); ?>
                    <input type="hidden" name="id" value="<?php echo e($userDetails->id); ?>">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="EmpFullname">Full Name</label>
                                <input type="text" name="full_name"
                                    class="form-control   <?php if( $errors->has('full_name')): ?> is-invalid border-danger  <?php endif; ?>"
                                    value="<?php echo e($userDetails->full_name); ?>" id="EmpFullname"
                                    placeholder="eg. Mohammad Shaan">
                                <?php if($errors->has('full_name')): ?>
                                    <span id="EmpFullname-error"
                                        class="error text-danger invalid-feedback"><?php echo e($errors->first('full_name')); ?></span>
                                    <small></small>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="EmpEmail">Email</label>
                                <input type="email" name="email"
                                    class="form-control <?php if( $errors->has('email')): ?> is-invalid border-danger  <?php endif; ?>"
                                    id="EmpEmail" value="<?php echo e($userDetails->email); ?>"
                                    placeholder="eg. shaan@example.com">
                                <?php if($errors->has('email')): ?>
                                    <span id="EmpFullname-error"
                                        class="error text-danger invalid-feedback"><?php echo e($errors->first('email')); ?></span>
                                    <small></small>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="EmpMobile">Mobile</label>
                                <input type="number" name="mobile"
                                    class="form-control <?php if( $errors->has('mobile')): ?> is-invalid border-danger  <?php endif; ?>"
                                    id="EmpMobile" value="<?php echo e($userDetails->mobile_number); ?>"
                                    placeholder="Enter Mobile" readonly>
                                <?php if($errors->has('mobile')): ?>
                                    <span id="EmpFullname-error"
                                        class="error text-danger invalid-feedback"><?php echo e($errors->first('mobile')); ?></span>
                                    <small></small>
                                <?php endif; ?>
                            </div>
                        </div>
                        <?php if(Auth::user()->user_role == 1 || Auth::user()->user_role == 2): ?>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="user_role">User Role</label>
                                <select name="user_role"
                                    class="custom-select form-control <?php if( $errors->has('user_role')): ?> is-invalid border-danger  <?php endif; ?>"
                                    id="user_role">
                                    <option value="">Select Employee Role</option>
                                    <option value="2" <?php if($userDetails->user_role == 2): ?> selected <?php endif; ?>>Admin/HR</option>
                                    <option value="3" <?php if($userDetails->user_role == 3): ?> selected <?php endif; ?>>Team Lead</option>
                                    <option value="4" <?php if($userDetails->user_role == 4): ?> selected <?php endif; ?>>Employee</option>
                                </select>
                                <?php if($errors->has('user_role')): ?>
                                    <span id="user_role-error"
                                        class="error text-danger invalid-feedback"><?php echo e($errors->first('user_role')); ?></span>
                                    <small></small>
                                <?php endif; ?>
                            </div>
                        </div>
                        <?php endif; ?>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="employeeStatus">Status</label>
                                <select name="employee_status"
                                    class="custom-select form-control <?php if( $errors->has('employee_status')): ?> is-invalid border-danger  <?php endif; ?>"
                                    id="employeeStatus">
                                    <option value="0" <?php if($userDetails->emp_status =='0'): ?>
                                        <?php echo e(__('selected')); ?> <?php endif; ?>>Inactive</option>
                                    <option value="1" <?php if($userDetails->emp_status =='1'): ?>
                                        <?php echo e(__('selected')); ?> <?php endif; ?>>Active</option>
                                </select>
                                <?php if($errors->has('employee_status')): ?>
                                    <span id="employeeStatus-error"
                                        class="error text-danger invalid-feedback"><?php echo e($errors->first('employee_status')); ?></span>
                                    <small></small>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <button type="submit" class="btn btn-primary">Update Employee</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <!-- /.card -->
    </div>
    <!--/. container-fluid -->
</section>
<!-- /.content -->

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/claim_and_case_management/resources/views/pages/employees/editEmpForm.blade.php ENDPATH**/ ?>