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