<?php $__env->startSection('title'); ?>
Grupos de produtos
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content-header'); ?>
Grupos de produtos
<?php $__env->stopSection(); ?>

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

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-xs-12">
        <div class="box no-border">
            <div class="box-header">
                <h3 class="box-title">Lista de Grupos</h3>
                <div class="box-tools pull-right">
                    <a href="<?php echo route('admin.groups.create'); ?>" class="btn btn-success btn-sm"><i class="fa fa-plus"></i> Novo Grupo</a>
                </div>
            </div>
            <div class="box-body">
                <table id="table-groups" class="table table-bordered table-striped dataTable">
                    <thead>
                        <tr>
                            <th class="width-1">ID</th>
                            <th>Nome</th>
                            <th>Nº Famílias</th>
                            <th class="width-1">Visivel</th>
                            <th class="width-120px">Data Criação</th>
                            <th class="width-40px"></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-groups').dataTable({
            processing: true,
            serverSide: true,
            "ajax": {
                url: "<?php echo route('admin.groups.datatables'); ?>",
                type: "POST"
            },    
            "autoWidth": false,
            "order": [[0, "desc"]],
            columns: [
                 {data: 'id', name: 'id'},
                 {data: 'name', name: 'name'},
                 {data: 'count_families', name: 'count_families', searchable: false},
                 {data: 'visible', name: 'visible', searchable: false},
                 {data: 'created_at', name: 'created_at'},
                 {data: 'actions', name: 'actions', orderable: false, searchable: false},
             ],
        });
    });
</script>
<?php $__env->stopSection(); ?>