<div class="page-header">
    <h3 class="page-title">
        <span class="page-title-icon bg-success text-white mr-2">
            <i class="mdi mdi-briefcase-outline mdi-24px"></i>
        </span>
        Freelance jobs as hired
    </h3>
</div>

<div class="row justify-content-center">
    <div class="col-12 col-md-12 ">
        <div class="table-responsive">
            <table class="table table-hover" id="datatable">

                <thead class="bg-warning">
                    <tr>
                        <th>SL</th>
                        <th>Title</th>
                        <th>Category</th>
                        <th>Budget</th>
                        <th>Bid Amount</th>
                        <th>Status</th>
                        <th>Manage</th>
                    </tr>
                </thead>

                <tbody>
                <?php
                    if ($jobs)
                    {
                        foreach ($jobs as $key=>$job)
                        {
                            ?>
                            <tr>
                                <td><?= ($key+1) ?></td>
                                <td><?= $job->title ?></td>
                                <td><?= $job->category ?></td>
                                <td><?= $job->budget ?></td>
                                <td><?= $job->bid_amount ?></td>
                                <td>
                                <?php echo $job->isClosed == 1 ? 
                                    '<p class="bg-warning" style="padding:5px 10px; border-radius:5px;"> Complete </p> ' 
                                    : 
                                    '<p class="bg-danger" style="padding:5px 10px; border-radius:5px;"> Pending </p>
                                    ' 
                                ?>
                                </td>

                                <td>
                                    <a class="bg-success" href="<?= base_url()?>FreelanceController/JobChat/<?= $job->job_bid_id?>" target="_blank" 
                                    style="padding:5px 10px; border-radius:5px;color:#fff"> Chat </a>
                                </td>
                            </tr>
                            <?php 
                        }
                    }
                    ?>

                </tbody>
            </table>
        </div>
        
    </div>
</div>
