HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/demo.sports-crowd.com/resources/views/academy/categories/list.blade.php
@extends('modules.head') @section('contenido')
<div class="box-header">
    <a class="auxiliar-black" href="{{ url('/academy_categories/add') }}">
        <button class="btn btnAdd pull-right">
            <i style="margin-right:5px;" class="fa fa-plus"></i>
            {{ Lang::get('messages.academy_categories_labels.title_create') }}
        </button></a>
</div>

<!-- List Data -->
<div class="box">
    <div class="box-header with-border">
        <h3 class="box-title">{{ Lang::get('messages.academy_categories_labels.title_list') }}</h3>
    </div>

    <!-- /.box-header -->
    <div class="box-body table-responsive ">
        <table id="academy_categories" class="table table-bordered table-hover dataTable" role="grid" aria-describedby="academy_categories_info">
            <thead>
                <tr role="row">
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.tag1') }} </th>
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.tag4') }} </th>
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.tag2') }} </th>
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.tag3') }} </th>
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.registration_service_item_code') }} </th>
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.pension_service_item_code') }} </th>
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.cost_center') }} </th>
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.tag5') }} </th>
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.created_at') }} </th>
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.tag0') }} </th>
                    <th class="sorting" tabindex="0" aria-controls="academy_categories" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending"> {{ Lang::get('messages.academy_categories_labels.tag00') }} </th>
                </tr>
            </thead>
        </table>
    </div>
    <!-- /.box-body -->
</div>

<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/crud.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/academy_categories.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/bootstrap/js/bootstrap.min.js') }}"></script>
<script type="text/javascript">
    $(document).ready(function() {
        var syncERP = <?php echo json_encode($syncERP); ?>;
        var sort_col = $('#academy_categories').find("th:contains("+ Lang.get('messages.academy_categories_labels.created_at')+")")[0].cellIndex;
        let show_in_tranlate = {
            "all": "@lang('messages.academy_categories_show_in.all')",
            "app": "@lang('messages.academy_categories_show_in.app')",
            "web": "@lang('messages.academy_categories_show_in.web')"
        }
        _table = $('#academy_categories').DataTable({
            stateSave: true,
            stateSaveCallback: function(settings,data) {
                localStorage.setItem( 'DataTables_' + settings.sInstance, JSON.stringify(data) )
            },
            stateLoadCallback: function(settings) {
                return JSON.parse( localStorage.getItem( 'DataTables_' + settings.sInstance ) )
            },
            responsive: true,
            processing: true,
            serverSide: true,
            order: [
                [sort_col, 'desc']
            ],
            language: {
                url: window.DATATABLES_LANGUAGE_URL,
            },
            ajax: {
                url: "{{ route('academy_categories.table') }}",
                headers: {
                    "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
                },
                type: "POST"
            },
            columns: [{
                    data: 'name',
                    name: 'name'
                },
                {
                    data: 'academy_location',
                    render: function(data, type, row) {
                        return row.academy_location ? row.academy_location.name : '';
                    },
                    name: 'academy_location.name'
                },
                {
                    data: 'inscription_value',
                    name: 'inscription_value'
                },
                {
                    data: 'monthly_payment',
                    name: 'monthly_payment'
                },
                {
                    data: 'registration_service_item_code',
                    visible: syncERP,
                    name: 'academy_category_erps.registration_service_item_code'
                },
                {
                    data: 'pension_service_item_code',
                    visible: syncERP,
                    name: 'academy_category_erps.pension_service_item_code'
                },
                {
                    data: 'cost_center',
                    visible: syncERP,
                    name: 'academy_category_erps.cost_center'
                },
                {
                    data: 'show_in',
                    render: function(data, type, row) {
                        return show_in_tranlate[row.show_in];
                    },
                    name: 'show_in'
                },
                {
                    data: 'created_at',
                    name: 'created_at'
                },
                {
                    data: 'active',
                    name: 'active'
                },
                {
                    data: 'actions',
                    name: 'actions'
                }
            ]
        });

        var info = '<i class="fa  fa-info-circle"  id="btn-info-busqueda"></i><div class="dropdown-menu" id="menuBusqueda" style="left: 50%; padding: 5px; background-color: #f9fb8f;"><p data-toggle="modal">Busqueda por Nombre, Orden y Link</p></div>';

        $('#academy_categories_filter').append(info);
        $('#btn-info-busqueda').on('click', function() {
            $('#menuBusqueda').toggle();
        });

    });
</script>
@endsection