<?php if(Auth::user()->hasAnyPermission(['All','Add Employee'])): ?>

<!-- Modal ADD Branch -->
<div class="modal fade" id="md_add_employee" tabindex="-1" role="dialog" aria-labelledby="exampleModallabel" aria-hidden="true">
  <?php echo e(Form::open(array('route' => 'employee.commit', 'class' => 'cls_form' , 'id'=> 'form_add_employee', 'enctype' => 'multipart/form-data'))); ?>

  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModallabel">Add Employee</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true"></span>
        </button>
      </div>
      <div class="modal-body">
        <div class ="card">
            <div class="card-header">
               <div class = "col-md-5">
              <strong class="strong-margin">PERSONAL  INFORMATION</strong>
              </div>
              <div class = "col-md-6">
              </div>
             <div class = "col-md-1">
           <img src = "<?php echo e(asset('assets/images/icons/userinformation.png')); ?>"/>
               
            </div>
          </div>
            <div class="card-body  form-fieldset">
                <div class="row">
         
            <div class="col-sm-6">
                 <label class="label-color"> CNIC: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('cnic',":message")); ?></small>
            <div class="input-group mb-3">
             
              <?php echo e(Form::Text('cnic', '', ['class' => 'form-control form-control-sm  cls_cnic','data-mask' => '00000-0000000-0', 'data-mask-clearifnotmatch' => 'true' ,'placeholder' => '00000-0000000-0'  , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>
          </div>

            <div class="col-sm-6">
                <label class="label-color" >Type: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('employee_type',":message")); ?></small>

            <div class="input-group mb-3">
              <select name="employee_type" class="form-control form-control-sm cls_selection">
                  <option value="selected">Select Type</option>

                 <?php $__currentLoopData = EF::getEmployeeType(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                 <option value="<?php echo e($rows); ?>"><?php echo e($rows); ?>

                 </option>
                 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
          </div>

          <div class="col-sm-6">
               <label class="label-color"> Name: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('full_name',":message")); ?></small>

            <div class="input-group mb-3">
              <?php echo e(Form::Text('full_name', '', ['class' => 'form-control form-control-sm  cls_fullname', 'placeholder' => 'Full name' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>
           </div>

          <div class="col-sm-6">
               <label class="label-color"> Father Name: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('father_name',":message")); ?></small>

            <div class="input-group mb-3">
              <?php echo e(Form::Text('father_name', '', ['class' => 'form-control form-control-sm  cls_fullname', 'placeholder' => 'Father name' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>
          </div>
                   <div class="col-sm-6">
                <label class="label-color" >Gender: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('gender',":message")); ?></small>

            <div class="input-group mb-3">
              <select name="gender" class="form-control form-control-sm cls_selection">
                  <option value="selected">Select Gender</option>

                 <?php $__currentLoopData = EF::getGenderList(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                 <option value="<?php echo e($rows); ?>"><?php echo e($rows); ?>

                 </option>
                 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
          </div>


     
                 <div class="col-sm-6">
                <label class="label-color" >Blood Group:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('blood_group',":message")); ?></small>

            <div class="input-group mb-3">
              <select name="blood_group" class="form-control form-control-sm cls_selection">
                  <option value="">Select Blood Group</option>

                 <?php $__currentLoopData = EF::getBloodGroupList(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                 <option value="<?php echo e($rows); ?>"><?php echo e($rows); ?>

                 </option>
                 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
          </div>

          <div class="col-sm-6">
               <label class="label-color"> Contact: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('contact',":message")); ?></small>

            <div class="input-group mb-3">
              <?php echo e(Form::Text('contact', '', ['class' => 'form-control form-control-sm  cls_contact', 'placeholder' => 'Contact no' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','data-mask' => '0000-0000000', 'data-mask-clearifnotmatch' => 'true' ,'placeholder' => '0000-0000000'])); ?>

            </div>
          </div>
          <input type ="hidden" name="designation_id" value = "<?php echo e(Crypt::encrypt(0)); ?>"/>
          
   
                 <div class="col-sm-6">
                <label class="label-color" >Department:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('department',":message")); ?></small>

            <div class="input-group mb-3">
              <select name="department" class="form-control form-control-sm cls_selection">
                  <option value="<?php echo e(Crypt::encrypt(0)); ?>">Select Department</option>

                 <?php $__currentLoopData = $department_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                 <option value="<?php echo e(Crypt::encrypt($rows->id)); ?>"><?php echo e(ucfirst($rows->code)); ?> <?php echo e(ucfirst($rows->name)); ?>

                 </option>
                 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
          </div>

                <div class="col-sm-6">
                <label class="label-color">Temporary Address:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('temporary_address',":message")); ?></small>

            <div class="input-group mb-3">
             <!--  <div class="input-group-prepend">
                <span class="input-group-text" id="inputGroup-sizing-default">
                  <i class="fa fa-address-card   "></i>
                </span>
              </div> -->
              <?php echo e(Form::Textarea('temporary_address', '', ['class' => 'form-control form-control-sm', 'placeholder' => 'Temporary address' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','rows' => 2])); ?>

            </div>
          </div>

           <div class="col-sm-6">
                <label class="label-color">Permanent Address:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('permanent_address',":message")); ?></small>

            <div class="input-group mb-3">
             <!--  <div class="input-group-prepend">
                <span class="input-group-text" id="inputGroup-sizing-default">
                  <i class="fa fa-address-card   "></i>
                </span>
              </div> -->
              <?php echo e(Form::textarea('permanent_address', '', ['class' => 'form-control form-control-sm', 'placeholder' => 'Permanent address' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','rows' => 2])); ?>

            </div>
          </div>


                                   <div class="col-md-12">
                            <label class="label-color">Upload Document:</label>
                               <small class="form-errors pull-right " value=""><?php echo e($errors->first('employee_form',":message")); ?></small>
                               <div class="input-group mb-3">
                                 <div class="input-group-prepend">
                                   <span class="input-group-text" id="inputGroup-sizing-default">
                                     <i class="fa fa-file "></i>
                                   </span>
                                 </div>
                                 <input type="file" name="employee_form" class="form-control form-control-sm btn-xsm" required>
                                <div class="input-group-prepend">
                                   <span class="input-group-text" id="inputGroup-sizing-default">
                                     <i class ="userimage" >PDF,DOC,DOCX,XLS</i>
                                   </span>
                                 </div>

                               </div>
                             </div>



           <div class="col-sm-12">
           <label class="label-color">Upload Photo:</label>

            <small class="form-errors pull-right " value=""><?php echo e($errors->first('user_image',":message")); ?></small>

            <div class="input-group mb-3">
              <div class="input-group-prepend">
                <span class="input-group-text" id="inputGroup-sizing-default">
                  <i class="fa fa-camera "></i>
                </span>
              </div>
              <input type="file" name="user_image" class="form-control form-control-sm btn-xsm">
             <div class="input-group-prepend">
                <span class="input-group-text" id="inputGroup-sizing-default">
                  <i class ="userimage" >PNG,JPG,JPEG</i>
                </span>
              </div>

            </div>
          </div>
          
          
        
       </div>
      </div>
    </div>

       <div class = "card">
      <div class = "card-header">
        <div class = "col-md-5">
    <strong class="strong-margin">SALARY INFORMATION</strong>
     </div>
              <div class = "col-md-6">
               
   
     </div>
             <div class = "col-md-1">
           <img src = "<?php echo e(asset('assets/images/icons/accountinformation.png')); ?>"/>
               
      </div>
    </div>
      <div class = "card-body  form-fieldset">
        <div class = "row">
          <div class = "col-md-12">

               <label class="label-color">Salary Mode:</label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('salary_mode',":message")); ?></small>

            <div class="input-group mb-3">
            
              <?php ($mode_list = []); ?>

              <?php $__currentLoopData = EF::getSalaryMode(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php ($mode_list += [$rows => $rows]); ?>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

             <?php echo e(Form::select('salary_mode', $mode_list, '' , array('class' => 'form-control form-control-sm  cls_selection','onChange' => 'checkPaymentMode(this,"bank_section")'))); ?>

            </div>    
          </div>
        

        </div>
           <div class ="bank_section row" style="display:none;">

          <div class="col-sm-4">
               <label class="label-color">Bank Branch:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('bank_branch',":message")); ?></small>

            <div class="input-group mb-3">
              
              <?php echo e(Form::Text('bank_branch', '', ['class' => 'form-control form-control-sm  cls_required bank_branch', 'placeholder' => 'Bank Branch ' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>   
          </div>

                     <div class="col-sm-4">
               <label class="label-color">Bank Name:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('bank_name',":message")); ?></small>

            <div class="input-group mb-3">
         
              <?php echo e(Form::Text('bank_name', '', ['class' => 'form-control form-control-sm    cls_required bank_name', 'placeholder' => 'Bank Name' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>   
          </div>

           <div class="col-sm-4">
               <label class="label-color">Account No:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('account_no',":message")); ?></small>

            <div class="input-group mb-3">
         
              <?php echo e(Form::Text('account_no', '', ['class' => 'form-control form-control-sm   cls_required account_no', 'placeholder' => 'Account No' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>   
          </div>
    
          </div>
      </div>

    </div>
    <div class = "card">
      <div class = "card-header">
        <div class = "col-md-5">
    <strong class="strong-margin">ACCOUNT INFORMATION</strong>
     </div>
              <div class = "col-md-6">
               
   
     </div>
             <div class = "col-md-1">
           <img src = "<?php echo e(asset('assets/images/icons/accountinformation.png')); ?>"/>
               
      </div>
    </div>
      <div class = "card-body  form-fieldset">
        <div class = "row">
          <?php echo $__env->make('layouts.common.authentication', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        </div>
      </div>

    </div>
  </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="submit" onClick="storeEmployee(event,this)" class="btn btn-primary <?php if(EF::getUrl() == 'employees'): ?> cls_submit <?php endif; ?>" content="add employee">Add Employee</button>
      </div>
    </div>
  </div>
  <?php echo e(Form::close()); ?>

</div>
<!-- END MODAL ADD BRANCH -->
<?php endif; ?><?php /**PATH /home/ubuntu/rebmgisplus/skylite/resources/views/user/modals/add_employee.blade.php ENDPATH**/ ?>