
<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-lg-3">
        <div class="form-group">
            <label><?php echo e(__('messages.username')); ?> *</label>
            <input type="text" name="username" id="username" class="form-control" placeholder="User Name" />
            <small id="msg_username" class="form-text text-muted" style="display: none;"></small>
        </div>
    </div>
    <div class="col-lg-3">
        <div class="form-group">
            <label><?php echo e(__('messages.password')); ?> *</label>
            <input type="password" name="userpass" id="userpass" class="form-control"
                placeholder="Password" />
            <small id="msg_userpass" class="form-text text-muted" style="display: none;"></small>
        </div>
    </div>
    <div class="col-lg-3">
        <div class="form-group">
            <label><?php echo e(__('messages.branch')); ?> / <?php echo e(__('messages.admin')); ?></label>
            <select class="form-control" name="branch_id" id="branch_id">
                <option value="" selected><?php echo e(__('messages.choose')); ?></option>
                <option value="0"><?php echo e(__('messages.admin')); ?></option>
                <?php $__currentLoopData = $branches; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $br): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($br->branch_id); ?>"><?php echo e($br->branch_name); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
            <small id="msg_userbranch" class="form-text text-muted" style="display: none;"></small>
        </div>
    </div>
    <div class="col-lg-2">
        <div class="form-group">
            <label>&nbsp;</label>
            <button type="button" id="btn-add-users" class="btn btn-success mt-20"><?php echo e(__('messages.submit')); ?></button>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <h4> <?php echo e(__('messages.permissions')); ?> </h4>
    </div>
</div>
<div class="row">
    <div class="col-md-2">
        <input type="checkbox" class="pchk" value="dashboard" disabled> <?php echo e(__('messages.dashboard')); ?>

    </div>
    <!-- <div class="col-md-2">
          <input type="checkbox" class="pchk" value="sales" disabled> Sales
        </div> -->
    <div class="col-md-2">
        <input type="checkbox" class="pchk" value="quotations" disabled> <?php echo e(__('messages.quotations')); ?>

    </div>
    <div class="col-md-2">
        <input type="checkbox" class="pchk" value="purchase" disabled> <?php echo e(__('messages.purchases')); ?>

    </div>
    <div class="col-md-2">
        <input type="checkbox" class="pchk" value="stock" disabled> <?php echo e(__('messages.stock')); ?>

    </div>
    <div class="col-md-2">
        <input type="checkbox" class="pchk" value="expenses" disabled> <?php echo e(__('messages.expenses')); ?>

    </div>
    <div class="col-md-2 d-none">
        <input type="checkbox" class="pchk" value="services" disabled> Services
    </div>
    <!-- <div class="col-md-2 hidden">
          <input type="checkbox" class="pchk" value="offers" disabled> Offers
        </div> -->
    <!-- <div class="col-md-2">
          <input type="checkbox" class="pchk" value="employees" disabled> Employees
        </div> -->
    <div class="col-md-2">
        <input type="checkbox" class="pchk" value="users" disabled> <?php echo e(__('messages.users')); ?>

    </div>
    <div class="col-md-2 d-none">
        <input type="checkbox" class="pchk" value="customers" disabled> Customers
    </div>
    <div class="col-md-2 d-none">
        <input type="checkbox" class="pchk" value="invoice_header" disabled> Invoice Header
    </div>
    <div class="col-md-2 d-none">
        <input type="checkbox" class="pchk" value="db_backup" disabled> Backup DB
    </div>
    <div class="col-md-2">
        <input type="checkbox" class="pchk" value="reports" disabled> <?php echo e(__('messages.reports')); ?>

    </div>
</div>
<br>
<br>
<div class="row">
    <div class="col-md-12">
        <table id="usersTable" class="table table-striped table-bordered dt-responsive nowrap"
            width="100%">
            <thead>
                <tr>
                    <th>#</th>
                    <th><?php echo e(__('messages.username')); ?></th>
                    <th><?php echo e(__('messages.password')); ?></th>
                    <th><?php echo e(__('messages.branch')); ?></th>
                    <th><?php echo e(__('messages.dashboard')); ?></th>
                    <th><?php echo e(__('messages.quotations')); ?></th>
                    <th><?php echo e(__('messages.purchases')); ?></th>
                    <th><?php echo e(__('messages.stock')); ?></th>
                    <th><?php echo e(__('messages.expenses')); ?></th>
                    <!-- <th>Services</th> -->
                    <th><?php echo e(__('messages.users')); ?></th>
                    <!-- <th>Customers</th> -->
                    <!-- <th>Invoice Header</th> -->
                    <!-- <th>Backup DB</th> -->
                    <th><?php echo e(__('messages.reports')); ?></th>
                    <th><?php echo e(__('messages.stock')); ?> <?php echo e(__('messages.actions')); ?></th>
                    <th><?php echo e(__('messages.actions')); ?></th>
                </tr>
            </thead>
            <tbody>

            </tbody>

        </table>
    </div>
</div>
          
       
<div id="user-edit-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
    aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title"><?php echo e(__('messages.edit')); ?></h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-lg-4">
                        <input type="hidden" name="user_id" id="e_user_id">
                        <div class="form-group">
                            <label><?php echo e(__('messages.username')); ?> *</label>
                            <input type="text" name="username" id="e_username" class="form-control"
                                placeholder="User Name" />
                            <small id="msg_e_username" class="form-text text-muted"
                                style="display: none;"></small>
                        </div>
                    </div>
                    <div class="col-lg-4">
                        <div class="form-group">
                            <label><?php echo e(__('messages.password')); ?> *</label>
                            <input type="password" name="userpass" id="e_userpass" class="form-control"
                                placeholder="Password" />
                            <small id="msg_e_userpass" class="form-text text-muted"
                                style="display: none;"></small>
                        </div>
                    </div>
                    <div class="col-lg-4">
                        <div class="form-group">
                            <label><?php echo e(__('messages.branch')); ?> /<?php echo e(__('messages.admin')); ?> *</label>
                            <select class="form-control" name="branch_id" id="e_branch_id">
                                <option value="" selected>Select</option>
                                <option value="0"><?php echo e(__('messages.admin')); ?></option>
                                <?php
                                foreach ($branches as $br) {
                                    echo '<option value="' . $br->branch_id . '">' . $br->branch_name . '</option>';
                                }
                                ?>
                            </select>
                            <small id="msg_e_userbranch" class="form-text text-muted"
                                style="display: none;"></small>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-lg-12">
                        <h4> <?php echo e(__('messages.permissions')); ?> </h4>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-2">
                        <input type="checkbox" class="epchk" id="per_dashboard" value="dashboard"> <?php echo e(__('messages.dashboard')); ?>

                    </div>
                    <!--  <div class="col-md-2">
               <input type="checkbox" class="epchk" id="per_sales" value="sales"> Sales
             </div> -->
                    <div class="col-md-2">
                        <input type="checkbox" class="epchk" id="per_quotations" value="quotations"> <?php echo e(__('messages.quotations')); ?>

                    </div>
                    <div class="col-md-2">
                        <input type="checkbox" class="epchk" id="per_purchase" value="purchase"> <?php echo e(__('messages.purchases')); ?>

                    </div>
                    <div class="col-md-2">
                        <input type="checkbox" class="epchk" id="per_stock" value="stock"> <?php echo e(__('messages.stock')); ?>

                    </div>
                    <div class="col-md-2">
                        <input type="checkbox" class="epchk" id="per_expenses" value="expenses"> <?php echo e(__('messages.expenses')); ?>

                    </div>
                    <div class="col-md-2 d-none">
                        <input type="checkbox" class="epchk" id="per_services" value="services"> Services
                    </div>
                    <!-- <div class="col-md-2">
               <input type="checkbox" class="epchk" id="per_offers" value="offers"> Offers
             </div> -->
                    <!-- <div class="col-md-2">
               <input type="checkbox" class="epchk" id="per_employees" value="employees"> Employees
             </div> -->
                    <div class="col-md-2">
                        <input type="checkbox" class="epchk" id="per_users" value="users"> <?php echo e(__('messages.users')); ?>

                    </div>
                    <div class="col-md-2 d-none">
                        <input type="checkbox" class="epchk" id="per_customers" value="customers"> Customers
                    </div>
                    <div class="col-md-2 d-none">
                        <input type="checkbox" class="epchk" id="per_invoice_header" value="invoice_header">
                        Customers
                    </div>
                    <div class="col-md-2 d-none">
                        <input type="checkbox" class="epchk" id="per_db_backup" value="db_backup"> Backup DB
                    </div>
                    <div class="col-md-2">
                        <input type="checkbox" class="epchk" id="per_reports" value="reports"> <?php echo e(__('messages.reports')); ?>

                    </div>
                    <!-- <div class="col-md-3">
               <input type="checkbox" class="epchk" id="per_stk_actions" value="stk_actions"> Stock Actions
             </div> -->
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default waves-effect" data-dismiss="modal"><?php echo e(__('messages.close')); ?></button>
                <button type="button" id="btn-update-users" class="btn btn-primary"><?php echo e(__('messages.save_changes')); ?></button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('customjs'); ?>
    <script src="<?php echo e(asset('custom_js/users.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.template.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/craftada/iftikhar.appssoul.com/resources/views/admin/users.blade.php ENDPATH**/ ?>