<?php $__env->startSection('body'); ?>


<div class="page-content"><div class="container"><div class="content-area card"><div class="card-innr"><div class="card-head"><h4 class="card-title">Sales Log</h4></div>


   <table class="data-table dt-filter-init admin-tnx"><thead><tr class="data-item data-head"><th class="data-col dt-tnxno">Buyer</th><th class="data-col dt-token">Amount</th><th class="data-col dt-amount">Unit</th> <th class="data-col dt-account">Currency</th><th class="data-col dt-type"><div class="dt-type-text">Status</div></th><th class="data-col"></th></tr></thead><tbody>

<?php $__currentLoopData = $exchange; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k=>$data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr class="data-item"><td class="data-col dt-tnxno"><div class="d-flex align-items-center">


  <?php if( $data->status ==2 ): ?>
                                            <div class="data-state data-state-approved"><span class="d-none">Approved</span></div>
                                        <?php elseif( $data->status == -2 ): ?>
                                            <div class="data-state data-state-canceled"><span class="d-none">Rejected</span></div>
                                        <?php else: ?>
                                            <div class="data-state data-state-pending"><span class="d-none">Pending</span></div>
                                        <?php endif; ?>




<div class="fake-class"><span class="lead tnx-id"><a href="<?php echo e(route('user.single',$data->user->id)); ?>">
                                            <?php echo e($data->user->username); ?>

                                        </a></span><span class="sub sub-date"><?php echo e($data->created_at); ?></span></div></div></td><td class="data-col dt-token"><span class="lead token-amount"><?php echo e(number_format($data->enter_amount-$data->buy_charge, $basic->decimal)); ?></span><span class="sub sub-symbol"><?php echo e($basic->currency); ?></span></td><td class="data-col dt-amount"><span class="lead amount-pay"><?php echo e($data->get_amount); ?></span><span class="sub sub-symbol"><?php echo e($data->currency->symbol); ?> <em class="fas fa-info-circle" data-toggle="tooltip" data-placement="bottom" title="<?php echo e($data->currency->name); ?>"></em></span></td><td class="data-col dt-account"><span class="lead user-info"><?php echo e($data->currency->name); ?></span> </td>


 <td class="data-col dt-type">
  <?php if( $data->status ==2 ): ?>
<span class="dt-type-md badge badge-outline badge-success badge-md">Approved</span><span class="dt-type-sm badge badge-sq badge-outline badge-success badge-md">A</span>
     <?php elseif( $data->status == -2 ): ?>
<span class="dt-type-md badge badge-outline badge-danger badge-md">Declined</span><span class="dt-type-sm badge badge-sq badge-outline badge-danger badge-md">P</span>
                                        <?php else: ?>
<span class="dt-type-md badge badge-outline badge-warning badge-md">Pending</span><span class="dt-type-sm badge badge-sq badge-outline badge-warning badge-md">P</span>
                                        <?php endif; ?>
</td>

<td class="data-col text-right"><div class="relative d-inline-block"><a href="#" class="btn btn-light-alt btn-xs btn-icon toggle-tigger"><em class="ti ti-more-alt"></em></a><div class="toggle-class dropdown-content dropdown-content-top-left"><ul class="dropdown-list"><li><a href="<?php echo e(route('sell-info',$data->id)); ?>"><em class="ti ti-eye"></em> View Details</a></li>


<li><a href="<?php echo e(route('sell.approve',$data->id)); ?>"><em class="ti ti-check-box"></em> Approve</a></li>
<?php if($data->status != -2): ?>
<li><a href="<?php echo e(route('sell.reject',$data->id)); ?>"><em class="ti ti-na"></em> Decline</a></li>
<?php endif; ?>
</ul></div></div></td></tr><!-- .data-item -->
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

<!-- .data-item --></tbody></table>

   </div></div></div></div></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('include.admindashboard', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>