

<?php $__env->startSection('content'); ?>
<!-- Content wrapper scroll start -->
<div class="content-wrapper-scroll">

<!-- Content wrapper start -->
<div class="content-wrapper">

<?php if(auth()->user()->role == "Administrator"): ?>
    <!-- Row start -->
    <div class="row gutters">
        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            
            <div class="card">
                <div class="card-body">
                    
                    <div class="table-responsive">
                        <table id="copy-print-csv" class="table v-middle">
                            <thead>
                                <tr>
                                  <th>Outlet</th>
                                  <th>Outlet Code</th>
                                  <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $branches; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $branches): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>												  
                                  <td><?php echo e($branches->branch_name); ?></td>
                                  <td><?php echo e($branches->branch_code); ?></td>
                                  <td>
                                  <form action="<?php echo e(route('branchSales')); ?>" method="get">
                                          <?php echo csrf_field(); ?>
                                          <input type="text" name="branch" hidden readonly value="<?php echo e($branches->branch_name); ?>">
                                            <button class="btn btn-outline-primary btn-sm"><i class="icon-bubble_chart" aria-hidden="true"></i> Report</button>
                                      </form>
                                  </td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                    </table>
                    </div>

                </div>
            </div>

        </div>
    </div>
    <!-- Row end -->

<?php else: ?>

     <!-- Row start -->
     <div class="row gutters">
        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            
            <div class="card">
                <div class="card-body">
                    
                    <div class="table-responsive">
                        <table id="copy-print-csv" class="table v-middle">
                            <thead>
                                <tr>
                                  <th>Outlet</th>
                                  <th>Description</th>
                                  <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>												  
                                  <td><?php echo e(@strtoupper($branch_officer->branch_name)); ?></td>
                                  <td><?php echo e($branch_officer->branch_description); ?></td>
                                  <td>
                                      <form action="<?php echo e(route('branchSales')); ?>" method="get">
                                          <?php echo csrf_field(); ?>
                                          <input type="text" name="branch" hidden readonly value="<?php echo e($branch_officer->branch_name); ?>">
                                          <button class="btn btn-outline-primary btn-sm"><i class="icon-eye1" aria-hidden="true"></i> Report</button>
                                        </form>
                                  </td>
                                </tr>
                            </tbody>
                    </table>
                    </div>

                </div>
            </div>

        </div>
    </div>
    <!-- Row end -->

<?php endif; ?>



<?php if(auth()->user()->role == "Administrator"): ?>
<!-- For Admins -->
    <!-- Row start -->
    <div class="row gutters">
        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            
            <div class="card">
                <div class="card-body">
                <div><h6>USER REPORT</h6></div>
                <hr>
                    <div class="table-responsive">
                    <table id="fixedHeader" class="table custom-table">
                            <thead>
                                <tr>
                                  <th>Name</th>
                                  <th>Category</th>
                                  <th>email</th>
                                  <th>outlet</th>
                                  <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $all_users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $users): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>												  
                                  <td><?php echo e(@strtoupper($users->name)); ?></td>
                                  <td><?php echo e(@strtoupper($users->sales_person_category)); ?></td>
                                  <td><?php echo e($users->email); ?></td>
                                  <td><?php echo e(@strtoupper($users->branch)); ?></td>
                                  <td>
                                    <div class="actions">
                                        <a href="<?php echo e(route('userSales', $users->id)); ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Edit">
                                            <i class="icon-eye1 text-info"></i>
                                        </a>
                                        
                                    </div>
                                  </td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                    </table>
                    </div>

                </div>
            </div>

        </div>
    </div>
    <!-- Row end -->



<!-- for Branch Managers -->

<?php else: ?>
        <!-- Row start -->
        <div class="row gutters">
        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            
            <div class="card">
                <div class="card-body">
                <div class="card-title"><?php echo e(@strtoupper(auth()->user()->branch)); ?> USERS REPORT</div>
                    <div class="table-responsive">
                    <table id="fixedHeader" class="table custom-table">
                            <thead>
                                <tr>
                                  <th>Name</th>
                                  <th>Category</th>
                                  <th>Email</th>
                                  <th>Branch</th>
                                  <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $branch_user; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $users): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>												  
                                  <td><?php echo e(@strtoupper($users->name)); ?></td>
                                  <td><?php echo e($users->sales_person_category); ?></td>
                                  <td><?php echo e($users->email); ?></td>
                                  <td><?php echo e(@strtoupper($users->branch)); ?></td>
                                  <td>
                                  <div class="actions">
                                        <a href="<?php echo e(route('userSales', $users->id)); ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Edit">
                                            <i class="icon-eye1 text-info"></i>
                                        </a>
                                        
                                    </div>
                                  </td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                    </table>
                    </div>

                </div>
            </div>

        </div>
    </div>
    <!-- Row end -->

<?php endif; ?>


</div>
<!-- Content wrapper end -->


<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home2/morttacy/morttsonsposfiles/resources/views/sales/sales-today.blade.php ENDPATH**/ ?>