%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/silvzytp/calling_code/resources/views/backend/super-admin/pages/system/roles/
Upload File :
Create Path :
Current File : //home/silvzytp/calling_code/resources/views/backend/super-admin/pages/system/roles/index.blade.php

@extends('layouts.backend')
@section('title', $siteTitle)

@push('styles')
    <style>
        .w-20{
            width: 28px !important;
            height: 28px !important;
            line-height: 21px !important
        }
    </style>
@endpush

@section('content')

    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body px-0">
                    <div class="table-responsive">
                        <table class="table table-sm table-borderless" id="role-datatables">
                            <thead>
                                <th>SL</th>
                                <th>Role Name</th>
                                <th>Slug</th>
                                <th>Permission</th>
                                <th>Created At</th>
                                <th class="text-center">Action</th>
                            </thead>
                            <tbody>

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection

@push('scripts')
<script>
    table = $('#role-datatables').DataTable({
        processing: true,
        serverSide: true,
        order: [], //Initial no order
        bInfo: true, //TO show the total number of data
        bFilter: false, //For datatable default search box show/hide
        responsive: false,
        ordering: false,
        lengthMenu: [
            [5, 10, 15, 25, 50, 100, -1],
            [5, 10, 15, 25, 50, 100, "All"]
        ],
        pageLength: 10, //number of data show per page
        ajax: {
            url: "{{ route(routeName().'.roles.index') }}",
            type: "GET",
            dataType: "JSON",
            data: function(d) {
                d._token = _token
            },
        },
        columns: [
            {data: 'DT_RowIndex',orderable: false, searchable: false},
            {data: 'name'},
            {data: 'slug'},
            {data: 'permission'},
            {data: 'date'},
            {data: 'action', orderable: false, searchable: false},
        ],
        language: {
            processing: '<img src="{{ asset("uploads/images/table-loading.svg") }}">',
            emptyTable: '<strong class="text-danger">No Data Found</strong>',
            infoEmpty: '',
            zeroRecords: '<strong class="text-danger">No Data Found</strong>',
            oPaginate: {
                sPrevious: "Previous", // This is the link to the previous page
                sNext: "Next", // This is the link to the next page
            },
            lengthMenu: "_MENU_"
        },
        dom: "<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6' <'float-right pr-15'B>>>" +
        "<'row'<'col-sm-12'tr>>" +
        "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'<'float-right pr-15'p>>>",
        buttons: {
            buttons: [
                {
                    extend: 'pdf',
                    filename: 'role_{{ date("d_m_d") }}',
                    title: 'Role List',
                    orientation: "portrait",
                    pageSize: "A4",
                    className: 'pdfButton btn btn-sm btn-primary',
                    exportOptions: {
                        columns: '0,1,2,3,4'
                    },
                },
                {
                    extend: 'excel',
                    filename: 'role_{{ date("d_m_d") }}',
                    title: 'Role List',
                    className: 'excelButton btn btn-sm btn-primary',
                    exportOptions: {
                        columns: '0,1,2,3,4'
                    },
                },
                {
                    extend: 'csv',
                    filename: 'role_{{ date("d_m_d") }}',
                    title: 'Role List',
                    className: 'csvButton btn btn-sm btn-primary',
                    exportOptions: {
                        columns: '0,1,2,3,4'
                    },
                },
                {
                    extend: 'print',
                    title: 'Role List',
                    orientation: "portrait",
                    pageSize: "A4",
                    className: 'printButton btn btn-sm btn-primary',
                    exportOptions: {
                        columns: '0,1,2,3,4'
                    },
                    customize: function ( win ) {
                        $(win.document.body)
                            .addClass('bg-white')
                            .css('font-size','10pt');

                        $(win.document.body).find('table')
                            .addClass('compact bg-white')
                            .css('font-size','inherit' );
                    }
                }
            ]
        }
    });

    // deletable btn
    $(document).on('click', 'button.confirm-deletable-action', function(){
        // modal data
        let data_id = $('#deletable-modal input.datatable').val();
        const url = "{{ route(routeName().'.roles.destroy') }}";

        deletable_action(data_id,url); // define function
    });
</script>
@endpush

Zerion Mini Shell 1.0