wip
This commit is contained in:
parent
8314e8c602
commit
8df96e9756
@ -10,7 +10,6 @@
|
||||
use Illuminate\Support\Str;
|
||||
use Yajra\DataTables\EloquentDataTable;
|
||||
use Yajra\DataTables\Html\Builder as HtmlBuilder;
|
||||
use Yajra\DataTables\Html\Button;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use Yajra\DataTables\Html\SearchPane;
|
||||
use Yajra\DataTables\Services\DataTable;
|
||||
@ -86,24 +85,20 @@ public function html(): HtmlBuilder
|
||||
'buttons' => [
|
||||
'searchPanes',
|
||||
'excel',
|
||||
'csv',
|
||||
'pdf',
|
||||
'print',
|
||||
'reset',
|
||||
'reload',
|
||||
// 'csv',
|
||||
// 'pdf',
|
||||
// 'print',
|
||||
// 'reset',
|
||||
// 'reload',
|
||||
],
|
||||
'order' => [
|
||||
[0, 'desc'],
|
||||
[8, 'desc'],
|
||||
],
|
||||
])
|
||||
->selectStyleSingle()
|
||||
->pageLength(25) // Set default page length to 10
|
||||
->lengthMenu([15, 25, 50, 100, 250]) // Custom page length options
|
||||
->buttons([
|
||||
Button::make('excel'),
|
||||
Button::make('csv'),
|
||||
Button::make('pdf'),
|
||||
Button::make('print'),
|
||||
Button::make('reset'),
|
||||
Button::make('reload'),
|
||||
]);
|
||||
->pageLength(25)
|
||||
->lengthMenu([15, 25, 50, 100, 250]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -112,7 +107,7 @@ public function html(): HtmlBuilder
|
||||
public function getColumns(): array
|
||||
{
|
||||
return [
|
||||
// Column::checkbox(''),
|
||||
Column::make('priority')->hidden(),
|
||||
Column::make('priority_icon')
|
||||
->searchable(false)
|
||||
->orderable(false)
|
||||
|
@ -28,13 +28,16 @@
|
||||
|
||||
@section('vendor-script')
|
||||
@vite([
|
||||
'resources/assets/vendor/libs/moment/moment.js',
|
||||
'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js'
|
||||
'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js',
|
||||
])
|
||||
@endsection
|
||||
|
||||
@section('page-script')
|
||||
{{ $dataTable->scripts(attributes: ['type' => 'module']) }}
|
||||
<script>
|
||||
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
||||
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
Loading…
Reference in New Issue
Block a user