
<?php $__env->startSection('title'); ?>
<?php echo $variables['header_routes']; ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card card-outline card-warning">
                    <div class="card-header">
                        <div class="d-flex flex-wrap align-items-center">
                            <?php echo $__env->make('layouts.partials.excel_upload_buttons', ['module' => 'menus'], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                            <a href="<?php echo e(route('menus.create')); ?>" class="btn btn-sm btn-warning mb-2 mb-md-0 button-cek-permission" data-permission="menus.create">
                                <i class="fas fa-plus"></i><span class="d-none d-sm-inline ml-1">Tambah</span>
                            </a>
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table id="dataTable" class="table table-hover table-sm">
                                <thead class="bg-warning">
                                    <tr>
                                        <th width="5%">No</th>
                                        <th width="12%">Kode</th>
                                        <th width="25%">Nama</th>
                                        <th width="15%">Grup Menu</th>
                                        <th width="10%">Kode PLU</th>
                                        <th width="13%">Kategori</th>
                                        <th width="12%">Harga</th>
                                        <th width="8%">Status</th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<script>
    $(document).ready(function() {
        $('#dataTable').DataTable({
            processing: true,
            serverSide: true,
            ajax: {
                url: "<?php echo e(route('menus.index')); ?>",
                type: "GET"
            },
            columns: [{
                    data: 0,
                    name: 'no',
                    orderable: false,
                    searchable: false
                },
                {
                    data: 1,
                    name: 'code'
                },
                {
                    data: 2,
                    name: 'name'
                },
                {
                    data: 3,
                    name: 'menu_group'
                },
                {
                    data: 4,
                    name: 'plu_code'
                },
                {
                    data: 5,
                    name: 'category'
                },
                {
                    data: 6,
                    name: 'price'
                },
                {
                    data: 7,
                    name: 'is_active',
                    orderable: false
                }
            ],
            order: [
                [1, 'asc']
            ],
            pageLength: 25,
            responsive: false,
            language: {
                processing: "Memuat...",
                search: "Cari:",
                lengthMenu: "Tampilkan _MENU_ data",
                info: "Menampilkan _START_ sampai _END_ dari _TOTAL_ data",
                infoEmpty: "Menampilkan 0 sampai 0 dari 0 data",
                infoFiltered: "(difilter dari _MAX_ total data)",
                paginate: {
                    first: "Pertama",
                    last: "Terakhir",
                    next: "Selanjutnya",
                    previous: "Sebelumnya"
                }
            }
        });
    });
</script>

<?php echo $__env->make('layouts.partials.excel_upload_modal', [
    'module' => 'menus',
    'title' => 'Menu',
    'uploadRoute' => route('menus.upload_excel'),
    'downloadRoute' => route('menus.download_template')
], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts/base_view', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\LSM\resources\views/m-menus/index.blade.php ENDPATH**/ ?>