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/orders/orders.blade.php
@extends('modules.head') @section('contenido')
<style>
    /* Ensure that the demo table scrolls */
    /* th, */
    td {
        white-space: nowrap;
    }

    div.dataTables_wrapper {
        height: fit-content;
        margin: 0px 10px 0px 10px;
    }

    .dataTables_scrollBody {
        max-height: none !important;
    }
</style>

<div class="box-header">
    <a class="auxiliar" href="{{url('/orders/generate/report')}}">
        <button type="button" class="btn  pull-left btnAux" data-dismiss="modal">
            <i class="fa fa-file"></i>{{ Lang::get('messages.screen_orders_tag1')}}
        </button></a>
    <a class="auxiliar-black" href="{{url('/orders/add')}}{{ '/' . $storeType }}">
        <button class="btn btnAdd pull-right">
            <i class="fa fa-plus"></i>{{ Lang::get('messages.screen_orders_tag2')}}
        </button></a>
</div>
<div id="message-orders-notAccepted" class="ordersNotAccepted"><i class="fa fa-exclamation-circle"></i>
    <p id="text-orders-notAccepted" class="text-red"></p>
</div>

<!-- LISTADO Productos-->
<div class="box">
    <div class="box-header">
        <h3 class="box-title">{{ Lang::get('messages.screen_orders_tag3')}}</h3>
    </div>

    <!-- /.box-header -->
    <div class="box-body table-responsive">
        <table id="example2" class="table table-bordered table-hover dataTable" role="grid" aria-describedby="example2_info">
            <thead>
                <tr role="row">
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag4') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag19' )}}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag5')}}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag6') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag7') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag22') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag8') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag20-1') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.hashed_reference') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag20-2') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag20-3') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_purchase_origin') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag21') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag9') }}</th>
                    {{-- @if(Auth::user()->rol->id==1 || Auth::user()->rol->id==6) --}}
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag10') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_tag11') }}</th>
                    {{-- @endif --}}
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_sync_with_erp') }}</th>
                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_orders_actions') }}</th>
                </tr>
            </thead>
        </table>
    </div>
    <!-- /.box-body -->
</div>

@include('orders.infoOrder')
@include('orders.modal_calification')

<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/orders.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/bootstrap/js/bootstrap.min.js') }}"></script>

<script type="text/javascript">
    $(document).ready(function() {
        var storeType = <?php echo json_encode($storeType); ?>;
        localStorage.setItem("storeType", storeType);
        var sort_col = $('#example2').find("th:contains(" + Lang.get('messages.screen_orders_tag5') + ")")[0].cellIndex;

        let fixedColumns = false;
        let isMobileDevice = /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
        if (!isMobileDevice) {
            fixedColumns = {
                left: 1,
                right: 1
            };
        }

        _table = $('#example2').DataTable({
            responsive: true,
            processing: true,
            serverSide: true,
            order: [
                [sort_col, 'desc']
            ],
            language: {
                url: window.DATATABLES_LANGUAGE_URL,
            },
            scrollX: true,
            scrollCollapse: true,
            paging: true,
            fixedColumns: fixedColumns,
            ajax: {
                url: '/orders/filter/' + storeType,
                headers: {
                    "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
                },
                type: "POST"
            },
            columns: [{
                    data: 'code',
                    name: 'code'
                },
                {
                    data: 'order_reference',
                    name: 'order_reference'
                },
                {
                    data: 'creation_date',
                    name: 'creation_date'
                },
                {
                    data: 'nameClient',
                    name: 'users.first_name'
                },
                {
                    data: 'documentClient',
                    name: 'users.document'
                },
                {
                    data: 'emailClient',
                    name: 'users.email'
                },
                {
                    data: 'nameState',
                    name: 'order_states.name'
                },
                {
                    data: 'gw_code_transaction',
                    name: 'gw_code_transaction'
                },
                {
                    data: 'hashed_reference',
                    name: 'hashed_reference'
                },
                {
                    data: 'payment_transaction_id',
                    name: 'payment_transaction_id'
                },
                {
                    data: 'gw_state',
                    name: 'gw_state'
                },
                {
                    data: 'purchase_origin',
                    name: 'purchase_origin'
                },
                {
                    data: 'is_change',
                    name: 'is_change'
                },
                {
                    data: 'nameDeliveryM',
                    name: 'm.first_name'
                },
                {
                    data: 'sucursal',
                    name: 'sucursals.name'
                },
                {
                    data: 'city',
                    name: 'cities.name'
                },
                {
                    data: 'sync_with_erp',
                    name: 'sync_with_erp'
                },
                {
                    data: 'actions',
                    name: 'actions'
                },
            ]
        });

        // Paginacion
        $('#example2').on('page.dt', function() {
            window.actualPage = $('#example2').DataTable().page();
            localStorage.setItem("setPaginaActual", $('#example2').DataTable().page());
        });

        $('#example2').on('init.dt', function() {
            if (localStorage.getItem("setPaginaActual")) {
                let paginationCurrent = Number(localStorage.getItem("setPaginaActual", $('#example2').DataTable().page()));
                if (parseInt(localStorage.getItem("setPaginaActual")) != paginationCurrent)
                    $('#example2').DataTable().page(paginationCurrent).draw('page');
            }
        });

        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 Código, Cedula, Mensajero, Sucursal, Fechas, Estado, Nombre</p></div>';
        $('#example2_filter').append(info);
        $('#btn-info-busqueda').on('click', function() {
            $('#menuBusqueda').toggle();
        });
    });

    // Paginacion inicial
    var URLactual = window.location.href;
    document.addEventListener('click', function(e) {
        if (e.target.closest('a')) {
            var href = e.target.closest('a').href || '';
            href = href.split('#')[0];
            if (URLactual != href) {
                localStorage.setItem("setPaginaActual", 0);
            }
        }
    }, false);
</script>
@endsection