<?php $__env->startSection('title', 'Director Complaint List'); ?>
<?php $__env->startSection('content'); ?>
    <div class="validation-page">
        <div class="container-fluid text-left">
            <h2>Complaint List</h2>
        </div>
        <br>
        <br>
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-9">
                    <div class="panel panel-default">
                        <div class="panel-heading clearfix">
                            Complaints List
                        </div>
                        <div class="panel-body">
                            <table class="table data-table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th>Complainant Name</th>
                                    <th>Token No</th>
                                    <th>Subject</th>
                                    <th>Status</th>
                                    <th>Created Date</th>
                                    <th>Action</th>
                                </tr>
                                </thead>
                                <tfoot>
                                <tr>
                                    <th>Complainant Name</th>
                                    <th>Token No</th>
                                    <th>Subject</th>
                                    <th>Status</th>
                                    <th>Created Date</th>
                                    <th>Action</th>
                                </tr>
                                </tfoot>
                                <tbody>
                                <?php $__currentLoopData = $complaints; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $items): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr class="<?php echo e($items->status); ?>">
                                        <td><?php echo e($items->complainant_name); ?></td>
                                        <td><?php echo e($items->token); ?></td>
                                        <td><?php echo e($items->Subject); ?></td>
                                        <td><?php echo e($items->status); ?></td>
                                        <td><?php echo e($items->created_at->format('d M Y')); ?></td>
                                        <td class="text-center">
                                             <span data-toggle="tooltip" title="comments">
                                                   <a target="_blank" href="<?php echo e(url('/complaint_comments', ['id'=>$items->id])); ?>" class="btn-xs btn btn-warning"><i class="fa fa-comment"></i> </a>
                                            </span>
                                            <span data-toggle="tooltip" title="Edit">
                                                   <a target="_blank"  href="<?php echo e(url('/edit-complaint', ['id'=>$items->id])); ?>" class="btn-xs btn btn-success"><i class="fa fa-pencil"></i> </a>
                                            </span>

                                            <span data-toggle="tooltip" title="View">
                                            <a target="_blank" href="<?php echo e(url('/view-complaints', ['id'=>$items->id])); ?>" class="btn-xs btn btn-primary" value="<?php echo e($items->id); ?>"><i class="fa fa-eye"></i></a>

                                        </span>
                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="panel panel-default">
                        <div class="panel-heading">Search Filter</div>
                        <div class="panel-body">
                            <?php echo e(Form::open(['url' => 'search-filter', 'class'=>'filter-form'])); ?>

                            <div class="form-group">
                                <label>Select Date</label>
                                <select name="date" class="form-control text-capitalize">
                                    <?php if( !empty ( $selection_date ) ): ?>
                                        <option selected value="<?php echo e($selection_date); ?>"><?php echo e($selection_date); ?></option>
                                        <option value>select</option>

                                    <?php else: ?>
                                        <option selected value>select</option>
                                    <?php endif; ?>
                                    <option value="today">Today</option>
                                    <option value="yesterday">Yesterday</option>
                                    <option value="week">Last 7 Days</option>
                                    <option value="month">Last Month</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Issue Status</label>
                                <select name="status" class="form-control text-capitalize">
                                    <?php if( !empty ( $status ) ): ?>
                                        <option selected value="<?php echo e($status); ?>"><?php echo e($status); ?></option>
                                        <option value>select</option>

                                    <?php else: ?>
                                        <option selected value>select</option>
                                    <?php endif; ?>
                                    <option value="open">Open</option>
                                    <option value="closed">Closed</option>
                                    <option value="over due">Over Due</option>
                                    <option value="under process">Under Process</option>
                                </select>
                            </div>

                            <div class="form-group clearfix">
                                <button type="submit" class="btn btn-success pull-right rounded"> Search </button>
                            </div>

                            <?php echo e(Form::close()); ?>

                        </div>
                    </div>

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


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


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