/home/mip/mip/storage/framework/views/3292d379d87c466a5022927557af76f0.php
<?php $__env->startSection('page-body'); ?>
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<i class="fa fa-<?php echo e($pageIcon ? $pageIcon : 'angle-double-right'); ?>" aria-hidden="true"></i> <?php echo e($pageTitle); ?>
<br>
<small><?php echo e($pageDescription); ?></small>
</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-<?php echo e($pageIcon ? $pageIcon : 'angle-double-right'); ?>"></i> <?php echo e($pageTitle); ?></li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<?php echo $__env->make('Client::message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<div class="box box-default">
<div class="box-header with-border">
<div class="pull-left">
<form action="javascript:void(0)" id="job-filter" method="POST" class="form-inline" role="form">
<b>Filter: </b>
<div class="form-group">
<?php echo Form::text('position', null, ['placeholder' => 'Enter Position Title', 'class' => 'form-control', 'autocomplete' => 'off']); ?>
</div>
<div class="form-group">
<label class="sr-only" for="">Search Job</label>
<?php echo Form::select('status', $status, null, ['class' => 'form-control', 'placeholder'=>'All']); ?>
</div>
<button type="submit" class="btn btn-primary">Filter</button>
<button href="javascript:void(0)" class="btn btn-default" id="reset">Reset</button>
</form>
</div>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('create', $permissions)): ?>
<div class="pull-right">
<a href="<?php echo e(route(config('modules.client').'.job-opening.create')); ?>" class="btn btn-primary btn-flat"><i class="fa fa-plus-circle"></i> Add <?php echo e($pageModuleName); ?></a>
</div>
<?php endif; ?>
</div>
<div class="box-body">
<table class="table table-bordered table-striped table-hover" id="job-table" width="100%">
<thead>
<tr>
<th>#</th>
<th>Position Title</th>
<th>Opening Date</th>
<th>Closing Date</th>
<th>Location</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
</table>
</div>
</div>
<?php echo $__env->make('Client::job-opening.includes.job-opening-modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('Client::logs', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page-css'); ?>
<?php echo $__env->make('Client::job-opening.includes.css', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page-js'); ?>
<script type="text/javascript">
$(document).ready(function() {
var jobTable = $('#job-table').DataTable({
"processing": true,
"serverSide": true,
"pagingType": "input",
ajax: {
url: '<?php echo route(config('modules.client').'.job-opening.datatables-index'); ?>',
type: 'POST',
"data": function(d){
d.position = $('#job-filter [name="position"]').val();
d.status = $('#job-filter [name="status"]').val();
}
},
"dom": "<'row'<'col-sm-6'i><'col-sm-6 text-right'l>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'><'col-sm-7'p>>",
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', orderable: true, searchable: false},
{ data: 'closing_date', name: 'closing_date', orderable: true, searchable: false},
{ data: 'location', name: 'location', orderable: false, searchable: true},
{ data: 'status', name: 'status', orderable: false, searchable: false},
{ data: 'action', name: 'action', orderable: false, searchable: false, width:'60px', className:'text-center'},
],
fnDrawCallback: function ( oSettings ) {
$('[data-toggle="tooltip"]').tooltip();
jobTable.$("td").on("click", 'a#btn-delete', function() {
var action = $(this).data('action');
swal({
title: 'Are you sure you want to delete?',
text: "This will be permanently deleted",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function () {
$.ajax({
type: "DELETE",
url: action,
dataType: 'json',
success: function(data) {
if(data.type == "success") {
jobTable.draw();
swal(data.message, '', 'success')
}else{
swal(data.message, '', 'error')
}
},
error :function( jqXhr ) {
swal('Unable to delete.', 'Please try again.', 'error')
}
});
}).catch(swal.noop);
});
},
"order": [[1, "asc"]],
});
$('#job-filter').on('submit', function(){
jobTable.draw();
});
$('#reset').on('click', function(event) {
event.preventDefault();
$('#job-filter [name="position"]').val('');
$('#job-filter [name="status"]').val('');
jobTable.draw();
});
});
</script>
<?php echo $__env->make('Client::job-opening.includes.js', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('Client::notify', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('Client::layouts', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/mip/mip/app/Modules/Client/Views/job-opening/index.blade.php ENDPATH**/ ?>