<section class="container">
    <div class="row">
        <div class="col col-md-4">
            <div class="card bg-light-transparent">
                <div class="card-body">
                    <div class="card no-shadow">
                        <div class="card-body">
                            <ul class="navbar-nav">
                                <li class="nav-item">
                                    <a href="<?php echo base_url('/hr/claim/adminProcessedClaim/'); ?>" class="nav-link btn btn-primary active">All</a>
                                </li>

                                <?php if(!empty($departments)): ?>
                                    <?php foreach($departments as $department): ?>
                                        <li class="nav-item">
                                            <a href="<?php echo base_url('/hr/claim/adminProcessedClaim/'.$department->id); ?>" class="nav-link btn btn-light"><?php echo $department->name; ?></a>
                                        </li>
                                    <?php endforeach ?>
                                <?php endif ?>

                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col col-md-8">
            
            <div class="card bg-light-transparent">
                <div class="card">
                    <div class="card-body">
                        <div class="row">
                            <div class="col-10">
                                <div class="row">
                                    <div class="col">
                                        <select class="form-control form-control-sm">
                                            <option>All</option>
                                            <option>January</option>
                                        </select>
                                    </div>

                                    <div class="col">
                                        <select class="form-control form-control-sm">
                                            <option>All</option>
                                            <option>2019</option>
                                        </select>
                                    </div>

                                    <div class="col-2">
                                        <button class="btn btn-primary btn-sm btn-block"><i class="fas fa-search"></i></button>
                                    </div>
                                </div>
                            </div>
                            <div class="col text-right">
                                <a class="btn btn-outline-dark btn-sm" href=""  target="_blank"><i class="fas fa-print"></i></a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="card-body">
                    <div class="card no-shadow">
                        <div class="card-body">
                            <div class="table-responsive">
                                <table class="table table-bordered">
                                    <thead>
                                        <tr>
                                            <th>Name</th>
                                            <th>Submission Month</th>
                                            <th>Year</th>
                                            <th>Status</th>
                                            <th></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if(!empty($claims)): ?>
                                            <?php foreach($claims as $claim): ?>
                                                <tr>
                                                    <td>
                                                       <?php echo (!empty($claim->name))?$claim->name:'';?>
                                                    </td>
                                                    <td>
                                                        <?php echo date('F',strtotime('01-'.$claim->month.'-'.$claim->year)); ?>
                                                    </td>
                                                    <td>
                                                        <?php echo date('Y',strtotime('01-'.$claim->month.'-'.$claim->year)); ?>                                                           
                                                    </td>
                                                    <td>Complete</td>
                                                    <td class="text-center">
                                                        <a class="btn btn-primary btn-sm" href="<?php echo base_url('/hr/claim/adminClaimDetail/'.$claim->year.'/'.$claim->month.'/'.$claim->user_id.'/'.$claim->id.'/approval-admin'); ?>" target="_blank"><i class="fas fa-eye"></i></a>
                                                    </td>
                                                </tr>
                                            <?php endforeach ?>
                                        <?php endif ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>