<?php $__env->startSection('content'); ?>
    <!-- Dashboard Top Section -->
    <div class="dashboard-top mb-4">
        <form class="search-form" method="GET">
            <div class="input-group">
                <input class="form-control form--control bg-white" type="text" name="search"
                    value="<?php echo e(request()->search ?? ''); ?>" placeholder="<?php echo app('translator')->get('Search'); ?>...">
                <button class="btn btn--base" type="submit">
                    <i class="fas fa-search"></i>
                </button>
            </div>
        </form>
        <a href="<?php echo e(route('user.buyer.job.basic')); ?>" class="btn btn--base btn--lg" role="button">
            <i class="fas fa-plus"></i>
            <span><?php echo app('translator')->get('Create Job'); ?></span>
        </a>
    </div>

    <!-- Jobs Table Section -->
    <div class="table-section">
        <div class="table-area">
            <table class="table table--custom table-responsive--xl">
                <thead>
                    <tr>
                        <th><?php echo app('translator')->get('Name'); ?></th>
                        <th><?php echo app('translator')->get('Category'); ?></th>
                        <th><?php echo app('translator')->get('Budget'); ?></th>
                        <th><?php echo app('translator')->get('Delivery Time'); ?></th>
                        <th><?php echo app('translator')->get('Step'); ?></th>
                        <th><?php echo app('translator')->get('Status'); ?></th>
                        <th><?php echo app('translator')->get('Last Update'); ?></th>
                        <th><?php echo app('translator')->get('Action'); ?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $jobs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $job): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td>
                                <div class="author-info">
                                    <div class="thumb">
                                        <img src="<?php echo e(poster(@$job->image ? getFilePath('job') . '/' . @$job->image : 'assets/images/default.png', false)); ?>"
                                            alt="<?php echo app('translator')->get('Job Image'); ?>">
                                    </div>
                                    <div class="content text-start" data-bs-toggle="tooltip" data-bs-placement="top"
                                        title="<?php echo e(__($job->name)); ?>">
                                        <?php echo e(__(strLimit($job->name, 30))); ?>

                                    </div>
                                </div>
                            </td>
                            <td><?php echo e(__($job->category->name)); ?></td>
                            <td><span class="text-nowrap"><?php echo e(showAmount($job->price)); ?></span></td>
                            <td><?php echo e($job->delivery_time); ?> <?php echo app('translator')->get('Days'); ?></td>
                            <td><?php echo $job->stepBadge ?></td>
                            <td>
                                <div><?php echo $job->customStatusBadge ?></div>
                            </td>
                            <td>
                                <small>
                                    <?php echo e(showDateTime($job->updated_at)); ?>

                                    <br>
                                    <?php echo e(diffforhumans($job->updated_at)); ?>

                                </small>
                            </td>
                            <td>
                                <div class="dropdown dropdown-custom">
                                    <button class="btn btn--base btn--sm" id="actionButton" data-bs-toggle="dropdown"
                                        data-bs-toggle="tooltip" data-bs-placement="top" aria-label="<?php echo app('translator')->get('Actions'); ?>"
                                        title="<?php echo app('translator')->get('Actions'); ?>">
                                        <i class="las la-ellipsis-v"></i>
                                    </button>
                                    <div class="dropdown-menu p-0">
                                        <!-- Edit Job Option -->
                                        <a href="<?php echo e(route('user.buyer.job.basic', $job->id)); ?>" class="dropdown-item">
                                            <i class="las la-pencil-alt"></i> <?php echo app('translator')->get('Edit'); ?>
                                        </a>

                                        <!-- Bidding List Option -->
                                        <a href="<?php echo e(route('user.buyer.job.bidding.list', [slug($job->name), $job->id])); ?>"
                                            class="dropdown-item">
                                            <i class="las la-list"></i> <?php echo app('translator')->get('Bidding List'); ?>
                                        </a>

                                        <!-- Close Job Option (only if job is approved) -->
                                        <?php if($job->status == Status::APPROVED): ?>
                                            <button class="dropdown-item confirmationBtn" data-question="<?php echo app('translator')->get('Are you sure to close this job?'); ?>"
                                                data-action="<?php echo e(route('user.buyer.job.close', $job->id)); ?>" type="button">
                                                <i class="las la-times"></i> <?php echo app('translator')->get('Close'); ?>
                                            </button>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </td>


                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td class="text-center" colspan="100%">
                                <?php echo $__env->make('Template::partials.empty', [
                                    'message' => 'No job created yet!',
                                ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                            </td>
                        </tr>
                    <?php endif; ?>
                </tbody>
            </table>

            <!-- Pagination Links -->
            <?php if($jobs->hasPages()): ?>
                <?php echo e(paginateLinks($jobs)); ?>

            <?php endif; ?>
        </div>
    </div>

    <!-- Confirmation Modal -->
    <?php if (isset($component)) { $__componentOriginalbd5922df145d522b37bf664b524be380 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalbd5922df145d522b37bf664b524be380 = $attributes; } ?>
<?php $component = App\View\Components\ConfirmationModal::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('confirmation-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\ConfirmationModal::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => 'frontend']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalbd5922df145d522b37bf664b524be380)): ?>
<?php $attributes = $__attributesOriginalbd5922df145d522b37bf664b524be380; ?>
<?php unset($__attributesOriginalbd5922df145d522b37bf664b524be380); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalbd5922df145d522b37bf664b524be380)): ?>
<?php $component = $__componentOriginalbd5922df145d522b37bf664b524be380; ?>
<?php unset($__componentOriginalbd5922df145d522b37bf664b524be380); ?>
<?php endif; ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('Template::layouts.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/mojibor/work.mojibor.com/core/resources/views/templates/basic/buyer/job/index.blade.php ENDPATH**/ ?>