107 lines
4.5 KiB
PHP
Executable File
107 lines
4.5 KiB
PHP
Executable File
<div class="app-content content">
|
|
<section class="content-wrapper">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<h3 class="font-weight-bold"><?=lang('Available Caregivers')?></h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="mt-0 mb-0" />
|
|
<div class="card-content collapse show">
|
|
<div class="card-body card-dashboard">
|
|
<div class="panel-body">
|
|
<div class="adv-table editable-table ">
|
|
<div class="space15"></div>
|
|
<table class="table table-striped table-bordered dom-jQuery-events" id="data_table_available_caregivers" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th><?=lang('No.')?></th>
|
|
<th><?=lang('Service Type')?></th>
|
|
<th><?=lang('Caregiver Name')?></th>
|
|
<th><?=lang('Email')?></th>
|
|
<th><?=lang('Phone')?></th>
|
|
<th><?=lang('Address (City, Zip)')?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
ajax_get_available_caregivers_overview({
|
|
'filter':'week'
|
|
});
|
|
});
|
|
function ajax_get_available_caregivers_overview(req){
|
|
try{
|
|
var dataTable=$('#data_table_available_caregivers').DataTable();
|
|
dataTable.destroy();
|
|
|
|
var table=$('#data_table_available_caregivers').DataTable({
|
|
responsive: true,
|
|
"processing": true,
|
|
"serverSide": true,
|
|
"searchable": true,
|
|
"ajax": {
|
|
url: "caregivers/get_available_caregivers_list",
|
|
type: 'POST',
|
|
data: {
|
|
'<?=$this->security->get_csrf_token_name()?>' : '<?=$this->security->get_csrf_hash()?>',
|
|
body:req
|
|
},
|
|
},
|
|
scroller: {
|
|
loadingIndicator: true
|
|
},
|
|
dom: "<'row'<'col-sm-5 data-table-pagelimit'l><'col-sm-6 data-table-search'f><'col-sm-1 text-center data-table-button-collection'B>>" +
|
|
"<'row'<'col-sm-12 data-table-body'tr>>" +
|
|
"<'row'<'col-sm-5 data-table-pagecountsummary'i><'col-sm-7 data-table-pagination'p>>",
|
|
buttons: [
|
|
{
|
|
extend: 'collection',
|
|
text: '...',
|
|
buttons: [
|
|
'copyHtml5',
|
|
'excelHtml5',
|
|
'csvHtml5',
|
|
'pdfHtml5',
|
|
{
|
|
extend: 'print',
|
|
exportOptions: {
|
|
columns: [0, 1, 2, 3, 4, 5, 6],
|
|
}
|
|
}
|
|
]
|
|
},
|
|
],
|
|
aLengthMenu: [
|
|
[10, 25, 50, 100,],
|
|
[10, 25, 50, 100]
|
|
],
|
|
iDisplayLength: 100,
|
|
"order": [[0, "desc"]],
|
|
"language": {
|
|
"lengthMenu": "_MENU_",
|
|
search: "_INPUT_",
|
|
"url": "common/assets/DataTables/languages/<?=$this->language?>.json"
|
|
}
|
|
});
|
|
table.buttons().container().appendTo('.custom_buttons');
|
|
}catch(error){
|
|
console.error(`Error occured in function ajax_get_available_caregivers_overview(); - ${error}`);
|
|
}
|
|
}
|
|
</script>
|