<?php $__env->startSection('title'); ?>
    Manage Users
<?php $__env->stopSection(); ?>

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

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

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

<?php echo $__env->make('partials.dashboard-menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<h1> <strong><?php echo $company; ?></strong> users</h1>

<div class="row">
    <div class="large-6 columns">
        <a style="text-decoration: none;" href="/new-user/<?php echo $company; ?>"><button class="myButton">Add New User</button></a>
    </div>
     <div class="large-6 columns">
        <a style="text-decoration: none;" href="/view-company-usage-log/<?php echo $company; ?>"><button class="myButton">Overall Usage Log</button></a>
     </div>
</div>


    <div class="comapanyTable">
            <table>
                <thead>
                    <tr>
                        <th width="10%%">User Name</th>
                        <th width="10%">Edit User Details</th>
                        <th  width="10%">User Transactions</th>
                        <th  width="10%">Delete User</th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach($users as $user): ?>
                        <tr>
                            <td><?php echo $user->name; ?></td>
                            <td><a href="/edit-user/<?php echo $user->id; ?>"> <i class="fa fa-pencil-square-o" aria-hidden="true"></i> </a></td>
                            <td><a href="/user-transactions/<?php echo $user->id; ?>"> <i class="fa fa-pencil-square-o" aria-hidden="true"></i> </a></td>
                            <td><a onclick="return Conform_Delete()" href="/deleteUser/<?php echo $user->id; ?>"> <i class="red fa fa-times" aria-hidden="true"></i></a></td>
                            </tr>
                    <?php endforeach; ?>
                </tbody>
            </table>

    </div>


<hr>

<?php echo $__env->make('partials.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <script>
        function Conform_Delete()
        {
           return confirm("Are You Sure Want to Delete this user?");
        }
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>