<?php $__env->startSection('title','List of Cases | '); ?>
<?php $__env->startSection('content'); ?>
<!-- Content Header (Page header) -->
<div class="content-header">
    <div class="container-fluid">
        <div class="row mb-2">
            <div class="col-sm-6">
                <h1 class="m-0">All Cases</h1>
            </div><!-- /.col -->
            <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                    <li class="breadcrumb-item"><a href="#">Home</a></li>
                    <li class="breadcrumb-item active">Case</li>
                </ol>
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
    <div class="container-fluid pb-5">
        <div class="card">
            <div class="card-header">
                <h3 class="card-title">List of all cases</h3>
            </div>
            <!-- /.card-header -->
            <div class="card-body">
                <table id="claimListing" class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>Sr No.</th>
                            <th>Employee</th>
                            <th>Case Number</th>
                            <th>Case Register For</th>
                            <th>Case File Date</th>
                            <th>Plantiff</th>
                            <th>Defendant</th>
                            <th>Lawyer Name</th>
                            <th>Hearing Date</th>
                            <th>Case Remark</th>
                            <th>Action</th>
                        </tr>
                    </thead>

                    <tbody>
                        <?php if($cases->count() > 0): ?>
                        <?php
                        $count = 1;
                        ?>
                        <?php $__currentLoopData = $cases; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr class="<?php echo e(($data->case_status == 3) ? 'bg-success' : ''); ?>">
                            <td><?php echo e($count); ?></td>
                            <td>
                                <?php if($data->case_register_for == 1): ?>
                                <a href="<?php echo e(route('view.claim.details',$data->claim_id)); ?>"  <?php if($data->case_status == 3): ?> class="text-white" <?php endif; ?>><?php echo e($data->emp_name); ?>(<?php echo e($data->emp_id); ?>)[<?php echo e($data->claim_category); ?>]</a>
                                <?php endif; ?>
                                
                                <?php if($data->case_register_for == 2): ?>
                                <a href="<?php echo e(route('view.cases.details',$data->id)); ?>"><?php echo e($data->plaintiff); ?></a>
                                <?php endif; ?>
                                
                            </td>
                            <td><?php echo e($data->case_number); ?></td>
                            <td><?php echo e(($data->case_register_for == 1) ? 'Rejected Claim' : 'Other'); ?></td>
                            <td><?php echo e(formatDate($data->case_file_date)); ?></td>
                            <td><?php echo e($data->plaintiff); ?></td>
                            <td><?php echo e($data->defendant); ?></td>
                            <td><?php echo e($data->lawyer_name); ?></td>
                            <td><?php echo e(formatDate($data->hearing)); ?></td>
                            <td><?php echo e($data->case_remark); ?></td>
                            <td class="d-flex">
                                <ul class="nav">
                                    <li class="nav-item dropdown dropleft">
                                        <a class="nav-link p-0 dropdown-toggle " data-toggle="dropdown" href="#" role="button" aria-expanded="false">Action</a>
                                        <div class="dropdown-menu">
                                            <!-- view case details -->
                                            <a href="<?php echo e(route('view.cases.details',$data->id)); ?>" data-toggle="tooltip" data-placement="top" title="View Case Details" class="dropdown-item text-primary"><i class="fas fa-eye"></i> View</a>
                                            <!-- edit case details -->
                                            <a href="<?php echo e(route('edit.cases',$data->id)); ?>"  data-toggle="tooltip" data-placement="top" title="Edit Case Details" class="dropdown-item text-primary" <?php if($data->case_status == 3): ?> onclick="return false;" <?php endif; ?>><i class="fa fa-edit"></i> Edit</a>
                                            <!-- update hearing dates -->
                                            <a href="<?php echo e(route('update.hearing',$data->id)); ?>" data-toggle="tooltip" data-placement="top" title="Update Hearing Date" class="dropdown-item text-primary" <?php if($data->case_status == 3): ?> onclick="return false;" <?php endif; ?>><i class="fa fa-calendar-alt"></i> Hearings</a>
                                        </div>
                                    </li>
                                </ul>

                                <!-- <a href="<?php echo e(route('view.cases.details',$data->id)); ?>" class="btn btn-primary btn-sm mr-1 d-flex justify-content-center align-items-center">View</a>
                                <a href="<?php echo e(route('edit.cases',$data->id)); ?>" class="btn btn-secondary btn-sm mr-1 d-flex justify-content-center align-items-center" <?php if($data->case_status == 3): ?> onclick="return false;" <?php endif; ?>>Edit</a>
                                <a href="<?php echo e(route('update.hearing',$data->id)); ?>" class="btn btn-warning btn-sm mr-1 d-flex justify-content-center align-items-center" <?php if($data->case_status == 3): ?> onclick="return false;" <?php endif; ?>>Update Hearings</a> -->
                                
                                <!-- For update claim remark -->
                                <!-- <a href="<?php echo e(route('create.case.remark',[2,$data->id])); ?>" data-toggle="tooltip" data-placement="top" title="Update Remark of Case" class="btn btn-secondary btn-sm mr-1  d-flex justify-content-center align-items-center">Update Remark</a> -->
                                <!-- To view remarks -->
                                <!-- <a href="<?php echo e(route('view.remark',[2,$data->id])); ?>" data-toggle="tooltip" data-placement="top" title="View Remarks of Cases" class="btn btn-info btn-sm mr-1  d-flex justify-content-center align-items-center">View Remarks</a> -->
                            </td>
                        </tr>
                        <?php
                        $count++;
                        ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
            <!-- /.card-body -->
        </div>
        <!-- /.card -->
    </div>
    <!--/. container-fluid -->
</section>
<!-- /.content -->
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/legalclaim231/public_html/resources/views/pages/cases/caseListing.blade.php ENDPATH**/ ?>