

<?php $__env->startSection('content'); ?>

    <div class="right-side">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <!-- Starting of Dashboard orders data-table area -->
                    <div class="section-padding add-product-1">
                        <div class="row">
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                <div class="add-product-box customers">
                                    <div class="add-product-header">
                                        <h2>Staff</h2>
                                        <a href="<?php echo url('admin/staffs/create'); ?>" class="add-newProduct-btn"><i class="fa fa-plus-circle"></i> Add New Staff</a>
                                    </div>
                                    <hr/>
                                    <div class="table-responsive">
                                        <div id="response" class="col-md-12">
                                            <?php if(Session::has('message')): ?>
                                                <div class="alert alert-success alert-dismissable">
                                                    <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                                                    <?php echo e(Session::get('message')); ?>

                                                </div>
                                            <?php endif; ?>
                                        </div>
                                        <table id="product-table_wrapper" class="table table-striped table-hover products dt-responsive nowrap" cellspacing="0" width="100%">
                                            <thead>
                                            <tr>
                                                <th>Staff Name</th>
                                                <th width="10%">Email</th>
                                                <th>Phone</th>
                                                <th width="10%">Role</th>
                                                <th>Status</th>
                                                <th>Actions</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php $__currentLoopData = $staffs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $staff): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <tr>
                                                    <td><?php echo e($staff->name); ?></td>
                                                    <td><?php echo e($staff->email); ?></td>
                                                    <td><?php echo e($staff->phone); ?></td>
                                                    <td><?php echo e(ucfirst($staff->role)); ?></td>
                                                    <td>
                                                        <?php if($staff->status == 1): ?>
                                                            Active
                                                        <?php else: ?>
                                                            Banned
                                                        <?php endif; ?>
                                                    </td>
                                                    <td>
                                                        <form method="POST" action="<?php echo action('StaffController@destroy',['id' => $staff->id]); ?>">
                                                            <?php echo e(csrf_field()); ?>

                                                            <input type="hidden" name="_method" value="DELETE">
                                                            <a href="staffs/<?php echo e($staff->id); ?>" class="btn btn-primary product-btn"><i class="fa fa-check"></i> View Details </a>

                                                            <?php if($staff->id != 1): ?>
                                                                <button type="submit" class="btn btn-danger product-btn"><i class="fa fa-trash"></i> Remove </button>
                                                            <?php endif; ?>
                                                        </form>
                                                    </td>
                                                </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </tbody>
                                        </table>
                                    </div>
                                    <hr/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- Ending of Dashboard orders data-table area -->

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

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

<?php $__env->startSection('footer'); ?>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.includes.masterpage-admin', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>