/home/mip/mip/app/Modules/Client/Views/applicants/index.blade.php
@extends('Client::layouts')
@section('page-body')
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            <i class="fa fa-{{$pageIcon ? $pageIcon : 'angle-double-right'}}" aria-hidden="true"></i> {{$pageTitle}}
            <br>
            <small>{{$pageDescription}}</small>
        </h1>
        <ol class="breadcrumb">
            <li class="active"><i class="fa fa-{{$pageIcon ? $pageIcon : 'angle-double-right'}}"></i> {{$pageTitle}}</li>           
        </ol>
    </section>
    <!-- Main content -->
    <section class="content"> 
        @include('Client::message')
        <div class="box box-default">
            <div class="box-header with-border">
            </div>
            <div class="box-body">
                <table class="table table-bordered table-striped table-hover" id="applicant-table" width="100%">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Job Title</th>
                            <th>Opening Date</th>
                            <th>Closing Date</th>
                            <th>Location</th>
                            <th>No. of Applicant(s)</th>
                        </tr>
                    </thead>
               </table>
            </div>                
        </div>
    </section>
@stop
@section('page-js')
<script type="text/javascript">
    $(document).ready(function() {
        var applicantTable = $('#applicant-table').DataTable({
            "processing": true,
            "serverSide": true,
            "pagingType": "input",
            ajax: {
                url: '{{ route(config('modules.client').'.applicants.datatables-index') }}', 
                type: 'POST',
            },
            columns: [
                {
                    width:'10px', searchable: false, orderable: false,
                    render: function (data, type, row, meta) {
                        return meta.row + meta.settings._iDisplayStart + 1;
                    }
                },
                { data: 'position', name: 'position' },
                { data: 'opening_date', name: 'opening_date', sortable: true, searchable: true},
                { data: 'closing_date', name: 'closing_date', sortable: true, searchable: true},
                { data: 'location', name: 'location', sortable: false, searchable: true},
                { data: 'applicants_count', name: 'applicants_count', sortable: true, searchable: false, className: 'text-center', width:'120px'},
            ],
            fnDrawCallback: function ( oSettings ) {         
            },
            "order": [[1, "desc"]],
        });
    });
</script>
@include('Client::notify')
@stop