<style>
    .table thead tr >th{
        background-color: #652d90;
        color:#fff;
    }
</style>
<div class="container-fluid container-fixed-lg bg-white">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div class="panel-title"><?php print CommonLanguage::getMessage('checkup_list'); ?></div>
            <div class="row">
                <div class="col-md-3">  
                    <input  type="hidden" name="Truck_ID" id="Truck_ID" class="full-width"/>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
        <div class="panel-body">
            <table class="table table-bordered table-hover demo-table-search" id="tableWithSearch" >
                <thead>
                    <tr>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('vehicle'); ?></th> 
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('vehicle_name'); ?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('check_out_date'); ?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('check_in'); ?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('check_in_date'); ?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('trip_distance'); ?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('fuel_consumption'); ?></th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
    </div>
</div>
<script>
    var KMLang = <?php echo json_encode(CommonLanguage::getMessage('km')); ?>,
        LLang = <?php echo json_encode(CommonLanguage::getMessage('L')); ?>;
        $(function () {
            build_select2($("#Truck_ID"), "xhr/truckSearch");
            RebuildDataTable($('.panel-heading .panel-title').html(), [0, 1,2,3,4,5], 'GarageAjax/getCheckupList',{vehicle_id:$('#Truck_ID').val()});
            $("#Truck_ID").on("change", function (e) {
                RebuildDataTable($('.panel-heading .panel-title').html(), [0, 1,2,3,4,5], 'GarageAjax/getCheckupList',{vehicle_id:$('#Truck_ID').val()});
            })
        });
</script>