<?php $__env->startSection('content'); ?>
  <article class="content items-list-page">
                    <div class="title-search-block">
               
                        <div class="title-block">
                            <div class="row">
                                <div class="col-md-6">
                                    <h3 class="title">
                    Designations <button type="button" class="btn btn-primary btn-sm rounded-s btn-pill-right" data-toggle="modal" data-target="#myModal"><i class="fa fa-location-arrow"></i> New Designation </button>
                    <!--<a href="<?php echo e(url('admin/emp/create')); ?>" class="btn btn-primary btn-sm rounded-s">
                        <i class="fa fa-location-arrow"></i> New Appointment
                    </a> -->
                    
              
                </h3>
                                    <p class="title-description"> 
        <ul class='breadcrumb'>
        <li><a href="<?php echo e(URL('admin/dashboard')); ?>"><i class="fa fa-home"></i> Dashboard</a></li>
        <li>Designations</li>

    </ul>
</p>
                                </div>
                            </div>
                        </div>
                       
                    </div>
 <?php if(count($errors) > 0): ?>
                        <div class="alert alert-danger">
                            <strong>Whoops!</strong> There were some problems with your input.<br><br>
                            <ul>
                                <?php foreach($errors->all() as $error): ?>
                                    <li><?php echo e($error); ?></li>
                                <?php endforeach; ?>
                            </ul>
                        </div>
                    <?php endif; ?>

                 <?php if(Session::has('message')): ?>
                        <div class="alert alert-success">
                            <strong>  <?php echo e(Session('message')); ?> </strong>
                        </div>
                    <?php endif; ?>


                    <?php if(count($posting) > 0): ?>
                    <table class="table table-striped sortable">
                    
                     <tbody>
                      <?php foreach($posting as $emp): ?>
                      <tr>
                            <td><strong><a href="<?php echo e(URL::to('admin/company/posting/edit/' . $emp->id)); ?>"><?php echo e($emp->post); ?></a></strong> <br />
                              <span class="label label-default"><?php echo e($emp->dept->department); ?></span></td>
                           <td><h5><i class="fa fa-group"></i> <?php echo e($emp->count); ?> Employees</h5></td>
                            
                        </tr>
                         <?php endforeach; ?>
                     </tbody>

                     </table>
                         <nav class="text-xs-right">
                       <?php echo str_replace('/?', '?', $posting->render()); ?>

                      </nav>
                    <?php else: ?>
                       <h3>No Data Found!</h3>
                    <?php endif; ?>



                      
                   
                </article>



<!-- new creation -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">

  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel"><i class="fa fa-location-arrow"></i> New Designation</h4>
      </div>
      <div class="modal-body">
 <form class="form-horizontal" role="form" method="POST" action="<?php echo e(url('/admin/posting/docreate')); ?>">
                        <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                        <div class="form-group">
                            <label class="control-label">Posting*</label>
                            
                                <input type="text" class="form-control underlined" name="post" value="">
                            
                        </div>

                        <div class="form-group">
                            <label class="control-label">Department*</label>
                            
 <select class="form-control underlined" name="dept_id">                               
<?php foreach($dept as $dep): ?>
  <option value="<?php echo e($dep->id); ?> "><?php echo e($dep->department); ?></option>
  <?php endforeach; ?>
</select>
                            
                            

                        </div>         
<div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-times"></i> Cancel</button>
        <button type="submit" class="btn btn-primary"><i class="fa fa-check"></i> Save changes</button>
        </form>
      </div>
            
                                
      
                       

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

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

<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>