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

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

<?php $__env->startSection('breadcrumb'); ?>
<li class="active">
    Clientes
</li>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">Lista de Clientes</h3>
                <div class="box-tools pull-right">
                    <a href="<?php echo route('admin.customers.create'); ?>" class="btn btn-success btn-sm"><i class="fa fa-user-plus"></i> Novo Cliente</a>
                </div>
            </div>
            <div class="box-body">
                <table id="table-users" class="table table-bordered table-striped dataTable">
                    <thead>
                        <tr>
                            <th style="width: 1%">#</th>
                            <th>Nome</th>
                            <th>NIF</th>
                            <th>E-mail</th>
                            <th style="width: 1%">Orçamentos</th>
                            <th style="width: 120px">Registado em</th>
                            <th style="width: 60px"></th>
                        </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script type="text/javascript">
    $(document).ready(function () {
        $('#table-users').dataTable({
            processing: true,
            serverSide: true,
            "ajax": {
                url: "<?php echo route('admin.customers.datatables'); ?>",
                type: "POST"
            },    
            "autoWidth": false,
            "order": [[1, "asc"]],
            "columnDefs": [
                { "orderable": false, "targets": -1 }
              ]
        });

        $('#sidebar-customers').addClass('active');
    });

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