@extends('adminlte::page') @section('content')
<?php Fun::lang() ?>
<div class="title-page">
    <div class="page-bar">
        <ul class="page-breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
            <li><a href="#">Manage Stock</a></li>
            <li><a href="#">Item History</a></li>
        </ul>
    </div>
</div>
<div class="page">
    <div class="top-content">
        <div class="row">
            <div class="col-sm-12 col-xs-12">
                <div class="title-page">
                    <div class="pull-left">
                        <h3>Item Commission History</h3>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-12 col-xs-12">
            <div class="box-body table-responsive">
                <table id="datatable_item_commission" class="table table-striped table-bordered table-hover nowrap">
                    <thead>
                        <tr>
                            <th>NO</th>
                            <th>Project Name</th>
                            <th>Category Name</th>
                            <th>Group</th>
                            <th>Block</th>
                            <th>Item Name</th>
                            <th>Old Commission</th>
                            <th>Commission Update</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</div>
@endsection @section('js')

<script type="text/javascript">
    $(document).ready(function() {
        $('.main-spinner').show();
        $('#datatable_item_commission').DataTable({
            ordering: false,
            "serverSide": true,
            "lengthMenu": [
                [20, 30, 50, 100, -1],
                [20, 30, 50, 100, 'all']
            ],
            ajax: "{{ route('updated-commission-item-list') }}",
            columns: [{
                    data: 'DT_RowIndex'
                },
                {
                    data: 'project_name'
                },
                {
                    data: 'category_name'
                },
                {
                    data: 'group_name'
                },
                {
                    data: 'block_name'
                },
                {
                    data: 'item_name'
                },
                {
                    data: 'old_commission'
                },
                {
                    data: 'new_commission'
                }
            ]
        });
        $.fn.dataTable.ext.errMode = 'throw';
    });
</script>
@endsection