<section class="container" style="padding-bottom: 2rem;">
  <div class="card bg-light-transparent">
    <div class="card-body">
        <div class="card no-shadow">
            <div class="card-body">
                <div class="table-responsive">
                    <table id="table_forms" class="table table-bordered table-hover">
                        <thead>
                            <th>Department</th>
                            <th>Branch</th>
                            <th>Head of Department</th>
                        </thead>
                        <tbody>
                        <?php if(isset($departments)): ?>
                            <?php foreach($departments as $dept): ?>
                                <tr>
                                    <td><a href="<?php echo base_url('hr/leave/department/').$dept['id']; ?>"><?php echo $dept['name']; ?></a></td>
                                    <td><?php echo $dept['branch_name']; ?></td>
                                    <td><a href="<?php echo base_url('hr/leave/application/').$dept['hod_id']; ?>"><?php echo $dept['hod_name']; ?></a></td>
                                </tr>
                            <?php endforeach; ?>
                        <?php endif; ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
  </div>
</section>