65 lines
2.3 KiB
PHP
65 lines
2.3 KiB
PHP
@push('script')
|
|
<script>
|
|
$(document).ready(function () {
|
|
function load_job(params = []) {
|
|
$("table.table").DataTable().destroy()
|
|
$("table.table").DataTable({
|
|
"deferRender": true,
|
|
"responsive": true,
|
|
'serverSide': true,
|
|
'processing': true,
|
|
"ordering": false,
|
|
"ajax": {
|
|
"url": "{{ route('api.user.admingetowners') }}",
|
|
"type": "GET",
|
|
"data": {
|
|
"sort": "ASC"
|
|
},
|
|
"headers": {
|
|
"Authorization" : getAuthorization()
|
|
},
|
|
"dataSrc": "data"
|
|
},
|
|
"columns": [
|
|
{
|
|
data: null,
|
|
render: function (data, type, row, meta) {
|
|
return meta.row + meta.settings._iDisplayStart + 1 + '.';
|
|
}
|
|
},
|
|
{
|
|
data: null,
|
|
render: res => {
|
|
return `<img src="${res.profile.image}" width="75px" height="75px" style="border-radius: 200px;">`;
|
|
}
|
|
},
|
|
{
|
|
data: 'name'
|
|
},
|
|
{
|
|
data: 'email'
|
|
},
|
|
{
|
|
data: 'profile.phone'
|
|
},
|
|
{
|
|
data: 'profile.address'
|
|
},
|
|
{
|
|
data: 'profile.birthdate'
|
|
},
|
|
{
|
|
data: 'profile.gender'
|
|
},
|
|
{
|
|
data: 'profile.last_education'
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
load_job();
|
|
})
|
|
</script>
|
|
@endpush
|