<?php $__env->startSection('content'); ?>
  <?php $success = false; ?>
    <?php if(\Session::has('error')): ?>
        <div class="alert alert-danger">
            <?php echo \Session::get('error'); ?>

        </div>
    <?php endif; ?>
    <?php if(\Session::has('success')): ?>
    <?php $success = true; ?> 
        <div class="alert alert-success">
            <?php echo \Session::get('success'); ?>

        </div>
    <?php endif; ?>
<div class="page-content fade-in-up">
    <div class="ibox">
        <div class="ibox-body">
            <h5 class="font-strong mb-4"><?php echo e(__('Question Listing')); ?></h5>
               
              
               <div class="row">

                    <div class="col-md-12">                          
                        <form class="form-info form-inline1 form-search " action="javascript:;">
                            <div class="ibox-body" >
                                <div class="row">
                                    <div class="col-sm-3 form-group">
                                        <label>Search</label>
                                        <input class="form-control text-search" type="text" placeholder="">
                                        
                                    </div>
                                    <div class="col-sm-3 form-group">
                                        <label>Chief Complain</label>
                                        <!-- <input class="form-control complain-search" name="complainType" type="text" placeholder=""> -->
                                         <select class="form-control complain-search">
                                                <option value="">- Any -</option>
                                                <?php if($cheifComplainTypes): ?>
                                                    <?php $__currentLoopData = $cheifComplainTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <?php if($row->status == 0): ?>
                                                    <?php ($status = ' (Inactive)'); ?>
                                                    <?php else: ?>
                                                    <?php ($status = ''); ?>
                                                    <?php endif; ?>
                                                        <option  value="<?php echo e($row->id); ?>"><?php echo e($row->name); ?><?php echo e($status); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                <?php endif; ?>
                                        </select>
                                    </div>
                                    <div class="col-sm-3 form-group">
                                        <label>Question Category</label>
                                        <select class="form-control category-search" >
                                                <option value="">- Any -</option>
                                                <?php if($questionCategories): ?>
                                                    <?php $__currentLoopData = $questionCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <?php if($row->status == 0): ?>
                                                        <?php ($status = ' (Inactive)'); ?>
                                                        <?php else: ?>
                                                        <?php ($status = ''); ?>
                                                        <?php endif; ?>
                                                        <option  value="<?php echo e($row->id); ?>"><?php echo e($row->title); ?><?php echo e($status); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                <?php endif; ?>
                                        </select>
                                    </div>
                                    <div class="col-sm-3 form-group">
                                        <label>Status</label>

                                        <div class="row last-row">

                                            <div class="col-sm-6 form-group element-1" >

                                                    <select class="form-control status-search" name="status" >
                                                            <option value="">- Any -</option>
                                                            <option value="1">Active</option>
                                                            <option value="0">Inactive</option>
                                                    </select>

                                            </div>

                                            <div class="col-sm-6 form-group element-2" >
                                                <button class="btn btn-info button-search" type="button">Search</button>
                                            </div>
                                        </div>
                                         
                                    </div>
                                </div>                               
                            </div>
                        </form>
                    </div>

               </div>
               
                <table
                    class="table table-bordered table-hover" 
                    id="questions" 
                    data-source = "<?php echo e(route('Questions_ajax')); ?>"
                    data-cols = ",,,,,"
                    data-search = "false"
                    >
                    <thead class="thead-default thead-lg">
                         <tr>
                            <th width="15%">Chief Complain</th>
                            <th width="15%">Category</th>
                            <th width="30%">Question</th>
                            <!-- <th width="10%">Sort Order</th> -->
                            <th width="20%">Options</th>
                            <th width="5%">Status</th>
                            <th width="5%">Actions</th>
                        </tr>
                    </thead>
                </table>
        </div>
    </div>
</div>

        <!-- END PAGE CONTENT-->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script>
    DataTable.initDataTable('#questions');
    $('.button-search').click(function()
    {   
        DataTable.reDraw(); 
    });

</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('physician.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>