
<?php $__env->startSection('content'); ?>
<style>
    .status-pending {
        color: #ffc107;
        font-weight: 500;
    }
    .status-approved {
        color: #28a745;
        font-weight: 500;
    }
    .status-rejected {
        color: #dc3545;
        font-weight: 500;
    }
    .document-link {
        color: #4e73df;
    }
    .document-link:hover {
        text-decoration: underline;
    }
    .action-btns .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
</style>

<!-- begin::main content -->
<main class="main-content">
    <div class="container">
        <!-- begin::page header -->
        <div class="page-header">
            <h3>Reimbursement Claims</h3>
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Dashboard</a></li>
                    <li class="breadcrumb-item active" aria-current="page">All Claims</li>
                </ol>
            </nav>
        </div>
        
        <?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
        
        <div class="card">
            <div class="card-header pt-5">
                <div class="row">
                    <div class="col-md-10">
                        <form action="<?php echo e(asset('employee/employee-reimbursements')); ?>" class="row" method="GET">
                            <div class="form-group col-3">
                                <label>Claim Date</label>
                                <input type="date" name="claim_date" class="form-control" value="<?php echo e(isset($_GET['claim_date']) ? $_GET['claim_date'] : ''); ?>">
                            </div>
                            <div class="form-group col-3">
                                <label>Expense Date</label>
                                <input type="date" name="expense_date" class="form-control" value="<?php echo e(isset($_GET['expense_date']) ? $_GET['expense_date'] : ''); ?>">
                            </div>
                            <div class="form-group col-3">
                                    <label for="claim_type" class="required-field">Claim Type</label>
                                    <select class="form-control" id="claim_type" name="claim_type" required>
                                        <option selected disabled>Select Claim Type</option>
                                        <option value="travel" <?php echo e(isset($_GET['claim_type']) && $_GET['claim_type'] == 'travel' ? 'selected' : ''); ?>>Travel Expense</option>
                                        <option value="medical" <?php echo e(isset($_GET['claim_type']) && $_GET['claim_type'] == 'medical' ? 'selected' : ''); ?>>Medical Expense</option>
                                        <option value="meal" <?php echo e(isset($_GET['claim_type']) && $_GET['claim_type'] == 'meal' ? 'selected' : ''); ?>>Meal Expense</option>
                                        <option value="lodging" <?php echo e(isset($_GET['claim_type']) && $_GET['claim_type'] == 'lodging' ? 'selected' : ''); ?>>Lodging Expense</option>
                                        <option value="office_supplies" <?php echo e(isset($_GET['claim_type']) && $_GET['claim_type'] == 'office_supplies' ? 'selected' : ''); ?>>Office Supplies</option>
                                        <option value="other" <?php echo e(isset($_GET['claim_type']) && $_GET['claim_type'] == 'other' ? 'selected' : ''); ?>>Other</option>
                                    </select>
                                </div>
                            <div class=" col-3 pt-4">
                                <div>
                                    <button class="btn btn-outline-secondary" type="submit"><i class="ti ti-search"></i></button>
                                    <a href="<?php echo e(asset('employee/employee-reimbursements')); ?>" class="btn btn-outline-secondary"><i class="ti ti-reload"></i></a>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="col-md-2 text-right pt-4">
                        <a href="<?php echo e(asset('employee/add-reimbursement')); ?>" class="btn btn-success text-white">
                            <i class="fa fa-plus mr-2"></i> New Claim
                        </a>
                    </div>
                </div>
            </div>
            
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-striped table-hover">
                        <thead class="thead-light">
                            <tr>
                                <th>#</th>
                                <th>Claim Date</th>
                                <th>Type</th>
                                <th>Description</th>
                                <th>Amount</th>
                                <th>Expense Date</th>
                                <th>Status</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <?php if($reimbursement->count() != 0): ?>
                            <tbody>
                                <?php $__currentLoopData = $reimbursement; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e(++$key); ?></td>
                                    <td><?php echo e($value->claim_date); ?></td>
                                    <td><?php echo e($value->claim_type); ?></td>
                                    <td><?php echo e($value->description); ?></td>
                                    <td>₹<?php echo e($value->amount); ?></td>
                                    <td><?php echo e($value->expense_date); ?></td>
                                    
                                    <td>
                                        <?php if($value->status == "approved"): ?>
                                        <span class="status-approved">
                                            <i class="fa fa-check-circle mr-1"></i> Approved
                                        </span>
                                        <?php endif; ?>
                                        <?php if($value->status == "pending"): ?>
                                        <span class="text-warning">
                                            <i class="ti-alarm-clock mr-1"></i> Pending
                                        </span>
                                        <?php endif; ?>
                                        <?php if($value->status == "reject"): ?>
                                        <span class="text-danger">
                                            <i class="fa fa-times-circle mr-1"></i> Reject
                                        </span>
                                        <?php endif; ?>
                                    </td>
                                    <td class="action-btns">
                                        <a href="<?php echo e($value->document_path); ?>" target="_blank" class="document-link btn btn-sm btn-outline-info">
                                            <i class="fa fa-eye"></i>
                                        </a>
                                        
                                        <?php if($value->status == "pending"): ?>
                                        <a href="<?php echo e(asset('employee/edit-employee-reimbursement/'.$value->id)); ?>" class="btn btn-sm btn-success">
                                            <i class="fa fa-edit"></i>
                                        </a>
                                        <?php endif; ?>

                                    </td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                
                            </tbody>
                        <?php endif; ?>
                    </table>
                </div>
                
                
                <div class="mt-3">
                <?php echo e($reimbursement->links('pagination::bootstrap-4')); ?> 
                </div>
            
            </div>
        </div>
    </div>
</main>
<!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\blurb_erp\resources\views/hrms/employee_panel/reimbursement/list.blade.php ENDPATH**/ ?>