<?php $__env->startSection('title','List of Claims | '); ?>
<?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 Claims</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">Claims</li>
                </ol>
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
    <div class="container-fluid">
        <div class="card">
            <div class="card-header">
                <h3 class="card-title">List of all claims</h3>
            </div>
            <!-- /.card-header -->
            <div class="card-body">
                <table id="claimListing" class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>Sr No.</th>
                            <th>Emp ID</th>
                            <th>Emp Name</th>
                            <th>Mobile</th>
                            <th>Aadhar</th>
                            <th>Claim Type</th>
                            <th>Claim For</th>
                            <th>Action</th>
                        </tr>
                    </thead>

                    <tbody>
                        <?php if($claims->count() > 0): ?>
                        <?php
                        $count = 1;
                        ?>
                        <?php $__currentLoopData = $claims; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($count); ?></td>
                            <td><?php echo e($data->emp_id); ?></td>
                            <td><?php echo e($data->emp_name); ?></td>
                            <td><?php echo e($data->emp_mobile); ?></td>
                            <td><?php echo e($data->aadhar_number); ?></td>
                            <td>
                                <?php if($data->claim_type == 1): ?>
                                <?php echo e(__('Death')); ?>

                                <?php elseif($data->claim_type == 2): ?>
                                <?php echo e(__('Accident')); ?>

                                <?php endif; ?>
                            </td>
                            <td>
                                <?php if($data->claim_applied_for->count() > 0): ?>
                                    <?php $__currentLoopData = $data->claim_applied_for; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $items): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                   
                                    <span class="">
                                        <a href="<?php echo e(route('update.claim.status',[$data->claim_id,$items->claim_category])); ?>" target="_blank"><?php echo e($items->claim_category); ?> (<?php echo e($items->claim_text_status); ?>)</a>
                                    </span>
                                    <span class="ml-2" data-toggle="tooltip" data-placement="top" title="Edit Applied <?php echo e($items->claim_category); ?> Claim">
                                        <a href="<?php echo e(route('edit.next.claim.form',[$data->claim_id,$items->claim_category])); ?>"><i class="fa fa-edit"></i></a>
                                    </span>
                                    <!-- For update claim remark -->
                                    <span class="ml-2" data-toggle="tooltip" data-placement="top" title="Update Remark on <?php echo e($items->claim_category); ?> Claim">
                                        <a href="<?php echo e(route('create.claim.remark',[1,$items->id])); ?>"><i class="fas fa-comment"></i></a>
                                    </span>
                                    <!-- To view remarks -->
                                    <span class="ml-2" data-toggle="tooltip" data-placement="top" title="View Remarks of <?php echo e($items->claim_category); ?> Claim">
                                        <a href="<?php echo e(route('view.remark',[1,$items->id])); ?>"><i class="fas fa-eye"></i></a>
                                    </span><br>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php else: ?>
                                    <span class="">EPF (Not Applied)</span><br>
                                    <span class="">ESI (Not Applied)</span><br>
                                    <span class="">WC (Not Applied)</span><br>
                                    <span class="">GPA (Not Applied)</span>
                                <?php endif; ?>
                            </td>
                            <td>
                                <a data-toggle="tooltip" data-placement="top" title="Claim" href="<?php echo e(route('next.claim.form',$data->claim_id)); ?>" class="btn btn-info btn-sm" target="_blank">Claim</a>
                                <a href="<?php echo e(route('edit.claim.info',$data->claim_id)); ?>" class="btn btn-warning btn-sm">Edit</a>
                                <a href="<?php echo e(route('view.claim.details',$data->claim_id)); ?>" class="btn btn-primary btn-sm" target="_blank">View</a>
                               
                            </td>
                        </tr>
                        <?php
                        $count++;
                        ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endif; ?>
                    </tbody>
                    <tfooter>
                        <tr>
                            <th>Sr No.</th>
                            <th>Emp ID</th>
                            <th>Emp Name</th>
                            <th>Mobile</th>
                            <th>Aadhar</th>
                            <th>Claim Type</th>
                            <th>Claim For</th>
                            <th>Action</th>
                        </tr>
                    </tfooter>
                </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 /var/www/html/claim_and_case_management/resources/views/pages/claims/claimListing.blade.php ENDPATH**/ ?>