 @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="#">Subcontract</a></li>
            <li><a href="#">List</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>Subcontract List</h3>
                        </div>
                    </div>
                    <div class="pull-right">
                        <a class="button_sm button_primary" href="{{route('construction-subcontract.create')}}"><span class="fa fa-plus"></span>  Create New</a>
                    </div>
                </div>
            </div>
        </div>
        <div class="box-body table-responsive">
                        
            <table id="datatable_subcontract" class="table table-striped table-bordered table-hover nowrap">
                <thead>
                    <tr>
                        <th>NO</th>
                        <th>Name</th>
                        <th>Phone</th>
                        <th>ID Card</th>
                        <th>Skill</th>
                        <th>Address</th>
                        <th>Description</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
                   
                </tbody>
            </table>

        </div>
    </div>
    @endsection
    @section('js')
    <script type="text/javascript">
            $(document).ready(function() {
                $('#main-spinner').show();
                $('#datatable_subcontract').DataTable({
                    ordering: false,
                    "serverSide": true,
                    "lengthMenu": [
                    [20, 25, 50, 100, 500],
                    [20, 25, 50, 100, 500]
                ],
                    ajax: "{{ route('data.subcontract') }}",
                    columns: [{
                        data: 'DT_RowIndex'
                    }, {
                        data: 'name'
                    }, {
                        data: 'phone'
                    }, {
                        data: 'id_card'
                    }
                    ,{
                        data:'skill'
                    }
                    , {
                        data: 'address'
                    }
                    ,{
                        data: 'description'
                    }
                    , {
                        data: 'action'
                    }, ],
                    "initComplete": function(settings, json) {
                        $('#main-spinner').hide();
                    }
                });

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