@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="#">Construction</a></li>
                <li><a href="#">Manage Construction Stock</a></li>
                <li><a href="#">Manage Stock</a></li>
                <li><a href="#">Return To Ajust Stock</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>Return To Ajust Stock List</h3>
                        </div>
                    </div>
                </div>
            </div>
            <div class="pull-right">
                @can('Construction-Return-To-Ajust-Stock-Create')
                <a class="button_sm button_primary" href="{{ route('construction.return_stock_create') }}"
                   data-toggle="modal"><span class="fa fa-plus"></span> Add New Return </a>
                @endcan
            </div>
        </div>
        <div class="box-body table-responsive">

            <table id="datatable_stock" class="table table-striped table-bordered table-hover nowrap">
                <thead>
                <tr>
                    <th>NO</th>
                    <th>Date</th>
                    <th>Project</th>
                    <th>Warehouse</th>
                    <th>Constructor</th>
                    <th>Action</th>
                </tr>
                </thead>
                <tbody>

                </tbody>
            </table>

        </div>
    </div>

@endsection
@section('js')
    <script type="text/javascript">
        $(document).ready(function()
        {
            $('#datatable_stock').DataTable({
                ordering: false,
                "serverSide": true,
                "scrollY":"600px",
                "scrollCollapse": true,
                "lengthMenu": [
                    [20, 25, 50, 100, 500],
                    [20, 25, 50, 100, 500]
                ],
                ajax: "{{ route('construction.ajust_stock_index') }}",
                columns: [
                    {data: 'DT_RowIndex'},
                    {data: 'date'},
                    {data: 'project_name'},
                    {data: 'warehouse_name'},
                    {data: 'constructor_name'},
                    {data: 'action'}
                ],
                "initComplete": function (settings, json) {
                    $('#main-spinner').hide();
                }
            });

            $.fn.dataTable.ext.errMode = 'throw';
        });
    </script>
@endsection