
<?php $__env->startSection('title'); ?>
<title><?php echo e($title); ?></title>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('admin-content'); ?>
      <!-- Main Content -->
      <div class="main-content">
        <section class="section">
          <div class="section-header">
            <h1><?php echo e($title); ?></h1>

          </div>

          <div class="section-body">
            <div class="row mt-4">
                <div class="col">
                  <div class="card">
                    <div class="card-body">
                      <div class="table-responsive table-invoice">
                        <table class="table table-striped" id="dataTable">
                            <thead>
                                <tr>
                                    <th width="5%"><?php echo e(__('admin.SN')); ?></th>
                                    <th width="10%"><?php echo e(__('admin.Agent')); ?></th>
                                    <th width="10%"><?php echo e(__('admin.Email')); ?></th>
                                    <th width="10%"><?php echo e(__('admin.Package')); ?></th>
                                    <th width="15%"><?php echo e(__('admin.Purchase Date')); ?></th>
                                    <th width="15%"><?php echo e(__('admin.Expired Date')); ?></th>
                                    <th width="5%"><?php echo e(__('admin.Price')); ?></th>
                                    <th width="5%"><?php echo e(__('admin.Status')); ?></th>
                                    <th width="10%"><?php echo e(__('admin.Active')); ?></th>
                                  </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e(++$index); ?></td>
                                        <td><?php echo e($order->user ? $order->user->name : ''); ?></td>
                                        <td><?php echo e($order->user ? $order->user->email : ''); ?></td>
                                        <td><?php echo e($order->package->package_name); ?></td>
                                        <td><?php echo e($order->purchase_date); ?></td>
                                        <td>
                                            <?php if($order->expired_date==null): ?>
                                            <?php echo e(__('admin.Unlimited')); ?>

                                            <?php else: ?>
                                                <?php echo e($order->expired_date); ?>

                                            <?php endif; ?>
                                        </td>
                                        <td><?php echo e($currency); ?><?php echo e($order->amount_real_currency); ?></td>
                                        <td>
                                            <?php if($order->status==1): ?>
                                                <?php if($order->expired_date==null): ?>
                                                    <span class="badge badge-success"><?php echo e(__('admin.Active')); ?></span>
                                                <?php else: ?>
                                                    <?php if(date('Y-m-d') < $order->expired_date): ?>
                                                    <span class="badge badge-success"><?php echo e(__('admin.Active')); ?></span>
                                                    <?php else: ?>
                                                    <span class="badge badge-danger"><?php echo e(__('admin.Expired')); ?></span>
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                            <?php elseif($order->status == -1): ?>
                                            <span class="badge badge-danger"><?php echo e(__('admin.Pending')); ?></span>
                                            <?php else: ?>
                                            <span class="badge badge-danger"><?php echo e(__('admin.Expired')); ?></span>
                                            <?php endif; ?>
                                        </td>

                                        <td>

                                        <a href="<?php echo e(route('admin.order-show',$order->id)); ?>" class="btn btn-primary btn-sm"><i class="fa fa-eye" aria-hidden="true"></i></a>

                                        <a href="javascript:;" data-toggle="modal" data-target="#deleteModal" class="btn btn-danger btn-sm" onclick="deleteData(<?php echo e($order->id); ?>)"><i class="fa fa-trash" aria-hidden="true"></i></a>

                                        </td>
                                    </tr>
                                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                      </div>
                    </div>
                  </div>
                </div>
          </div>
        </section>
      </div>


<script>
    function deleteData(id){
        $("#deleteForm").attr("action",'<?php echo e(url("admin/delete-order/")); ?>'+"/"+id)
    }
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.master_layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\laragon\www\topland\script_content\main_files\resources\views/admin/order.blade.php ENDPATH**/ ?>